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.
 
 
 

1 lines
4.7 MiB

{"version":3,"sources":["fineui.ie.js","webpack:///webpack/bootstrap","webpack:///typescript/bundle.ts","webpack:///typescript/index.ts","webpack:///typescript/core/decorator/decorator.ts"],"names":["_classCallCheck","instance","Constructor","TypeError","e","o","t","r","exports","n","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","prototype","hasOwnProperty","p","s","iterator","constructor","Math","globalThis","window","self","Function","this","u","a","f","y","v","h","g","target","global","stat","noTargetGet","forced","undefined","sham","String","enforce","split","unsafe","source","join","toString","slice","WeakMap","type","b","has","set","x","getterFor","arguments","length","configurable","writable","push","version","mode","copyright","style","display","appendChild","src","contentWindow","document","open","write","close","F","promise","resolve","reject","getOwnPropertyDescriptor","min","ceil","floor","isNaN","apply","getPrototypeOf","stopped","result","next","done","stop","error","propertyIsEnumerable","1","valueOf","createElement","random","concat","getOwnPropertyNames","getOwnPropertySymbols","keys","indexOf","includes","normalize","replace","toLowerCase","data","NATIVE","POLYFILL","Array","isArray","S","O","j","w","P","forEach","map","filter","some","every","find","findIndex","callee","charCodeAt","charAt","codeAt","E","IteratorPrototype","A","BUGGY_SAFARI_ITERATORS","T","L","M","k","entries","name","values","proto","setPrototypeOf","Promise","location","setImmediate","clearImmediate","process","MessageChannel","Dispatch","postMessage","protocol","host","nextTick","now","test","port2","port1","onmessage","addEventListener","importScripts","removeChild","setTimeout","clear","allSettled","then","status","reason","RegExp","exec","lastIndex","index","max","defineProperties","assign","I","_","C","R","N","D","G","V","$","z","H","W","q","B","JSON","U","stringify","Y","J","K","Q","X","Z","tt","nt","et","rt","QObject","ot","findChild","it","ut","tag","description","ct","st","ft","yt","at","lt","pt","wrap","for","keyFor","useSetter","useSimple","string","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","kind","Arguments","fetch","versions","v8","createEvent","dispatchEvent","PromiseRejectionEvent","all","notified","reactions","state","ok","fail","domain","rejection","enter","exit","initEvent","emit","parent","catch","race","return","from","MutationObserver","WebKitMutationObserver","fn","createTextNode","observe","characterData","console","real","finally","Error","errors","message","AggregateError","try","any","unicode","groups","ignoreCase","multiline","dotAll","sticky","_global","BI","prepares","searchElement","fromIndex","len","abs","lastIndexOf","Number","log","warn","debug","info","time","dir","profile","exception","trace","assert","localStorage","items","setItem","Cache","addCookie","getItem","getCookie","removeItem","deleteCookie","key","falsy","skipArray","__ob__","$accessors","$vbthis","$vbsetter","arg","Date","Set","match","add","ua","navigator","userAgent","reg","_sort","sort","tmp","func","thisArg","args","arrayAggregator","array","setter","iteratee","accumulator","arrayEach","arrayEvery","predicate","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","arrayPush","offset","arrayReduce","initAccum","arraySome","asciiToArray","baseFindKey","collection","eachFunc","baseFindIndex","fromRight","strictIndexOf","baseIsNaN","baseProperty","object","basePropertyOf","baseReduce","baseSortBy","comparer","baseTimes","baseUnary","baseValues","props","cacheHas","cache","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","getValue","hasUnicode","reHasUnicode","iteratorToArray","mapToArray","size","overArg","transform","replaceHolders","PLACEHOLDER","safeGet","setToArray","stringSize","unicodeSize","asciiSize","stringToArray","unicodeToArray","reUnicode","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","MAX_ARRAY_LENGTH","__views__","lazyClone","copyArray","lazyReverse","clone","lazyValue","isArr","isRight","arrLength","view","getView","start","end","iteratees","iterLength","takeCount","nativeMin","baseWrapperValue","outer","iterIndex","computed","LAZY_MAP_FLAG","LAZY_FILTER_FLAG","Hash","entry","hashClear","__data__","nativeCreate","hashDelete","hashGet","HASH_UNDEFINED","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","pop","splice","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","hash","Map","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","copyObject","baseAssignIn","keysIn","baseAt","paths","skip","baseClamp","number","lower","upper","baseClone","bitmask","customizer","stack","isDeep","CLONE_DEEP_FLAG","isFlat","CLONE_FLAT_FLAG","isFull","CLONE_SYMBOLS_FLAG","isObject","initCloneArray","getTag","isFunc","funcTag","genTag","cloneBuffer","objectTag","argsTag","initCloneObject","copySymbolsIn","copySymbols","cloneableTags","initCloneByTag","stacked","isSet","subValue","isMap","keysFunc","getAllKeysIn","getAllKeys","baseDelay","wait","FUNC_ERROR_TEXT","baseDifference","isCommon","valuesLength","valuesIndex","baseEvery","baseExtremum","current","isSymbol","baseFilter","baseFlatten","depth","isStrict","isFlattenable","baseForOwn","baseFor","baseForOwnRight","baseForRight","baseFunctions","isFunction","baseGet","path","castPath","toKey","baseGetAllKeys","symbolsFunc","baseGetTag","undefinedTag","nullTag","symToStringTag","getRawTag","objectToString","baseGt","other","baseHas","baseHasIn","baseIntersection","arrays","othLength","othIndex","caches","maxLength","Infinity","seen","baseInverter","baseInvoke","last","baseIsArguments","baseIsDate","dateTag","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","arrayTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","COMPARE_PARTIAL_FLAG","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsMap","mapTag","baseIsMatch","matchData","noCustomizer","srcValue","COMPARE_UNORDERED_FLAG","baseIsNative","isMasked","pattern","reIsNative","reIsHostCtor","toSource","baseIsRegExp","regexpTag","baseIsSet","setTag","baseIsTypedArray","isLength","typedArrayTags","baseIteratee","identity","baseMatchesProperty","baseMatches","property","baseKeys","isPrototype","nativeKeys","baseKeysIn","nativeKeysIn","isProto","baseLt","baseMap","isArrayLike","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","newValue","mergeFunc","isTyped","isArrayLikeObject","cloneTypedArray","isPlainObject","toPlainObject","baseOrderBy","orders","criteria","compareMultiple","basePick","basePickBy","baseSet","basePropertyDeep","baseRandom","nativeFloor","nativeRandom","baseRange","step","nativeMax","nativeCeil","baseRest","setToString","overRest","nested","baseSlice","baseSome","baseToString","symbolToString","INFINITY","baseUniq","createSet","seenIndex","baseUnset","actions","action","baseZipObject","assignFunc","valsLength","castArrayLikeObject","stringToPath","castSlice","buffer","allocUnsafe","copy","cloneArrayBuffer","arrayBuffer","byteLength","Uint8Array","cloneDataView","dataView","byteOffset","cloneRegExp","regexp","reFlags","cloneSymbol","symbol","symbolValueOf","typedArray","compareAscending","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","objCriteria","othCriteria","ordersLength","order","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","getSymbols","getSymbolsIn","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","createBaseEach","iterable","createBaseFor","createBind","wrapper","root","Ctor","isBind","WRAP_BIND_FLAG","createCtor","thisBinding","baseCreate","createCurry","arity","getHolder","createRecurry","createHybrid","createFind","findIndexFunc","partialsRight","holdersRight","argPos","ary","holdersCount","newHolders","isBindKey","reorder","isFlip","reverse","isAry","WRAP_ARY_FLAG","WRAP_BIND_KEY_FLAG","WRAP_CURRY_FLAG","WRAP_CURRY_RIGHT_FLAG","WRAP_FLIP_FLAG","createInverter","toIteratee","createPartial","createRange","toFinite","wrapFunc","isCurry","newHoldersRight","newPartials","newPartialsRight","WRAP_PARTIAL_FLAG","WRAP_PARTIAL_RIGHT_FLAG","WRAP_CURRY_BOUND_FLAG","newData","isLaziable","setData","setWrapToString","createWrap","toInteger","getData","mergeData","baseSetData","customDefaultsMerge","customOmitClone","isPartial","arrValue","othValue","compared","dataViewTag","arrayBufferTag","boolTag","numberTag","errorTag","stringTag","convert","symbolTag","objProps","objLength","othProps","skipCtor","objCtor","othCtor","flatRest","flatten","getFuncName","realNames","otherFunc","isKeyable","getNative","isOwn","unmasked","nativeObjectToString","transforms","getWrapDetails","reWrapDetails","reSplitDetails","hasPath","hasFunc","input","getPrototype","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","insertWrapDetails","details","reWrapComment","spreadableSymbol","MAX_SAFE_INTEGER","reIsUint","reIsPlainProp","reIsDeepProp","funcName","maskSrcKey","objectProto","memoizeCapped","memoize","MAX_MEMOIZE_SIZE","srcBitmask","newBitmask","isCombo","WRAP_REARG_FLAG","otherArgs","indexes","oldArray","reference","updateWrapDetails","shortOut","count","lastCalled","stamp","nativeNow","remaining","HOT_SPAN","HOT_COUNT","funcToString","wrapFlags","pair","compact","drop","findLastIndex","flattenDeep","head","initial","nativeReverse","take","takeRight","uniq","uniqBy","unzip","group","zipObject","chain","tap","interceptor","thru","wrapperChain","wrapperCommit","wrapperNext","toArray","wrapperToIterator","wrapperPlant","previous","wrapperReverse","wrapped","wrapperValue","reduce","negate","isString","before","debounce","options","invokeFunc","lastArgs","lastThis","lastInvokeTime","leadingEdge","timerId","timerExpired","leading","remainingWait","timeSinceLastCall","lastCallTime","timeSinceLastInvoke","timeWaiting","maxing","maxWait","shouldInvoke","trailingEdge","trailing","cancel","clearTimeout","flush","debounced","isInvoking","toNumber","resolver","memoized","once","rest","throttle","cloneDeep","isBoolean","isEmpty","isEqual","isFinite","nativeIsFinite","asyncTag","proxyTag","isNumber","isNull","objectCtorString","isUndefined","symIterator","sign","MAX_INTEGER","remainder","NAN","reTrim","isBinary","reIsBinary","reIsOctal","freeParseInt","reIsBadHex","properties","findKey","findLastKey","defaultValue","omitBy","pickBy","prop","clamp","floating","temp","rand","freeParseFloat","escape","reHasUnescapedHtml","reUnescapedHtml","escapeHtmlChar","trim","chars","constant","matches","mixin","methodNames","methodName","noConflict","oldDash","noop","stubArray","stubFalse","uniqueId","prefix","id","idCounter","VERSION","LAZY_WHILE_FLAG","promiseTag","weakMapTag","rePropName","reRegExpChar","reEscapeChar","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsZWJ","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","htmlEscapes","&","<",">","\"","'","parseFloat","parseInt","freeGlobal","freeSelf","freeExports","nodeType","freeModule","module","moduleExports","freeProcess","nodeUtil","binding","nodeIsDate","isDate","nodeIsMap","nodeIsRegExp","isRegExp","nodeIsSet","nodeIsTypedArray","arrayProto","funcProto","coreJsData","uid","IE_PROTO","Buffer","objectCreate","isConcatSpreadable","nativeGetSymbols","nativeIsBuffer","DataView","metaMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","baseSetToString","ArrayBuffer","ctorString","quote","subString","difference","intersection","mapped","union","without","zip","wrapperAt","countBy","groupBy","sortBy","defer","delay","assignIn","defaults","propsIndex","propsLength","defaultsDeep","mergeWith","invert","invertBy","merge","omit","pick","range","extend","each","first","isFilter","getIteratee","takeName","dropName","findLast","invokeMap","dropRight","takeRightWhile","takeWhile","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","names","define","amd","traverse","context","obj","_apply","_applyFunc","is","deepContains","UUID","str","isWidget","widget","Widget","View","createWidgets","item","createWidget","deepClone","createItems","innerAttr","outerAttr","makeArray","shift","el","packageItems","layouts","formatEL","stripEL","trans2Element","widgets","wi","element","to","inverse","firstKey","res","lastKey","firstObject","lastObject","obj1","obj2","backEach","backAny","backEvery","backFindKey","backFind","remove","contains","removeAt","string2Array","array2String","abc2Int","idx","toUpperCase","int2Abc","num","DIGITS","makeObject","makeArrayByArray","isSorted","inherit","sb","sp","overrides","spp","superclass","init","initialized","freeze","isCapitalEqual","isWidthOrHeight","isNotNull","isEmptyArray","arr","isNotEmptyArray","isEmptyObject","isNotEmptyObject","isEmptyString","isNotEmptyString","isWindow","deepExtend","isDeepMatch","attrs","deepIndexOf","deepRemove","deepWithout","deepUnique","deepDiff","used","nextTickHandler","pending","copies","callbacks","timerFunc","counter","observer","textNode","queueNextTick","cb","_resolve","getTime","performance","webkitNow","getDate","radix","parseSafeInt","isNaturalNumber","isPositiveInteger","isNegativeInteger","isInteger","isNumeric","isFloat","isOdd","isEven","sum","average","toLocaleUpperCase","toLocaleLowerCase","isEndWithBlank","isLiteral","exp","literalValueRE","stripQuotes","camelize","character","hyphenate","encrypt","text","CRYPT_TYPE","AES","aesEncrypt","leftPad","val","ch","format","isLeapYear","year","checkDateVoid","YY","MM","DD","minDate","maxDate","back","checkDateLegal","ar","MD","_MD","parseDateTime","fmt","today","yearlength","otherlength","substring","hr","sec","_MN","substr","getFullYear","getMonth","getHours","getMinutes","getSeconds","search","dt","timeZone","localTime","localOffset","getTimezoneOffset","utc","OB","config","_constructor","destroyed","_initProps","_init","_initRef","_defaultConfig","_initListeners","listeners","lis","eventName","ref","_purgeRef","_getEvents","events","on","fns","proxy","un","newFns","ifn","purgeListeners","fireEvent","destroy","tagName","attributes","disabled","invisible","invalid","baseCls","extraCls","cls","css","beforeInit","beforeCreate","created","render","beforeMount","mounted","shouldUpdate","update","beforeDestroy","_initRoot","_initElementWidth","_initElementHeight","_initVisual","_initState","_initRender","__asking","_render","__async","_initElement","_initEffects","widgetName","_isRoot","_parent","addWidget","_renderEngine","_isWidget","_baseCls","addClass","attr","_children","width","height","setEnable","setValid","_isMounted","els","_mount","_setParent","force","deep","lifeHook","isVisible","_mountChildren","isEnabled","_setEnable","isValid","_setValid","Events","MOUNT","isMounted","setWidth","setHeight","enable","child","_manualSetEnable","valid","_manualSetValid","_setVisible","visible","removeClass","setVisible","VIEW","doBehavior","getWidth","getHeight","getName","DESTROY","getWidgetByName","removeWidget","nameOrWidget","hasWidget","getText","setText","setValue","disable","__d","_unMount","UNMOUNT","isolate","DOM","hang","empty","_destroy","registerRenderEngine","engine","createFragment","createDocumentFragment","mount","container","hydrate","ws","patchProps","children","triggerLifeHook","append","kv","shortcut","component","xtype","getWidget","getObject","CryptoJS","C_lib","lib","Base","subtype","mixIn","$super","propertyName","WordArray","words","sigBytes","encoder","Hex","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","thatByte","nBytes","C_enc","enc","hexChars","bite","parse","hexStr","hexStrLength","Latin1","latin1Chars","fromCharCode","latin1Str","latin1StrLength","Utf8","decodeURIComponent","utf8Str","unescape","encodeURIComponent","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","_process","doFlush","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","_minBufferSize","nWordsReady","nBytesReady","_doProcessBlock","processedWords","Hasher","cfg","_doReset","messageUpdate","finalize","_doFinalize","_createHelper","hasher","_createHmacHelper","C_algo","HMAC","algo","Base64","_map","base64Chars","byte1","byte2","byte3","triplet","paddingChar","base64Str","base64StrLength","paddingIndex","bits1","bits2","FF","GG","HH","II","sin","MD5","_hash","offset_i","M_offset_i","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","nBitsTotal","nBitsLeft","nBitsTotalH","nBitsTotalL","H_i","HmacMD5","EvpKDF","keySize","iterations","compute","password","salt","derivedKey","derivedKeyWords","block","Cipher","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","xformMode","_xformMode","_key","dataUpdate","finalProcessedData","ivSize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","decrypt","ciphertext","StreamCipher","finalProcessedBlocks","C_mode","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","xorBlock","_prevBlock","processBlock","encryptBlock","thisBlock","decryptBlock","C_pad","pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","padding","unpad","BlockCipher","modeCreator","_mode","CipherParams","cipherParams","formatter","C_format","OpenSSLFormatter","OpenSSL","openSSLStr","ciphertextWords","encryptor","cipherCfg","algorithm","_parse","plaintext","C_kdf","kdf","OpenSSLKdf","execute","derivedParams","ECB","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","x2","x4","x8","RCON","keyWords","nRounds","_nRounds","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","_doCryptBlock","s0","s1","s2","s3","round","t0","t1","t2","t3","base64Cipher","aspect","advice","exist","dispatcher","beforeArr","rs","method","afterArr","after","ii","aspectArr","_index","_keyStr","_utf8_encode","utftext","_utf8_decode","c3","c2","encode","output","chr1","chr2","chr3","enc1","enc2","enc3","enc4","decode","_prefix","setUsername","username","getUsername","_getKeyPrefix","_generateKey","expiresHours","cookieString","date","setTime","toUTCString","cookie","CellSizeAndPositionManager","cellCount","cellSizeGetter","estimatedCellSize","_cellSizeGetter","_cellCount","_estimatedCellSize","_cellSizeAndPositionData","_lastMeasuredIndex","configure","getCellCount","getEstimatedCellSize","getLastMeasuredIndex","getSizeAndPositionOfCell","lastMeasuredCellSizeAndPosition","getSizeAndPositionOfLastMeasuredCell","getTotalSize","getUpdatedOffsetForIndex","align","containerSize","currentOffset","targetIndex","datum","maxOffset","minOffset","idealOffset","totalSize","getVisibleCellRange","_findNearestCell","resetCell","_binarySearch","high","low","middle","_exponentialSearch","interval","lastMeasuredIndex","ScalingCellSizeAndPositionManager","maxScrollSize","_cellSizeAndPositionManager","_maxScrollSize","getOffsetAdjustment","safeTotalSize","offsetPercentage","_getOffsetPercentage","_safeOffsetToOffset","_offsetToSafeOffset","_ChineseFirstPY","oMultiDiff","19969","19975","19988","20048","20056","20060","20094","20127","20167","20193","20250","20256","20282","20285","20291","20314","20315","20340","20375","20389","20391","20415","20446","20447","20504","20608","20854","20857","20911","20985","21032","21048","21049","21089","21119","21242","21273","21305","21306","21330","21333","21345","21378","21397","21414","21442","21477","21480","21484","21494","21505","21512","21523","21537","21542","21549","21571","21574","21588","21589","21618","21621","21632","21654","21679","21683","21710","21719","21734","21769","21780","21804","21834","21899","21903","21908","21939","21956","21964","21970","22003","22031","22040","22060","22066","22079","22129","22179","22237","22244","22280","22300","22313","22331","22343","22351","22395","22412","22484","22500","22534","22549","22561","22612","22771","22831","22841","22855","22865","23013","23081","23487","23558","23561","23586","23614","23615","23631","23646","23663","23673","23762","23769","23780","23884","24055","24113","24162","24191","24273","24324","24377","24378","24439","24554","24683","24694","24733","24925","25094","25100","25103","25153","25170","25179","25203","25240","25282","25303","25324","25341","25373","25375","25384","25457","25528","25530","25552","25774","25874","26044","26080","26292","26333","26355","26366","26397","26399","26415","26451","26526","26552","26561","26588","26597","26629","26638","26646","26653","26657","26727","26894","26937","26946","26999","27099","27449","27481","27542","27663","27748","27784","27788","27795","27812","27850","27852","27895","27898","27973","27981","27986","27994","28044","28065","28177","28267","28291","28337","28463","28548","28601","28689","28805","28820","28846","28952","28975","29100","29325","29575","29602","30010","30044","30058","30091","30111","30229","30427","30465","30631","30655","30684","30707","30729","30796","30917","31074","31085","31109","31181","31192","31293","31400","31584","31896","31909","31995","32321","32327","32418","32420","32421","32438","32473","32488","32521","32527","32562","32564","32735","32793","33071","33098","33100","33152","33261","33324","33333","33406","33426","33432","33445","33486","33493","33507","33540","33544","33564","33617","33632","33636","33637","33694","33705","33728","33882","34067","34074","34121","34255","34259","34425","34430","34485","34503","34532","34552","34558","34593","34660","34892","34928","34999","35048","35059","35098","35203","35265","35299","35782","35828","35830","35843","35895","35977","36158","36228","36426","36466","36710","36711","36767","36866","36951","37034","37063","37218","37325","38063","38079","38085","38107","38116","38123","38224","38241","38271","38415","38426","38461","38463","38466","38477","38518","38551","38585","38704","38739","38761","38808","39048","39049","39052","39076","39271","39534","39552","39584","39647","39730","39748","40109","40479","40516","40536","40583","40765","40784","40840","40863","_checkPYCh","uni","_mkPYRslt","ignoreMulti","splitChar","arrRslt","multiLen","strlen","tmpStr","tmpArr","makeFirstPY","arrResult","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","oCancelAnimationFrame","msCancelAnimationFrame","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","MouseMoveTracker","onMove","onMoveEnd","domNode","_isDragging","_animationFrameID","_domNode","_onMove","_onMoveEnd","_onMouseMove","_onMouseUp","_didMouseMove","captureMouseMoves","event","_eventMoveToken","_eventUpToken","EventListener","listen","_deltaX","_deltaY","_x","clientX","_y","clientY","preventDefault","returnValue","releaseMouseMoves","isDragging","normalizeWheel","sX","sY","pX","pY","detail","wheelDelta","wheelDeltaY","wheelDeltaX","axis","HORIZONTAL_AXIS","PIXEL_STEP","deltaY","deltaX","deltaMode","LINE_HEIGHT","PAGE_HEIGHT","spinX","spinY","pixelX","pixelY","WheelHandler","onWheel","handleScrollX","handleScrollY","stopPropagation","_didWheel","_handleScrollX","_handleScrollY","_stopPropagation","_onWheelCallback","normalizedEvent","changed","cancelBubble","defaultComparator","Heap","_items","_size","_comparator","_heapify","elt","lastElt","_sinkDown","_bubbleUp","peek","parentIndex","parentElt","leftChildIndex","rightChildIndex","swapIndex","leftChild","rightChild","LinkHashMap","scope","re","LRU","limit","tail","_keymap","put","removed","newer","older","returnEntry","node","Int32Array","xs","ceilLog2","PrefixIntervalTree","_half","_heap","getSize","sumUntil","sumTo","inclusiveEnd","begin","greatestLowerBound","leftSum","greatestStrictLowerBound","leastUpperBound","leastStrictUpperBound","uniform","initialValue","Queue","capacity","getElementByIndex","unshift","fromArray","Section","_indexMap","_indices","addCellIndex","getCellIndices","SECTION_SIZE","SectionManager","sectionSize","_sectionSize","_cellMetadata","_sections","indices","getSections","section","getCellMetadata","sectionXStart","sectionXStop","sectionYStart","sectionYStop","sections","sectionX","sectionY","getTotalSectionCount","registerCell","cellMetadatum","Tree","Node","addNode","newNode","addChild","isRoot","getRoot","initTree","nodes","queue","_toJSON","getChildren","toJSON","_toJSONWithNode","toJSONWithNode","param","_traverse","callback","_recursion","route","recursion","inOrderTraverse","_inOrderTraverse","getLeft","getRight","nrInOrderTraverse","preOrderTraverse","_preOrderTraverse","nrPreOrderTraverse","postOrderTraverse","_postOrderTraverse","nrPostOrderTraverse","preNode","isLeaf","getChildrenLength","getFirstChild","getLastChild","setLeft","left","setRight","right","setParent","getParent","getChild","getChildIndex","removeChildByIndex","behind","removeAllChilds","cur","equals","transformToArrayFormat","pId","newNodes","arrayFormat","transformToTreeFormat","sNodes","tmpMap","treeFormat","traversal","Vector","cross","sqrt","Region","isIntersects","isPointInside","vector1","vector2","vector3","getPosition","pos","BehaviorFactory","createBehavior","behavior","HighlightBehavior","RedMarkBehavior","Behavior","rule","Layout","scrollable","scrollx","scrolly","_init4Margin","_init4Scroll","top","bottom","overflow-x","overflow-y","appendFragment","frag","hasChild","_getChildName","_addElement","removeItemAt","_getOptions","_compare","item1","item2","aStack","bStack","className","areArrays","_getWrapper","_addItemAt","_removeItemAt","addItem","addItemAt","prependItem","prependTo","deleted","newItems","newChildren","shouldUpdateItem","updateItemAt","updated","del","addItems","fragment","added","prependItems","prepend","patchItem","oldVnode","vnode","updateChildren","oldCh","newCh","sameVnode","vnode1","vnode2","oldIndex","newIndex","opt","addVnodes","vnodes","startIdx","endIdx","insertBefore","removeVnodes","insert","isNext","insertKey","beforeKey","findOldVnode","vNode","beginIdx","found","oldStartIdx","newStartIdx","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","sameOldVnode","stroke","removeIndex","populate","resize","_WidgetsPlugin","_ObjectPlugin","_ConfigPlugin","_GlobalWidgetConfigFn","_GlobalObjectConfigFn","widgetConfigFn","objectConfigFn","configWidget","registerWidget","relieveWidget","registerObject","relieveObject","Action","tar","actionPerformed","actionBack","ActionFactory","createAction","ShowAction","isInvalidDate","_eFormat","eFormat","neg","magnitudeNeg","magnitude","pow","integerLen","getInteger","precision","getPrecision","isValueCarry","isValueCarried","toFixed","formatExponential","isAllZero","formatLeft","valueLeftLen","roundNum","_dealNumberPrecision","fright","_numberFormat","numMod","fp","fleft","tp","tleft","tright","paddingZero","_dealWithRight","leftPlus","_dealWithLeft","rll","numReg","orilen","newnum","combo","com","tll","newstr","lres","cjkEncode","newText","code","cjkDecode","rightIdx","subText","eval","SPECIAL_TAGS"," ","htmlEncode","replaceAll","htmlDecode","cjkEncodeDO","jsonEncode","useHasOwn","\b","\t","\n","\f","\r","\\","encodeString","encodeArray","__time__","jsonDecode","_hasDateInJson","json","jo","parseJSON","getEncodeURL","urlTemplate","ori","url","specialCharsMap","reserveSpecialCharsMap","initialChar","encodeChar","contentFormat","cv","needTrim","date2Str","parseFmt","str2Date","compileJFmt","jfmt","_DN","getDay","hour","getTimezone","flagch","char","object2Number","object2Date","object2Time","doBe","run","doHighLight","unHighLight","Single","doRedMark","unRedMark","Controller","EVENT_CHANGE","BroadcastController","_broadcasts","send","BubblesController","_const","bubbleHeight","bubblesManager","storeBubbles","Resizers","_createBubble","direct","level","direction","_getOffsetLeft","offsetStyle","bounds","_getOffsetTop","_getLeftPosition","position","getLeftPosition","_getBottomPosition","getBottomPosition","_getTopPosition","getTopPosition","_getRightPosition","getRightPosition","show","adjustYOffset","adjustXOffset","isTopSpaceEnough","isLeftSpaceEnough","isRightSpaceEnough","hide","bubble","LayerController","layerManager","zindex","zIndex_layer","_resize","layer","trigger","make","op","layout","outerWidth","outerHeight","_getLayout","removeAll","MaskersController","zIndex_masker","PopoverController","modal","floatManager","floatLayer","floatContainer","floatOpened","zIndex_popover","zindexMap","_check","popover","Popover","EVENT_CLOSE","__hasZIndexMask__","__releaseZIndexMask__","__buildZIndexMask__","setZindex","ResizeController","resizerManger","ev","resizer","TooltipsController","tooltipsManager","showingTips","_createTooltip","stopEvent","tooltip","tip","belowMouse","scrollHeight","pageX","pageY","bodyHeight","hover","KEYDOWN","BACKSPACE","SPACE","ENTER","CONFIRM","ERROR","PAUSE","CLEAR","ADD","EDITING","EMPTY","RESIZE","BEFOREEDIT","AFTEREDIT","STARTEDIT","STOPEDIT","CHANGE","EXPAND","COLLAPSE","CALLBACK","CLICK","STATECHANGE","BEFORESTATECHANGE","INIT","AFTERINIT","SCROLL","STARTLOAD","AFTERLOAD","BS","AS","SC","SF","SS","BVW","AVW","AV","BW","AW","WS","WF","BA","AA","BD","AD","UC","BTOPDF","ATOPDF","BTOEXCEL","ATOEXCEL","BTOWORD","ATOWORD","BTOIMAGE","ATOIMAGE","BTOHTML","ATOHTML","BIMEXCEL","AIMEXCEL","BPDFPRINT","APDFPRINT","BFLASHPRINT","AFLASHPRINT","BAPPLETPRINT","AAPPLETPRINT","BSEVERPRINT","ASERVERPRINT","BEMAIL","AEMAIL","pushArray","sArray","pushDistinct","pushDistinctArray","i18nText","_SDN","_FD","_SMN","_QN","_OFFSET","SECOND","MINUTE","HOUR","DAY","WEEK","getMonthDays","month","getLastDateOfMonth","getDayOfYear","getWeekNumber","week","startOfWeek","StartOfWeek","middleDay","offsetWeekStartCount","offsetWeekMiddleCount","setDate","ms","setMonth","getQuarter","getOffsetDate","getOffsetQuarter","day","monthDay","getQuarterStartMonth","quarterStartMonth","nowMonth","getQuarterStartDate","getQuarterEndDate","quarterEndMonth","getOffsetMonth","getWeekStartDate","getWeekEndDate","print","yWith4number","wn","qr","pm","ir","dy","isKhtml","par","Func","createDistinctName","getGBWidth","getSearchResult","keyword","py","matched","pidx","beforeFunc","sFunc","__self","afterFunc","ret","accAdd","arg1","arg2","r1","r2","cm","sub","accSub","mul","accMul","div","digitLength","eSplit","float2Fixed","dLen","times","num1","num2","others","_i","num1Changed","num2Changed","baseNum","leftValue","accDivide","startWith","startTag","endWith","endTag","getQuery","appendQuery","paras","perfectStart","allIndexOf","loc","i18nStore","addI18n","i18n","localeText","moduleInjection","constantInjection","modelInjection","model","storeInjection","store","serviceInjection","service","providerInjection","provider","configFunctions","configFn","providers","globalAction","actionFn","points","point","pointFn","Modules","getModule","getAllModules","Constants","getConstant","callPoint","inst","bfns","afns","Models","getModel","stores","Stores","getStore","services","Services","getService","providerInstance","Providers","getProvider","$get","Actions","runAction","act","runGlobalAction","getContext","ShowListener","eventObj","cardLayout","cardNameCreator","cardCreator","emptyFn","afterCardCreated","afterCardShow","ob","cardName","isCardExisted","card","addCardByName","showCardByName","StyleLoaderManager","stylesManager","loadStyle","styleString","styles","getElementsByTagName","setAttribute","styleSheet","cssText","removeStyle","parentNode","Logic","createLogic","LogicFactory","Type","Vertical","Horizontal","Table","HorizontalFill","logic","VerticalLayoutLogic","HorizontalLayoutLogic","TableLayoutLogic","HorizontalFillLayoutLogic","createLogicTypeByDirection","Direction","Top","Bottom","Custom","Left","Right","createLogicItemsByDirection","dynamic","hgap","vgap","lgap","rgap","tgap","bgap","columns","rows","columnSize","rowSize","_isSupportFlex","isSupportFlex","isSupportCss3","isIE","supportFlex","isLessIE8","getIEVersion","verticalAlign","VerticalAlign","Middle","horizontalAlign","HorizontalAlign","Center","justOneItem","attachEvent","stylesCreated","requestFrame","raf","cancelFrame","resetTriggers","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","offsetWidth","offsetHeight","checkTriggers","__resizeLast__","scrollListener","__resizeRAF__","__resizeListeners__","animation","animationstring","keyframeprefix","animationstartevent","domPrefixes","startEvents","pfx","elm","animationName","animationKeyframes","animationStyle","createStyles","addResizeListener","getComputedStyle","innerHTML","removeResizeListener","detachEvent","removeEventListener","ResizeDetector","ready","fromElement","toElement","elemData","jQuery","eventKey","handler","namespace","fromChildren","toChildren","doms","dom","isExist","preloadImages","srcArray","onload","complete","images","Image","onerror","getTextSizeWidth","fontSize","span","appendTo","getTextSizeHeight","getScrollWidth","_scrollWidth","ul","overflow","clientWidth","getImage","fillStyle","backgroundColor","canvas","ratio","ctx","font","measureText","textBaseline","fillText","backColor","toDataURL","isColor","color","isRGBColor","isHexColor","isDarkColor","hex","rgb","rgb2json","hex2rgb","grayLevel","getContrastColor","rgb2hex","rgbColour","rgbValues","red","green","blue","hexColour","int2hex","rgba2json","json2rgb","json2rgba","rgba","strNum","hexdig","tempValue","colorArray","rgba2rgb","rgbColor","bgColor","popup","extraWidth","getInnerLeftPosition","getInnerRightPosition","viewBounds","extraHeight","isInnerLeftSpaceEnough","windowBounds","isInnerRightSpaceEnough","isBottomSpaceEnough","isRightSpaceLarger","isBottomSpaceLarger","getLeftAlignPosition","getLeftAdaptPosition","getRightAlignPosition","comboBounds","getRightAdaptPosition","getTopAlignPosition","needAdaptHeight","comboOffset","popupBounds","adaptHeight","getTopAdaptPosition","getBottomAlignPosition","getBottomAdaptPosition","getCenterAdaptPosition","getMiddleAdaptPosition","getComboPositionByDirections","directions","leftRight","topBottom","innerLeftRight","isNeedAdaptHeight","tbFirst","lrFirst","firstDir","tW","tH","change","getComboPosition","maxHeight","resetHeight","eventType","capture","registerDefault","__isIE","__IEVersion","agent","v1","v2","isIE9Below","isEdge","isChrome","isFireFox","isOpera","isSafari","isMac","isWindows","humpString","htmlStyle","documentElement","_toHumb","$0","$1","isArraylike","createOptions","optionsCache","core_rnotwhite","flag","internalData","elem","pvt","acceptData","thisCache","internalKey","expando","getByName","isNode","core_deletedIds","guid","camelCase","internalRemoveData","isEmptyDataObject","cleanData","support","deleteExpando","dataAttr","rmultiDash","getAttribute","rbrace","returnTrue","returnFalse","sibling","winnow","elements","qualifier","keep","grep","retVal","filtered","isSimple","inArray","createSafeFragment","list","nodeNames","safeFrag","findOrAppend","ownerDocument","disableScript","getAttributeNode","specified","restoreScript","rscriptTypeMasked","removeAttribute","setGlobalEval","elems","refElements","cloneCopyEvent","dest","hasData","oldData","curData","handle","fixCloneNodeIssues","nodeName","noCloneEvent","removeEvent","outerHTML","html5Clone","manipulation_rcheckableType","defaultChecked","checked","defaultSelected","selected","getAll","core_strundefined","querySelectorAll","childNodes","fixDefaultChecked","vendorPropName","capName","origName","cssPrefixes","isHidden","showHide","hidden","css_defaultDisplay","setPositiveNumber","subtract","rnumsplit","augmentWidthOrHeight","extra","isBorderBox","cssExpand","getWidthOrHeight","valueIsBorderBox","getStyles","boxSizing","curCSS","rnumnonpx","boxSizingReliable","doc","elemdisplay","actualDisplay","iframe","contentDocument","detach","body","buildParams","traditional","rbracket","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspect","inspected","prefilterOrFactory","dataTypeOrTransport","seekingTransport","transports","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","responses","firstDataType","finalDataType","contents","responseFields","mimeType","getResponseHeader","converters","ajaxConvert","response","conv2","conv","prev","dataFilter","createStandardXHR","XMLHttpRequest","createActiveXHR","ActiveXObject","createFxNow","fxNow","createTweens","tweeners","Animation","animationPrefilters","deferred","Deferred","always","tick","currentTime","startTime","duration","percent","tweens","notifyWith","resolveWith","opts","specialEasing","originalProperties","createTween","tween","Tween","easing","gotoEnd","rejectWith","propFilter","fx","timer","anim","progress","hooks","cssHooks","defaultPrefilter","dataShow","toggle","oldfire","orig","handled","_queueHooks","unqueued","fire","overflowX","overflowY","inlineBlockNeedsLayout","zoom","shrinkWrapBlocks","rfxtypes","_removeData","genFx","includeWidth","which","opacity","getWindow","defaultView","parentWindow","readyList","rootjQuery","_jQuery","_$","class2type","core_version","core_concat","core_push","core_slice","core_indexOf","core_toString","core_hasOwn","core_trim","selector","core_pnum","rtrim","rquickExpr","rsingleTag","rvalidchars","rvalidbraces","rvalidescape","rvalidtokens","rmsPrefix","rdashAlpha","fcamelCase","letter","completed","readyState","jquery","parseHTML","getElementById","pushStack","prevObject","copyIsArray","isReady","readyWait","holdReady","hold","off","msg","keepScripts","parsed","scripts","buildFragment","parseXML","xml","DOMParser","parseFromString","async","loadXML","globalEval","execScript","results","second","inv","access","chainable","emptyGet","raw","bulk","frameElement","doScroll","doScrollCheck","Callbacks","firing","memory","fired","firingLength","firingIndex","firingStart","stopOnFalse","unique","lock","locked","fireWith","tuples","newDefer","tuple","returned","notify","pipe","stateString","when","subordinate","resolveValues","updateFunc","contexts","progressValues","progressContexts","resolveContexts","select","isSupported","getSetAttribute","leadingWhitespace","firstChild","tbody","htmlSerialize","hrefNormalized","cssFloat","checkOn","optSelected","enctype","cloneNode","boxModel","compatMode","reliableMarginRight","pixelPosition","noCloneChecked","optDisabled","radioValue","appendChecked","checkClone","lastChild","click","submit","focusin","backgroundClip","clearCloneStyle","marginDiv","tds","divReset","reliableHiddenOffsets","doesNotIncludeMarginInBodyOffset","offsetTop","marginRight","noData","embed","applet","removeData","dequeue","startLength","speeds","timeout","clearQueue","nodeHook","boolHook","rclass","rreturn","rfocusable","rclickable","rboolean","ruseDefault","getSetInput","removeAttr","removeProp","propFix","classes","clazz","proceed","toggleClass","stateVal","isBool","classNames","hasClass","valHooks","option","selectedIndex","one","notxml","nType","isXMLDoc","attrHooks","propName","attrNames","tabindex","readonly","class","maxlength","cellspacing","cellpadding","rowspan","colspan","usemap","frameborder","contenteditable","propHooks","tabIndex","attributeNode","href","button","setAttributeNode","createAttribute","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","types","handleObjIn","special","eventHandle","handleObj","handlers","namespaces","origType","triggered","dispatch","delegateType","bindType","needsContext","expr","delegateCount","setup","mappedTypes","origCount","teardown","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","namespace_re","noBubble","isPropagationStopped","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","srcElement","metaKey","original","charCode","keyCode","eventDoc","clientLeft","clientTop","relatedTarget","load","focus","activeElement","blur","beforeunload","simulate","isSimulated","defaultPrevented","getPreventDefault","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","related","submitBubbles","form","_submit_bubble","changeBubbles","_just_changed","focusinBubbles","attaches","origFn","unbind","delegate","undelegate","triggerHandler","isNative","rnative","createCache","Expr","cacheLength","markFunction","Sizzle","seed","old","nid","newContext","newSelector","preferredDoc","setDocument","documentIsXML","getByClassName","getElementsByClassName","qsa","rbuggyQSA","tokenize","rescape","toSelector","rsibling","qsaError","siblingCheck","diff","sourceIndex","MAX_NEGATIVE","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","parseOnly","tokens","soFar","preFilters","cached","tokenCache","preFilter","rcomma","rcombinators","matchExpr","addCombinator","matcher","combinator","base","checkNonElements","doneName","outerCache","dirkey","dirruns","cachedruns","elementMatcher","matchers","condense","unmatched","newUnmatched","setMatcher","postFilter","postFinder","postSelector","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","relative","implicitRelative","matchContext","matchAnyContext","outermostContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","uniqueSort","token","runescape","funescape","compile","setFilters","isXML","hasDuplicate","docElem","rbuggyMatches","sortOrder","classCache","compilerCache","strundefined","whitespace","characterEncoding","identifier","operators","pseudos","rpseudo","ridentifier","ID","CLASS","NAME","TAG","ATTR","PSEUDO","CHILD","rinputs","rheader","rattributeQuotes","escaped","tagNameNoComments","createComment","pass","getElementsByName","getIdNotName","attrHandle","attrId","matchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","aup","ap","bp","detectDuplicates","duplicates","textContent","nodeValue","selectors","createPseudo","+","~","excess","unquoted","operator","check","what","simple","forward","ofType","nodeIndex","useCache","pseudo","not","innerText","lang","elemLang","hasFocus","enabled","header","even","odd","gt","radio","checkbox","file","image","filters","runtil","rparentsprev","rneedsContext","guaranteedUnique","targets","closest","prevAll","addBack","andSelf","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","rinlinejQuery","rnoshimcache","rleadingWhitespace","rxhtmlTag","rtagName","rtbody","rhtml","rnoInnerhtml","rchecked","rscriptType","rcleanScript","wrapMap","legend","area","thead","tr","col","td","safeFragment","fragmentDiv","optgroup","tfoot","colgroup","caption","th","wrapAll","html","wrapInner","unwrap","replaceWith","domManip","keepData","dataAndEvents","deepDataAndEvents","table","hasScripts","iNoClone","ajax","throws","insertAfter","destElements","srcElements","inPage","selection","safe","ralpha","ropacity","rposition","rdisplayswap","rmargin","rrelNum","BODY","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","bool","cssNumber","columnCount","fillOpacity","lineHeight","orphans","widows","zIndex","cssProps","float","swap","_computed","minWidth","maxWidth","getPropertyValue","currentStyle","rsLeft","runtimeStyle","pixelLeft","margin","border","suffix","expanded","parts","r20","rCRLF","rsubmitterTypes","rsubmittable","serialize","serializeArray","fnOver","fnOut","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","allTypes","params","responseText","success","active","lastModified","etag","isLocal","processData","contentType","accepts","*","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","nativeStatusText","headers","isSuccess","modified","statusText","timeoutTimer","transport","responseHeadersString","ifModified","cacheURL","callbackContext","statusCode","fireGlobals","globalEventContext","completeDeferred","responseHeaders","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","abort","finalText","crossDomain","hasContent","beforeSend","getScript","getJSON","script","text script","scriptCharset","charset","onreadystatechange","isAbort","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhrCallbacks","xhrSupported","xhrId","xhrOnUnloadAbort","xhr","cors","xhrFields","err","firefoxAccessException","unload","rfxnum","rrun","unit","scale","maxIterations","tweener","prefilter","eased","cssFn","speed","animate","fadeTo","optall","doAnimation","finish","stopQueue","timers","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","swing","cos","PI","setInterval","clearInterval","slow","fast","animated","setOffset","win","box","getBoundingClientRect","pageYOffset","pageXOffset","curElem","curOffset","curCSSTop","curCSSLeft","calculatePosition","curPosition","curTop","curLeft","using","offsetParent","parentOffset","scrollTo","Height","Width","content","","defaultExtra","insets","hasIgnoredBounds","__textKeywordMarked__","textLeft","tidx","ps","getDomHeight","hasVerticalScroll","hasHorizonScroll","clientHeight","getStyle","computedStyle","styleFloat","__isMouseInBounds__","offset2Body","zIndexMask","domArray","indexMask","mask","z-index","$import","loadReady","must","$scripts","_LOADED","$links","ext","link","rel","multiply","divide","acc","fractionDigits","RangeError","MAX","MIN","EVENT_RESPONSE_TIME","zIndex_popup","zIndex_tip","emptyStr","Key","48","49","50","51","52","53","54","55","56","57","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","96","97","98","99","100","101","102","103","104","105","106","107","109","110","111","KeyCode","COMMA","DELETE","DOWN","END","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","TAB","UP","Status","SUCCESS","WRONG","START","WAITING","READY","RUNNING","OUTOFBOUNDS","NULL","Axis","Selection","Default","None","Multi","All","Stretch","AbsoluteCenterLayout","AbsoluteHorizontalLayout","AbsoluteVerticalLayout","CenterAdaptLayout","_ref","HorizontalAdaptLayout","LeftRightVerticalAdaptLayout","llgap","lrgap","lhgap","rlgap","rrgap","rhgap","layoutArray","textAlign","LeftVerticalAdaptLayout","RightVerticalAdaptLayout","TableAdaptLayout","$table","white-space","max-width","vertical-align","margin-top","margin-left","margin-right","margin-bottom","VerticalAdaptLayout","HorizontalAutoLayout","FloatHorizontalLayout","InlineCenterAdaptLayout","InlineLayout","whiteSpace","InlineVerticalAdaptLayout","FlexCenterLayout","flex-shrink","FlexHorizontalCenter","FlexHorizontalLayout","FlexVerticalCenter","FlexVerticalLayout","FlexWrapperCenterLayout","$wrapper","FlexWrapperHorizontalCenter","FlexWrapperHorizontalLayout","FlexWrapperVerticalCenter","FlexWrapperVerticalLayout","AbsoluteLayout","AdaptiveLayout","BorderLayout","regions","CardLayout","showIndex","tItem","defaultShowName","getCardByName","_deleteCardByName","deleteCardByName","cardItem","lastShowIndex","showLastCard","setDefaultShowName","getDefaultShowName","getAllCardNames","getShowingCard","deleteAllCard","hideAllCard","isAllCardHide","removeName","DefaultLayout","DivisionLayout","opitons","firstElement","row","widths","heights","column","totalW","lastW","totalH","FloatLeftLayout","FloatRightLayout","GridLayout","HorizontalLayout","border-spacing","border-collapse","$tr","HorizontalCellLayout","*display","*zoom","LatticeLayout","TableLayout","HTapeLayout","VTapeLayout","TdLayout","VerticalLayout","WindowLayout","CenterLayout","FloatCenterLayout","HorizontalCenterLayout","VerticalCenterLayout","MODE","BufferPool","_Shared","SharingPool","shared","cat","Req","factory","require","Fix","_$1","makeHashCode","rhashcode","_toString","parsePath","bailRE","segments","$$skips","cloneShadow","__ref__","isShadowEqual","getMixins","mixinInjection","runBinaryFunction","binarys","watch","vm","expOrFn","$watch","$vm","user","exps","watchers","running","oldValue","sync","isGlobal","getter","$$skipArray","_getter","currentModels","_loop","models","initState","_stateWatchers","_loop2","_key2","userDef","Watcher","_modelHashId","listener","defaultCallback","initComputed","_computedWatchers","_computedOrder","initWatch","watchObj","_watchers","createWatcher","injectMethod","$digest","initMethods","methods","initMixins","mixins","mixinType","mixin$$1","defineContext","getSingleContext","childContext","_contextWatchers","digestState","dirty","watcher","digestComputed","dirtyQueue","cleanQueue","digestContext","contextListeners","digest","stateDirty","contextDirty","computedDirty","ttl","TTL","_ttl","_ttl2","executeWatchListeners","syncListeners","asyncListeners","listner","refreshAllDefineModel","allDefineModelInstances","insta","getAllModelInstances","allModelInstances","refreshAll","Model","getModelID","originalMethods","_len","channel","port","SymbolProto","ObjProto","deepEq","_wrapped","aCtor","bCtor","falsy$1","||","&&","(",")","getInstance","nextListener","callbackMap","queueNextListener","alive","watch$$1","orgEvent","delta","absDelta","offsetX","offsetY","pageHeight","lowestDelta","shouldAdjustOldDeltas","normalizeOffset","boundingRect","deltaFactor","nullLowestDeltaTimeout","nullLowestDelta","adjustOldDeltas","toFix","toBind","documentMode","mousewheel","onmousewheel","unmousewheel","Pane","tipText","overlap","onLoaded","_assertTip","_tipText","loading","loadingAnimation","setTipVisible","Layers","_loading","loaded","EVENT_LOADED","conf","title","warningTitle","tipType","_showToolTip","getTipType","getTitle","getWarningTitle","Tooltips","_hideTooltip","enableHover","_clearTimeOut","showTimeout","hideTimeout","_hoverBinded","_e","disabledHover","setTitle","setWarningTitle","isReadOnly","Text","highLight","padding-left","padding-right","padding-top","padding-bottom","textOverflow","_getShowText","setStyle","BasicButton","forceSelected","forceNotSelected","disableSelected","shadow","isShadowShowingOnSelected","setSelected","bindEvent","_createShadow","assertMask","$mask","mouseup","_hover","isSelected","clk","isOnce","destroyWhenHide","getBubble","BubblePopupBarView","EVENT_CLICK_TOOLBAR_BUTTON","hideView","onClick","BubbleCombo","EVENT_BEFORE_POPUPVIEW","isViewVisible","showView","hand","triggerArr","mouseDown","mousedown","_trigger","dblclick","doClick","_doClick","isDisableSelected","isForceSelected","isForceNotSelected","beforeClick","dishover","NodeButton","setOpened","isOpened","triggerCollapse","triggerExpand","Tip","ButtonGroup","behaviors","chooseType","_createBtns","_btnsCreator","buttons","btn","CHOOSE_TYPE_SINGLE","CHOOSE_TYPE_NONE","_packageBtns","btns","_packageSimpleItems","_packageItems","packBtns","_packageLayout","lay","_isSimpleLayout","removeItems","setNotSelectedValue","setEnabledValue","getNotSelectedValue","getAllButtons","getAllLeaves","getSelectedButtons","getNotSelectedButtons","getIndexByValue","getNodeById","getNodeByValue","CHOOSE_TYPE_MULTI","CHOOSE_TYPE_ALL","CHOOSE_TYPE_DEFAULT","ButtonTree","leaves","vs","TreeView","selectedValues","itemsCreator","_stop","_createTree","_loadMore","setSelectedValue","tree","_selectTreeNode","treeId","treeNode","_configSetting","getCheckStatus","half","checkNode","getUrl","_getParentValues","beforeExpand","isAjaxing","Msg","toast","ajaxGetNodes","onAsyncSuccess","halfCheck","zTree","totalCount","perTime","updateNode","selectNode","onAsyncError","textStatus","errorThrown","reloadType","reAsyncChildNodes","beforeCheck","track","treeObj","getSelectedNodes","onCheck","onExpand","onCollapse","setting","autoParam","otherParam","simpleData","showIcon","expandSpeed","nameIsHTML","dblClickExpand","getParentNode","_getNodeValue","_getHalfSelectedValues","checkState","parentValues","_buildTree","storeValues","_getTree","_addTreeNode","_getSelectedValues","hashMap","rootNoots","getNodes","_dealWidthNodes","ns","isParent","setLoading","hasNext","setLoaded","setEnd","addNodes","_initTree","hasChecked","getCheckedNodes","checkAll","setNode","checkAllNodes","expandAll","updateValue","refresh","getNodesByParam","REQ_TYPE_INIT_DATA","REQ_TYPE_ADJUST_DATA","REQ_TYPE_SELECT_DATA","REQ_TYPE_GET_SELECTED_DATA","EVENT_INIT","EVENT_AFTERINIT","AsyncTree","getZTreeObj","_beforeExpandNode","tNode","pNode","_join","valueA","valueB","_getJoinValue","checkedValues","PartTree","lastSearchValue","curSelectedValue","notSelectedValue","new_values","ListTreeView","_constants","SPLIT","storeValue","_checkValue","chkboxType","_transArrayToMap","treeArrays","_transMapToArray","treeMap","ListAsyncTree","ListPartTree","Maskers","Bubbles","Popovers","Broadcasts","StyleLoaders","CollectionView","cellSizeAndPositionGetter","horizontalOverscanSize","verticalOverscanSize","renderedCells","renderedKeys","renderRange","_scrollLock","_debounceRelease","scroll","_calculateChildrenToRender","EVENT_SCROLL","_calculateSizeAndPositionData","_populate","cellMetadata","sectionManager","_sectionManager","_height","_width","_cellRenderers","_lastRenderedCellIndices","_cellGroupRenderer","rendered","_getMaxScrollLeft","_getMaxScrollTop","minY","maxY","minX","maxX","childrenToDisplay","renderedWidgets","lefts","tops","leftMap","topMap","leftBorder","rightBorder","topBorder","bottomBorder","assertMinBorder","MAX_VALUE","assertMaxBorder","_left","_top","startTopIndex","endTopIndex","startLeftIndex","endLeftIndex","existSet","addSet","deleteArray","addedItems","_reRange","setScrollLeft","setScrollTop","setOverflowX","setOverflowY","getScrollLeft","getScrollTop","getMaxScrollLeft","getMaxScrollTop","_clearChildren","restore","cell","Combo","isDefaultInit","isNeedAdjustHeight","isNeedAdjustWidth","adjustLength","hideChecker","comboClass","hoverClass","_initCombo","_initPullDownAction","_popupView","_hideView","EVENT_EXPAND","EVENT_COLLAPSE","EVENT_TRIGGER_CHANGE","_assertPopupView","_toggle","_assertPopupViewRender","popupView","enterPopup","evs","EVENT_AFTER_INIT","_rendered","_hideIf","adjustWidth","adjustHeight","isHide","EVENT_BEFORE_HIDEVIEW","EVENT_AFTER_HIDEVIEW","EVENT_AFTER_POPUPVIEW","resetListWidth","maxW","resetListHeight","resetWidth","getPopupPosition","Expander","expanderClass","_expanded","_initExpander","expander","isExpanded","ComboGroup","son","VirtualGroup","buttonMap","Loader","hasPrev","_prevLoad","_nextLoad","button_group","Navigation","single","tab","cardMap","setSelect","_deleteOtherCards","currCardName","_assertCard","getSelect","getSelectedCard","Searcher","isAutoSearch","isAutoSync","onSearch","adapter","masker","editor","_search","_startSearch","_stopSearch","_pauseSearch","_isSearching","EVENT_START","startSearch","pauseSearch","EVENT_PAUSE","stopSearch","EVENT_STOP","_getLastSearchKeyword","getItems","finding","EVENT_SEARCHING","searchResult","matchResult","setAdapter","doSearch","isSearching","hasMatched","adjustView","getKeyword","getKeywords","Switcher","switcherClass","_initSwitcher","switcher","_created","Tab","curr","removeTab","cardname","getSelectedTab","getTab","EL","ele","messageShow","$pop","toastStack","alert","_show","confirm","prompt","min_width","autoClose","Toast","EVENT_DESTORY","hasCancel","controlItems","north","center","east","south","GridView","overscanColumnCount","overscanRowCount","rowHeightGetter","columnWidthGetter","_getOverscanIndices","overscanCellsCount","startIndex","stopIndex","overscanStartIndex","overscanStopIndex","visibleColumnIndices","_columnSizeAndPositionManager","visibleRowIndices","_rowSizeAndPositionManager","horizontalOffsetAdjustment","verticalOffsetAdjustment","_renderedColumnStartIndex","_renderedColumnStopIndex","_renderedRowStartIndex","_renderedRowStopIndex","overscanColumnIndices","overscanRowIndices","rowCount","columnStartIndex","columnStopIndex","rowStartIndex","rowStopIndex","minRowDatum","minColumnDatum","maxRowDatum","maxColumnDatum","rowIndex","rowDatum","columnIndex","columnDatum","_rowIndex","_columnIndex","_getRealMaxScrollLeft","totalWidth","estimatedColumnSize","estimatedRowSize","setColumnCount","setRowCount","setEstimatedColumnSize","setEstimatedRowSize","_constant","SIZE","SMALL","NORMAL","BIG","HEADER_HEIGHT","footer","closable","startX","startY","tracker","_calculateSize","dragger","compareHeight","EVENT_OPEN","BarPopover","EVENT_CANCEL","EVENT_CONFIRM","PopupView","minHeight","innerVGap","tool","tabs","min-width","mouseover","_createTool","_createTab","_createView","toolbar","_createToolBar","min-height","tbHeight","tabHeight","toolHeight","max-height","SearcherView","redmark","searcher","spliter","ListView","overscanHeight","renderedIndex","_calculateBlocksToRender","lastWidth","lastHeight","_renderMoreIf","minContentHeight","cnt","getElementHeight","addedHeight","VirtualList","topBlank","bottomBlank","minContentHeightFrom","minContentHeightTo","needDestroyed","firstFragment","lastFragment","currentFragment","lastCache","Pager","dynamicShow","dynamicShowFirstLast","dynamicShowPrevNext","pages","jump","firstPage","lastPage","currPage","dict","poor","flow","EVENT_AFTER_POPULATE","getCurrentPage","setAllPages","LoadingBar","_reset","IconButton","iconWidth","iconHeight","icon","ImageButton","setImageWidth","setImageHeight","getImageWidth","getImageHeight","setSrc","getSrc","Button","iconCls","ghost","textWidth","textHeight","TextButton","BlankIconIconTextItem","iconCls1","iconCls2","blankWidth","textHgap","textVgap","textLgap","textRgap","blank","icon1","icon2","BlankIconTextIconItem","BlankIconTextItem","IconTextIconItem","leftIconWrapperWidth","rightIconWrapperWidth","IconTextItem","iconWrapperWidth","TextIconItem","TextItem","IconTextIconNode","IconTextNode","TextIconNode","TextNode","Editor","inputType","validationChecker","quitChecker","allowBlank","watermark","errorText","outline","_assertWaterMark","contentWrapper","Input","EVENT_FOCUS","_checkError","EVENT_BLUR","_setErrorVisible","EVENT_CLICK","EVENT_KEY_DOWN","EVENT_QUICK_DOWN","EVENT_VALID","_checkWaterMark","EVENT_ERROR","isEditing","EVENT_RESTRICT","EVENT_EMPTY","EVENT_ENTER","EVENT_SPACE","EVENT_BACKSPACE","EVENT_REMOVE","EVENT_CHANGE_CONFIRM","_checkToolTip","disabledWaterMark","setErrorText","getErrorText","setWaterMark","disabledError","disableError","enableError","disableWaterMark","enableWaterMark","selectAll","onKeyDown","getLastValidValue","getLastChangedValue","MultifileEditor","multiple","maxSize","accept","File","EVENT_UPLOADSTART","EVENT_PROGRESS","EVENT_UPLOADED","upload","TextAreaEditor","_focus","_blur","Html","Icon","Iframe","setName","Img","ImageCheckbox","Checkbox","files","sendFile","multipart","boundary","CRLF","fileName","getAsBinary","sendAsBinary","fileSize","rpe","attachO","attach_type","filename","attach_array","onloadstart","total","simulation","onprogress","onabort","FormData","onloadprogress","interactive","sendFiles","sent","_wrap","self_","clean","attach","errorCode","errorMsg","fileType","attach_names","attachNum","_events","tempFile","errorType","replaceChild","totalProp","currentProp","ctrlKey","inputEventValid","_keydown","_keydown_","_clk","_click","_focusDebounce","_blurDebounce","keydown","keyup","focusout","_checkValidationOnValueChange","_isEditing","_lastValidValue","_defaultState","_start","lastValidValue","_lastChangedValue","_lastValue","_pause","lastValue","_valueChange","_lastSubmitValue","textValue","ImageRadio","Radio","AbstractLabel","_createJson","_createCenterEl","_createNotCenterEl","line-height","adaptLayout","HtmlLabel","IconLabel","Label","Link","Bubble","mousemove","_createBubbleText","_bottom","_right","Tooltip","texts","setLevel","Trigger","setKey","getKey","CustomTree","_formatItems","roots","_consts","BUTTON","LEVEL","ICO_LOADING","SWITCH","NODECREATED","ASYNC_SUCCESS","ASYNC_ERROR","REMOVE","SELECTED","UNSELECTED","ICON","SPAN","UL","line","ROOT","ROOTS","CENTER","BOTTOM","NOLINE","LINE","folder","OPEN","CLOSE","DOCU","CURSELECTED","_setting","addDiyDom","autoCancelSelected","fontCss","selectedMulti","showLine","showTitle","txtSelectedEnable","idKey","pIdKey","rootPId","leaf","beforeAsync","beforeDblClick","beforeRightClick","beforeMouseDown","beforeMouseUp","beforeCollapse","beforeRemove","onNodeCreated","onDblClick","onRightClick","onMouseDown","onMouseUp","onRemove","setRoot","expandTriggerFlag","curSelectedList","noSelection","createdNodes","zId","_ver","_initCache","getCache","setCache","_bindEvent","consts","tools","srcEvent","clickFlag","onSelected","onUnSelected","_unbindEvent","_eventProxy","getSetting","tId","nodeEventType","treeEventType","nodeEventCallback","treeEventCallback","eqs","getNodeMainDom","getMDom","attrName","getNodeCache","onSwitchNode","onClickNode","onZTreeMousedown","onZTreeMouseup","onZTreeDblclick","onZTreeContextmenu","proxyResult","_initNode","isFirstNode","isLastNode","openFlag","childKey","parentTId","zAsync","getPreNode","getNextNode","fixPIdKeyValue","proxys","beforeA","afterA","innerBeforeA","innerAfterA","zTreeTools","addNodeCache","getNodeCacheId","addAfterA","addBeforeA","addInnerAfterA","addInnerBeforeA","addInitBind","addInitUnBind","unbindEvent","addInitCache","initCache","addInitNode","initNode","addInitProxy","initProxy","isFirst","addInitRoot","initRoot","addNodesData","setNodeLineIcos","addSelectedNode","isSelectedNode","addCreatedNode","addZTreeTools","exSetting","getAfterA","getBeforeA","getInnerAfterA","getInnerBeforeA","getNodeByParam","getNodeName","nameKey","getNodeTitle","getNodesByParamFuzzy","getNodesByFilter","isSingle","invokeParam","tmpResult","getRoots","getSettings","getZTreeTools","treeTools","nextNode","removeNodeCache","removeSelectedNode","setZTreeTools","transformTozTreeFormat","parentKey","bindTree","eventParam","-moz-user-select","unbindTree","doProxy","uCanDo","switchNode","cancelPreSelectedNode","fun","zt","canAsync","str1","str2","curDom","targetExpr","isChildOrSelf","parentId","isSilent","target_switchObj","$$","target_icoObj","target_ulObj","replaceSwitchClass","replaceIcoClass","createNodes","expandCollapseParentNode","appendNodes","initFlag","tmpPNode","tmpPChild","childHtml","makeDOMNodeMainBefore","makeDOMNodeLine","makeDOMNodeNameBefore","makeDOMNodeIcon","makeDOMNodeNameAfter","makeUlHtml","makeDOMNodeMainAfter","appendParentULDom","nObj","ulObj","asyncNode","icoObj","tmpParam","pKey","spKey","_tmpV","excludeNode","createNodeCallback","zTreeHtml","expandCollapseNode","expandFlag","animateFlag","_callback","switchObj","iconOpen","iconClose","makeNodeIcoStyle","expandCollapseSonNode","treeNodes","selfAnimateSign","nameStr","makeNodeIcoClass","makeNodeLineClass","makeNodeUrl","fontcss","makeNodeFontCss","fontStyle","makeNodeTarget","icoCss","iconSkin","icoStyle","lineClass","makeNodeLineClassEx","urlKey","makeUlLineClass","removeChildNodes","tmp_switchObj","tmp_icoObj","setFirstNode","childLength","setLastNode","removeNode","tmp_ulObj","newLast","tmp_first_switchObj","newName","tmpName","tmpList","addFlag","setNodeFontCss","aObj","ulLine","setNodeName","setNodeTarget","setNodeUrl","_z","zSetting","zNodes","addCallback","xNewNodes","cancelSelectedNode","expandNode","sonSign","callbackFlag","getNodeByTId","getNodeIndex","transformTozTreeNodes","simpleNodes","transformToArray","checkTypeFlag","CHECK","STYLE","DEFAULT","DISABLED","FALSE","TRUE","FULL","PART","FOCUS","TYPE_ALL","TYPE_LEVEL","autoCheckTrigger","chkStyle","nocheckInherit","chkDisabledInherit","radioType","radioCheckedList","_handler","onCheckNode","onMouseoverCheck","onMouseoutCheck","checkedKey","checkedOld","nocheck","chkDisabled","check_Child_State","check_Focus","_beforeA","makeChkFlag","makeChkClass","_zTreeTools","checkObj","checkNodeRelation","setChkClass","repairParentChkClassWithSelf","repairAllChk","getTreeCheckedNodes","getChangeCheckedNodes","getTreeChangeCheckedNodes","setChkDisabled","inheritParent","inheritChildren","repairSonChkDisabled","repairParentChkDisabled","_updateNode","getRadioCheckedList","checkedList","onlyOne","chkFlag","cNode","_event","_tools","_view","setSonNodeCheckBox","setParentNodeCheckBox","checkboxType","notEffectByOtherNode","fullStyle","chkName","repairChkClass","repairParentChkClass","sNode","srcNode","pSign","pNodes","hasDisable","_createNodes","_removeNode","_appendNodes","IconChangeButton","setIcon","TriggerIconButton","HalfIconButton","HalfButton","MultiSelectItem","SingleSelectIconTextItem","SingleSelectItem","SingleSelectRadioItem","ArrowNode","FirstPlusGroupNode","IconArrowNode","LastPlusGroupNode","MidPlusGroupNode","MultiLayerIconArrowNode","PlusGroupNode","Switch","FirstTreeLeafItem","getId","getPId","IconTreeLeafItem","LastTreeLeafItem","MidTreeLeafItem","MultiLayerIconTreeLeafItem","isFront","TreeTextLeafItem","CalendarDateItem","Calendar","_dateCreator","De","mins","maxs","setFullYear","ymd","FDay","offSetFDay","PDay","NDay","lastMonth","currentDay","nextMonth","_getWeekLabel","days","_getItems","isFrontDate","newDate","isFinalDate","setMinDate","setMaxDate","getPageByDateJSON","page","getDateJSONByPage","months","YearCalendar","_yearCreator","getStartYear","startDate","endDate","INTERVAL","currentYear","years","isFrontYear","isFinalYear","getEndYear","tyears","getPageByYear","ArrowTreeGroupNodeCheckbox","CheckingMarkNode","FirstTreeNodeCheckbox","LastTreeNodeCheckbox","MidTreeNodeCheckbox","TreeNodeCheckbox","CustomColorChooser","ColorPickerEditor","farbtastic","Farbtastic","ColorChooser","colorPicker","ColorChooserPopup","EVENT_VALUE_CHANGE","_isRGBColor","colorEditor","_dealStoreColors","storeColors","_digestStoreColors","_getStoreColors","ColorPicker","customColorChooser","panel","more","PopupPanel","colors","que","setStoreColors","colorsArray","SimpleColorChooserPopup","SimpleColorChooser","ColorChooserTrigger","colorContainer","down","background-color","LongColorChooserTrigger","changeIcon","label","ColorPickerButton","_createMask","constants","REB_WIDTH","colorShow","RGB","checker","Ws","TextEditor","_checkEditors","none","lastColor","_isEmptyRGB","transparent","_showPreColor","SimpleColorPickerEditor","RADIUS","SQUARE","WIDTH","colorWrapper","wheel","overlay","hMarker","slMarker","_unpack","_pack","_setColor","unpack","hsl","_RGBToHSL","_updateDisplay","_setHSL","_HSLToRGB","m1","m2","_hueToRGB","angle","_absolutePosition","offsetLeft","_widgetCoords","mouseX","mouseY","_doMouseMove","circleDrag","hue","atan2","sat","lum","TRIANGLE_LENGTH","_getAdjustLength","_showTriangle","_hideTriangle","_createTriangle","triangle","_createLeftTriangle","_createRightTriangle","_createTopTriangle","_createBottomTriangle","BubblePopupView","buttonOpt","TextBubblePopupBarView","EditorIconCheckCombo","baseClass","EditorTrigger","TextValueCheckComboPopup","editorIconCheckCombo","IconCombo","IconComboPopup","iconCombo","IconComboTrigger","isShowDown","_digest","IconTextValueCombo","IconTextValueComboPopup","textIconCombo","SearchTextValueCombo","SearchTextValueTrigger","getSearcher","TextValueComboPopup","stopEditing","triggerBtn","SearchTextValueComboPopup","defaultText","_setState","setState","vals","formatItems","TextValueCheckCombo","textIconCheckCombo","TextValueCombo","setTipType","SmallTextValueCombo","ClearEditor","EVENT_CLEAR","_checkClear","ShelterEditor","EVENT_CLICK_LABEL","_showHint","_checkText","_showInput","setTextStyle","getState","SignEditor","StateEditor","stateValue","SimpleStateEditor","mouseOut","MultiPopupView","buttongroup","ListPane","calback","Panel","titleButtons","_createTitle","LinearSegmentButton","LinearSegment","buttonGroup","SelectList","allSelected","setAllSelected","_checkAllSelected","selectLength","notSelectLength","isAlreadyAllSelected","isHalf","setHalfSelected","setToolBarVisible","isAllSelected","assist","LazyLoader","PAGE","loader","_getNextItems","lastNum","lastItems","nextItems","ListLoader","SortList","sortable","containment","connectWith","cursor","tolerance","$currentItem","holder","ui","over","sorted","getSortedValues","attribute","LoadingPane","__loaded","AllCountPager","pagerDirection","pagerIconCls","_getPagerIconCls","pager","preCls","nextCls","allPages","alwaysShowPager","setPagerVisible","setVPage","setCount","DirectionPager","horizontal","vertical","_createVPager","_createHPager","vpager","vlabel","hpager","hlabel","getVPage","getHPage","setHPage","hasVNext","hasHNext","hasVPrev","hasHPrev","setHPagerVisible","setVPagerVisible","vShow","hShow","DetailPager","_lock","_debouce","SegmentButton","Segment","MultiSelectBar","isAllCheckedBySelectedValue","isHalfCheckedBySelectedValue","halfSelected","isSelect","isHalfSelect","_setSelected","isHalfSelected","isAllChecked","LevelTree","_assertId","DisplayTree","ListDisplayTree","getFont","SimpleTreeView","_getValue","triggerWidth","IconTrigger","iconButton","IconTextTrigger","textCls","trigerButton","iconItem","textItem","setTextCls","oldCls","SelectIconTextTrigger","_digist","TextTrigger","SelectTextTrigger","formatValue","SmallSelectTextTrigger","SmallTextTrigger","MonthDateCombo","YearPopup","YearDateCombo","DatePicker","_year","_month","_checkLeftValid","_checkRightValid","YearPicker","DateCalendarPopup","selectedTime","_createNav","calendar","_day","datePicker","_checkMin","_checkMax","timeOb","MonthPopup","_createYearCalendar","selectedYear","backBtn","preBtn","navigation","DateTriangleTrigger","StaticDatePaneCard","_getNewCurrentDate","_setCalenderValue","_setDatePicker","_setCalendar","DynamicDatePane","Static","Dynamic","dateTab","DynamicDateHelper","getCalculation","dynamicPane","_checkValueValid","DynamicDateCombo","DateTimeCombo","popupHeight","popupWidth","comboAdjustHeight","minute","DateTimePopup","BUTTON_CANCEL_EVENT_CHANGE","hidePopupView","BUTTON_OK_EVENT_CHANGE","cancelButton","okButton","dateCombo","CALENDAR_EVENT_CHANGE","dateButton","timeSelect","DateTimeTrigger","_printTime","dateStr","StaticDateTimePaneCard","DynamicDateTimeSelect","DynamicDateTimePane","DownListCombo","popupview","DownListPopup","downlistcombo","EVENT_SON_VALUE_CHANGE","fatherValue","DownListGroup","downlistgroup","DownListItem","DownListGroupItem","childValues","nextIcon","singleValues","childValueMap","fatherValueMap","_createChildren","changedValue","valueObject","item_done","childValue","father","_createChildValue","el_done","_isGroup","_needSpliter","spliter_container","itemLength","valueItem","valueArray","_checkValues","joinValue","itemGroup","popupItem","fartherValue","getCalculationByDate","quarter","workDay","holidays","DynamicDateCard","OFFSET","CURRENT","getBeginDate","BEGIN","checkgroup","TYPE","YEAR","QUARTER","MONTH","workDayBox","plainValue","resultPane","dateType","_getParamJson","WORK_DAY","positionValue","comboItems","_getText","_createValue","valuesItems","valueMap","selectValues","allowEdit","storeTriggerValue","DynamicDateTrigger","dateStore","dateObj","_checkDynamicValue","DynamicDatePopup","BUTTON_CLEAR_EVENT_CHANGE","BUTTON_lABEL_EVENT_CHANGE","comboWrapper","DynamicDateParamItem","offsetCombo","buttonHeight","_getTabJson","textButton","_setInnerValue","yearLength","yearMonthLength","yearFullMonthLength","compareFormat","formatStr","_getStandardDateStr","_autoAppend","_dateCheck","_checkVoid","_getTitle","_getFormatString","formatArray","dateArray","newArray","_yearCheck","splitMonth","_monthCheck","getPositionText","baseText","endText","EVENT_TRIGGER_CLICK","DynamicDateTimeCombo","DynamicDateTimeTrigger","DynamicDateTimePopup","_checkHour","_formatValueToDoubleDigit","_autoSwitch","_checkMinute","_checkSecond","_checkBorder","setDownEnable","setUpEnable","_assertValue","hasSecond","suffixArray","suffixString","dateString","SearchEditor","keywords","SmallSearchEditor","SmallTextEditor","IntervalSlider","EDITOR_WIDTH","EDITOR_R_GAP","EDITOR_HEIGHT","SLIDER_WIDTH_HALF","SLIDER_WIDTH","SLIDER_HEIGHT","TRACK_HEIGHT","digit","valueOne","valueTwo","calculation","AccurateCalculationModel","grayTrack","blueTrack","_createTrackWrapper","labelOne","_checkValidation","oldValueOne","_getPercentByValue","significantPercent","_setSliderOnePosition","_setBlueTrack","_checkLabelPosition","labelTwo","oldValueTwo","_setSliderTwoPosition","sliderOne","sliderTwo","_draggable","_createLabelWrapper","_createSliderWrapper","_rePosBySizeAfterMove","isLeft","_getGrayTrackLength","_getValueByPercent","_rePosBySizeAfterStop","optimizeSize","startDrag","defaultSize","mouseMoveTracker","dotText","_checkOverlap","labelOneLeft","labelTwoLeft","isSliderOneLeft","_resetLabelPosition","needReverse","_setBlueTrackLeft","_setBlueTrackWidth","percentOne","percentTwo","_setAllPosition","two","_setErrorText","accurateSubtraction","accurateMultiplication","accurateDivisionTenExponent","accurateAddition","reduceValue","_setDraggableEnable","_getPrecision","pre","toPrecision","eIndex","decimalPartLength","sciencePartLength","setMinAndMax","minNumber","maxNumber","NaN","_getMagnitude","_formatDecimal","stringNumber1","stringNumber2","numDecimalLength","magnitudeDiff","needAddZero","numDecimal","_stringNumberFactory","numStrArray","numInteger","_accurateSubtraction","getDecimalMaxLength","addZero","resultTemp","integerResult","decimalMaxLength","decimalResultTemp","decimalResult","borrow","_accurateAddition","_accurateMultiplication","dec1Int2","_accurateDivisionTenExponent","int1dec2","dec1dec2","stringNumber","partDecimalResult","MultiLayerDownListPopup","_createPopupItems","fatherArrayValue","fValue","getChildrenValue","MultiLayerSelectTreeCombo","allowSearchValue","allowInsertValue","_getSyncConfig","_getAsyncConfig","_getBaseConfig","MultiLayerSelectTreePopup","_getSearchConfig","valueFormatter","MultiLayerSelectTreeTrigger","EVENT_ADD_ITEM","baseConfig","MultiLayerSelectTreeInsertSearchPane","setKeyword","keywordGetter","MultiLayerSelectLevelTree","addNotMatchTip","showTip","_initData","_getSearchItems","_fillTreeStructure4Search","_getChildren","MultiLayerSelectTreeFirstPlusGroupNode","needBlankLayers","MultiLayerSelectTreeLastPlusGroupNode","MultiLayerSelectTreeMidPlusGroupNode","MultiLayerSelectTreePlusGroupNode","MultiLayerSingleTreeCombo","MultiLayerSingleTreePopup","MultiLayerSingleTreeTrigger","MultiLayerSingleTreeInsertSearchPane","MultiLayerSingleLevelTree","MultiLayerSingleTreeFirstPlusGroupNode","_createNode","MultiLayerSingleTreeLastPlusGroupNode","MultiLayerSingleTreeMidPlusGroupNode","MultiLayerSingleTreePlusGroupNode","MultiLayerSingleTreeFirstTreeLeafItem","MultiLayerSingleTreeLastTreeLeafItem","MultiLayerSingleTreeMidTreeLeafItem","MultiSelectCheckPane","onClickContinueSelect","txt","continueSelect","DisplaySelectedList","_createItems","MultiSelectCombo","assertShowValue","_startValue","numberCounter","setButtonChecked","requesting","_itemsCreator4Trigger","MultiSelectTrigger","_setStartValue","_joinKeywords","_joinAll","EVENT_CLICK_ITEM","EVENT_BEFORE_COUNTER_POPUPVIEW","updateSelectedValue","EVENT_COUNTER_CLICK","MultiSelectPopupView","_adjust","EVENT_CLICK_CONFIRM","EVENT_CLICK_CLEAR","wants2Quit","_stopEditing","MultiSelectCheckSelectedSwitcher","refreshPlaceHolderWidth","_makeMap","selectedMap","REQ_GET_ALL_DATA","notSelectedMap","adjust","setStartValue","populateSwitcher","REQ_GET_DATA_LENGTH","MultiSelectNoBarCombo","MultiSelectInsertCombo","MultiSelectInsertTrigger","_addItem","MultiSelectInsertNoBarCombo","MultiSelectInsertSearcher","wrapNumberCounter","MultiSelectLoader","startValue","firstItems","_scrollToTop","MultiSelectNoBarLoader","MultiSelectNoBarPopupView","MultiSelectSearcher","MultiSelectSearchInsertPane","tooltipClick","isMatchTipVisible","MultiSelectSearchLoader","_filterValues","newValues","MultiSelectSearchPane","MultiSelectCheckSelectedButton","MultiSelectEditor","checkPane","me","MultiSelectInsertList","searcherPane","_showAdapter","_showSearcherPane","MultiSelectInsertNoBarList","MultiSelectList","_count","MultiSelectTree","MultiSelectTreePopup","MultiTreeCheckPane","backToPopup","configs","EVENT_CONTINUE_CLICK","MultiTreeCombo","showCounter","isPopupView","isInit","want2showCounter","MultiTreePopup","MultiTreeInsertCombo","MultiTreeSearchInsertPane","_assertShowValue","MultiTreeListCombo","MultiTreeCheckSelectedButton","indicator","checkSelected","addTip","partTree","isAddTipVisible","MultiTreeSearchPane","MultiListTreeSearcher","MultiTreeSearcher","getChildrenNode","NumberEditor","topBtn","_finetuning","bottomBtn","NumberInterval","typeError","numberError","signalError","editorWidth","numberErrorCls","less","less_equal","numTip","validation","closeMin","smallEditor","smallEditorBubbleType","smallTip","bigEditor","bigEditorBubbleType","bigTip","smallCombo","bigCombo","closeMax","_setValidEvent","_setErrorEvent","_setBlurEvent","_setFocusEvent","_setComboValueChangedEvent","_setEditorValueChangedEvent","_setTitle","smallValue","bigValue","bigComboValue","smallComboValue","NumberIntervalSingleEidtor","isStateValid","setMinEnable","setCloseMinEnable","setMaxEnable","setCloseMaxEnable","showNumTip","hideNumTip","setNumTip","getNumTip","combo_value","minComboValue","maxComboValue","SearchMultiTextValueCombo","_updateAllValue","getCounter","allValueGetter","allValue","_itemsCreator","_getItemsByTimes","_hasNextByTimes","kw","SearchMultiSelectTrigger","SearchMultiSelectLoader","SearchMultiSelectPopupView","SearchMultiSelectSearcher","SelectTreeFirstPlusGroupNode","SelectTreeLastPlusGroupNode","SelectTreeMidPlusGroupNode","SelectTreePlusGroupNode","SelectTreeCombo","SingleTreePopup","SelectTreeExpander","SelectTreePopup","SingleSelectSearchLoader","allowNoSelect","SingleSelectList","SingleSelectSearchInsertPane","SingleSelectSearchPane","SingleSelectCombo","SingleSelectTrigger","SingleSelectPopupView","SingleSelectInsertCombo","SingleSelectComboItem","SingleSelectLoader","SingleSelectSearcher","SingleSelectInsertList","_allData","SingleSelectEditor","SignTextEditor","SliderIconButton","LARGE_SIZE","NORMAL_SIZE","LARGE_OFFSET","NORMAL_OFFSET","slider","SingleSlider","TRACK_GAP_HALF","TRACK_GAP","sliderVertical","trackLength","_setLabelPosition","_setSliderPosition","thousandth","SingleSliderLabel","HEIGHT","SingleSliderNormal","minMax","_createTrack","EVENT_DRAG","SingleTreeCombo","SingleTreeTrigger","_checkTitle","TextValueDownListCombo","_createValueMap","currentVal","DownListSelectTextTrigger","_formatItemArray","sourceArray","targetArray","TimePopup","BUTTON_NOW_EVENT_CHANGE","TimeCombo","_setNowTime","nowTome","TimeTrigger","COMPARE_FORMAT","COMPLETE_COMPARE_FORMAT","FORMAT_ARRAY","DEFAULT_DATE_STRING","_formatValue","DateInterval","timeErrorCls","_createCombo","_clearTitle","smallDate","bigDate","smallObj","bigObj","TimeInterval","TimePeriods","DynamicYearCard","StaticYearCard","DynamicYearCombo","DynamicYearTrigger","DynamicYearPopup","_titleCreator","DynamicYearMonthCard","StaticYearMonthCard","_createMonths","monthMap","yearPicker","_checkMonthStatus","selectedMonth","minYear","maxYear","minMonth","maxMonth","yearInvalid","monthInvalid","newObj","DynamicYearMonthCombo","DynamicYearMonthTrigger","DynamicYearMonthPopup","yearEditor","_createEditor","monthEditor","isYear","_doEditorConfirm","_getStaticTitle","monthValue","hasYear","hasMonth","YearMonthInterval","_checkValid","smallDate4Check","bigDate4Check","DynamicYearQuarterCard","StaticYearQuarterCard","_createQuarter","selectedQuarter","DynamicYearQuarterCombo","DynamicYearQuarterTrigger","DynamicYearQuarterPopup","quarterEditor","quarterValue","AbstractAllValueChooser","perPage","_valueFormatter","resultItems","AllValueChooserCombo","AllValueChooserPane","AllValueMultiTextValueCombo","_digestValue","numOfPage","AbstractTreeValueChooser","_reqInitTreeNode","_reqAdjustTreeNode","_reqSelectedTreeNode","_reqDisplayTreeNode","_reqTreeNode","doCheck","newParents","llen","_getChildCount","createOneJson","_getTreeNode","getCount","dealWithSelectedValues","canFindKey","isSearchValueInParent","_deleteNode","searched","_getNode","expandSelectedValue","isChild","strs","childrenCount","_isMatch","notSearch","can","nk","nv","nodeSearch","_getAddedValueNode","isAllSelect","isCurAllSelected","isOpen","findSelectedObj","judgeState","selected_value","dealWithSelectedValue","nextNames","getCheckState","tempCheck","childCount","allNodes","_getAllChildren","parentCheckState","valueFind","findParentNode","pValues","AbstractListTreeValueChooser","ListTreeValueChooserInsertCombo","TreeValueChooserInsertCombo","TreeValueChooserCombo","TreeValueChooserPane","pane","AbstractValueChooser","ValueChooserInsertCombo","ValueChooserCombo","ValueChooserPane","eventsApi","allEvents","triggerEvents","listenTo","listeningTo","_listeningTo","_listenId","listenToOnce","eventSplitter","stopListening","a1","a2","a3","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","escapeRegExp","_routeToRegExp","router","history","_extractParameters","navigate","optional","History","checkUrl","routeStripper","rootStripper","pathStripper","started","atRoot","pathname","getSearch","getHash","getPath","decodeURI","getFragment","_hasPushState","_wantsHashChange","hashChange","_hasHashChange","_wantsPushState","pushState","_checkUrlInterval","silent","loadUrl","_updateHash","keyOrFn","pushTarget","_target","targetStack","popTarget","pushContext","_context","contextStack","popContext","findStore","__cacheStore","createStore","needPop","_store","_widget","oldWatch","_create","pushed","unMount","unwatches","unwatch","additionFunc","ajaxComplete","nKeys","installedModules","__webpack_require__","moduleId","modules","fineui","Decorators","Target"],"mappings":";;AA21oCA,QAASA,iBAAgBC,SAAUC,aAAe,KAAMD,mBAAoBC,cAAgB,KAAM,IAAIC,WAAU,sCA31oC/G,SAASC,GAAY,QAASC,GAAEC,GAAG,GAAGC,EAAED,GAAG,MAAOC,GAAED,GAAGE,OAAQ,IAAIC,GAAEF,EAAED,IAAII,EAAEJ,EAAEK,GAAE,EAAGH,WAAY,OAAOJ,GAAEE,GAAGM,KAAKH,EAAED,QAAQC,EAAEA,EAAED,QAAQH,GAAGI,EAAEE,GAAE,EAAGF,EAAED,QAAvI,GAAID,KAA2IF,GAAEQ,EAAET,EAAEC,EAAES,EAAEP,EAAEF,EAAEU,EAAE,SAAST,EAAEG,EAAEL,GAAGC,EAAEA,EAAEC,EAAEG,IAAIO,OAAOC,eAAeX,EAAEG,GAAGS,YAAW,EAAGC,IAAIf,KAAKC,EAAEE,E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O,KACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,IACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KAC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Mt0F,MAAOhiC,IAJ/C,GAAqBzW,K,mBAahB+sI,E,2VAMTh+H,MAAA,WACI,MAAO,I,GAPqGw4H,IAAIwF,O","file":"fineui.ie.min.js","sourcesContent":["!function(e){var r={};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}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)&&o!==undefined){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.join(\"string\"==typeof n?n:\"\")),t!==c?(o?!u&&t[n]&&(i=!0):delete t[n],i?t[n]=e:s(t,n,e)):i?t[n]=e:a(n,e)})(Function.prototype,\"toString\",function(){return\"function\"==typeof this&&u(this).source||o.call(this)})},function(t,n,e){\"use strict\";var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,e){\"use strict\";t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(String(t)+\" is not a function\");return t}},function(t,n,e){\"use strict\";var r=e(37),o=e(25);t.exports=function(t){return r(o(t))}},function(t,n,e){\"use strict\";t.exports=!1},function(t,n,e){\"use strict\";var r,o,i,u=e(76),c=e(0),s=e(7),f=e(6),a=e(8),l=e(26),p=e(27),y=c.WeakMap,d=function d(t){return i(t)?o(t):r(t,{})},v=function v(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw TypeError(\"Incompatible receiver, \"+e+\" required\");return n}};if(u){var h=new y,g=h.get,b=h.has,m=h.set;r=function r(t,n){return m.call(h,t,n),n},o=function o(t){return g.call(h,t)||{}},i=function i(t){return b.call(h,t)}}else{var x=l(\"state\");p[x]=!0,r=function r(t,n){return f(t,x,n),n},o=function o(t){return a(t,x)?t[x]:{}},i=function i(t){return a(t,x)}}t.exports={set:r,get:o,has:i,enforce:d,getterFor:v}},function(t,n,e){\"use strict\";var r=e(10),o=e(0),i=function i(t){return\"function\"==typeof t?t:undefined};t.exports=function(t,n){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][n]||o[t]&&o[t][n]}},function(t,n,e){\"use strict\";var r=e(25);t.exports=function(t){return Object(r(t))}},function(t,n,e){\"use strict\";t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){\"use strict\";var r=e(15),o=e(75);(t.exports=function(t,n){return o[t]||(o[t]=n!==undefined?n:{})})(\"versions\",[]).push({version:\"3.3.2\",mode:r?\"pure\":\"global\",copyright:\"© 2019 Denis Pushkarev (zloirock.ru)\"})},function(t,n,e){\"use strict\";var r=e(3),o=e(83),i=e(43),u=e(27),c=e(52),s=e(39),f=e(26)(\"IE_PROTO\"),a=\"prototype\",l=function l(){},p=function(){var t,n=s(\"iframe\"),e=i.length,r=\"script\";for(n.style.display=\"none\",c.appendChild(n),n.src=String(\"javascript:\"),(t=n.contentWindow.document).open(),t.write(\"<script>document.F=Object</\"+r+\">\"),t.close(),p=t.F;e--;)delete p[a][i[e]];return p()};t.exports=Object.create||function(t,n){var e;return null!==t?(l[a]=r(t),e=new l,l[a]=null,e[f]=t):e=p(),n===undefined?e:o(e,n)},u[f]=!0},function(t,n,e){\"use strict\";t.exports={}},function(t,n,e){\"use strict\";var o=e(13),i=function i(t){var e,r;this.promise=new t(function(t,n){if(e!==undefined||r!==undefined)throw TypeError(\"Bad Promise constructor\");e=t,r=n}),this.resolve=o(e),this.reject=o(r)};t.exports.f=function(t){return new i(t)}},function(t,n,e){\"use strict\";var r=e(5),o=e(36),i=e(19),u=e(14),c=e(38),s=e(8),f=e(47),a=Object.getOwnPropertyDescriptor;n.f=r?a:function(t,n){if(t=u(t),n=c(n,!0),f)try{return a(t,n)}catch(e){}if(s(t,n))return i(!o.f.call(t,n),t[n])}},function(t,n,e){\"use strict\";t.exports=function(t){if(t==undefined)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n,e){\"use strict\";var r=e(20),o=e(41),i=r(\"keys\");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n,e){\"use strict\";t.exports={}},function(t,n,e){\"use strict\";var r=e(29),o=Math.min;t.exports=function(t){return 0<t?o(r(t),9007199254740991):0}},function(t,n,e){\"use strict\";var r=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?o:r)(t)}},function(t,n,e){\"use strict\";var r=e(9).f,o=e(8),i=e(1)(\"toStringTag\");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){\"use strict\";var i=e(13);t.exports=function(r,o,t){if(i(r),o===undefined)return r;switch(t){case 0:return function(){return r.call(o)};case 1:return function(t){return r.call(o,t)};case 2:return function(t,n){return r.call(o,t,n)};case 3:return function(t,n,e){return r.call(o,t,n,e)}}return function(){return r.apply(o,arguments)}}},function(t,n,e){\"use strict\";var r=e(8),o=e(18),i=e(26),u=e(57),c=i(\"IE_PROTO\"),s=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:\"function\"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,n,e){\"use strict\";var r=e(0),o=e(31),i=Function.call;t.exports=function(t,n,e){return o(i,r[t].prototype[n],e)}},function(t,n,e){\"use strict\";function y(t){return(y=\"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 d=e(3),v=e(123),h=e(28),g=e(31),b=e(124),m=e(125),x=function x(t,n){this.stopped=t,this.result=n};(t.exports=function(t,n,e,r,o){var i,u,c,s,f,a,l,p=g(n,e,r?2:1);if(o)i=t;else{if(\"function\"!=typeof(u=b(t)))throw TypeError(\"Target is not iterable\");if(v(u)){for(c=0,s=h(t.length);c<s;c++)if((f=r?p(d(l=t[c])[0],l[1]):p(t[c]))&&f instanceof x)return f;return new x(!1)}i=u.call(t)}for(a=i.next;!(l=a.call(i)).done;)if(\"object\"==y(f=m(i,p,l.value,r))&&f&&f instanceof x)return f;return new x(!1)}).stop=function(t){return new x(!0,t)}},function(t,n,e){\"use strict\";t.exports=function(t){try{return{error:!1,value:t()}}catch(n){return{error:!0,value:n}}}},function(t,n,e){\"use strict\";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n,e){\"use strict\";var r=e(4),o=e(12),i=\"\".split;t.exports=r(function(){return!Object(\"z\").propertyIsEnumerable(0)})?function(t){return\"String\"==o(t)?i.call(t,\"\"):Object(t)}:Object},function(t,n,e){\"use strict\";var o=e(7);t.exports=function(t,n){if(!o(t))return t;var e,r;if(n&&\"function\"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;if(\"function\"==typeof(e=t.valueOf)&&!o(r=e.call(t)))return r;if(!n&&\"function\"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")}},function(t,n,e){\"use strict\";var r=e(0),o=e(7),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n,e){\"use strict\";var r=e(0),o=e(6);t.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},function(t,n,e){\"use strict\";var r=0,o=Math.random();t.exports=function(t){return\"Symbol(\"+String(t===undefined?\"\":t)+\")_\"+(++r+o).toString(36)}},function(t,n,e){\"use strict\";var r=e(49),o=e(43).concat(\"length\",\"prototype\");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n,e){\"use strict\";t.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},function(t,n,e){\"use strict\";n.f=Object.getOwnPropertySymbols},function(t,n,e){\"use strict\";var r=e(49),o=e(43);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){\"use strict\";var r=e(17);t.exports=r(\"navigator\",\"userAgent\")||\"\"},function(t,n,e){\"use strict\";var r=e(5),o=e(4),i=e(39);t.exports=!r&&!o(function(){return 7!=Object.defineProperty(i(\"div\"),\"a\",{get:function(){return 7}}).a})},function(t,n,e){\"use strict\";var r=e(20);t.exports=r(\"native-function-to-string\",Function.toString)},function(t,n,e){\"use strict\";var u=e(8),c=e(14),s=e(50).indexOf,f=e(27);t.exports=function(t,n){var e,r=c(t),o=0,i=[];for(e in r)!u(f,e)&&u(r,e)&&i.push(e);for(;n.length>o;)u(r,e=n[o++])&&(~s(i,e)||i.push(e));return i}},function(t,n,e){\"use strict\";var s=e(14),f=e(28),a=e(79),r=function r(c){return function(t,n,e){var r,o=s(t),i=f(o.length),u=a(e,i);if(c&&n!=n){for(;u<i;)if((r=o[u++])!=r)return!0}else for(;u<i;u++)if((c||u in o)&&o[u]===n)return c||u||0;return!c&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}},function(t,n,e){\"use strict\";var r=e(4),o=/#|\\.prototype\\./,i=function i(t,n){var e=c[u(t)];return e==f||e!=s&&(\"function\"==typeof n?r(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,\".\").toLowerCase()},c=i.data={},s=i.NATIVE=\"N\",f=i.POLYFILL=\"P\";t.exports=i},function(t,n,e){\"use strict\";var r=e(17);t.exports=r(\"document\",\"documentElement\")},function(t,n,e){\"use strict\";var r=e(4);t.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(t,n,e){\"use strict\";var r=e(12);t.exports=Array.isArray||function(t){return\"Array\"==r(t)}},function(t,n,e){\"use strict\";n.f=e(1)},function(t,n,e){\"use strict\";var x=e(31),S=e(37),O=e(18),j=e(28),w=e(93),P=[].push,r=function r(y){var d=1==y,v=2==y,h=3==y,g=4==y,b=6==y,m=5==y||b;return function(t,n,e,r){for(var o,i,u=O(t),c=S(u),s=x(n,e,3),f=j(c.length),a=0,l=r||w,p=d?l(t,f):v?l(t,0):undefined;a<f;a++)if((m||a in c)&&(i=s(o=c[a],a,u),y))if(d)p[a]=i;else if(i)switch(y){case 3:return!0;case 5:return o;case 6:return a;case 2:P.call(p,o)}else if(g)return!1;return b?-1:h||g?g:p}};t.exports={forEach:r(0),map:r(1),filter:r(2),some:r(3),every:r(4),find:r(5),findIndex:r(6)}},function(t,n,e){\"use strict\";var r=e(4);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},function(t,n,e){\"use strict\";var r=e(4);t.exports=function(t,n){var e=[][t];return!e||!r(function(){e.call(null,n||function(){throw 1},1)})}},function(t,n,e){\"use strict\";var o=e(12),i=e(1)(\"toStringTag\"),u=\"Arguments\"==o(function(){return arguments}()),c=function c(t,n){try{return t[n]}catch(e){}};t.exports=function(t){var n,e,r;return t===undefined?\"Undefined\":null===t?\"Null\":\"string\"==typeof(e=c(n=Object(t),i))?e:u?o(n):\"Object\"==(r=o(n))&&\"function\"==typeof n.callee?\"Arguments\":r}},function(t,n,e){\"use strict\";var s=e(29),f=e(25),r=function r(c){return function(t,n){var e,r,o=String(f(t)),i=s(n),u=o.length;return i<0||u<=i?c?\"\":undefined:(e=o.charCodeAt(i))<55296||56319<e||i+1===u||(r=o.charCodeAt(i+1))<56320||57343<r?c?o.charAt(i):e:c?o.slice(i,i+2):r-56320+(e-55296<<10)+65536}};t.exports={codeAt:r(!1),charAt:r(!0)}},function(t,n,e){\"use strict\";var g=e(2),b=e(113),m=e(32),x=e(63),S=e(30),O=e(6),j=e(11),r=e(1),w=e(15),P=e(22),o=e(62),E=o.IteratorPrototype,A=o.BUGGY_SAFARI_ITERATORS,T=r(\"iterator\"),L=\"values\",M=\"entries\",k=function k(){return this};t.exports=function(t,n,e,r,o,i,u){b(e,n,r);var c,s,f,a=function a(t){if(t===o&&v)return v;if(!A&&t in y)return y[t];switch(t){case\"keys\":case L:case M:return function(){return new e(this,t)}}return function(){return new e(this)}},l=n+\" Iterator\",p=!1,y=t.prototype,d=y[T]||y[\"@@iterator\"]||o&&y[o],v=!A&&d||a(o),h=\"Array\"==n&&y.entries||d;if(h&&(c=m(h.call(new t)),E!==Object.prototype&&c.next&&(w||m(c)===E||(x?x(c,E):\"function\"!=typeof c[T]&&O(c,T,k)),S(c,l,!0,!0),w&&(P[l]=k))),o==L&&d&&d.name!==L&&(p=!0,v=function(){return d.call(this)}),w&&!u||y[T]===v||O(y,T,v),P[n]=v,o)if(s={values:a(L),keys:i?v:a(\"keys\"),entries:a(M)},u)for(f in s)!A&&!p&&f in y||j(y,f,s[f]);else g({target:n,proto:!0,forced:A||p},s);return s}},function(t,n,e){\"use strict\";var r,o,i,u=e(32),c=e(6),s=e(8),f=e(1),a=e(15),l=f(\"iterator\"),p=!1,y=function y(){return this};[].keys&&(\"next\"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):p=!0),r==undefined&&(r={}),a||s(r,l)||c(r,l,y),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,n,e){\"use strict\";var o=e(3),i=e(114);t.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var e,r=!1,t={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\").set).call(t,[]),r=t instanceof Array}catch(n){}return function(t,n){return o(t),i(n),r?e.call(t,n):function u(t,n){for(var e=Object.getOwnPropertyNames(n),r=0;r<e.length;r++){var o=e[r],i=Object.getOwnPropertyDescriptor(n,o);i&&i.configurable&&t[o]===undefined&&Object.defineProperty(t,o,i)}return t}(t,n),t}}():undefined)},function(t,n,e){\"use strict\";var r=e(0);t.exports=r.Promise},function(t,n,e){\"use strict\";var o=e(3),i=e(13),u=e(1)(\"species\");t.exports=function(t,n){var e,r=o(t).constructor;return r===undefined||(e=o(r)[u])==undefined?n:i(e)}},function(t,n,e){\"use strict\";var r,o,i,u=e(0),c=e(4),s=e(12),f=e(31),a=e(52),l=e(39),p=e(46),y=u.location,d=u.setImmediate,v=u.clearImmediate,h=u.process,g=u.MessageChannel,b=u.Dispatch,m=0,x={},S=\"onreadystatechange\",O=function O(t){if(x.hasOwnProperty(t)){var n=x[t];delete x[t],n()}},j=function j(t){return function(){O(t)}},w=function w(t){O(t.data)},P=function P(t){u.postMessage(t+\"\",y.protocol+\"//\"+y.host)};d&&v||(d=function(t){for(var n=[],e=1;e<arguments.length;)n.push(arguments[e++]);return x[++m]=function(){(\"function\"==typeof t?t:Function(t)).apply(undefined,n)},r(m),m},v=function(t){delete x[t]},\"process\"==s(h)?r=function r(t){h.nextTick(j(t))}:b&&b.now?r=function r(t){b.now(j(t))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(p)?(i=(o=new g).port2,o.port1.onmessage=w,r=f(i.postMessage,i,1)):!u.addEventListener||\"function\"!=typeof postMessage||u.importScripts||c(P)?r=S in l(\"script\")?function r(t){a.appendChild(l(\"script\"))[S]=function(){a.removeChild(this),O(t)}}:function r(t){setTimeout(j(t),0)}:(r=P,u.addEventListener(\"message\",w,!1))),t.exports={set:d,clear:v}},function(t,n,e){\"use strict\";var r=e(3),o=e(7),i=e(23);t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){\"use strict\";var r=e(2),f=e(13),o=e(23),i=e(35),a=e(34);r({target:\"Promise\",stat:!0},{allSettled:function(t){var c=this,n=o.f(c),s=n.resolve,e=n.reject,r=i(function(){var r=f(c.resolve),o=[],i=0,u=1;a(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(c,t).then(function(t){e||(e=!0,o[n]={status:\"fulfilled\",value:t},--u||s(o))},function(t){e||(e=!0,o[n]={status:\"rejected\",reason:t},--u||s(o))})}),--u||s(o)});return r.error&&e(r.value),n.promise}})},function(t,n,e){\"use strict\";var r,o,u=e(138),c=RegExp.prototype.exec,s=String.prototype.replace,i=c,f=(r=/a/,o=/b*/g,c.call(r,\"a\"),c.call(o,\"a\"),0!==r.lastIndex||0!==o.lastIndex),a=/()??/.exec(\"\")[1]!==undefined;(f||a)&&(i=function(t){var n,e,r,o,i=this;return a&&(e=new RegExp(\"^\"+i.source+\"$(?!\\\\s)\",u.call(i))),f&&(n=i.lastIndex),r=c.call(i,t),f&&r&&(i.lastIndex=i.global?r.index+r[0].length:n),a&&r&&1<r.length&&s.call(r[0],e,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===undefined&&(r[o]=undefined)}),r}),t.exports=i},function(t,n,e){e(71),e(80),e(84),e(88),e(94),e(97),e(101),e(104),e(108),t.exports=e(134)},function(t,n,e){\"use strict\";t.exports=e(72)},function(t,n,e){\"use strict\";e(73);var r=e(10).Object,o=t.exports=function o(t,n,e){return r.defineProperty(t,n,e)};r.defineProperty.sham&&(o.sham=!0)},function(t,n,e){\"use strict\";var r=e(2),o=e(5);r({target:\"Object\",stat:!0,forced:!o,sham:!o},{defineProperty:e(9).f})},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)}var o;o=function(){return this}();try{o=o||new Function(\"return this\")()}catch(i){\"object\"===(\"undefined\"==typeof window?\"undefined\":r(window))&&(o=window)}t.exports=o},function(t,n,e){\"use strict\";var r=e(0),o=e(40),i=\"__core-js_shared__\",u=r[i]||o(i,{});t.exports=u},function(t,n,e){\"use strict\";var r=e(0),o=e(48),i=r.WeakMap;t.exports=\"function\"==typeof i&&/native code/.test(o.call(i))},function(t,n,e){\"use strict\";var c=e(8),s=e(78),f=e(24),a=e(9);t.exports=function(t,n){for(var e=s(n),r=a.f,o=f.f,i=0;i<e.length;i++){var u=e[i];c(t,u)||r(t,u,o(n,u))}}},function(t,n,e){\"use strict\";var r=e(17),o=e(42),i=e(44),u=e(3);t.exports=r(\"Reflect\",\"ownKeys\")||function(t){var n=o.f(u(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){\"use strict\";var r=e(29),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n,e){\"use strict\";t.exports=e(81)},function(t,n,e){\"use strict\";e(82);var r=e(10).Object;t.exports=function(t,n){return r.create(t,n)}},function(t,n,e){\"use strict\";e(2)({target:\"Object\",stat:!0,sham:!e(5)},{create:e(21)})},function(t,n,e){\"use strict\";var r=e(5),u=e(9),c=e(3),s=e(45);t.exports=r?Object.defineProperties:function(t,n){c(t);for(var e,r=s(n),o=r.length,i=0;i<o;)u.f(t,e=r[i++],n[e]);return t}},function(t,n,e){\"use strict\";t.exports=e(85)},function(t,n,e){\"use strict\";e(86);var r=e(10);t.exports=r.Object.assign},function(t,n,e){\"use strict\";var r=e(2),o=e(87);r({target:\"Object\",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,n,e){\"use strict\";var p=e(5),r=e(4),y=e(45),d=e(44),v=e(36),h=e(18),g=e(37),o=Object.assign;t.exports=!o||r(function(){var t={},n={},e=Symbol(),r=\"abcdefghijklmnopqrst\";return t[e]=7,r.split(\"\").forEach(function(t){n[t]=t}),7!=o({},t)[e]||y(o({},n)).join(\"\")!=r})?function(t,n){for(var e=h(t),r=arguments.length,o=1,i=d.f,u=v.f;o<r;)for(var c,s=g(arguments[o++]),f=i?y(s).concat(i(s)):y(s),a=f.length,l=0;l<a;)c=f[l++],p&&!u.call(s,c)||(e[c]=s[c]);return e}:o},function(t,n,e){\"use strict\";t.exports=e(89)},function(t,n,e){\"use strict\";e(90);var r=e(10);t.exports=r.Object.getOwnPropertySymbols},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)}var o=e(2),i=e(0),u=e(15),c=e(5),s=e(53),f=e(4),a=e(8),l=e(54),p=e(7),y=e(3),d=e(18),v=e(14),h=e(38),g=e(19),b=e(21),m=e(45),x=e(42),S=e(91),O=e(44),j=e(24),w=e(9),P=e(36),E=e(6),A=e(11),T=e(20),L=e(26),M=e(27),k=e(41),I=e(1),_=e(55),F=e(92),C=e(30),R=e(16),N=e(56).forEach,D=L(\"hidden\"),G=\"Symbol\",V=\"prototype\",$=I(\"toPrimitive\"),z=R.set,H=R.getterFor(G),W=Object[V],q=i.Symbol,B=i.JSON,U=B&&B.stringify,Y=j.f,J=w.f,K=S.f,Q=P.f,X=T(\"symbols\"),Z=T(\"op-symbols\"),tt=T(\"string-to-symbol-registry\"),nt=T(\"symbol-to-string-registry\"),et=T(\"wks\"),rt=i.QObject,ot=!rt||!rt[V]||!rt[V].findChild,it=c&&f(function(){return 7!=b(J({},\"a\",{get:function(){return J(this,\"a\",{value:7}).a}})).a})?function(t,n,e){var r=Y(W,n);r&&delete W[n],J(t,n,e),r&&t!==W&&J(W,n,r)}:J,ut=function ut(t,n){var e=X[t]=b(q[V]);return z(e,{type:G,tag:t,description:n}),c||(e.description=n),e},ct=s&&\"symbol\"==r(q.iterator)?function(t){return\"symbol\"==r(t)}:function(t){return Object(t)instanceof q},st=function(t,n,e){t===W&&st(Z,n,e),y(t);var r=h(n,!0);return y(e),a(X,r)?(e.enumerable?(a(t,D)&&t[D][r]&&(t[D][r]=!1),e=b(e,{enumerable:g(0,!1)})):(a(t,D)||J(t,D,g(1,{})),t[D][r]=!0),it(t,r,e)):J(t,r,e)},ft=function(n,t){y(n);var e=v(t),r=m(e).concat(yt(e));return N(r,function(t){c&&!at.call(e,t)||st(n,t,e[t])}),n},at=function(t){var n=h(t,!0),e=Q.call(this,n);return!(this===W&&a(X,n)&&!a(Z,n))&&(!(e||!a(this,n)||!a(X,n)||a(this,D)&&this[D][n])||e)},lt=function(t,n){var e=v(t),r=h(n,!0);if(e!==W||!a(X,r)||a(Z,r)){var o=Y(e,r);return!o||!a(X,r)||a(e,D)&&e[D][r]||(o.enumerable=!0),o}},pt=function(t){var n=K(v(t)),e=[];return N(n,function(t){a(X,t)||a(M,t)||e.push(t)}),e},yt=function(t){var n=t===W,e=K(n?Z:v(t)),r=[];return N(e,function(t){!a(X,t)||n&&!a(W,t)||r.push(X[t])}),r};s||(A((q=function(){if(this instanceof q)throw TypeError(\"Symbol is not a constructor\");var t=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,n=k(t),e=function e(t){this===W&&e.call(Z,t),a(this,D)&&a(this[D],n)&&(this[D][n]=!1),it(this,n,g(1,t))};return c&&ot&&it(W,n,{configurable:!0,set:e}),ut(n,t)})[V],\"toString\",function(){return H(this).tag}),P.f=at,w.f=st,j.f=lt,x.f=S.f=pt,O.f=yt,c&&(J(q[V],\"description\",{configurable:!0,get:function(){return H(this).description}}),u||A(W,\"propertyIsEnumerable\",at,{unsafe:!0})),_.f=function(t){return ut(I(t),t)}),o({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:q}),N(m(et),function(t){F(t)}),o({target:G,stat:!0,forced:!s},{\"for\":function(t){var n=String(t);if(a(tt,n))return tt[n];var e=q(n);return tt[n]=e,nt[e]=n,e},keyFor:function(t){if(!ct(t))throw TypeError(t+\" is not a symbol\");if(a(nt,t))return nt[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),o({target:\"Object\",stat:!0,forced:!s,sham:!c},{create:function(t,n){return n===undefined?b(t):ft(b(t),n)},defineProperty:st,defineProperties:ft,getOwnPropertyDescriptor:lt}),o({target:\"Object\",stat:!0,forced:!s},{getOwnPropertyNames:pt,getOwnPropertySymbols:yt}),o({target:\"Object\",stat:!0,forced:f(function(){O.f(1)})},{getOwnPropertySymbols:function(t){return O.f(d(t))}}),B&&o({target:\"JSON\",stat:!0,forced:!s||f(function(){var t=q();return\"[null]\"!=U([t])||\"{}\"!=U({a:t})||\"{}\"!=U(Object(t))})},{stringify:function(t){for(var e,r,n=[t],o=1;o<arguments.length;)n.push(arguments[o++]);if(r=e=n[1],(p(e)||t!==undefined)&&!ct(t))return l(e)||(e=function e(t,n){if(\"function\"==typeof r&&(n=r.call(this,t,n)),!ct(n))return n}),n[1]=e,U.apply(B,n)}}),q[V][$]||E(q[V],$,q[V].valueOf),C(q,G),M[D]=!0},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)}var o=e(14),i=e(42).f,u={}.toString,c=\"object\"==(\"undefined\"==typeof window?\"undefined\":r(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function s(t){try{return i(t)}catch(n){return c.slice()}};t.exports.f=function(t){return c&&\"[object Window]\"==u.call(t)?s(t):i(o(t))}},function(t,n,e){\"use strict\";var r=e(10),o=e(8),i=e(55),u=e(9).f;t.exports=function(t){var n=r.Symbol||(r.Symbol={});o(n,t)||u(n,t,{value:i.f(t)})}},function(t,n,e){\"use strict\";var r=e(7),o=e(54),i=e(1)(\"species\");t.exports=function(t,n){var e;return o(t)&&(\"function\"==typeof(e=t.constructor)&&(e===Array||o(e.prototype))||r(e)&&null===(e=e[i]))&&(e=undefined),new(e===undefined?Array:e)(0===n?0:n)}},function(t,n,e){\"use strict\";t.exports=e(95)},function(t,n,e){\"use strict\";e(96);var r=e(10);t.exports=r.Object.getPrototypeOf},function(t,n,e){\"use strict\";var r=e(2),o=e(4),i=e(18),u=e(32),c=e(57);r({target:\"Object\",stat:!0,forced:o(function(){u(1)}),sham:!c},{getPrototypeOf:function(t){return u(i(t))}})},function(t,n,e){\"use strict\";t.exports=e(98)},function(t,n,e){\"use strict\";e(99);var r=e(33);t.exports=r(\"Array\",\"forEach\")},function(t,n,e){\"use strict\";var r=e(2),o=e(100);r({target:\"Array\",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,n,e){\"use strict\";var r=e(56).forEach,o=e(58);t.exports=o(\"forEach\")?function(t){return r(this,t,1<arguments.length?arguments[1]:undefined)}:[].forEach},function(t,n,e){\"use strict\";t.exports=e(102)},function(t,n,e){\"use strict\";e(103);var r=e(33);t.exports=r(\"Array\",\"indexOf\")},function(t,n,e){\"use strict\";var r=e(2),o=e(50).indexOf,i=e(58),u=[].indexOf,c=!!u&&1/[1].indexOf(1,-0)<0,s=i(\"indexOf\");r({target:\"Array\",proto:!0,forced:c||s},{indexOf:function(t){return c?u.apply(this,arguments)||0:o(this,t,1<arguments.length?arguments[1]:undefined)}})},function(t,n,e){\"use strict\";t.exports=e(105)},function(t,n,e){\"use strict\";e(106);var r=e(33);t.exports=r(\"Function\",\"bind\")},function(t,n,e){\"use strict\";e(2)({target:\"Function\",proto:!0},{bind:e(107)})},function(t,n,e){\"use strict\";var i=e(13),u=e(7),c=[].slice,s={},f=function f(t,n,e){if(!(n in s)){for(var r=[],o=0;o<n;o++)r[o]=\"a[\"+o+\"]\";s[n]=Function(\"C,a\",\"return new C(\"+r.join(\",\")+\")\")}return s[n](t,e)};t.exports=Function.bind||function(n){var e=i(this),r=c.call(arguments,1),o=function(){var t=r.concat(c.call(arguments));return this instanceof o?f(e,t.length,t):e.apply(n,t)};return u(e.prototype)&&(o.prototype=e.prototype),o}},function(t,n,e){\"use strict\";t.exports=e(109),e(130),e(131),e(132),e(133)},function(t,n,e){\"use strict\";e(110),e(112),e(115),e(119),e(68),e(129);var r=e(10);t.exports=r.Promise},function(t,n,e){\"use strict\";var r=e(11),o=e(111),i=Object.prototype;o!==i.toString&&r(i,\"toString\",o,{unsafe:!0})},function(t,n,e){\"use strict\";var r=e(59),o={};o[e(1)(\"toStringTag\")]=\"z\",t.exports=\"[object z]\"!==String(o)?function(){return\"[object \"+r(this)+\"]\"}:o.toString},function(t,n,e){\"use strict\";var o=e(60).charAt,r=e(16),i=e(61),u=\"String Iterator\",c=r.set,s=r.getterFor(u);i(String,\"String\",function(t){c(this,{type:u,string:String(t),index:0})},function(){var t,n=s(this),e=n.string,r=n.index;return r>=e.length?{value:undefined,done:!0}:(t=o(e,r),n.index+=t.length,{value:t,done:!1})})},function(t,n,e){\"use strict\";var o=e(62).IteratorPrototype,i=e(21),u=e(19),c=e(30),s=e(22),f=function f(){return this};t.exports=function(t,n,e){var r=n+\" Iterator\";return t.prototype=i(o,{next:u(1,e)}),c(t,r,!1,!0),s[r]=f,t}},function(t,n,e){\"use strict\";var r=e(7);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError(\"Can't set \"+String(t)+\" as a prototype\");return t}},function(t,n,e){\"use strict\";var r=e(0),o=e(116),i=e(117),u=e(6),c=e(1),s=c(\"iterator\"),f=c(\"toStringTag\"),a=i.values;for(var l in o){var p=r[l],y=p&&p.prototype;if(y){if(y[s]!==a)try{u(y,s,a)}catch(v){y[s]=a}if(y[f]||u(y,f,l),o[l])for(var d in i)if(y[d]!==i[d])try{u(y,d,i[d])}catch(v){y[d]=i[d]}}}},function(t,n,e){\"use strict\";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,n,e){\"use strict\";var r=e(14),o=e(118),i=e(22),u=e(16),c=e(61),s=\"Array Iterator\",f=u.set,a=u.getterFor(s);t.exports=c(Array,\"Array\",function(t,n){f(this,{type:s,target:r(t),index:0,kind:n})},function(){var t=a(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=undefined,{value:undefined,done:!0}):\"keys\"==e?{value:r,done:!1}:\"values\"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}},\"values\"),i.Arguments=i.Array,o(\"keys\"),o(\"values\"),o(\"entries\")},function(t,n,e){\"use strict\";var r=e(1),o=e(21),i=e(6),u=r(\"unscopables\"),c=Array.prototype;c[u]==undefined&&i(c,u,o(null)),t.exports=function(t){c[u][t]=!0}},function(t,n,e){\"use strict\";var r,o,i,u,c=e(2),s=e(15),f=e(0),a=e(10),l=e(64),p=e(11),y=e(120),d=e(30),v=e(121),h=e(7),g=e(13),b=e(122),m=e(12),x=e(34),S=e(126),O=e(65),j=e(66).set,w=e(127),P=e(67),E=e(128),A=e(23),T=e(35),L=e(46),M=e(16),k=e(51),I=e(1)(\"species\"),_=\"Promise\",F=M.get,C=M.set,R=M.getterFor(_),N=l,D=f.TypeError,G=f.document,V=f.process,$=f.fetch,z=V&&V.versions,H=z&&z.v8||\"\",W=A.f,q=W,B=\"process\"==m(V),U=!!(G&&G.createEvent&&f.dispatchEvent),Y=\"unhandledrejection\",J=k(_,function(){var t=N.resolve(1),n=function n(){},e=(t.constructor={})[I]=function(t){t(n,n)};return!((B||\"function\"==typeof PromiseRejectionEvent)&&(!s||t[\"finally\"])&&t.then(n)instanceof e&&0!==H.indexOf(\"6.6\")&&-1===L.indexOf(\"Chrome/66\"))}),K=J||!S(function(t){N.all(t)[\"catch\"](function(){})}),Q=function Q(t){var n;return!(!h(t)||\"function\"!=typeof(n=t.then))&&n},X=function X(p,y,d){if(!y.notified){y.notified=!0;var v=y.reactions;w(function(){for(var t=y.value,n=1==y.state,e=0;v.length>e;){var r,o,i,u=v[e++],c=n?u.ok:u.fail,s=u.resolve,f=u.reject,a=u.domain;try{c?(n||(2===y.rejection&&et(p,y),y.rejection=1),!0===c?r=t:(a&&a.enter(),r=c(t),a&&(a.exit(),i=!0)),r===u.promise?f(D(\"Promise-chain cycle\")):(o=Q(r))?o.call(r,s,f):s(r)):f(t)}catch(l){a&&!i&&a.exit(),f(l)}}y.reactions=[],y.notified=!1,d&&!y.rejection&&tt(p,y)})}},Z=function Z(t,n,e){var r,o;U?((r=G.createEvent(\"Event\")).promise=n,r.reason=e,r.initEvent(t,!1,!0),f.dispatchEvent(r)):r={promise:n,reason:e},(o=f[\"on\"+t])?o(r):t===Y&&E(\"Unhandled promise rejection\",e)},tt=function tt(e,r){j.call(f,function(){var t,n=r.value;if(nt(r)&&(t=T(function(){B?V.emit(\"unhandledRejection\",n,e):Z(Y,e,n)}),r.rejection=B||nt(r)?2:1,t.error))throw t.value})},nt=function nt(t){return 1!==t.rejection&&!t.parent},et=function et(t,n){j.call(f,function(){B?V.emit(\"rejectionHandled\",t):Z(\"rejectionhandled\",t,n.value)})},rt=function rt(n,e,r,o){return function(t){n(e,r,t,o)}},ot=function ot(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,X(t,n,!0))},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:undefined})}).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:undefined,e.parent=!0,e.reactions.push(r),0!=e.state&&X(this,e,!1),r.promise},\"catch\":function(t){return this.then(undefined,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(undefined,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(undefined),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 t!==undefined&&(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(t!=undefined)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 o!==undefined&&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=undefined,e}}i=undefined,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(undefined),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:undefined};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 strict\";var r=e(2),o=e(15),i=e(64),u=e(17),c=e(65),s=e(67),f=e(11);r({target:\"Promise\",proto:!0,real:!0},{\"finally\":function(n){var e=c(this,u(\"Promise\")),t=\"function\"==typeof n;return this.then(t?function(t){return s(e,n()).then(function(){return t})}:n,t?function(t){return s(e,n()).then(function(){throw t})}:n)}}),o||\"function\"!=typeof i||i.prototype[\"finally\"]||f(i.prototype,\"finally\",u(\"Promise\").prototype[\"finally\"])},function(t,n,e){\"use strict\";var r=e(2),o=e(5),i=e(32),u=e(63),c=e(21),s=e(9),f=e(19),a=e(34),l=e(6),p=e(3),y=e(16),d=y.set,v=y.getterFor(\"AggregateError\"),h=function(t,n){var e=this;if(!(e instanceof h))return new h(t,n);u&&(e=u(new Error(n),i(e)));var r=[];return a(t,r.push,r),o?d(e,{errors:r,type:\"AggregateError\"}):e.errors=r,n!==undefined&&l(e,\"message\",String(n)),e};h.prototype=c(Error.prototype,{constructor:f(5,h),message:f(5,\"\"),name:f(5,\"AggregateError\"),toString:f(5,function(){var t=p(this).name;t=t===undefined?\"AggregateError\":String(t);var n=this.message;return t+\": \"+(n=n===undefined?\"\":String(n))})}),o&&s.f(h.prototype,\"errors\",{get:function(){return v(this).errors},configurable:!0}),r({global:!0},{AggregateError:h})},function(t,n,e){\"use strict\";e(68)},function(t,n,e){\"use strict\";var r=e(2),o=e(23),i=e(35);r({target:\"Promise\",stat:!0},{\"try\":function(t){var n=o.f(this),e=i(t);return(e.error?n.reject:n.resolve)(e.value),n.promise}})},function(t,n,e){\"use strict\";var r=e(2),l=e(13),p=e(17),o=e(23),i=e(35),y=e(34),d=\"No one promise resolved\";r({target:\"Promise\",stat:!0},{any:function(t){var s=this,n=o.f(s),f=n.resolve,a=n.reject,e=i(function(){var r=l(s.resolve),o=[],i=0,u=1,c=!1;y(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(s,t).then(function(t){e||c||(c=!0,f(t))},function(t){e||c||(e=!0,o[n]=t,--u||a(new(p(\"AggregateError\"))(o,d)))})}),--u||a(new(p(\"AggregateError\"))(o,d))});return e.error&&a(e.value),n.promise}})},function(t,n,e){\"use strict\";t.exports=e(135)},function(t,n,e){\"use strict\";e(136);var r=e(33);t.exports=r(\"String\",\"replace\")},function(t,n,e){\"use strict\";var r=e(137),j=e(3),p=e(18),w=e(28),P=e(29),i=e(25),E=e(139),A=e(140),T=Math.max,L=Math.min,y=Math.floor,d=/\\$([$&'`]|\\d\\d?|<[^>]*>)/g,v=/\\$([$&'`]|\\d\\d?)/g,M=function M(t){return t===undefined?t:String(t)};r(\"replace\",2,function(o,x,S){return[function(t,n){var e=i(this),r=t==undefined?undefined:t[o];return r!==undefined?r.call(t,e,n):x.call(String(e),t,n)},function(t,n){var e=S(x,t,this,n);if(e.done)return e.value;var r=j(t),o=String(this),i=\"function\"==typeof n;i||(n=String(n));var u=r.global;if(u){var c=r.unicode;r.lastIndex=0}for(var s=[];;){var f=A(r,o);if(null===f)break;if(s.push(f),!u)break;\"\"===String(f[0])&&(r.lastIndex=E(o,w(r.lastIndex),c))}for(var a=\"\",l=0,p=0;p<s.length;p++){f=s[p];for(var y=String(f[0]),d=T(L(P(f.index),o.length),0),v=[],h=1;h<f.length;h++)v.push(M(f[h]));var g=f.groups;if(i){var b=[y].concat(v,d,o);g!==undefined&&b.push(g);var m=String(n.apply(undefined,b))}else m=O(y,o,d,v,g,n);l<=d&&(a+=o.slice(l,d)+m,l=d+y.length)}return a+o.slice(l)}];function O(i,u,c,s,f,t){var a=c+i.length,l=s.length,n=v;return f!==undefined&&(f=p(f),n=d),x.call(t,n,function(t,n){var e;switch(n.charAt(0)){case\"$\":return\"$\";case\"&\":return i;case\"`\":return u.slice(0,c);case\"'\":return u.slice(a);case\"<\":e=f[n.slice(1,-1)];break;default:var r=+n;if(0==r)return t;if(l<r){var o=y(r/10);return 0===o?t:o<=l?s[o-1]===undefined?n.charAt(1):s[o-1]+n.charAt(1):t}e=s[r-1]}return e===undefined?\"\":e})}})},function(t,n,e){\"use strict\";var l=e(6),p=e(11),y=e(4),d=e(1),v=e(69),h=d(\"species\"),g=!y(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:\"7\"},t},\"7\"!==\"\".replace(t,\"$<a>\")}),b=!y(function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e=\"ab\".split(t);return 2!==e.length||\"a\"!==e[0]||\"b\"!==e[1]});t.exports=function(e,t,n,r){var o=d(e),i=!y(function(){var t={};return t[o]=function(){return 7},7!=\"\"[e](t)}),u=i&&!y(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},\"split\"===e&&(n.constructor={},n.constructor[h]=function(){return n}),n[o](\"\"),!t});if(!i||!u||\"replace\"===e&&!g||\"split\"===e&&!b){var c=/./[o],s=n(o,\"\"[e],function(t,n,e,r,o){return n.exec===v?i&&!o?{done:!0,value:c.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}}),f=s[0],a=s[1];p(String.prototype,e,f),p(RegExp.prototype,o,2==t?function(t,n){return a.call(t,this,n)}:function(t){return a.call(t,this)}),r&&l(RegExp.prototype[o],\"sham\",!0)}}},function(t,n,e){\"use strict\";var r=e(3);t.exports=function(){var t=r(this),n=\"\";return t.global&&(n+=\"g\"),t.ignoreCase&&(n+=\"i\"),t.multiline&&(n+=\"m\"),t.dotAll&&(n+=\"s\"),t.unicode&&(n+=\"u\"),t.sticky&&(n+=\"y\"),n}},function(t,n,e){\"use strict\";var r=e(60).charAt;t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},function(t,n,e){\"use strict\";function o(t){return(o=\"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 i=e(12),u=e(69);t.exports=function(t,n){var e=t.exec;if(\"function\"==typeof e){var r=e.call(t,n);if(\"object\"!==o(r))throw TypeError(\"RegExp exec method returned something other than an Object or null\");return r}if(\"RegExp\"!==i(t))throw TypeError(\"RegExp#exec called on incompatible receiver\");return u.call(t,n)}}]);/**\r\n * Created by richie on 15/7/8.\r\n */\r\n/**\r\n * 初始化BI对象\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (_global.BI == null) {\r\n _global.BI = {prepares: []};\r\n}\r\nif(_global.BI.prepares == null) {\r\n _global.BI.prepares = [];\r\n}// Production steps of ECMA-262, Edition 5, 15.4.4.14\r\n// Reference: http://es5.github.io/#x15.4.4.14\r\nif (!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function (searchElement, fromIndex) {\r\n\r\n var k;\r\n\r\n // 1. Let o be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if (this == null) {\r\n throw new TypeError(\"\\\"this\\\" is null or not defined\");\r\n }\r\n\r\n var o = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of o with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = o.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if (len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = fromIndex | 0;\r\n\r\n // 6. If n >= len, return -1.\r\n if (n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while (k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of o with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of o with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if (k in o && o[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\nif (!Array.prototype.lastIndexOf) {\r\n Array.prototype.lastIndexOf = function (searchElement /* , fromIndex*/) {\r\n \"use strict\";\r\n\r\n if (this === void 0 || this === null) {\r\n throw new TypeError();\r\n }\r\n\r\n var n, k,\r\n t = Object(this),\r\n len = t.length >>> 0;\r\n if (len === 0) {\r\n return -1;\r\n }\r\n\r\n n = len - 1;\r\n if (arguments.length > 1) {\r\n n = Number(arguments[1]);\r\n if (n != n) {\r\n n = 0;\r\n } else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {\r\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\r\n }\r\n }\r\n\r\n for (k = n >= 0\r\n ? Math.min(n, len - 1)\r\n : len - Math.abs(n); k >= 0; k--) {\r\n if (k in t && t[k] === searchElement) {\r\n return k;\r\n }\r\n }\r\n return -1;\r\n };\r\n}\r\n/**\r\n * 特殊情况\r\n * Created by wang on 15/6/23.\r\n */\r\n// 解决console未定义问题 guy\r\n_global.console = _global.console || (function () {\r\n var c = {};\r\n c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile\r\n = c.clear = c.exception = c.trace = c.assert = function () {\r\n };\r\n return c;\r\n})();\r\n/*\r\n * 前端缓存\r\n */\r\n_global.localStorage || (_global.localStorage = {\r\n items: {},\r\n setItem: function (k, v) {\r\n BI.Cache.addCookie(k, v);\r\n },\r\n getItem: function (k) {\r\n return BI.Cache.getCookie(k);\r\n },\r\n removeItem: function (k) {\r\n BI.Cache.deleteCookie(k);\r\n },\r\n key: function () {\r\n\r\n },\r\n clear: function () {\r\n this.items = {};\r\n }\r\n});\r\nif (!Object.keys) {\r\n Object.keys = function(o) {\r\n if (o !== Object(o)) {\r\n throw new TypeError('Object.keys called on a non-object');\r\n }\r\n // fix的问题\r\n var falsy;\r\n var skipArray = {\r\n __ob__: falsy,\r\n $accessors: falsy,\r\n $vbthis: falsy,\r\n $vbsetter: falsy\r\n };\r\n var k = [], p;\r\n for (p in o) {\r\n if (!(p in skipArray)) {\r\n if (Object.prototype.hasOwnProperty.call(o, p)) {\r\n k.push(p);\r\n }\r\n }\r\n }\r\n return k;\r\n };\r\n}\r\n\r\nif (!Array.isArray) {\r\n Array.isArray = function(arg) {\r\n return Object.prototype.toString.call(arg) === '[object Array]';\r\n };\r\n}\r\n\r\n/* 统一采用core-js的polyfill,此块暂去\r\n// https://stackoverflow.com/questions/10919915/ie8-getprototypeof-method\r\nif (typeof Object.getPrototypeOf !== \"function\") {\r\n Object.getPrototypeOf = \"\".__proto__ === String.prototype\r\n ? function (object) {\r\n return object.__proto__;\r\n }\r\n : function (object) {\r\n // May break if the constructor has been tampered with\r\n return object.constructor.prototype;\r\n };\r\n}\r\n */\r\n\r\nif(!Date.now) {\r\n Date.now = function () {\r\n return new Date().valueOf();\r\n };\r\n}if (typeof Set !== \"undefined\" && Set.toString().match(/native code/)) {\r\n\r\n} else {\r\n Set = function () {\r\n this.set = {};\r\n };\r\n Set.prototype.has = function (key) {\r\n return this.set[key] !== undefined;\r\n };\r\n Set.prototype.add = function (key) {\r\n this.set[key] = 1;\r\n };\r\n Set.prototype.clear = function () {\r\n this.set = {};\r\n };\r\n}// 修复ie9下sort方法的bug\r\n// IE的sort 需要显示声明返回-1, 0, 1三种比较结果才可正常工作,而Chrome, Firefox中可以直接返回true, false等\r\n// BI-36544 sort提供的参数就可以自定义返回值,不需要特别控制。这边使用冒泡相较于快排可能慢了点。\r\n// 这边先将webkit的限制去掉\r\n!function (window) {\r\n var ua = window.navigator.userAgent.toLowerCase(),\r\n reg = /msie/;\r\n if (reg.test(ua)) {\r\n var _sort = Array.prototype.sort;\r\n Array.prototype.sort = function (fn) {\r\n if (!!fn && typeof fn === \"function\") {\r\n if (this.length < 2) {\r\n return this;\r\n }\r\n var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;\r\n for (; i < l; i++) {\r\n for (j = i + 1; j < l; j++) {\r\n t = fn.call(this, this[i], this[j]);\r\n r = (typeof t === \"number\" ? t :\r\n t ? 1 : 0) > 0;\r\n if (r === true) {\r\n tmp = this[i];\r\n this[i] = this[j];\r\n this[j] = tmp;\r\n }\r\n }\r\n }\r\n return this;\r\n }\r\n return _sort.call(this);\r\n\r\n };\r\n }\r\n}(window);/**\r\n * Created by richie on 15/7/8.\r\n */\r\n/**\r\n * 初始化BI对象\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (_global.BI == null) {\r\n _global.BI = {prepares: []};\r\n}\r\nif(_global.BI.prepares == null) {\r\n _global.BI.prepares = [];\r\n}/**\r\n * @license\r\n * Lodash (Custom Build) <https://lodash.com/>\r\n * Build: `lodash core plus=\"debounce,throttle,get,set,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge,groupBy,uniqBy\"`\r\n * Copyright JS Foundation and other contributors <https://js.foundation/>\r\n * Released under MIT license <https://lodash.com/license>\r\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\r\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\r\n */\r\n;(function() {\r\n\r\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\r\n var undefined;\r\n\r\n /** Used as the semantic version number. */\r\n var VERSION = '4.17.5';\r\n\r\n /** Used as the size to enable large array optimizations. */\r\n var LARGE_ARRAY_SIZE = 200;\r\n\r\n /** Error message constants. */\r\n var FUNC_ERROR_TEXT = 'Expected a function';\r\n\r\n /** Used to stand-in for `undefined` hash values. */\r\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\r\n\r\n /** Used as the maximum memoize cache size. */\r\n var MAX_MEMOIZE_SIZE = 500;\r\n\r\n /** Used as the internal argument placeholder. */\r\n var PLACEHOLDER = '__lodash_placeholder__';\r\n\r\n /** Used to compose bitmasks for cloning. */\r\n var CLONE_DEEP_FLAG = 1,\r\n CLONE_FLAT_FLAG = 2,\r\n CLONE_SYMBOLS_FLAG = 4;\r\n\r\n /** Used to compose bitmasks for value comparisons. */\r\n var COMPARE_PARTIAL_FLAG = 1,\r\n COMPARE_UNORDERED_FLAG = 2;\r\n\r\n /** Used to compose bitmasks for function metadata. */\r\n var WRAP_BIND_FLAG = 1,\r\n WRAP_BIND_KEY_FLAG = 2,\r\n WRAP_CURRY_BOUND_FLAG = 4,\r\n WRAP_CURRY_FLAG = 8,\r\n WRAP_CURRY_RIGHT_FLAG = 16,\r\n WRAP_PARTIAL_FLAG = 32,\r\n WRAP_PARTIAL_RIGHT_FLAG = 64,\r\n WRAP_ARY_FLAG = 128,\r\n WRAP_REARG_FLAG = 256,\r\n WRAP_FLIP_FLAG = 512;\r\n\r\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\r\n var HOT_COUNT = 800,\r\n HOT_SPAN = 16;\r\n\r\n /** Used to indicate the type of lazy iteratees. */\r\n var LAZY_FILTER_FLAG = 1,\r\n LAZY_MAP_FLAG = 2,\r\n LAZY_WHILE_FLAG = 3;\r\n\r\n /** Used as references for various `Number` constants. */\r\n var INFINITY = 1 / 0,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_INTEGER = 1.7976931348623157e+308,\r\n NAN = 0 / 0;\r\n\r\n /** Used as references for the maximum length and index of an array. */\r\n var MAX_ARRAY_LENGTH = 4294967295;\r\n\r\n /** Used to associate wrap methods with their bit flags. */\r\n var wrapFlags = [\r\n ['ary', WRAP_ARY_FLAG],\r\n ['bind', WRAP_BIND_FLAG],\r\n ['bindKey', WRAP_BIND_KEY_FLAG],\r\n ['curry', WRAP_CURRY_FLAG],\r\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\r\n ['flip', WRAP_FLIP_FLAG],\r\n ['partial', WRAP_PARTIAL_FLAG],\r\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\r\n ['rearg', WRAP_REARG_FLAG]\r\n ];\r\n\r\n /** `Object#toString` result references. */\r\n var argsTag = '[object Arguments]',\r\n arrayTag = '[object Array]',\r\n asyncTag = '[object AsyncFunction]',\r\n boolTag = '[object Boolean]',\r\n dateTag = '[object Date]',\r\n errorTag = '[object Error]',\r\n funcTag = '[object Function]',\r\n genTag = '[object GeneratorFunction]',\r\n mapTag = '[object Map]',\r\n numberTag = '[object Number]',\r\n nullTag = '[object Null]',\r\n objectTag = '[object Object]',\r\n promiseTag = '[object Promise]',\r\n proxyTag = '[object Proxy]',\r\n regexpTag = '[object RegExp]',\r\n setTag = '[object Set]',\r\n stringTag = '[object String]',\r\n symbolTag = '[object Symbol]',\r\n undefinedTag = '[object Undefined]',\r\n weakMapTag = '[object WeakMap]';\r\n\r\n var arrayBufferTag = '[object ArrayBuffer]',\r\n dataViewTag = '[object DataView]',\r\n float32Tag = '[object Float32Array]',\r\n float64Tag = '[object Float64Array]',\r\n int8Tag = '[object Int8Array]',\r\n int16Tag = '[object Int16Array]',\r\n int32Tag = '[object Int32Array]',\r\n uint8Tag = '[object Uint8Array]',\r\n uint8ClampedTag = '[object Uint8ClampedArray]',\r\n uint16Tag = '[object Uint16Array]',\r\n uint32Tag = '[object Uint32Array]';\r\n\r\n /** Used to match HTML entities and HTML characters. */\r\n var reUnescapedHtml = /[&<>\"']/g,\r\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\r\n\r\n /** Used to match property names within property paths. */\r\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\r\n reIsPlainProp = /^\\w*$/,\r\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\r\n\r\n /**\r\n * Used to match `RegExp`\r\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\r\n */\r\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\r\n\r\n /** Used to match leading and trailing whitespace. */\r\n var reTrim = /^\\s+|\\s+$/g;\r\n\r\n /** Used to match wrap detail comments. */\r\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\r\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\r\n reSplitDetails = /,? & /;\r\n\r\n /** Used to match backslashes in property paths. */\r\n var reEscapeChar = /\\\\(\\\\)?/g;\r\n\r\n /** Used to match `RegExp` flags from their coerced string values. */\r\n var reFlags = /\\w*$/;\r\n\r\n /** Used to detect bad signed hexadecimal string values. */\r\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\r\n\r\n /** Used to detect binary string values. */\r\n var reIsBinary = /^0b[01]+$/i;\r\n\r\n /** Used to detect host constructors (Safari). */\r\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\r\n\r\n /** Used to detect octal string values. */\r\n var reIsOctal = /^0o[0-7]+$/i;\r\n\r\n /** Used to detect unsigned integer values. */\r\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\r\n\r\n /** Used to compose unicode character classes. */\r\n var rsAstralRange = '\\\\ud800-\\\\udfff',\r\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\r\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\r\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\r\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\r\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\r\n\r\n /** Used to compose unicode capture groups. */\r\n var rsAstral = '[' + rsAstralRange + ']',\r\n rsCombo = '[' + rsComboRange + ']',\r\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\r\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\r\n rsNonAstral = '[^' + rsAstralRange + ']',\r\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\r\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\r\n rsZWJ = '\\\\u200d';\r\n\r\n /** Used to compose unicode regexes. */\r\n var reOptMod = rsModifier + '?',\r\n rsOptVar = '[' + rsVarRange + ']?',\r\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\r\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\r\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\r\n\r\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\r\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\r\n\r\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\r\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\r\n\r\n /** Used to identify `toStringTag` values of typed arrays. */\r\n var typedArrayTags = {};\r\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\r\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\r\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\r\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\r\n typedArrayTags[uint32Tag] = true;\r\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\r\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\r\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\r\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\r\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\r\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\r\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\r\n typedArrayTags[weakMapTag] = false;\r\n\r\n /** Used to identify `toStringTag` values supported by `_.clone`. */\r\n var cloneableTags = {};\r\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\r\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\r\n cloneableTags[boolTag] = cloneableTags[dateTag] =\r\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\r\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\r\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\r\n cloneableTags[numberTag] = cloneableTags[objectTag] =\r\n cloneableTags[regexpTag] = cloneableTags[setTag] =\r\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\r\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\r\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\r\n cloneableTags[errorTag] = cloneableTags[funcTag] =\r\n cloneableTags[weakMapTag] = false;\r\n\r\n /** Used to map characters to HTML entities. */\r\n var htmlEscapes = {\r\n '&': '&amp;',\r\n '<': '&lt;',\r\n '>': '&gt;',\r\n '\"': '&quot;',\r\n \"'\": '&#39;'\r\n };\r\n\r\n /** Built-in method references without a dependency on `root`. */\r\n var freeParseFloat = parseFloat,\r\n freeParseInt = parseInt;\r\n\r\n /** Detect free variable `global` from Node.js. */\r\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\r\n\r\n /** Detect free variable `self`. */\r\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\r\n\r\n /** Used as a reference to the global object. */\r\n var root = freeGlobal || freeSelf || Function('return this')();\r\n\r\n /** Detect free variable `exports`. */\r\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\r\n\r\n /** Detect free variable `module`. */\r\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\r\n\r\n /** Detect the popular CommonJS extension `module.exports`. */\r\n var moduleExports = freeModule && freeModule.exports === freeExports;\r\n\r\n /** Detect free variable `process` from Node.js. */\r\n var freeProcess = moduleExports && freeGlobal.process;\r\n\r\n /** Used to access faster Node.js helpers. */\r\n var nodeUtil = (function() {\r\n try {\r\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\r\n } catch (e) {}\r\n }());\r\n\r\n /* Node.js helper references. */\r\n var nodeIsDate = nodeUtil && nodeUtil.isDate,\r\n nodeIsMap = nodeUtil && nodeUtil.isMap,\r\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\r\n nodeIsSet = nodeUtil && nodeUtil.isSet,\r\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /**\r\n * A faster alternative to `Function#apply`, this function invokes `func`\r\n * with the `this` binding of `thisArg` and the arguments of `args`.\r\n *\r\n * @private\r\n * @param {Function} func The function to invoke.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} args The arguments to invoke `func` with.\r\n * @returns {*} Returns the result of `func`.\r\n */\r\n function apply(func, thisArg, args) {\r\n switch (args.length) {\r\n case 0: return func.call(thisArg);\r\n case 1: return func.call(thisArg, args[0]);\r\n case 2: return func.call(thisArg, args[0], args[1]);\r\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\r\n }\r\n return func.apply(thisArg, args);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseAggregator` for arrays.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function arrayAggregator(array, setter, iteratee, accumulator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n setter(accumulator, value, iteratee(value), array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.forEach` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayEach(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (iteratee(array[index], index, array) === false) {\r\n break;\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.every` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n */\r\n function arrayEvery(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (!predicate(array[index], index, array)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.filter` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function arrayFilter(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (predicate(value, index, array)) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.includes` for arrays without support for\r\n * specifying an index to search from.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludes(array, value) {\r\n var length = array == null ? 0 : array.length;\r\n return !!length && baseIndexOf(array, value, 0) > -1;\r\n }\r\n\r\n /**\r\n * This function is like `arrayIncludes` except that it accepts a comparator.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @param {Function} comparator The comparator invoked per element.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludesWith(array, value, comparator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (comparator(value, array[index])) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.map` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function arrayMap(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n result = Array(length);\r\n\r\n while (++index < length) {\r\n result[index] = iteratee(array[index], index, array);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Appends the elements of `values` to `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to append.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayPush(array, values) {\r\n var index = -1,\r\n length = values.length,\r\n offset = array.length;\r\n\r\n while (++index < length) {\r\n array[offset + index] = values[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.reduce` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @param {boolean} [initAccum] Specify using the first element of `array` as\r\n * the initial value.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function arrayReduce(array, iteratee, accumulator, initAccum) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n if (initAccum && length) {\r\n accumulator = array[++index];\r\n }\r\n while (++index < length) {\r\n accumulator = iteratee(accumulator, array[index], index, array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.some` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function arraySome(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (predicate(array[index], index, array)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the size of an ASCII `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n var asciiSize = baseProperty('length');\r\n\r\n /**\r\n * Converts an ASCII `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function asciiToArray(string) {\r\n return string.split('');\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\r\n * without support for iteratee shorthands, which iterates over `collection`\r\n * using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the found element or its key, else `undefined`.\r\n */\r\n function baseFindKey(collection, predicate, eachFunc) {\r\n var result;\r\n eachFunc(collection, function(value, key, collection) {\r\n if (predicate(value, key, collection)) {\r\n result = key;\r\n return false;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\r\n * support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {number} fromIndex The index to search from.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\r\n var length = array.length,\r\n index = fromIndex + (fromRight ? 1 : -1);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (predicate(array[index], index, array)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseIndexOf(array, value, fromIndex) {\r\n return value === value\r\n ? strictIndexOf(array, value, fromIndex)\r\n : baseFindIndex(array, baseIsNaN, fromIndex);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNaN` without support for number objects.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n */\r\n function baseIsNaN(value) {\r\n return value !== value;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.property` without support for deep paths.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function baseProperty(key) {\r\n return function(object) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.propertyOf` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyOf(object) {\r\n return function(key) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\r\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} accumulator The initial value.\r\n * @param {boolean} initAccum Specify using the first or last element of\r\n * `collection` as the initial value.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\r\n eachFunc(collection, function(value, index, collection) {\r\n accumulator = initAccum\r\n ? (initAccum = false, value)\r\n : iteratee(accumulator, value, index, collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortBy` which uses `comparer` to define the\r\n * sort order of `array` and replaces criteria objects with their corresponding\r\n * values.\r\n *\r\n * @private\r\n * @param {Array} array The array to sort.\r\n * @param {Function} comparer The function to define sort order.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function baseSortBy(array, comparer) {\r\n var length = array.length;\r\n\r\n array.sort(comparer);\r\n while (length--) {\r\n array[length] = array[length].value;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.times` without support for iteratee shorthands\r\n * or max array length checks.\r\n *\r\n * @private\r\n * @param {number} n The number of times to invoke `iteratee`.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the array of results.\r\n */\r\n function baseTimes(n, iteratee) {\r\n var index = -1,\r\n result = Array(n);\r\n\r\n while (++index < n) {\r\n result[index] = iteratee(index);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unary` without support for storing metadata.\r\n *\r\n * @private\r\n * @param {Function} func The function to cap arguments for.\r\n * @returns {Function} Returns the new capped function.\r\n */\r\n function baseUnary(func) {\r\n return function(value) {\r\n return func(value);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.values` and `_.valuesIn` which creates an\r\n * array of `object` property values corresponding to the property names\r\n * of `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} props The property names to get values for.\r\n * @returns {Object} Returns the array of property values.\r\n */\r\n function baseValues(object, props) {\r\n return arrayMap(props, function(key) {\r\n return object[key];\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a `cache` value for `key` exists.\r\n *\r\n * @private\r\n * @param {Object} cache The cache to query.\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function cacheHas(cache, key) {\r\n return cache.has(key);\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the first unmatched string symbol.\r\n */\r\n function charsStartIndex(strSymbols, chrSymbols) {\r\n var index = -1,\r\n length = strSymbols.length;\r\n\r\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the last unmatched string symbol.\r\n */\r\n function charsEndIndex(strSymbols, chrSymbols) {\r\n var index = strSymbols.length;\r\n\r\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Gets the number of `placeholder` occurrences in `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} placeholder The placeholder to search for.\r\n * @returns {number} Returns the placeholder count.\r\n */\r\n function countHolders(array, placeholder) {\r\n var length = array.length,\r\n result = 0;\r\n\r\n while (length--) {\r\n if (array[length] === placeholder) {\r\n ++result;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Used by `_.escape` to convert characters to HTML entities.\r\n *\r\n * @private\r\n * @param {string} chr The matched character to escape.\r\n * @returns {string} Returns the escaped character.\r\n */\r\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\r\n\r\n /**\r\n * Gets the value at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function getValue(object, key) {\r\n return object == null ? undefined : object[key];\r\n }\r\n\r\n /**\r\n * Checks if `string` contains Unicode symbols.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\r\n */\r\n function hasUnicode(string) {\r\n return reHasUnicode.test(string);\r\n }\r\n\r\n /**\r\n * Converts `iterator` to an array.\r\n *\r\n * @private\r\n * @param {Object} iterator The iterator to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function iteratorToArray(iterator) {\r\n var data,\r\n result = [];\r\n\r\n while (!(data = iterator.next()).done) {\r\n result.push(data.value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `map` to its key-value pairs.\r\n *\r\n * @private\r\n * @param {Object} map The map to convert.\r\n * @returns {Array} Returns the key-value pairs.\r\n */\r\n function mapToArray(map) {\r\n var index = -1,\r\n result = Array(map.size);\r\n\r\n map.forEach(function(value, key) {\r\n result[++index] = [key, value];\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a unary function that invokes `func` with its argument transformed.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {Function} transform The argument transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overArg(func, transform) {\r\n return function(arg) {\r\n return func(transform(arg));\r\n };\r\n }\r\n\r\n /**\r\n * Replaces all `placeholder` elements in `array` with an internal placeholder\r\n * and returns an array of their indexes.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {*} placeholder The placeholder to replace.\r\n * @returns {Array} Returns the new array of placeholder indexes.\r\n */\r\n function replaceHolders(array, placeholder) {\r\n var index = -1,\r\n length = array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value === placeholder || value === PLACEHOLDER) {\r\n array[index] = PLACEHOLDER;\r\n result[resIndex++] = index;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the value at `key`, unless `key` is \"__proto__\".\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function safeGet(object, key) {\r\n return key == '__proto__'\r\n ? undefined\r\n : object[key];\r\n }\r\n\r\n /**\r\n * Converts `set` to an array of its values.\r\n *\r\n * @private\r\n * @param {Object} set The set to convert.\r\n * @returns {Array} Returns the values.\r\n */\r\n function setToArray(set) {\r\n var index = -1,\r\n result = Array(set.size);\r\n\r\n set.forEach(function(value) {\r\n result[++index] = value;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.indexOf` which performs strict equality\r\n * comparisons of values, i.e. `===`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function strictIndexOf(array, value, fromIndex) {\r\n var index = fromIndex - 1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n if (array[index] === value) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Gets the number of symbols in `string`.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function stringSize(string) {\r\n return hasUnicode(string)\r\n ? unicodeSize(string)\r\n : asciiSize(string);\r\n }\r\n\r\n /**\r\n * Converts `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function stringToArray(string) {\r\n return hasUnicode(string)\r\n ? unicodeToArray(string)\r\n : asciiToArray(string);\r\n }\r\n\r\n /**\r\n * Gets the size of a Unicode `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function unicodeSize(string) {\r\n var result = reUnicode.lastIndex = 0;\r\n while (reUnicode.test(string)) {\r\n ++result;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts a Unicode `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function unicodeToArray(string) {\r\n return string.match(reUnicode) || [];\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /** Used for built-in method references. */\r\n var arrayProto = Array.prototype,\r\n funcProto = Function.prototype,\r\n objectProto = Object.prototype;\r\n\r\n /** Used to detect overreaching core-js shims. */\r\n var coreJsData = root['__core-js_shared__'];\r\n\r\n /** Used to resolve the decompiled source of functions. */\r\n var funcToString = funcProto.toString;\r\n\r\n /** Used to check objects for own properties. */\r\n var hasOwnProperty = objectProto.hasOwnProperty;\r\n\r\n /** Used to generate unique IDs. */\r\n var idCounter = 0;\r\n\r\n /** Used to detect methods masquerading as native. */\r\n var maskSrcKey = (function() {\r\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\r\n return uid ? ('Symbol(src)_1.' + uid) : '';\r\n }());\r\n\r\n /**\r\n * Used to resolve the\r\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\r\n * of values.\r\n */\r\n var nativeObjectToString = objectProto.toString;\r\n\r\n /** Used to infer the `Object` constructor. */\r\n var objectCtorString = funcToString.call(Object);\r\n\r\n /** Used to restore the original `_` reference in `_.noConflict`. */\r\n var oldDash = root._;\r\n\r\n /** Used to detect if a method is native. */\r\n var reIsNative = RegExp('^' +\r\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\r\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\r\n );\r\n\r\n /** Built-in value references. */\r\n var Buffer = moduleExports ? root.Buffer : undefined,\r\n Symbol = root.Symbol,\r\n Uint8Array = root.Uint8Array,\r\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\r\n getPrototype = overArg(Object.getPrototypeOf, Object),\r\n objectCreate = Object.create,\r\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\r\n splice = arrayProto.splice,\r\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\r\n symIterator = Symbol ? Symbol.iterator : undefined,\r\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\r\n\r\n var defineProperty = (function() {\r\n try {\r\n var func = getNative(Object, 'defineProperty');\r\n func({}, '', {});\r\n return func;\r\n } catch (e) {}\r\n }());\r\n\r\n /* Built-in method references for those with the same name as other `lodash` methods. */\r\n var nativeCeil = Math.ceil,\r\n nativeFloor = Math.floor,\r\n nativeGetSymbols = Object.getOwnPropertySymbols,\r\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\r\n nativeIsFinite = root.isFinite,\r\n nativeKeys = overArg(Object.keys, Object),\r\n nativeMax = Math.max,\r\n nativeMin = Math.min,\r\n nativeNow = Date.now,\r\n nativeRandom = Math.random,\r\n nativeReverse = arrayProto.reverse;\r\n\r\n /* Built-in method references that are verified to be native. */\r\n var DataView = getNative(root, 'DataView'),\r\n Map = getNative(root, 'Map'),\r\n Promise = getNative(root, 'Promise'),\r\n Set = getNative(root, 'Set'),\r\n WeakMap = getNative(root, 'WeakMap'),\r\n nativeCreate = getNative(Object, 'create');\r\n\r\n /** Used to store function metadata. */\r\n var metaMap = WeakMap && new WeakMap;\r\n\r\n /** Used to lookup unminified function names. */\r\n var realNames = {};\r\n\r\n /** Used to detect maps, sets, and weakmaps. */\r\n var dataViewCtorString = toSource(DataView),\r\n mapCtorString = toSource(Map),\r\n promiseCtorString = toSource(Promise),\r\n setCtorString = toSource(Set),\r\n weakMapCtorString = toSource(WeakMap);\r\n\r\n /** Used to convert symbols to primitives and strings. */\r\n var symbolProto = Symbol ? Symbol.prototype : undefined,\r\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\r\n symbolToString = symbolProto ? symbolProto.toString : undefined;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` object which wraps `value` to enable implicit method\r\n * chain sequences. Methods that operate on and return arrays, collections,\r\n * and functions can be chained together. Methods that retrieve a single value\r\n * or may return a primitive value will automatically end the chain sequence\r\n * and return the unwrapped value. Otherwise, the value must be unwrapped\r\n * with `_#value`.\r\n *\r\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\r\n * enabled using `_.chain`.\r\n *\r\n * The execution of chained methods is lazy, that is, it's deferred until\r\n * `_#value` is implicitly or explicitly called.\r\n *\r\n * Lazy evaluation allows several methods to support shortcut fusion.\r\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\r\n * the creation of intermediate arrays and can greatly reduce the number of\r\n * iteratee executions. Sections of a chain sequence qualify for shortcut\r\n * fusion if the section is applied to an array and iteratees accept only\r\n * one argument. The heuristic for whether a section qualifies for shortcut\r\n * fusion is subject to change.\r\n *\r\n * Chaining is supported in custom builds as long as the `_#value` method is\r\n * directly or indirectly included in the build.\r\n *\r\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\r\n *\r\n * The wrapper `Array` methods are:\r\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\r\n *\r\n * The wrapper `String` methods are:\r\n * `replace` and `split`\r\n *\r\n * The wrapper methods that support shortcut fusion are:\r\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\r\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\r\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\r\n *\r\n * The chainable wrapper methods are:\r\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\r\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\r\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\r\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\r\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\r\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\r\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\r\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\r\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\r\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\r\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\r\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\r\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\r\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\r\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\r\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\r\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\r\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\r\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\r\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\r\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\r\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\r\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\r\n * `zipObject`, `zipObjectDeep`, and `zipWith`\r\n *\r\n * The wrapper methods that are **not** chainable by default are:\r\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\r\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\r\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\r\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\r\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\r\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\r\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\r\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\r\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\r\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\r\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\r\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\r\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\r\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\r\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\r\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\r\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\r\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\r\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\r\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\r\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\r\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\r\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\r\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\r\n * `upperFirst`, `value`, and `words`\r\n *\r\n * @name _\r\n * @constructor\r\n * @category Seq\r\n * @param {*} value The value to wrap in a `lodash` instance.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2, 3]);\r\n *\r\n * // Returns an unwrapped value.\r\n * wrapped.reduce(_.add);\r\n * // => 6\r\n *\r\n * // Returns a wrapped value.\r\n * var squares = wrapped.map(square);\r\n *\r\n * _.isArray(squares);\r\n * // => false\r\n *\r\n * _.isArray(squares.value());\r\n * // => true\r\n */\r\n function lodash(value) {\r\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\r\n if (value instanceof LodashWrapper) {\r\n return value;\r\n }\r\n if (hasOwnProperty.call(value, '__wrapped__')) {\r\n return wrapperClone(value);\r\n }\r\n }\r\n return new LodashWrapper(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.create` without support for assigning\r\n * properties to the created object.\r\n *\r\n * @private\r\n * @param {Object} proto The object to inherit from.\r\n * @returns {Object} Returns the new object.\r\n */\r\n var baseCreate = (function() {\r\n function object() {}\r\n return function(proto) {\r\n if (!isObject(proto)) {\r\n return {};\r\n }\r\n if (objectCreate) {\r\n return objectCreate(proto);\r\n }\r\n object.prototype = proto;\r\n var result = new object;\r\n object.prototype = undefined;\r\n return result;\r\n };\r\n }());\r\n\r\n /**\r\n * The function whose prototype chain sequence wrappers inherit from.\r\n *\r\n * @private\r\n */\r\n function baseLodash() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * The base constructor for creating `lodash` wrapper objects.\r\n *\r\n * @private\r\n * @param {*} value The value to wrap.\r\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\r\n */\r\n function LodashWrapper(value, chainAll) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__chain__ = !!chainAll;\r\n this.__index__ = 0;\r\n this.__values__ = undefined;\r\n }\r\n\r\n // Ensure wrappers are instances of `baseLodash`.\r\n lodash.prototype = baseLodash.prototype;\r\n lodash.prototype.constructor = lodash;\r\n\r\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LodashWrapper.prototype.constructor = LodashWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {*} value The value to wrap.\r\n */\r\n function LazyWrapper(value) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__dir__ = 1;\r\n this.__filtered__ = false;\r\n this.__iteratees__ = [];\r\n this.__takeCount__ = MAX_ARRAY_LENGTH;\r\n this.__views__ = [];\r\n }\r\n\r\n /**\r\n * Creates a clone of the lazy wrapper object.\r\n *\r\n * @private\r\n * @name clone\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the cloned `LazyWrapper` object.\r\n */\r\n function lazyClone() {\r\n var result = new LazyWrapper(this.__wrapped__);\r\n result.__actions__ = copyArray(this.__actions__);\r\n result.__dir__ = this.__dir__;\r\n result.__filtered__ = this.__filtered__;\r\n result.__iteratees__ = copyArray(this.__iteratees__);\r\n result.__takeCount__ = this.__takeCount__;\r\n result.__views__ = copyArray(this.__views__);\r\n return result;\r\n }\r\n\r\n /**\r\n * Reverses the direction of lazy iteration.\r\n *\r\n * @private\r\n * @name reverse\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\r\n */\r\n function lazyReverse() {\r\n if (this.__filtered__) {\r\n var result = new LazyWrapper(this);\r\n result.__dir__ = -1;\r\n result.__filtered__ = true;\r\n } else {\r\n result = this.clone();\r\n result.__dir__ *= -1;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Extracts the unwrapped value from its lazy wrapper.\r\n *\r\n * @private\r\n * @name value\r\n * @memberOf LazyWrapper\r\n * @returns {*} Returns the unwrapped value.\r\n */\r\n function lazyValue() {\r\n var array = this.__wrapped__.value(),\r\n dir = this.__dir__,\r\n isArr = isArray(array),\r\n isRight = dir < 0,\r\n arrLength = isArr ? array.length : 0,\r\n view = getView(0, arrLength, this.__views__),\r\n start = view.start,\r\n end = view.end,\r\n length = end - start,\r\n index = isRight ? end : (start - 1),\r\n iteratees = this.__iteratees__,\r\n iterLength = iteratees.length,\r\n resIndex = 0,\r\n takeCount = nativeMin(length, this.__takeCount__);\r\n\r\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\r\n return baseWrapperValue(array, this.__actions__);\r\n }\r\n var result = [];\r\n\r\n outer:\r\n while (length-- && resIndex < takeCount) {\r\n index += dir;\r\n\r\n var iterIndex = -1,\r\n value = array[index];\r\n\r\n while (++iterIndex < iterLength) {\r\n var data = iteratees[iterIndex],\r\n iteratee = data.iteratee,\r\n type = data.type,\r\n computed = iteratee(value);\r\n\r\n if (type == LAZY_MAP_FLAG) {\r\n value = computed;\r\n } else if (!computed) {\r\n if (type == LAZY_FILTER_FLAG) {\r\n continue outer;\r\n } else {\r\n break outer;\r\n }\r\n }\r\n }\r\n result[resIndex++] = value;\r\n }\r\n return result;\r\n }\r\n\r\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\r\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LazyWrapper.prototype.constructor = LazyWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a hash object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Hash(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the hash.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Hash\r\n */\r\n function hashClear() {\r\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the hash.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Hash\r\n * @param {Object} hash The hash to modify.\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function hashDelete(key) {\r\n var result = this.has(key) && delete this.__data__[key];\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the hash value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function hashGet(key) {\r\n var data = this.__data__;\r\n if (nativeCreate) {\r\n var result = data[key];\r\n return result === HASH_UNDEFINED ? undefined : result;\r\n }\r\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\r\n }\r\n\r\n /**\r\n * Checks if a hash value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Hash\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function hashHas(key) {\r\n var data = this.__data__;\r\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\r\n }\r\n\r\n /**\r\n * Sets the hash `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the hash instance.\r\n */\r\n function hashSet(key, value) {\r\n var data = this.__data__;\r\n this.size += this.has(key) ? 0 : 1;\r\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\r\n return this;\r\n }\r\n\r\n // Add methods to `Hash`.\r\n Hash.prototype.clear = hashClear;\r\n Hash.prototype['delete'] = hashDelete;\r\n Hash.prototype.get = hashGet;\r\n Hash.prototype.has = hashHas;\r\n Hash.prototype.set = hashSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an list cache object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function ListCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the list cache.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf ListCache\r\n */\r\n function listCacheClear() {\r\n this.__data__ = [];\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the list cache.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function listCacheDelete(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n return false;\r\n }\r\n var lastIndex = data.length - 1;\r\n if (index == lastIndex) {\r\n data.pop();\r\n } else {\r\n splice.call(data, index, 1);\r\n }\r\n --this.size;\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets the list cache value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function listCacheGet(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n return index < 0 ? undefined : data[index][1];\r\n }\r\n\r\n /**\r\n * Checks if a list cache value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf ListCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function listCacheHas(key) {\r\n return assocIndexOf(this.__data__, key) > -1;\r\n }\r\n\r\n /**\r\n * Sets the list cache `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the list cache instance.\r\n */\r\n function listCacheSet(key, value) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n ++this.size;\r\n data.push([key, value]);\r\n } else {\r\n data[index][1] = value;\r\n }\r\n return this;\r\n }\r\n\r\n // Add methods to `ListCache`.\r\n ListCache.prototype.clear = listCacheClear;\r\n ListCache.prototype['delete'] = listCacheDelete;\r\n ListCache.prototype.get = listCacheGet;\r\n ListCache.prototype.has = listCacheHas;\r\n ListCache.prototype.set = listCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a map cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function MapCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the map.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf MapCache\r\n */\r\n function mapCacheClear() {\r\n this.size = 0;\r\n this.__data__ = {\r\n 'hash': new Hash,\r\n 'map': new (Map || ListCache),\r\n 'string': new Hash\r\n };\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the map.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function mapCacheDelete(key) {\r\n var result = getMapData(this, key)['delete'](key);\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the map value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function mapCacheGet(key) {\r\n return getMapData(this, key).get(key);\r\n }\r\n\r\n /**\r\n * Checks if a map value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf MapCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function mapCacheHas(key) {\r\n return getMapData(this, key).has(key);\r\n }\r\n\r\n /**\r\n * Sets the map `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the map cache instance.\r\n */\r\n function mapCacheSet(key, value) {\r\n var data = getMapData(this, key),\r\n size = data.size;\r\n\r\n data.set(key, value);\r\n this.size += data.size == size ? 0 : 1;\r\n return this;\r\n }\r\n\r\n // Add methods to `MapCache`.\r\n MapCache.prototype.clear = mapCacheClear;\r\n MapCache.prototype['delete'] = mapCacheDelete;\r\n MapCache.prototype.get = mapCacheGet;\r\n MapCache.prototype.has = mapCacheHas;\r\n MapCache.prototype.set = mapCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n *\r\n * Creates an array cache object to store unique values.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [values] The values to cache.\r\n */\r\n function SetCache(values) {\r\n var index = -1,\r\n length = values == null ? 0 : values.length;\r\n\r\n this.__data__ = new MapCache;\r\n while (++index < length) {\r\n this.add(values[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Adds `value` to the array cache.\r\n *\r\n * @private\r\n * @name add\r\n * @memberOf SetCache\r\n * @alias push\r\n * @param {*} value The value to cache.\r\n * @returns {Object} Returns the cache instance.\r\n */\r\n function setCacheAdd(value) {\r\n this.__data__.set(value, HASH_UNDEFINED);\r\n return this;\r\n }\r\n\r\n /**\r\n * Checks if `value` is in the array cache.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf SetCache\r\n * @param {*} value The value to search for.\r\n * @returns {number} Returns `true` if `value` is found, else `false`.\r\n */\r\n function setCacheHas(value) {\r\n return this.__data__.has(value);\r\n }\r\n\r\n // Add methods to `SetCache`.\r\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\r\n SetCache.prototype.has = setCacheHas;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a stack cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Stack(entries) {\r\n var data = this.__data__ = new ListCache(entries);\r\n this.size = data.size;\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the stack.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Stack\r\n */\r\n function stackClear() {\r\n this.__data__ = new ListCache;\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the stack.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function stackDelete(key) {\r\n var data = this.__data__,\r\n result = data['delete'](key);\r\n\r\n this.size = data.size;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the stack value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function stackGet(key) {\r\n return this.__data__.get(key);\r\n }\r\n\r\n /**\r\n * Checks if a stack value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Stack\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function stackHas(key) {\r\n return this.__data__.has(key);\r\n }\r\n\r\n /**\r\n * Sets the stack `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the stack cache instance.\r\n */\r\n function stackSet(key, value) {\r\n var data = this.__data__;\r\n if (data instanceof ListCache) {\r\n var pairs = data.__data__;\r\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\r\n pairs.push([key, value]);\r\n this.size = ++data.size;\r\n return this;\r\n }\r\n data = this.__data__ = new MapCache(pairs);\r\n }\r\n data.set(key, value);\r\n this.size = data.size;\r\n return this;\r\n }\r\n\r\n // Add methods to `Stack`.\r\n Stack.prototype.clear = stackClear;\r\n Stack.prototype['delete'] = stackDelete;\r\n Stack.prototype.get = stackGet;\r\n Stack.prototype.has = stackHas;\r\n Stack.prototype.set = stackSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array of the enumerable property names of the array-like `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @param {boolean} inherited Specify returning inherited property names.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function arrayLikeKeys(value, inherited) {\r\n var isArr = isArray(value),\r\n isArg = !isArr && isArguments(value),\r\n isBuff = !isArr && !isArg && isBuffer(value),\r\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\r\n skipIndexes = isArr || isArg || isBuff || isType,\r\n result = skipIndexes ? baseTimes(value.length, String) : [],\r\n length = result.length;\r\n\r\n for (var key in value) {\r\n if ((inherited || hasOwnProperty.call(value, key)) &&\r\n !(skipIndexes && (\r\n // Safari 9 has enumerable `arguments.length` in strict mode.\r\n key == 'length' ||\r\n // Node.js 0.10 has enumerable non-index properties on buffers.\r\n (isBuff && (key == 'offset' || key == 'parent')) ||\r\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\r\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\r\n // Skip index properties.\r\n isIndex(key, length)\r\n ))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `assignValue` except that it doesn't assign\r\n * `undefined` values.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignMergeValue(object, key, value) {\r\n if ((value !== undefined && !eq(object[key], value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignValue(object, key, value) {\r\n var objValue = object[key];\r\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the index at which the `key` is found in `array` of key-value pairs.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} key The key to search for.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function assocIndexOf(array, key) {\r\n var length = array.length;\r\n while (length--) {\r\n if (eq(array[length][0], key)) {\r\n return length;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Aggregates elements of `collection` on `accumulator` with keys transformed\r\n * by `iteratee` and values set by `setter`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseAggregator(collection, setter, iteratee, accumulator) {\r\n baseEach(collection, function(value, key, collection) {\r\n setter(accumulator, value, iteratee(value), collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assign` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssign(object, source) {\r\n return object && copyObject(source, keys(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assignIn` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssignIn(object, source) {\r\n return object && copyObject(source, keysIn(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `assignValue` and `assignMergeValue` without\r\n * value checks.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function baseAssignValue(object, key, value) {\r\n if (key == '__proto__' && defineProperty) {\r\n defineProperty(object, key, {\r\n 'configurable': true,\r\n 'enumerable': true,\r\n 'value': value,\r\n 'writable': true\r\n });\r\n } else {\r\n object[key] = value;\r\n }\r\n }\r\n\r\n /**\r\n * The base implementation of `_.at` without support for individual paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Array} Returns the picked elements.\r\n */\r\n function baseAt(object, paths) {\r\n var index = -1,\r\n length = paths.length,\r\n result = Array(length),\r\n skip = object == null;\r\n\r\n while (++index < length) {\r\n result[index] = skip ? undefined : get(object, paths[index]);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clamp` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n */\r\n function baseClamp(number, lower, upper) {\r\n if (number === number) {\r\n if (upper !== undefined) {\r\n number = number <= upper ? number : upper;\r\n }\r\n if (lower !== undefined) {\r\n number = number >= lower ? number : lower;\r\n }\r\n }\r\n return number;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\r\n * traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to clone.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Deep clone\r\n * 2 - Flatten inherited properties\r\n * 4 - Clone symbols\r\n * @param {Function} [customizer] The function to customize cloning.\r\n * @param {string} [key] The key of `value`.\r\n * @param {Object} [object] The parent object of `value`.\r\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\r\n * @returns {*} Returns the cloned value.\r\n */\r\n function baseClone(value, bitmask, customizer, key, object, stack) {\r\n var result,\r\n isDeep = bitmask & CLONE_DEEP_FLAG,\r\n isFlat = bitmask & CLONE_FLAT_FLAG,\r\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\r\n\r\n if (customizer) {\r\n result = object ? customizer(value, key, object, stack) : customizer(value);\r\n }\r\n if (result !== undefined) {\r\n return result;\r\n }\r\n if (!isObject(value)) {\r\n return value;\r\n }\r\n var isArr = isArray(value);\r\n if (isArr) {\r\n result = initCloneArray(value);\r\n if (!isDeep) {\r\n return copyArray(value, result);\r\n }\r\n } else {\r\n var tag = getTag(value),\r\n isFunc = tag == funcTag || tag == genTag;\r\n\r\n if (isBuffer(value)) {\r\n return cloneBuffer(value, isDeep);\r\n }\r\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\r\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\r\n if (!isDeep) {\r\n return isFlat\r\n ? copySymbolsIn(value, baseAssignIn(result, value))\r\n : copySymbols(value, baseAssign(result, value));\r\n }\r\n } else {\r\n if (!cloneableTags[tag]) {\r\n return object ? value : {};\r\n }\r\n result = initCloneByTag(value, tag, isDeep);\r\n }\r\n }\r\n // Check for circular references and return its corresponding clone.\r\n stack || (stack = new Stack);\r\n var stacked = stack.get(value);\r\n if (stacked) {\r\n return stacked;\r\n }\r\n stack.set(value, result);\r\n\r\n if (isSet(value)) {\r\n value.forEach(function(subValue) {\r\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n if (isMap(value)) {\r\n value.forEach(function(subValue, key) {\r\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n var keysFunc = isFull\r\n ? (isFlat ? getAllKeysIn : getAllKeys)\r\n : (isFlat ? keysIn : keys);\r\n\r\n var props = isArr ? undefined : keysFunc(value);\r\n arrayEach(props || value, function(subValue, key) {\r\n if (props) {\r\n key = subValue;\r\n subValue = value[key];\r\n }\r\n // Recursively populate clone (susceptible to call stack limits).\r\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\r\n * to provide to `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {Array} args The arguments to provide to `func`.\r\n * @returns {number|Object} Returns the timer id or timeout object.\r\n */\r\n function baseDelay(func, wait, args) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return setTimeout(function() { func.apply(undefined, args); }, wait);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.difference` without support\r\n * for excluding multiple arrays or iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Array} values The values to exclude.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n */\r\n function baseDifference(array, values, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n isCommon = true,\r\n length = array.length,\r\n result = [],\r\n valuesLength = values.length;\r\n\r\n if (!length) {\r\n return result;\r\n }\r\n if (iteratee) {\r\n values = arrayMap(values, baseUnary(iteratee));\r\n }\r\n if (comparator) {\r\n includes = arrayIncludesWith;\r\n isCommon = false;\r\n }\r\n else if (values.length >= LARGE_ARRAY_SIZE) {\r\n includes = cacheHas;\r\n isCommon = false;\r\n values = new SetCache(values);\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee == null ? value : iteratee(value);\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var valuesIndex = valuesLength;\r\n while (valuesIndex--) {\r\n if (values[valuesIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(values, computed, comparator)) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forEach` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n */\r\n var baseEach = createBaseEach(baseForOwn);\r\n\r\n /**\r\n * The base implementation of `_.every` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`\r\n */\r\n function baseEvery(collection, predicate) {\r\n var result = true;\r\n baseEach(collection, function(value, index, collection) {\r\n result = !!predicate(value, index, collection);\r\n return result;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.max` and `_.min` which accepts a\r\n * `comparator` to determine the extremum value.\r\n *\r\n * @private\r\n * @param {Array} array The array to iterate over.\r\n * @param {Function} iteratee The iteratee invoked per iteration.\r\n * @param {Function} comparator The comparator used to compare values.\r\n * @returns {*} Returns the extremum value.\r\n */\r\n function baseExtremum(array, iteratee, comparator) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index],\r\n current = iteratee(value);\r\n\r\n if (current != null && (computed === undefined\r\n ? (current === current && !isSymbol(current))\r\n : comparator(current, computed)\r\n )) {\r\n var computed = current,\r\n result = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.filter` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function baseFilter(collection, predicate) {\r\n var result = [];\r\n baseEach(collection, function(value, index, collection) {\r\n if (predicate(value, index, collection)) {\r\n result.push(value);\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.flatten` with support for restricting flattening.\r\n *\r\n * @private\r\n * @param {Array} array The array to flatten.\r\n * @param {number} depth The maximum recursion depth.\r\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\r\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\r\n * @param {Array} [result=[]] The initial result value.\r\n * @returns {Array} Returns the new flattened array.\r\n */\r\n function baseFlatten(array, depth, predicate, isStrict, result) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n predicate || (predicate = isFlattenable);\r\n result || (result = []);\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (depth > 0 && predicate(value)) {\r\n if (depth > 1) {\r\n // Recursively flatten arrays (susceptible to call stack limits).\r\n baseFlatten(value, depth - 1, predicate, isStrict, result);\r\n } else {\r\n arrayPush(result, value);\r\n }\r\n } else if (!isStrict) {\r\n result[result.length] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `baseForOwn` which iterates over `object`\r\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseFor = createBaseFor();\r\n\r\n /**\r\n * This function is like `baseFor` except that it iterates over properties\r\n * in the opposite order.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseForRight = createBaseFor(true);\r\n\r\n /**\r\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwn(object, iteratee) {\r\n return object && baseFor(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwnRight(object, iteratee) {\r\n return object && baseForRight(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.functions` which creates an array of\r\n * `object` function property names filtered from `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Array} props The property names to filter.\r\n * @returns {Array} Returns the function names.\r\n */\r\n function baseFunctions(object, props) {\r\n return arrayFilter(props, function(key) {\r\n return isFunction(object[key]);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.get` without support for default values.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseGet(object, path) {\r\n path = castPath(path, object);\r\n\r\n var index = 0,\r\n length = path.length;\r\n\r\n while (object != null && index < length) {\r\n object = object[toKey(path[index++])];\r\n }\r\n return (index && index == length) ? object : undefined;\r\n }\r\n\r\n /**\r\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\r\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\r\n var result = keysFunc(object);\r\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\r\n }\r\n\r\n /**\r\n * The base implementation of `getTag` without fallbacks for buggy environments.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n function baseGetTag(value) {\r\n if (value == null) {\r\n return value === undefined ? undefinedTag : nullTag;\r\n }\r\n return (symToStringTag && symToStringTag in Object(value))\r\n ? getRawTag(value)\r\n : objectToString(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.gt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\r\n * else `false`.\r\n */\r\n function baseGt(value, other) {\r\n return value > other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.has` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHas(object, key) {\r\n return object != null && hasOwnProperty.call(object, key);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.hasIn` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHasIn(object, key) {\r\n return object != null && key in Object(object);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.intersection`, without support\r\n * for iteratee shorthands, that accepts an array of arrays to inspect.\r\n *\r\n * @private\r\n * @param {Array} arrays The arrays to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of shared values.\r\n */\r\n function baseIntersection(arrays, iteratee, comparator) {\r\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\r\n length = arrays[0].length,\r\n othLength = arrays.length,\r\n othIndex = othLength,\r\n caches = Array(othLength),\r\n maxLength = Infinity,\r\n result = [];\r\n\r\n while (othIndex--) {\r\n var array = arrays[othIndex];\r\n if (othIndex && iteratee) {\r\n array = arrayMap(array, baseUnary(iteratee));\r\n }\r\n maxLength = nativeMin(array.length, maxLength);\r\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\r\n ? new SetCache(othIndex && array)\r\n : undefined;\r\n }\r\n array = arrays[0];\r\n\r\n var index = -1,\r\n seen = caches[0];\r\n\r\n outer:\r\n while (++index < length && result.length < maxLength) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (!(seen\r\n ? cacheHas(seen, computed)\r\n : includes(result, computed, comparator)\r\n )) {\r\n othIndex = othLength;\r\n while (--othIndex) {\r\n var cache = caches[othIndex];\r\n if (!(cache\r\n ? cacheHas(cache, computed)\r\n : includes(arrays[othIndex], computed, comparator))\r\n ) {\r\n continue outer;\r\n }\r\n }\r\n if (seen) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invert` and `_.invertBy` which inverts\r\n * `object` with values transformed by `iteratee` and set by `setter`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform values.\r\n * @param {Object} accumulator The initial inverted object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseInverter(object, setter, iteratee, accumulator) {\r\n baseForOwn(object, function(value, key, object) {\r\n setter(accumulator, iteratee(value), key, object);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invoke` without support for individual\r\n * method arguments.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the method to invoke.\r\n * @param {Array} args The arguments to invoke the method with.\r\n * @returns {*} Returns the result of the invoked method.\r\n */\r\n function baseInvoke(object, path, args) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n var func = object == null ? object : object[toKey(last(path))];\r\n return func == null ? undefined : apply(func, object, args);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isArguments`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n */\r\n function baseIsArguments(value) {\r\n return isObjectLike(value) && baseGetTag(value) == argsTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isDate` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n */\r\n function baseIsDate(value) {\r\n return isObjectLike(value) && baseGetTag(value) == dateTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isEqual` which supports partial comparisons\r\n * and tracks traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Unordered comparison\r\n * 2 - Partial comparison\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n */\r\n function baseIsEqual(value, other, bitmask, customizer, stack) {\r\n if (value === other) {\r\n return true;\r\n }\r\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\r\n return value !== value && other !== other;\r\n }\r\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqual` for arrays and objects which performs\r\n * deep comparisons and tracks traversed objects enabling objects with circular\r\n * references to be compared.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\r\n var objIsArr = isArray(object),\r\n othIsArr = isArray(other),\r\n objTag = objIsArr ? arrayTag : getTag(object),\r\n othTag = othIsArr ? arrayTag : getTag(other);\r\n\r\n objTag = objTag == argsTag ? objectTag : objTag;\r\n othTag = othTag == argsTag ? objectTag : othTag;\r\n\r\n var objIsObj = objTag == objectTag,\r\n othIsObj = othTag == objectTag,\r\n isSameTag = objTag == othTag;\r\n\r\n if (isSameTag && isBuffer(object)) {\r\n if (!isBuffer(other)) {\r\n return false;\r\n }\r\n objIsArr = true;\r\n objIsObj = false;\r\n }\r\n if (isSameTag && !objIsObj) {\r\n stack || (stack = new Stack);\r\n return (objIsArr || isTypedArray(object))\r\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\r\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\r\n }\r\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\r\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\r\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\r\n\r\n if (objIsWrapped || othIsWrapped) {\r\n var objUnwrapped = objIsWrapped ? object.value() : object,\r\n othUnwrapped = othIsWrapped ? other.value() : other;\r\n\r\n stack || (stack = new Stack);\r\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\r\n }\r\n }\r\n if (!isSameTag) {\r\n return false;\r\n }\r\n stack || (stack = new Stack);\r\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMap` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n */\r\n function baseIsMap(value) {\r\n return isObjectLike(value) && getTag(value) == mapTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property values to match.\r\n * @param {Array} matchData The property names, values, and compare flags to match.\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r\n */\r\n function baseIsMatch(object, source, matchData, customizer) {\r\n var index = matchData.length,\r\n length = index,\r\n noCustomizer = !customizer;\r\n\r\n if (object == null) {\r\n return !length;\r\n }\r\n object = Object(object);\r\n while (index--) {\r\n var data = matchData[index];\r\n if ((noCustomizer && data[2])\r\n ? data[1] !== object[data[0]]\r\n : !(data[0] in object)\r\n ) {\r\n return false;\r\n }\r\n }\r\n while (++index < length) {\r\n data = matchData[index];\r\n var key = data[0],\r\n objValue = object[key],\r\n srcValue = data[1];\r\n\r\n if (noCustomizer && data[2]) {\r\n if (objValue === undefined && !(key in object)) {\r\n return false;\r\n }\r\n } else {\r\n var stack = new Stack;\r\n if (customizer) {\r\n var result = customizer(objValue, srcValue, key, object, source, stack);\r\n }\r\n if (!(result === undefined\r\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\r\n : result\r\n )) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNative` without bad shim checks.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a native function,\r\n * else `false`.\r\n */\r\n function baseIsNative(value) {\r\n if (!isObject(value) || isMasked(value)) {\r\n return false;\r\n }\r\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\r\n return pattern.test(toSource(value));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isRegExp` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n */\r\n function baseIsRegExp(value) {\r\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isSet` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n */\r\n function baseIsSet(value) {\r\n return isObjectLike(value) && getTag(value) == setTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n */\r\n function baseIsTypedArray(value) {\r\n return isObjectLike(value) &&\r\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\r\n }\r\n\r\n /**\r\n * The base implementation of `_.iteratee`.\r\n *\r\n * @private\r\n * @param {*} [value=_.identity] The value to convert to an iteratee.\r\n * @returns {Function} Returns the iteratee.\r\n */\r\n function baseIteratee(value) {\r\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\r\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\r\n if (typeof value == 'function') {\r\n return value;\r\n }\r\n if (value == null) {\r\n return identity;\r\n }\r\n if (typeof value == 'object') {\r\n return isArray(value)\r\n ? baseMatchesProperty(value[0], value[1])\r\n : baseMatches(value);\r\n }\r\n return property(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeys(object) {\r\n if (!isPrototype(object)) {\r\n return nativeKeys(object);\r\n }\r\n var result = [];\r\n for (var key in Object(object)) {\r\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeysIn(object) {\r\n if (!isObject(object)) {\r\n return nativeKeysIn(object);\r\n }\r\n var isProto = isPrototype(object),\r\n result = [];\r\n\r\n for (var key in object) {\r\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.lt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is less than `other`,\r\n * else `false`.\r\n */\r\n function baseLt(value, other) {\r\n return value < other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.map` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function baseMap(collection, iteratee) {\r\n var index = -1,\r\n result = isArrayLike(collection) ? Array(collection.length) : [];\r\n\r\n baseEach(collection, function(value, key, collection) {\r\n result[++index] = iteratee(value, key, collection);\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matches` which doesn't clone `source`.\r\n *\r\n * @private\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatches(source) {\r\n var matchData = getMatchData(source);\r\n if (matchData.length == 1 && matchData[0][2]) {\r\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\r\n }\r\n return function(object) {\r\n return object === source || baseIsMatch(object, source, matchData);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\r\n *\r\n * @private\r\n * @param {string} path The path of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatchesProperty(path, srcValue) {\r\n if (isKey(path) && isStrictComparable(srcValue)) {\r\n return matchesStrictComparable(toKey(path), srcValue);\r\n }\r\n return function(object) {\r\n var objValue = get(object, path);\r\n return (objValue === undefined && objValue === srcValue)\r\n ? hasIn(object, path)\r\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.merge` without support for multiple sources.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} [customizer] The function to customize merged values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMerge(object, source, srcIndex, customizer, stack) {\r\n if (object === source) {\r\n return;\r\n }\r\n baseFor(source, function(srcValue, key) {\r\n if (isObject(srcValue)) {\r\n stack || (stack = new Stack);\r\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\r\n }\r\n else {\r\n var newValue = customizer\r\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = srcValue;\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n }, keysIn);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseMerge` for arrays and objects which performs\r\n * deep merges and tracks traversed objects enabling objects with circular\r\n * references to be merged.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {string} key The key of the value to merge.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} mergeFunc The function to merge values.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\r\n var objValue = safeGet(object, key),\r\n srcValue = safeGet(source, key),\r\n stacked = stack.get(srcValue);\r\n\r\n if (stacked) {\r\n assignMergeValue(object, key, stacked);\r\n return;\r\n }\r\n var newValue = customizer\r\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n var isCommon = newValue === undefined;\r\n\r\n if (isCommon) {\r\n var isArr = isArray(srcValue),\r\n isBuff = !isArr && isBuffer(srcValue),\r\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\r\n\r\n newValue = srcValue;\r\n if (isArr || isBuff || isTyped) {\r\n if (isArray(objValue)) {\r\n newValue = objValue;\r\n }\r\n else if (isArrayLikeObject(objValue)) {\r\n newValue = copyArray(objValue);\r\n }\r\n else if (isBuff) {\r\n isCommon = false;\r\n newValue = cloneBuffer(srcValue, true);\r\n }\r\n else if (isTyped) {\r\n isCommon = false;\r\n newValue = cloneTypedArray(srcValue, true);\r\n }\r\n else {\r\n newValue = [];\r\n }\r\n }\r\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\r\n newValue = objValue;\r\n if (isArguments(objValue)) {\r\n newValue = toPlainObject(objValue);\r\n }\r\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\r\n newValue = initCloneObject(srcValue);\r\n }\r\n }\r\n else {\r\n isCommon = false;\r\n }\r\n }\r\n if (isCommon) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, newValue);\r\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\r\n stack['delete'](srcValue);\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.orderBy` without param guards.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\r\n * @param {string[]} orders The sort orders of `iteratees`.\r\n * @returns {Array} Returns the new sorted array.\r\n */\r\n function baseOrderBy(collection, iteratees, orders) {\r\n var index = -1;\r\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));\r\n\r\n var result = baseMap(collection, function(value, key, collection) {\r\n var criteria = arrayMap(iteratees, function(iteratee) {\r\n return iteratee(value);\r\n });\r\n return { 'criteria': criteria, 'index': ++index, 'value': value };\r\n });\r\n\r\n return baseSortBy(result, function(object, other) {\r\n return compareMultiple(object, other, orders);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pick` without support for individual\r\n * property identifiers.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePick(object, paths) {\r\n return basePickBy(object, paths, function(value, path) {\r\n return hasIn(object, path);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @param {Function} predicate The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePickBy(object, paths, predicate) {\r\n var index = -1,\r\n length = paths.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var path = paths[index],\r\n value = baseGet(object, path);\r\n\r\n if (predicate(value, path)) {\r\n baseSet(result, castPath(path, object), value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseProperty` which supports deep paths.\r\n *\r\n * @private\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyDeep(path) {\r\n return function(object) {\r\n return baseGet(object, path);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.random` without support for returning\r\n * floating-point numbers.\r\n *\r\n * @private\r\n * @param {number} lower The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the random number.\r\n */\r\n function baseRandom(lower, upper) {\r\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\r\n * coerce arguments.\r\n *\r\n * @private\r\n * @param {number} start The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} step The value to increment or decrement by.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Array} Returns the range of numbers.\r\n */\r\n function baseRange(start, end, step, fromRight) {\r\n var index = -1,\r\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\r\n result = Array(length);\r\n\r\n while (length--) {\r\n result[fromRight ? length : ++index] = start;\r\n start += step;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function baseRest(func, start) {\r\n return setToString(overRest(func, start, identity), func + '');\r\n }\r\n\r\n /**\r\n * The base implementation of `_.set`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @param {Function} [customizer] The function to customize path creation.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseSet(object, path, value, customizer) {\r\n if (!isObject(object)) {\r\n return object;\r\n }\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n lastIndex = length - 1,\r\n nested = object;\r\n\r\n while (nested != null && ++index < length) {\r\n var key = toKey(path[index]),\r\n newValue = value;\r\n\r\n if (index != lastIndex) {\r\n var objValue = nested[key];\r\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\r\n if (newValue === undefined) {\r\n newValue = isObject(objValue)\r\n ? objValue\r\n : (isIndex(path[index + 1]) ? [] : {});\r\n }\r\n }\r\n assignValue(nested, key, newValue);\r\n nested = nested[key];\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * The base implementation of `setData` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetData = !metaMap ? identity : function(func, data) {\r\n metaMap.set(func, data);\r\n return func;\r\n };\r\n\r\n /**\r\n * The base implementation of `setToString` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetToString = !defineProperty ? identity : function(func, string) {\r\n return defineProperty(func, 'toString', {\r\n 'configurable': true,\r\n 'enumerable': false,\r\n 'value': constant(string),\r\n 'writable': true\r\n });\r\n };\r\n\r\n /**\r\n * The base implementation of `_.slice` without an iteratee call guard.\r\n *\r\n * @private\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function baseSlice(array, start, end) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n if (start < 0) {\r\n start = -start > length ? 0 : (length + start);\r\n }\r\n end = end > length ? length : end;\r\n if (end < 0) {\r\n end += length;\r\n }\r\n length = start > end ? 0 : ((end - start) >>> 0);\r\n start >>>= 0;\r\n\r\n var result = Array(length);\r\n while (++index < length) {\r\n result[index] = array[index + start];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.some` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function baseSome(collection, predicate) {\r\n var result;\r\n\r\n baseEach(collection, function(value, index, collection) {\r\n result = predicate(value, index, collection);\r\n return !result;\r\n });\r\n return !!result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.toString` which doesn't convert nullish\r\n * values to empty strings.\r\n *\r\n * @private\r\n * @param {*} value The value to process.\r\n * @returns {string} Returns the string.\r\n */\r\n function baseToString(value) {\r\n // Exit early for strings to avoid a performance hit in some environments.\r\n if (typeof value == 'string') {\r\n return value;\r\n }\r\n if (isArray(value)) {\r\n // Recursively convert values (susceptible to call stack limits).\r\n return arrayMap(value, baseToString) + '';\r\n }\r\n if (isSymbol(value)) {\r\n return symbolToString ? symbolToString.call(value) : '';\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n */\r\n function baseUniq(array, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n length = array.length,\r\n isCommon = true,\r\n result = [],\r\n seen = result;\r\n\r\n if (comparator) {\r\n isCommon = false;\r\n includes = arrayIncludesWith;\r\n }\r\n else if (length >= LARGE_ARRAY_SIZE) {\r\n var set = iteratee ? null : createSet(array);\r\n if (set) {\r\n return setToArray(set);\r\n }\r\n isCommon = false;\r\n includes = cacheHas;\r\n seen = new SetCache;\r\n }\r\n else {\r\n seen = iteratee ? [] : result;\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var seenIndex = seen.length;\r\n while (seenIndex--) {\r\n if (seen[seenIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n if (iteratee) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(seen, computed, comparator)) {\r\n if (seen !== result) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unset`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The property path to unset.\r\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\r\n */\r\n function baseUnset(object, path) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n return object == null || delete object[toKey(last(path))];\r\n }\r\n\r\n /**\r\n * The base implementation of `wrapperValue` which returns the result of\r\n * performing a sequence of actions on the unwrapped `value`, where each\r\n * successive action is supplied the return value of the previous.\r\n *\r\n * @private\r\n * @param {*} value The unwrapped value.\r\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseWrapperValue(value, actions) {\r\n var result = value;\r\n if (result instanceof LazyWrapper) {\r\n result = result.value();\r\n }\r\n return arrayReduce(actions, function(result, action) {\r\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\r\n }, result);\r\n }\r\n\r\n /**\r\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\r\n *\r\n * @private\r\n * @param {Array} props The property identifiers.\r\n * @param {Array} values The property values.\r\n * @param {Function} assignFunc The function to assign values.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function baseZipObject(props, values, assignFunc) {\r\n var index = -1,\r\n length = props.length,\r\n valsLength = values.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var value = index < valsLength ? values[index] : undefined;\r\n assignFunc(result, props[index], value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Casts `value` to an empty array if it's not an array like object.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {Array|Object} Returns the cast array-like object.\r\n */\r\n function castArrayLikeObject(value) {\r\n return isArrayLikeObject(value) ? value : [];\r\n }\r\n\r\n /**\r\n * Casts `value` to a path array if it's not one.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {Array} Returns the cast property path array.\r\n */\r\n function castPath(value, object) {\r\n if (isArray(value)) {\r\n return value;\r\n }\r\n return isKey(value, object) ? [value] : stringToPath(toString(value));\r\n }\r\n\r\n /**\r\n * Casts `array` to a slice if it's needed.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {number} start The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the cast slice.\r\n */\r\n function castSlice(array, start, end) {\r\n var length = array.length;\r\n end = end === undefined ? length : end;\r\n return (!start && end >= length) ? array : baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a clone of `buffer`.\r\n *\r\n * @private\r\n * @param {Buffer} buffer The buffer to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Buffer} Returns the cloned buffer.\r\n */\r\n function cloneBuffer(buffer, isDeep) {\r\n if (isDeep) {\r\n return buffer.slice();\r\n }\r\n var length = buffer.length,\r\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\r\n\r\n buffer.copy(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `arrayBuffer`.\r\n *\r\n * @private\r\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\r\n * @returns {ArrayBuffer} Returns the cloned array buffer.\r\n */\r\n function cloneArrayBuffer(arrayBuffer) {\r\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\r\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `dataView`.\r\n *\r\n * @private\r\n * @param {Object} dataView The data view to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned data view.\r\n */\r\n function cloneDataView(dataView, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\r\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\r\n }\r\n\r\n /**\r\n * Creates a clone of `regexp`.\r\n *\r\n * @private\r\n * @param {Object} regexp The regexp to clone.\r\n * @returns {Object} Returns the cloned regexp.\r\n */\r\n function cloneRegExp(regexp) {\r\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\r\n result.lastIndex = regexp.lastIndex;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of the `symbol` object.\r\n *\r\n * @private\r\n * @param {Object} symbol The symbol object to clone.\r\n * @returns {Object} Returns the cloned symbol object.\r\n */\r\n function cloneSymbol(symbol) {\r\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\r\n }\r\n\r\n /**\r\n * Creates a clone of `typedArray`.\r\n *\r\n * @private\r\n * @param {Object} typedArray The typed array to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned typed array.\r\n */\r\n function cloneTypedArray(typedArray, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\r\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\r\n }\r\n\r\n /**\r\n * Compares values to sort them in ascending order.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {number} Returns the sort order indicator for `value`.\r\n */\r\n function compareAscending(value, other) {\r\n if (value !== other) {\r\n var valIsDefined = value !== undefined,\r\n valIsNull = value === null,\r\n valIsReflexive = value === value,\r\n valIsSymbol = isSymbol(value);\r\n\r\n var othIsDefined = other !== undefined,\r\n othIsNull = other === null,\r\n othIsReflexive = other === other,\r\n othIsSymbol = isSymbol(other);\r\n\r\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\r\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\r\n (valIsNull && othIsDefined && othIsReflexive) ||\r\n (!valIsDefined && othIsReflexive) ||\r\n !valIsReflexive) {\r\n return 1;\r\n }\r\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\r\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\r\n (othIsNull && valIsDefined && valIsReflexive) ||\r\n (!othIsDefined && valIsReflexive) ||\r\n !othIsReflexive) {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Used by `_.orderBy` to compare multiple properties of a value to another\r\n * and stable sort them.\r\n *\r\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\r\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\r\n * of corresponding values.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {boolean[]|string[]} orders The order to sort by for each property.\r\n * @returns {number} Returns the sort order indicator for `object`.\r\n */\r\n function compareMultiple(object, other, orders) {\r\n var index = -1,\r\n objCriteria = object.criteria,\r\n othCriteria = other.criteria,\r\n length = objCriteria.length,\r\n ordersLength = orders.length;\r\n\r\n while (++index < length) {\r\n var result = compareAscending(objCriteria[index], othCriteria[index]);\r\n if (result) {\r\n if (index >= ordersLength) {\r\n return result;\r\n }\r\n var order = orders[index];\r\n return result * (order == 'desc' ? -1 : 1);\r\n }\r\n }\r\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\r\n // that causes it, under certain circumstances, to provide the same value for\r\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\r\n // for more details.\r\n //\r\n // This also ensures a stable sort in V8 and other engines.\r\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\r\n return object.index - other.index;\r\n }\r\n\r\n /**\r\n * Creates an array that is the composition of partially applied arguments,\r\n * placeholders, and provided arguments into a single array of arguments.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to prepend to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgs(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersLength = holders.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(leftLength + rangeLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++leftIndex < leftLength) {\r\n result[leftIndex] = partials[leftIndex];\r\n }\r\n while (++argsIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[holders[argsIndex]] = args[argsIndex];\r\n }\r\n }\r\n while (rangeLength--) {\r\n result[leftIndex++] = args[argsIndex++];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `composeArgs` except that the arguments composition\r\n * is tailored for `_.partialRight`.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to append to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgsRight(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersIndex = -1,\r\n holdersLength = holders.length,\r\n rightIndex = -1,\r\n rightLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(rangeLength + rightLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++argsIndex < rangeLength) {\r\n result[argsIndex] = args[argsIndex];\r\n }\r\n var offset = argsIndex;\r\n while (++rightIndex < rightLength) {\r\n result[offset + rightIndex] = partials[rightIndex];\r\n }\r\n while (++holdersIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[offset + holders[holdersIndex]] = args[argsIndex++];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Copies the values of `source` to `array`.\r\n *\r\n * @private\r\n * @param {Array} source The array to copy values from.\r\n * @param {Array} [array=[]] The array to copy values to.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function copyArray(source, array) {\r\n var index = -1,\r\n length = source.length;\r\n\r\n array || (array = Array(length));\r\n while (++index < length) {\r\n array[index] = source[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Copies properties of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy properties from.\r\n * @param {Array} props The property identifiers to copy.\r\n * @param {Object} [object={}] The object to copy properties to.\r\n * @param {Function} [customizer] The function to customize copied values.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copyObject(source, props, object, customizer) {\r\n var isNew = !object;\r\n object || (object = {});\r\n\r\n var index = -1,\r\n length = props.length;\r\n\r\n while (++index < length) {\r\n var key = props[index];\r\n\r\n var newValue = customizer\r\n ? customizer(object[key], source[key], key, object, source)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = source[key];\r\n }\r\n if (isNew) {\r\n baseAssignValue(object, key, newValue);\r\n } else {\r\n assignValue(object, key, newValue);\r\n }\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Copies own symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbols(source, object) {\r\n return copyObject(source, getSymbols(source), object);\r\n }\r\n\r\n /**\r\n * Copies own and inherited symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbolsIn(source, object) {\r\n return copyObject(source, getSymbolsIn(source), object);\r\n }\r\n\r\n /**\r\n * Creates a function like `_.groupBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} [initializer] The accumulator object initializer.\r\n * @returns {Function} Returns the new aggregator function.\r\n */\r\n function createAggregator(setter, initializer) {\r\n return function(collection, iteratee) {\r\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\r\n accumulator = initializer ? initializer() : {};\r\n\r\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function like `_.assign`.\r\n *\r\n * @private\r\n * @param {Function} assigner The function to assign values.\r\n * @returns {Function} Returns the new assigner function.\r\n */\r\n function createAssigner(assigner) {\r\n return baseRest(function(object, sources) {\r\n var index = -1,\r\n length = sources.length,\r\n customizer = length > 1 ? sources[length - 1] : undefined,\r\n guard = length > 2 ? sources[2] : undefined;\r\n\r\n customizer = (assigner.length > 3 && typeof customizer == 'function')\r\n ? (length--, customizer)\r\n : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n customizer = length < 3 ? undefined : customizer;\r\n length = 1;\r\n }\r\n object = Object(object);\r\n while (++index < length) {\r\n var source = sources[index];\r\n if (source) {\r\n assigner(object, source, index, customizer);\r\n }\r\n }\r\n return object;\r\n });\r\n }\r\n\r\n /**\r\n * Creates a `baseEach` or `baseEachRight` function.\r\n *\r\n * @private\r\n * @param {Function} eachFunc The function to iterate over a collection.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseEach(eachFunc, fromRight) {\r\n return function(collection, iteratee) {\r\n if (collection == null) {\r\n return collection;\r\n }\r\n if (!isArrayLike(collection)) {\r\n return eachFunc(collection, iteratee);\r\n }\r\n var length = collection.length,\r\n index = fromRight ? length : -1,\r\n iterable = Object(collection);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (iteratee(iterable[index], index, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return collection;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseFor(fromRight) {\r\n return function(object, iteratee, keysFunc) {\r\n var index = -1,\r\n iterable = Object(object),\r\n props = keysFunc(object),\r\n length = props.length;\r\n\r\n while (length--) {\r\n var key = props[fromRight ? length : ++index];\r\n if (iteratee(iterable[key], key, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return object;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the optional `this`\r\n * binding of `thisArg`.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createBind(func, bitmask, thisArg) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return fn.apply(isBind ? thisArg : this, arguments);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function that produces an instance of `Ctor` regardless of\r\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\r\n *\r\n * @private\r\n * @param {Function} Ctor The constructor to wrap.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCtor(Ctor) {\r\n return function() {\r\n // Use a `switch` statement to work with class constructors. See\r\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\r\n // for more details.\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return new Ctor;\r\n case 1: return new Ctor(args[0]);\r\n case 2: return new Ctor(args[0], args[1]);\r\n case 3: return new Ctor(args[0], args[1], args[2]);\r\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\r\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\r\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n }\r\n var thisBinding = baseCreate(Ctor.prototype),\r\n result = Ctor.apply(thisBinding, args);\r\n\r\n // Mimic the constructor's `return` behavior.\r\n // See https://es5.github.io/#x13.2.2 for more details.\r\n return isObject(result) ? result : thisBinding;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to enable currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {number} arity The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCurry(func, bitmask, arity) {\r\n var Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length,\r\n placeholder = getHolder(wrapper);\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\r\n ? []\r\n : replaceHolders(args, placeholder);\r\n\r\n length -= holders.length;\r\n if (length < arity) {\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\r\n args, holders, undefined, undefined, arity - length);\r\n }\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return apply(fn, this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.find` or `_.findLast` function.\r\n *\r\n * @private\r\n * @param {Function} findIndexFunc The function to find the collection index.\r\n * @returns {Function} Returns the new find function.\r\n */\r\n function createFind(findIndexFunc) {\r\n return function(collection, predicate, fromIndex) {\r\n var iterable = Object(collection);\r\n if (!isArrayLike(collection)) {\r\n var iteratee = baseIteratee(predicate, 3);\r\n collection = keys(collection);\r\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\r\n }\r\n var index = findIndexFunc(collection, predicate, fromIndex);\r\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with optional `this`\r\n * binding of `thisArg`, partial application, and currying.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [partialsRight] The arguments to append to those provided\r\n * to the new function.\r\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\r\n var isAry = bitmask & WRAP_ARY_FLAG,\r\n isBind = bitmask & WRAP_BIND_FLAG,\r\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\r\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\r\n isFlip = bitmask & WRAP_FLIP_FLAG,\r\n Ctor = isBindKey ? undefined : createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length;\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n if (isCurried) {\r\n var placeholder = getHolder(wrapper),\r\n holdersCount = countHolders(args, placeholder);\r\n }\r\n if (partials) {\r\n args = composeArgs(args, partials, holders, isCurried);\r\n }\r\n if (partialsRight) {\r\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\r\n }\r\n length -= holdersCount;\r\n if (isCurried && length < arity) {\r\n var newHolders = replaceHolders(args, placeholder);\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\r\n args, newHolders, argPos, ary, arity - length\r\n );\r\n }\r\n var thisBinding = isBind ? thisArg : this,\r\n fn = isBindKey ? thisBinding[func] : func;\r\n\r\n length = args.length;\r\n if (argPos) {\r\n args = reorder(args, argPos);\r\n } else if (isFlip && length > 1) {\r\n args.reverse();\r\n }\r\n if (isAry && ary < length) {\r\n args.length = ary;\r\n }\r\n if (this && this !== root && this instanceof wrapper) {\r\n fn = Ctor || createCtor(fn);\r\n }\r\n return fn.apply(thisBinding, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function like `_.invertBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} toIteratee The function to resolve iteratees.\r\n * @returns {Function} Returns the new inverter function.\r\n */\r\n function createInverter(setter, toIteratee) {\r\n return function(object, iteratee) {\r\n return baseInverter(object, setter, toIteratee(iteratee), {});\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the `this` binding\r\n * of `thisArg` and `partials` prepended to the arguments it receives.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} partials The arguments to prepend to those provided to\r\n * the new function.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createPartial(func, bitmask, thisArg, partials) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var argsIndex = -1,\r\n argsLength = arguments.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n args = Array(leftLength + argsLength),\r\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n\r\n while (++leftIndex < leftLength) {\r\n args[leftIndex] = partials[leftIndex];\r\n }\r\n while (argsLength--) {\r\n args[leftIndex++] = arguments[++argsIndex];\r\n }\r\n return apply(fn, isBind ? thisArg : this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.range` or `_.rangeRight` function.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new range function.\r\n */\r\n function createRange(fromRight) {\r\n return function(start, end, step) {\r\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\r\n end = step = undefined;\r\n }\r\n // Ensure the sign of `-0` is preserved.\r\n start = toFinite(start);\r\n if (end === undefined) {\r\n end = start;\r\n start = 0;\r\n } else {\r\n end = toFinite(end);\r\n }\r\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\r\n return baseRange(start, end, step, fromRight);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to continue currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {Function} wrapFunc The function to create the `func` wrapper.\r\n * @param {*} placeholder The placeholder value.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\r\n var isCurry = bitmask & WRAP_CURRY_FLAG,\r\n newHolders = isCurry ? holders : undefined,\r\n newHoldersRight = isCurry ? undefined : holders,\r\n newPartials = isCurry ? partials : undefined,\r\n newPartialsRight = isCurry ? undefined : partials;\r\n\r\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\r\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\r\n\r\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\r\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\r\n }\r\n var newData = [\r\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\r\n newHoldersRight, argPos, ary, arity\r\n ];\r\n\r\n var result = wrapFunc.apply(undefined, newData);\r\n if (isLaziable(func)) {\r\n setData(result, newData);\r\n }\r\n result.placeholder = placeholder;\r\n return setWrapToString(result, func, bitmask);\r\n }\r\n\r\n /**\r\n * Creates a set object of `values`.\r\n *\r\n * @private\r\n * @param {Array} values The values to add to the set.\r\n * @returns {Object} Returns the new set.\r\n */\r\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\r\n return new Set(values);\r\n };\r\n\r\n /**\r\n * Creates a function that either curries or invokes `func` with optional\r\n * `this` binding and partially applied arguments.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags.\r\n * 1 - `_.bind`\r\n * 2 - `_.bindKey`\r\n * 4 - `_.curry` or `_.curryRight` of a bound function\r\n * 8 - `_.curry`\r\n * 16 - `_.curryRight`\r\n * 32 - `_.partial`\r\n * 64 - `_.partialRight`\r\n * 128 - `_.rearg`\r\n * 256 - `_.ary`\r\n * 512 - `_.flip`\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to be partially applied.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\r\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\r\n if (!isBindKey && typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var length = partials ? partials.length : 0;\r\n if (!length) {\r\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\r\n partials = holders = undefined;\r\n }\r\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\r\n arity = arity === undefined ? arity : toInteger(arity);\r\n length -= holders ? holders.length : 0;\r\n\r\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\r\n var partialsRight = partials,\r\n holdersRight = holders;\r\n\r\n partials = holders = undefined;\r\n }\r\n var data = isBindKey ? undefined : getData(func);\r\n\r\n var newData = [\r\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\r\n argPos, ary, arity\r\n ];\r\n\r\n if (data) {\r\n mergeData(newData, data);\r\n }\r\n func = newData[0];\r\n bitmask = newData[1];\r\n thisArg = newData[2];\r\n partials = newData[3];\r\n holders = newData[4];\r\n arity = newData[9] = newData[9] === undefined\r\n ? (isBindKey ? 0 : func.length)\r\n : nativeMax(newData[9] - length, 0);\r\n\r\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\r\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\r\n }\r\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\r\n var result = createBind(func, bitmask, thisArg);\r\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\r\n result = createCurry(func, bitmask, arity);\r\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\r\n result = createPartial(func, bitmask, thisArg, partials);\r\n } else {\r\n result = createHybrid.apply(undefined, newData);\r\n }\r\n var setter = data ? baseSetData : setData;\r\n return setWrapToString(setter(result, newData), func, bitmask);\r\n }\r\n\r\n /**\r\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\r\n * objects into destination objects that are passed thru.\r\n *\r\n * @private\r\n * @param {*} objValue The destination value.\r\n * @param {*} srcValue The source value.\r\n * @param {string} key The key of the property to merge.\r\n * @param {Object} object The parent object of `objValue`.\r\n * @param {Object} source The parent object of `srcValue`.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n * @returns {*} Returns the value to assign.\r\n */\r\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\r\n if (isObject(objValue) && isObject(srcValue)) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, objValue);\r\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\r\n stack['delete'](srcValue);\r\n }\r\n return objValue;\r\n }\r\n\r\n /**\r\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\r\n * objects.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {string} key The key of the property to inspect.\r\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\r\n */\r\n function customOmitClone(value) {\r\n return isPlainObject(value) ? undefined : value;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for arrays with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Array} array The array to compare.\r\n * @param {Array} other The other array to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `array` and `other` objects.\r\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\r\n */\r\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n arrLength = array.length,\r\n othLength = other.length;\r\n\r\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(array);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var index = -1,\r\n result = true,\r\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\r\n\r\n stack.set(array, other);\r\n stack.set(other, array);\r\n\r\n // Ignore non-index properties.\r\n while (++index < arrLength) {\r\n var arrValue = array[index],\r\n othValue = other[index];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, arrValue, index, other, array, stack)\r\n : customizer(arrValue, othValue, index, array, other, stack);\r\n }\r\n if (compared !== undefined) {\r\n if (compared) {\r\n continue;\r\n }\r\n result = false;\r\n break;\r\n }\r\n // Recursively compare arrays (susceptible to call stack limits).\r\n if (seen) {\r\n if (!arraySome(other, function(othValue, othIndex) {\r\n if (!cacheHas(seen, othIndex) &&\r\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\r\n return seen.push(othIndex);\r\n }\r\n })) {\r\n result = false;\r\n break;\r\n }\r\n } else if (!(\r\n arrValue === othValue ||\r\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n }\r\n stack['delete'](array);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for comparing objects of\r\n * the same `toStringTag`.\r\n *\r\n * **Note:** This function only supports comparing values with tags of\r\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {string} tag The `toStringTag` of the objects to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\r\n switch (tag) {\r\n case dataViewTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n (object.byteOffset != other.byteOffset)) {\r\n return false;\r\n }\r\n object = object.buffer;\r\n other = other.buffer;\r\n\r\n case arrayBufferTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\r\n return false;\r\n }\r\n return true;\r\n\r\n case boolTag:\r\n case dateTag:\r\n case numberTag:\r\n // Coerce booleans to `1` or `0` and dates to milliseconds.\r\n // Invalid dates are coerced to `NaN`.\r\n return eq(+object, +other);\r\n\r\n case errorTag:\r\n return object.name == other.name && object.message == other.message;\r\n\r\n case regexpTag:\r\n case stringTag:\r\n // Coerce regexes to strings and treat strings, primitives and objects,\r\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\r\n // for more details.\r\n return object == (other + '');\r\n\r\n case mapTag:\r\n var convert = mapToArray;\r\n\r\n case setTag:\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\r\n convert || (convert = setToArray);\r\n\r\n if (object.size != other.size && !isPartial) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked) {\r\n return stacked == other;\r\n }\r\n bitmask |= COMPARE_UNORDERED_FLAG;\r\n\r\n // Recursively compare objects (susceptible to call stack limits).\r\n stack.set(object, other);\r\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\r\n stack['delete'](object);\r\n return result;\r\n\r\n case symbolTag:\r\n if (symbolValueOf) {\r\n return symbolValueOf.call(object) == symbolValueOf.call(other);\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for objects with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n objProps = getAllKeys(object),\r\n objLength = objProps.length,\r\n othProps = getAllKeys(other),\r\n othLength = othProps.length;\r\n\r\n if (objLength != othLength && !isPartial) {\r\n return false;\r\n }\r\n var index = objLength;\r\n while (index--) {\r\n var key = objProps[index];\r\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\r\n return false;\r\n }\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var result = true;\r\n stack.set(object, other);\r\n stack.set(other, object);\r\n\r\n var skipCtor = isPartial;\r\n while (++index < objLength) {\r\n key = objProps[index];\r\n var objValue = object[key],\r\n othValue = other[key];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, objValue, key, other, object, stack)\r\n : customizer(objValue, othValue, key, object, other, stack);\r\n }\r\n // Recursively compare objects (susceptible to call stack limits).\r\n if (!(compared === undefined\r\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\r\n : compared\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n skipCtor || (skipCtor = key == 'constructor');\r\n }\r\n if (result && !skipCtor) {\r\n var objCtor = object.constructor,\r\n othCtor = other.constructor;\r\n\r\n // Non `Object` object instances with different constructors are not equal.\r\n if (objCtor != othCtor &&\r\n ('constructor' in object && 'constructor' in other) &&\r\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\r\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\r\n result = false;\r\n }\r\n }\r\n stack['delete'](object);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which flattens the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function flatRest(func) {\r\n return setToString(overRest(func, undefined, flatten), func + '');\r\n }\r\n\r\n /**\r\n * Creates an array of own enumerable property names and symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeys(object) {\r\n return baseGetAllKeys(object, keys, getSymbols);\r\n }\r\n\r\n /**\r\n * Creates an array of own and inherited enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeysIn(object) {\r\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\r\n }\r\n\r\n /**\r\n * Gets metadata for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {*} Returns the metadata for `func`.\r\n */\r\n var getData = !metaMap ? noop : function(func) {\r\n return metaMap.get(func);\r\n };\r\n\r\n /**\r\n * Gets the name of `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {string} Returns the function name.\r\n */\r\n function getFuncName(func) {\r\n var result = (func.name + ''),\r\n array = realNames[result],\r\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\r\n\r\n while (length--) {\r\n var data = array[length],\r\n otherFunc = data.func;\r\n if (otherFunc == null || otherFunc == func) {\r\n return data.name;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the argument placeholder value for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to inspect.\r\n * @returns {*} Returns the placeholder value.\r\n */\r\n function getHolder(func) {\r\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\r\n return object.placeholder;\r\n }\r\n\r\n /**\r\n * Gets the data for `map`.\r\n *\r\n * @private\r\n * @param {Object} map The map to query.\r\n * @param {string} key The reference key.\r\n * @returns {*} Returns the map data.\r\n */\r\n function getMapData(map, key) {\r\n var data = map.__data__;\r\n return isKeyable(key)\r\n ? data[typeof key == 'string' ? 'string' : 'hash']\r\n : data.map;\r\n }\r\n\r\n /**\r\n * Gets the property names, values, and compare flags of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the match data of `object`.\r\n */\r\n function getMatchData(object) {\r\n var result = keys(object),\r\n length = result.length;\r\n\r\n while (length--) {\r\n var key = result[length],\r\n value = object[key];\r\n\r\n result[length] = [key, value, isStrictComparable(value)];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the native function at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the method to get.\r\n * @returns {*} Returns the function if it's native, else `undefined`.\r\n */\r\n function getNative(object, key) {\r\n var value = getValue(object, key);\r\n return baseIsNative(value) ? value : undefined;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the raw `toStringTag`.\r\n */\r\n function getRawTag(value) {\r\n var isOwn = hasOwnProperty.call(value, symToStringTag),\r\n tag = value[symToStringTag];\r\n\r\n try {\r\n value[symToStringTag] = undefined;\r\n var unmasked = true;\r\n } catch (e) {}\r\n\r\n var result = nativeObjectToString.call(value);\r\n if (unmasked) {\r\n if (isOwn) {\r\n value[symToStringTag] = tag;\r\n } else {\r\n delete value[symToStringTag];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\r\n if (object == null) {\r\n return [];\r\n }\r\n object = Object(object);\r\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\r\n return propertyIsEnumerable.call(object, symbol);\r\n });\r\n };\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\r\n var result = [];\r\n while (object) {\r\n arrayPush(result, getSymbols(object));\r\n object = getPrototype(object);\r\n }\r\n return result;\r\n };\r\n\r\n /**\r\n * Gets the `toStringTag` of `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n var getTag = baseGetTag;\r\n\r\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\r\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\r\n (Map && getTag(new Map) != mapTag) ||\r\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\r\n (Set && getTag(new Set) != setTag) ||\r\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\r\n getTag = function(value) {\r\n var result = baseGetTag(value),\r\n Ctor = result == objectTag ? value.constructor : undefined,\r\n ctorString = Ctor ? toSource(Ctor) : '';\r\n\r\n if (ctorString) {\r\n switch (ctorString) {\r\n case dataViewCtorString: return dataViewTag;\r\n case mapCtorString: return mapTag;\r\n case promiseCtorString: return promiseTag;\r\n case setCtorString: return setTag;\r\n case weakMapCtorString: return weakMapTag;\r\n }\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\r\n *\r\n * @private\r\n * @param {number} start The start of the view.\r\n * @param {number} end The end of the view.\r\n * @param {Array} transforms The transformations to apply to the view.\r\n * @returns {Object} Returns an object containing the `start` and `end`\r\n * positions of the view.\r\n */\r\n function getView(start, end, transforms) {\r\n var index = -1,\r\n length = transforms.length;\r\n\r\n while (++index < length) {\r\n var data = transforms[index],\r\n size = data.size;\r\n\r\n switch (data.type) {\r\n case 'drop': start += size; break;\r\n case 'dropRight': end -= size; break;\r\n case 'take': end = nativeMin(end, start + size); break;\r\n case 'takeRight': start = nativeMax(start, end - size); break;\r\n }\r\n }\r\n return { 'start': start, 'end': end };\r\n }\r\n\r\n /**\r\n * Extracts wrapper details from the `source` body comment.\r\n *\r\n * @private\r\n * @param {string} source The source to inspect.\r\n * @returns {Array} Returns the wrapper details.\r\n */\r\n function getWrapDetails(source) {\r\n var match = source.match(reWrapDetails);\r\n return match ? match[1].split(reSplitDetails) : [];\r\n }\r\n\r\n /**\r\n * Checks if `path` exists on `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @param {Function} hasFunc The function to check properties.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n */\r\n function hasPath(object, path, hasFunc) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n result = false;\r\n\r\n while (++index < length) {\r\n var key = toKey(path[index]);\r\n if (!(result = object != null && hasFunc(object, key))) {\r\n break;\r\n }\r\n object = object[key];\r\n }\r\n if (result || ++index != length) {\r\n return result;\r\n }\r\n length = object == null ? 0 : object.length;\r\n return !!length && isLength(length) && isIndex(key, length) &&\r\n (isArray(object) || isArguments(object));\r\n }\r\n\r\n /**\r\n * Initializes an array clone.\r\n *\r\n * @private\r\n * @param {Array} array The array to clone.\r\n * @returns {Array} Returns the initialized clone.\r\n */\r\n function initCloneArray(array) {\r\n var length = array.length,\r\n result = new array.constructor(length);\r\n\r\n // Add properties assigned by `RegExp#exec`.\r\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\r\n result.index = array.index;\r\n result.input = array.input;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Initializes an object clone.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneObject(object) {\r\n return (typeof object.constructor == 'function' && !isPrototype(object))\r\n ? baseCreate(getPrototype(object))\r\n : {};\r\n }\r\n\r\n /**\r\n * Initializes an object clone based on its `toStringTag`.\r\n *\r\n * **Note:** This function only supports cloning values with tags of\r\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @param {string} tag The `toStringTag` of the object to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneByTag(object, tag, isDeep) {\r\n var Ctor = object.constructor;\r\n switch (tag) {\r\n case arrayBufferTag:\r\n return cloneArrayBuffer(object);\r\n\r\n case boolTag:\r\n case dateTag:\r\n return new Ctor(+object);\r\n\r\n case dataViewTag:\r\n return cloneDataView(object, isDeep);\r\n\r\n case float32Tag: case float64Tag:\r\n case int8Tag: case int16Tag: case int32Tag:\r\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\r\n return cloneTypedArray(object, isDeep);\r\n\r\n case mapTag:\r\n return new Ctor;\r\n\r\n case numberTag:\r\n case stringTag:\r\n return new Ctor(object);\r\n\r\n case regexpTag:\r\n return cloneRegExp(object);\r\n\r\n case setTag:\r\n return new Ctor;\r\n\r\n case symbolTag:\r\n return cloneSymbol(object);\r\n }\r\n }\r\n\r\n /**\r\n * Inserts wrapper `details` in a comment at the top of the `source` body.\r\n *\r\n * @private\r\n * @param {string} source The source to modify.\r\n * @returns {Array} details The details to insert.\r\n * @returns {string} Returns the modified source.\r\n */\r\n function insertWrapDetails(source, details) {\r\n var length = details.length;\r\n if (!length) {\r\n return source;\r\n }\r\n var lastIndex = length - 1;\r\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\r\n details = details.join(length > 2 ? ', ' : ' ');\r\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\r\n }\r\n\r\n /**\r\n * Checks if `value` is a flattenable `arguments` object or array.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\r\n */\r\n function isFlattenable(value) {\r\n return isArray(value) || isArguments(value) ||\r\n !!(spreadableSymbol && value && value[spreadableSymbol]);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like index.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\r\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\r\n */\r\n function isIndex(value, length) {\r\n var type = typeof value;\r\n length = length == null ? MAX_SAFE_INTEGER : length;\r\n\r\n return !!length &&\r\n (type == 'number' ||\r\n (type != 'symbol' && reIsUint.test(value))) &&\r\n (value > -1 && value % 1 == 0 && value < length);\r\n }\r\n\r\n /**\r\n * Checks if the given arguments are from an iteratee call.\r\n *\r\n * @private\r\n * @param {*} value The potential iteratee value argument.\r\n * @param {*} index The potential iteratee index or key argument.\r\n * @param {*} object The potential iteratee object argument.\r\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\r\n * else `false`.\r\n */\r\n function isIterateeCall(value, index, object) {\r\n if (!isObject(object)) {\r\n return false;\r\n }\r\n var type = typeof index;\r\n if (type == 'number'\r\n ? (isArrayLike(object) && isIndex(index, object.length))\r\n : (type == 'string' && index in object)\r\n ) {\r\n return eq(object[index], value);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a property name and not a property path.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\r\n */\r\n function isKey(value, object) {\r\n if (isArray(value)) {\r\n return false;\r\n }\r\n var type = typeof value;\r\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\r\n value == null || isSymbol(value)) {\r\n return true;\r\n }\r\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\r\n (object != null && value in Object(object));\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for use as unique object key.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\r\n */\r\n function isKeyable(value) {\r\n var type = typeof value;\r\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\r\n ? (value !== '__proto__')\r\n : (value === null);\r\n }\r\n\r\n /**\r\n * Checks if `func` has a lazy counterpart.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\r\n * else `false`.\r\n */\r\n function isLaziable(func) {\r\n var funcName = getFuncName(func),\r\n other = lodash[funcName];\r\n\r\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\r\n return false;\r\n }\r\n if (func === other) {\r\n return true;\r\n }\r\n var data = getData(other);\r\n return !!data && func === data[0];\r\n }\r\n\r\n /**\r\n * Checks if `func` has its source masked.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\r\n */\r\n function isMasked(func) {\r\n return !!maskSrcKey && (maskSrcKey in func);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely a prototype object.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\r\n */\r\n function isPrototype(value) {\r\n var Ctor = value && value.constructor,\r\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\r\n\r\n return value === proto;\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` if suitable for strict\r\n * equality comparisons, else `false`.\r\n */\r\n function isStrictComparable(value) {\r\n return value === value && !isObject(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `matchesProperty` for source values suitable\r\n * for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function matchesStrictComparable(key, srcValue) {\r\n return function(object) {\r\n if (object == null) {\r\n return false;\r\n }\r\n return object[key] === srcValue &&\r\n (srcValue !== undefined || (key in Object(object)));\r\n };\r\n }\r\n\r\n /**\r\n * A specialized version of `_.memoize` which clears the memoized function's\r\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\r\n *\r\n * @private\r\n * @param {Function} func The function to have its output memoized.\r\n * @returns {Function} Returns the new memoized function.\r\n */\r\n function memoizeCapped(func) {\r\n var result = memoize(func, function(key) {\r\n if (cache.size === MAX_MEMOIZE_SIZE) {\r\n cache.clear();\r\n }\r\n return key;\r\n });\r\n\r\n var cache = result.cache;\r\n return result;\r\n }\r\n\r\n /**\r\n * Merges the function metadata of `source` into `data`.\r\n *\r\n * Merging metadata reduces the number of wrappers used to invoke a function.\r\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\r\n * may be applied regardless of execution order. Methods like `_.ary` and\r\n * `_.rearg` modify function arguments, making the order in which they are\r\n * executed important, preventing the merging of metadata. However, we make\r\n * an exception for a safe combined case where curried functions have `_.ary`\r\n * and or `_.rearg` applied.\r\n *\r\n * @private\r\n * @param {Array} data The destination metadata.\r\n * @param {Array} source The source metadata.\r\n * @returns {Array} Returns `data`.\r\n */\r\n function mergeData(data, source) {\r\n var bitmask = data[1],\r\n srcBitmask = source[1],\r\n newBitmask = bitmask | srcBitmask,\r\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\r\n\r\n var isCombo =\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\r\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\r\n\r\n // Exit early if metadata can't be merged.\r\n if (!(isCommon || isCombo)) {\r\n return data;\r\n }\r\n // Use source `thisArg` if available.\r\n if (srcBitmask & WRAP_BIND_FLAG) {\r\n data[2] = source[2];\r\n // Set when currying a bound function.\r\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\r\n }\r\n // Compose partial arguments.\r\n var value = source[3];\r\n if (value) {\r\n var partials = data[3];\r\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\r\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\r\n }\r\n // Compose partial right arguments.\r\n value = source[5];\r\n if (value) {\r\n partials = data[5];\r\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\r\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\r\n }\r\n // Use source `argPos` if available.\r\n value = source[7];\r\n if (value) {\r\n data[7] = value;\r\n }\r\n // Use source `ary` if it's smaller.\r\n if (srcBitmask & WRAP_ARY_FLAG) {\r\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\r\n }\r\n // Use source `arity` if one is not provided.\r\n if (data[9] == null) {\r\n data[9] = source[9];\r\n }\r\n // Use source `func` and merge bitmasks.\r\n data[0] = source[0];\r\n data[1] = newBitmask;\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * This function is like\r\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * except that it includes inherited enumerable properties.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function nativeKeysIn(object) {\r\n var result = [];\r\n if (object != null) {\r\n for (var key in Object(object)) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `value` to a string using `Object.prototype.toString`.\r\n *\r\n * @private\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n */\r\n function objectToString(value) {\r\n return nativeObjectToString.call(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which transforms the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @param {Function} transform The rest array transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overRest(func, start, transform) {\r\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\r\n return function() {\r\n var args = arguments,\r\n index = -1,\r\n length = nativeMax(args.length - start, 0),\r\n array = Array(length);\r\n\r\n while (++index < length) {\r\n array[index] = args[start + index];\r\n }\r\n index = -1;\r\n var otherArgs = Array(start + 1);\r\n while (++index < start) {\r\n otherArgs[index] = args[index];\r\n }\r\n otherArgs[start] = transform(array);\r\n return apply(func, this, otherArgs);\r\n };\r\n }\r\n\r\n /**\r\n * Gets the parent value at `path` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} path The path to get the parent value of.\r\n * @returns {*} Returns the parent value.\r\n */\r\n function parent(object, path) {\r\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\r\n }\r\n\r\n /**\r\n * Reorder `array` according to the specified indexes where the element at\r\n * the first index is assigned as the first element, the element at\r\n * the second index is assigned as the second element, and so on.\r\n *\r\n * @private\r\n * @param {Array} array The array to reorder.\r\n * @param {Array} indexes The arranged array indexes.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function reorder(array, indexes) {\r\n var arrLength = array.length,\r\n length = nativeMin(indexes.length, arrLength),\r\n oldArray = copyArray(array);\r\n\r\n while (length--) {\r\n var index = indexes[length];\r\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Sets metadata for `func`.\r\n *\r\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\r\n * period of time, it will trip its breaker and transition to an identity\r\n * function to avoid garbage collection pauses in V8. See\r\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\r\n * for more details.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setData = shortOut(baseSetData);\r\n\r\n /**\r\n * Sets the `toString` method of `func` to return `string`.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setToString = shortOut(baseSetToString);\r\n\r\n /**\r\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\r\n * with wrapper details in a comment at the top of the source body.\r\n *\r\n * @private\r\n * @param {Function} wrapper The function to modify.\r\n * @param {Function} reference The reference function.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Function} Returns `wrapper`.\r\n */\r\n function setWrapToString(wrapper, reference, bitmask) {\r\n var source = (reference + '');\r\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\r\n }\r\n\r\n /**\r\n * Creates a function that'll short out and invoke `identity` instead\r\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\r\n * milliseconds.\r\n *\r\n * @private\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new shortable function.\r\n */\r\n function shortOut(func) {\r\n var count = 0,\r\n lastCalled = 0;\r\n\r\n return function() {\r\n var stamp = nativeNow(),\r\n remaining = HOT_SPAN - (stamp - lastCalled);\r\n\r\n lastCalled = stamp;\r\n if (remaining > 0) {\r\n if (++count >= HOT_COUNT) {\r\n return arguments[0];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n return func.apply(undefined, arguments);\r\n };\r\n }\r\n\r\n /**\r\n * Converts `string` to a property path array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the property path array.\r\n */\r\n var stringToPath = memoizeCapped(function(string) {\r\n var result = [];\r\n if (string.charCodeAt(0) === 46 /* . */) {\r\n result.push('');\r\n }\r\n string.replace(rePropName, function(match, number, quote, subString) {\r\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\r\n });\r\n return result;\r\n });\r\n\r\n /**\r\n * Converts `value` to a string key if it's not a string or symbol.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {string|symbol} Returns the key.\r\n */\r\n function toKey(value) {\r\n if (typeof value == 'string' || isSymbol(value)) {\r\n return value;\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * Converts `func` to its source code.\r\n *\r\n * @private\r\n * @param {Function} func The function to convert.\r\n * @returns {string} Returns the source code.\r\n */\r\n function toSource(func) {\r\n if (func != null) {\r\n try {\r\n return funcToString.call(func);\r\n } catch (e) {}\r\n try {\r\n return (func + '');\r\n } catch (e) {}\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Updates wrapper `details` based on `bitmask` flags.\r\n *\r\n * @private\r\n * @returns {Array} details The details to modify.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Array} Returns `details`.\r\n */\r\n function updateWrapDetails(details, bitmask) {\r\n arrayEach(wrapFlags, function(pair) {\r\n var value = '_.' + pair[0];\r\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\r\n details.push(value);\r\n }\r\n });\r\n return details.sort();\r\n }\r\n\r\n /**\r\n * Creates a clone of `wrapper`.\r\n *\r\n * @private\r\n * @param {Object} wrapper The wrapper to clone.\r\n * @returns {Object} Returns the cloned wrapper.\r\n */\r\n function wrapperClone(wrapper) {\r\n if (wrapper instanceof LazyWrapper) {\r\n return wrapper.clone();\r\n }\r\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\r\n result.__actions__ = copyArray(wrapper.__actions__);\r\n result.__index__ = wrapper.__index__;\r\n result.__values__ = wrapper.__values__;\r\n return result;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array with all falsey values removed. The values `false`, `null`,\r\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to compact.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * _.compact([0, 1, false, 2, '', 3]);\r\n * // => [1, 2, 3]\r\n */\r\n function compact(array) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new array concatenating `array` with any additional arrays\r\n * and/or values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to concatenate.\r\n * @param {...*} [values] The values to concatenate.\r\n * @returns {Array} Returns the new concatenated array.\r\n * @example\r\n *\r\n * var array = [1];\r\n * var other = _.concat(array, 2, [3], [[4]]);\r\n *\r\n * console.log(other);\r\n * // => [1, 2, 3, [4]]\r\n *\r\n * console.log(array);\r\n * // => [1]\r\n */\r\n function concat() {\r\n var length = arguments.length;\r\n if (!length) {\r\n return [];\r\n }\r\n var args = Array(length - 1),\r\n array = arguments[0],\r\n index = length;\r\n\r\n while (index--) {\r\n args[index - 1] = arguments[index];\r\n }\r\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\r\n }\r\n\r\n /**\r\n * Creates an array of `array` values not included in the other given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...Array} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.without, _.xor\r\n * @example\r\n *\r\n * _.difference([2, 1], [2, 3]);\r\n * // => [1]\r\n */\r\n var difference = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements dropped from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to drop.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.drop([1, 2, 3]);\r\n * // => [2, 3]\r\n *\r\n * _.drop([1, 2, 3], 2);\r\n * // => [3]\r\n *\r\n * _.drop([1, 2, 3], 5);\r\n * // => []\r\n *\r\n * _.drop([1, 2, 3], 0);\r\n * // => [1, 2, 3]\r\n */\r\n function drop(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the index of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': false },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': true }\r\n * ];\r\n *\r\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\r\n * // => 0\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findIndex(users, { 'user': 'fred', 'active': false });\r\n * // => 1\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findIndex(users, ['active', false]);\r\n * // => 0\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findIndex(users, 'active');\r\n * // => 2\r\n */\r\n function findIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\r\n }\r\n\r\n /**\r\n * This method is like `_.findIndex` except that it iterates over elements\r\n * of `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=array.length-1] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': false }\r\n * ];\r\n *\r\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\r\n * // => 2\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\r\n * // => 0\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastIndex(users, ['active', false]);\r\n * // => 2\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastIndex(users, 'active');\r\n * // => 0\r\n */\r\n function findLastIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = length - 1;\r\n if (fromIndex !== undefined) {\r\n index = toInteger(fromIndex);\r\n index = fromIndex < 0\r\n ? nativeMax(length + index, 0)\r\n : nativeMin(index, length - 1);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\r\n }\r\n\r\n /**\r\n * Flattens `array` a single level deep.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flatten([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, [3, [4]], 5]\r\n */\r\n function flatten(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, 1) : [];\r\n }\r\n\r\n /**\r\n * Recursively flattens `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, 3, 4, 5]\r\n */\r\n function flattenDeep(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, INFINITY) : [];\r\n }\r\n\r\n /**\r\n * Gets the first element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias first\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the first element of `array`.\r\n * @example\r\n *\r\n * _.head([1, 2, 3]);\r\n * // => 1\r\n *\r\n * _.head([]);\r\n * // => undefined\r\n */\r\n function head(array) {\r\n return (array && array.length) ? array[0] : undefined;\r\n }\r\n\r\n /**\r\n * Gets the index at which the first occurrence of `value` is found in `array`\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. If `fromIndex` is negative, it's used as the\r\n * offset from the end of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.indexOf([1, 2, 1, 2], 2);\r\n * // => 1\r\n *\r\n * // Search from the `fromIndex`.\r\n * _.indexOf([1, 2, 1, 2], 2, 2);\r\n * // => 3\r\n */\r\n function indexOf(array, value, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseIndexOf(array, value, index);\r\n }\r\n\r\n /**\r\n * Gets all but the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.initial([1, 2, 3]);\r\n * // => [1, 2]\r\n */\r\n function initial(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseSlice(array, 0, -1) : [];\r\n }\r\n\r\n /**\r\n * Creates an array of unique values that are included in all given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of intersecting values.\r\n * @example\r\n *\r\n * _.intersection([2, 1], [2, 3]);\r\n * // => [2]\r\n */\r\n var intersection = baseRest(function(arrays) {\r\n var mapped = arrayMap(arrays, castArrayLikeObject);\r\n return (mapped.length && mapped[0] === arrays[0])\r\n ? baseIntersection(mapped)\r\n : [];\r\n });\r\n\r\n /**\r\n * Gets the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the last element of `array`.\r\n * @example\r\n *\r\n * _.last([1, 2, 3]);\r\n * // => 3\r\n */\r\n function last(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? array[length - 1] : undefined;\r\n }\r\n\r\n /**\r\n * Reverses `array` so that the first element becomes the last, the second\r\n * element becomes the second to last, and so on.\r\n *\r\n * **Note:** This method mutates `array` and is based on\r\n * [`Array#reverse`](https://mdn.io/Array/reverse).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _.reverse(array);\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function reverse(array) {\r\n return array == null ? array : nativeReverse.call(array);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` from `start` up to, but not including, `end`.\r\n *\r\n * **Note:** This method is used instead of\r\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\r\n * returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function slice(array, start, end) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\r\n start = 0;\r\n end = length;\r\n }\r\n else {\r\n start = start == null ? 0 : toInteger(start);\r\n end = end === undefined ? length : toInteger(end);\r\n }\r\n return baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.take([1, 2, 3]);\r\n * // => [1]\r\n *\r\n * _.take([1, 2, 3], 2);\r\n * // => [1, 2]\r\n *\r\n * _.take([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.take([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function take(array, n, guard) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, 0, n < 0 ? 0 : n);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the end.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.takeRight([1, 2, 3]);\r\n * // => [3]\r\n *\r\n * _.takeRight([1, 2, 3], 2);\r\n * // => [2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function takeRight(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n n = length - n;\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * Creates an array of unique values, in order, from all given arrays using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of combined values.\r\n * @example\r\n *\r\n * _.union([2], [1, 2]);\r\n * // => [2, 1]\r\n */\r\n var union = baseRest(function(arrays) {\r\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\r\n });\r\n\r\n /**\r\n * Creates a duplicate-free version of an array, using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons, in which only the first occurrence of each element\r\n * is kept. The order of result values is determined by the order they occur\r\n * in the array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniq([2, 1, 2]);\r\n * // => [2, 1]\r\n */\r\n function uniq(array) {\r\n return (array && array.length) ? baseUniq(array) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.uniq` except that it accepts `iteratee` which is\r\n * invoked for each element in `array` to generate the criterion by which\r\n * uniqueness is computed. The order of result values is determined by the\r\n * order they occur in the array. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\r\n * // => [2.1, 1.2]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 1 }, { 'x': 2 }]\r\n */\r\n function uniqBy(array, iteratee) {\r\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.zip` except that it accepts an array of grouped\r\n * elements and creates an array regrouping the elements to their pre-zip\r\n * configuration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.2.0\r\n * @category Array\r\n * @param {Array} array The array of grouped elements to process.\r\n * @returns {Array} Returns the new array of regrouped elements.\r\n * @example\r\n *\r\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n *\r\n * _.unzip(zipped);\r\n * // => [['a', 'b'], [1, 2], [true, false]]\r\n */\r\n function unzip(array) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n var length = 0;\r\n array = arrayFilter(array, function(group) {\r\n if (isArrayLikeObject(group)) {\r\n length = nativeMax(group.length, length);\r\n return true;\r\n }\r\n });\r\n return baseTimes(length, function(index) {\r\n return arrayMap(array, baseProperty(index));\r\n });\r\n }\r\n\r\n /**\r\n * Creates an array excluding all given values using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * **Note:** Unlike `_.pull`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...*} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.difference, _.xor\r\n * @example\r\n *\r\n * _.without([2, 1, 2, 3], 1, 2);\r\n * // => [3]\r\n */\r\n var without = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, values)\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates an array of grouped elements, the first of which contains the\r\n * first elements of the given arrays, the second of which contains the\r\n * second elements of the given arrays, and so on.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to process.\r\n * @returns {Array} Returns the new array of grouped elements.\r\n * @example\r\n *\r\n * _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n */\r\n var zip = baseRest(unzip);\r\n\r\n /**\r\n * This method is like `_.fromPairs` except that it accepts two arrays,\r\n * one of property identifiers and one of corresponding values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.4.0\r\n * @category Array\r\n * @param {Array} [props=[]] The property identifiers.\r\n * @param {Array} [values=[]] The property values.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * _.zipObject(['a', 'b'], [1, 2]);\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n function zipObject(props, values) {\r\n return baseZipObject(props || [], values || [], assignValue);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\r\n * chain sequences enabled. The result of such sequences must be unwrapped\r\n * with `_#value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.3.0\r\n * @category Seq\r\n * @param {*} value The value to wrap.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'pebbles', 'age': 1 }\r\n * ];\r\n *\r\n * var youngest = _\r\n * .chain(users)\r\n * .sortBy('age')\r\n * .map(function(o) {\r\n * return o.user + ' is ' + o.age;\r\n * })\r\n * .head()\r\n * .value();\r\n * // => 'pebbles is 1'\r\n */\r\n function chain(value) {\r\n var result = lodash(value);\r\n result.__chain__ = true;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method invokes `interceptor` and returns `value`. The interceptor\r\n * is invoked with one argument; (value). The purpose of this method is to\r\n * \"tap into\" a method chain sequence in order to modify intermediate results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * _([1, 2, 3])\r\n * .tap(function(array) {\r\n * // Mutate input array.\r\n * array.pop();\r\n * })\r\n * .reverse()\r\n * .value();\r\n * // => [2, 1]\r\n */\r\n function tap(value, interceptor) {\r\n interceptor(value);\r\n return value;\r\n }\r\n\r\n /**\r\n * This method is like `_.tap` except that it returns the result of `interceptor`.\r\n * The purpose of this method is to \"pass thru\" values replacing intermediate\r\n * results in a method chain sequence.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns the result of `interceptor`.\r\n * @example\r\n *\r\n * _(' abc ')\r\n * .chain()\r\n * .trim()\r\n * .thru(function(value) {\r\n * return [value];\r\n * })\r\n * .value();\r\n * // => ['abc']\r\n */\r\n function thru(value, interceptor) {\r\n return interceptor(value);\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.at`.\r\n *\r\n * @name at\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Seq\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\r\n *\r\n * _(object).at(['a[0].b.c', 'a[1]']).value();\r\n * // => [3, 4]\r\n */\r\n var wrapperAt = flatRest(function(paths) {\r\n var length = paths.length,\r\n start = length ? paths[0] : 0,\r\n value = this.__wrapped__,\r\n interceptor = function(object) { return baseAt(object, paths); };\r\n\r\n if (length > 1 || this.__actions__.length ||\r\n !(value instanceof LazyWrapper) || !isIndex(start)) {\r\n return this.thru(interceptor);\r\n }\r\n value = value.slice(start, +start + (length ? 1 : 0));\r\n value.__actions__.push({\r\n 'func': thru,\r\n 'args': [interceptor],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\r\n if (length && !array.length) {\r\n array.push(undefined);\r\n }\r\n return array;\r\n });\r\n });\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\r\n *\r\n * @name chain\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 }\r\n * ];\r\n *\r\n * // A sequence without explicit chaining.\r\n * _(users).head();\r\n * // => { 'user': 'barney', 'age': 36 }\r\n *\r\n * // A sequence with explicit chaining.\r\n * _(users)\r\n * .chain()\r\n * .head()\r\n * .pick('user')\r\n * .value();\r\n * // => { 'user': 'barney' }\r\n */\r\n function wrapperChain() {\r\n return chain(this);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence and returns the wrapped result.\r\n *\r\n * @name commit\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2];\r\n * var wrapped = _(array).push(3);\r\n *\r\n * console.log(array);\r\n * // => [1, 2]\r\n *\r\n * wrapped = wrapped.commit();\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n *\r\n * wrapped.last();\r\n * // => 3\r\n *\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperCommit() {\r\n return new LodashWrapper(this.value(), this.__chain__);\r\n }\r\n\r\n /**\r\n * Gets the next value on a wrapped object following the\r\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\r\n *\r\n * @name next\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the next iterator value.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 1 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 2 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': true, 'value': undefined }\r\n */\r\n function wrapperNext() {\r\n if (this.__values__ === undefined) {\r\n this.__values__ = toArray(this.value());\r\n }\r\n var done = this.__index__ >= this.__values__.length,\r\n value = done ? undefined : this.__values__[this.__index__++];\r\n\r\n return { 'done': done, 'value': value };\r\n }\r\n\r\n /**\r\n * Enables the wrapper to be iterable.\r\n *\r\n * @name Symbol.iterator\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the wrapper object.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped[Symbol.iterator]() === wrapped;\r\n * // => true\r\n *\r\n * Array.from(wrapped);\r\n * // => [1, 2]\r\n */\r\n function wrapperToIterator() {\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\r\n *\r\n * @name plant\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @param {*} value The value to plant.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2]).map(square);\r\n * var other = wrapped.plant([3, 4]);\r\n *\r\n * other.value();\r\n * // => [9, 16]\r\n *\r\n * wrapped.value();\r\n * // => [1, 4]\r\n */\r\n function wrapperPlant(value) {\r\n var result,\r\n parent = this;\r\n\r\n while (parent instanceof baseLodash) {\r\n var clone = wrapperClone(parent);\r\n clone.__index__ = 0;\r\n clone.__values__ = undefined;\r\n if (result) {\r\n previous.__wrapped__ = clone;\r\n } else {\r\n result = clone;\r\n }\r\n var previous = clone;\r\n parent = parent.__wrapped__;\r\n }\r\n previous.__wrapped__ = value;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.reverse`.\r\n *\r\n * **Note:** This method mutates the wrapped array.\r\n *\r\n * @name reverse\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _(array).reverse().value()\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function wrapperReverse() {\r\n var value = this.__wrapped__;\r\n if (value instanceof LazyWrapper) {\r\n var wrapped = value;\r\n if (this.__actions__.length) {\r\n wrapped = new LazyWrapper(this);\r\n }\r\n wrapped = wrapped.reverse();\r\n wrapped.__actions__.push({\r\n 'func': thru,\r\n 'args': [reverse],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(wrapped, this.__chain__);\r\n }\r\n return this.thru(reverse);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence to resolve the unwrapped value.\r\n *\r\n * @name value\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias toJSON, valueOf\r\n * @category Seq\r\n * @returns {*} Returns the resolved unwrapped value.\r\n * @example\r\n *\r\n * _([1, 2, 3]).value();\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperValue() {\r\n return baseWrapperValue(this.__wrapped__, this.__actions__);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The corresponding value of\r\n * each key is the number of times the key was returned by `iteratee`. The\r\n * iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': 1, '6': 2 }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.countBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': 2, '5': 1 }\r\n */\r\n var countBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n ++result[key];\r\n } else {\r\n baseAssignValue(result, key, 1);\r\n }\r\n });\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\r\n * Iteration is stopped once `predicate` returns falsey. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * **Note:** This method returns `true` for\r\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\r\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\r\n * elements of empty collections.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.every([true, 1, null, 'yes'], Boolean);\r\n * // => false\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.every(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.every(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.every(users, 'active');\r\n * // => false\r\n */\r\n function every(collection, predicate, guard) {\r\n var func = isArray(collection) ? arrayEvery : baseEvery;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning an array of all elements\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * **Note:** Unlike `_.remove`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.reject\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * _.filter(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, { 'age': 36, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.filter(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function filter(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning the first element\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {*} Returns the matched element, else `undefined`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false },\r\n * { 'user': 'pebbles', 'age': 1, 'active': true }\r\n * ];\r\n *\r\n * _.find(users, function(o) { return o.age < 40; });\r\n * // => object for 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.find(users, { 'age': 1, 'active': true });\r\n * // => object for 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.find(users, ['active', false]);\r\n * // => object for 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.find(users, 'active');\r\n * // => object for 'barney'\r\n */\r\n var find = createFind(findIndex);\r\n\r\n /**\r\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\r\n * The iteratee is invoked with three arguments: (value, index|key, collection).\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\r\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\r\n * or `_.forOwn` for object iteration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias each\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n * @see _.forEachRight\r\n * @example\r\n *\r\n * _.forEach([1, 2], function(value) {\r\n * console.log(value);\r\n * });\r\n * // => Logs `1` then `2`.\r\n *\r\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\r\n */\r\n function forEach(collection, iteratee) {\r\n var func = isArray(collection) ? arrayEach : baseEach;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The order of grouped values\r\n * is determined by the order they occur in `collection`. The corresponding\r\n * value of each key is an array of elements responsible for generating the\r\n * key. The iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': [4.2], '6': [6.1, 6.3] }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.groupBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': ['one', 'two'], '5': ['three'] }\r\n */\r\n var groupBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n result[key].push(value);\r\n } else {\r\n baseAssignValue(result, key, [value]);\r\n }\r\n });\r\n\r\n /**\r\n * Creates an array of values by running each element in `collection` thru\r\n * `iteratee`. The iteratee is invoked with three arguments:\r\n * (value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\r\n *\r\n * The guarded methods are:\r\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\r\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\r\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\r\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * _.map([4, 8], square);\r\n * // => [16, 64]\r\n *\r\n * _.map({ 'a': 4, 'b': 8 }, square);\r\n * // => [16, 64] (iteration order is not guaranteed)\r\n *\r\n * var users = [\r\n * { 'user': 'barney' },\r\n * { 'user': 'fred' }\r\n * ];\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, 'user');\r\n * // => ['barney', 'fred']\r\n */\r\n function map(collection, iteratee) {\r\n var func = isArray(collection) ? arrayMap : baseMap;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Reduces `collection` to a value which is the accumulated result of running\r\n * each element in `collection` thru `iteratee`, where each successive\r\n * invocation is supplied the return value of the previous. If `accumulator`\r\n * is not given, the first element of `collection` is used as the initial\r\n * value. The iteratee is invoked with four arguments:\r\n * (accumulator, value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\r\n *\r\n * The guarded methods are:\r\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\r\n * and `sortBy`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @returns {*} Returns the accumulated value.\r\n * @see _.reduceRight\r\n * @example\r\n *\r\n * _.reduce([1, 2], function(sum, n) {\r\n * return sum + n;\r\n * }, 0);\r\n * // => 3\r\n *\r\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\r\n * (result[value] || (result[value] = [])).push(key);\r\n * return result;\r\n * }, {});\r\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\r\n */\r\n function reduce(collection, iteratee, accumulator) {\r\n var func = isArray(collection) ? arrayReduce : baseReduce,\r\n initAccum = arguments.length < 3;\r\n\r\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\r\n }\r\n\r\n /**\r\n * The opposite of `_.filter`; this method returns the elements of `collection`\r\n * that `predicate` does **not** return truthy for.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.filter\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': true }\r\n * ];\r\n *\r\n * _.reject(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.reject(users, { 'age': 40, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.reject(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.reject(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function reject(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, negate(baseIteratee(predicate, 3)));\r\n }\r\n\r\n /**\r\n * Gets the size of `collection` by returning its length for array-like\r\n * values or the number of own enumerable string keyed properties for objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object|string} collection The collection to inspect.\r\n * @returns {number} Returns the collection size.\r\n * @example\r\n *\r\n * _.size([1, 2, 3]);\r\n * // => 3\r\n *\r\n * _.size({ 'a': 1, 'b': 2 });\r\n * // => 2\r\n *\r\n * _.size('pebbles');\r\n * // => 7\r\n */\r\n function size(collection) {\r\n if (collection == null) {\r\n return 0;\r\n }\r\n if (isArrayLike(collection)) {\r\n return isString(collection) ? stringSize(collection) : collection.length;\r\n }\r\n var tag = getTag(collection);\r\n if (tag == mapTag || tag == setTag) {\r\n return collection.size;\r\n }\r\n return baseKeys(collection).length;\r\n }\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **any** element of `collection`.\r\n * Iteration is stopped once `predicate` returns truthy. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.some([null, 0, 'yes', false], Boolean);\r\n * // => true\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.some(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.some(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.some(users, 'active');\r\n * // => true\r\n */\r\n function some(collection, predicate, guard) {\r\n var func = isArray(collection) ? arraySome : baseSome;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Creates an array of elements, sorted in ascending order by the results of\r\n * running each element in a collection thru each iteratee. This method\r\n * performs a stable sort, that is, it preserves the original sort order of\r\n * equal elements. The iteratees are invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\r\n * The iteratees to sort by.\r\n * @returns {Array} Returns the new sorted array.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'fred', 'age': 48 },\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'barney', 'age': 34 }\r\n * ];\r\n *\r\n * _.sortBy(users, [function(o) { return o.user; }]);\r\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\r\n *\r\n * _.sortBy(users, ['user', 'age']);\r\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\r\n */\r\n var sortBy = baseRest(function(collection, iteratees) {\r\n if (collection == null) {\r\n return [];\r\n }\r\n var length = iteratees.length;\r\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\r\n iteratees = [];\r\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\r\n iteratees = [iteratees[0]];\r\n }\r\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\r\n });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Gets the timestamp of the number of milliseconds that have elapsed since\r\n * the Unix epoch (1 January 1970 00:00:00 UTC).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Date\r\n * @returns {number} Returns the timestamp.\r\n * @example\r\n *\r\n * _.defer(function(stamp) {\r\n * console.log(_.now() - stamp);\r\n * }, _.now());\r\n * // => Logs the number of milliseconds it took for the deferred invocation.\r\n */\r\n var now = function() {\r\n return root.Date.now();\r\n };\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a function that invokes `func`, with the `this` binding and arguments\r\n * of the created function, while it's called less than `n` times. Subsequent\r\n * calls to the created function return the result of the last `func` invocation.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {number} n The number of calls at which `func` is no longer invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * jQuery(element).on('click', _.before(5, addContactToList));\r\n * // => Allows adding up to 4 contacts to the list.\r\n */\r\n function before(n, func) {\r\n var result;\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n > 0) {\r\n result = func.apply(this, arguments);\r\n }\r\n if (n <= 1) {\r\n func = undefined;\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\r\n * and `partials` prepended to the arguments it receives.\r\n *\r\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\r\n * may be used as a placeholder for partially applied arguments.\r\n *\r\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\r\n * property of bound functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to bind.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new bound function.\r\n * @example\r\n *\r\n * function greet(greeting, punctuation) {\r\n * return greeting + ' ' + this.user + punctuation;\r\n * }\r\n *\r\n * var object = { 'user': 'fred' };\r\n *\r\n * var bound = _.bind(greet, object, 'hi');\r\n * bound('!');\r\n * // => 'hi fred!'\r\n *\r\n * // Bound with placeholders.\r\n * var bound = _.bind(greet, object, _, '!');\r\n * bound('hi');\r\n * // => 'hi fred!'\r\n */\r\n var bind = baseRest(function(func, thisArg, partials) {\r\n var bitmask = WRAP_BIND_FLAG;\r\n if (partials.length) {\r\n var holders = replaceHolders(partials, getHolder(bind));\r\n bitmask |= WRAP_PARTIAL_FLAG;\r\n }\r\n return createWrap(func, bitmask, thisArg, partials, holders);\r\n });\r\n\r\n /**\r\n * Creates a debounced function that delays invoking `func` until after `wait`\r\n * milliseconds have elapsed since the last time the debounced function was\r\n * invoked. The debounced function comes with a `cancel` method to cancel\r\n * delayed `func` invocations and a `flush` method to immediately invoke them.\r\n * Provide `options` to indicate whether `func` should be invoked on the\r\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\r\n * with the last arguments provided to the debounced function. Subsequent\r\n * calls to the debounced function return the result of the last `func`\r\n * invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the debounced function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.debounce` and `_.throttle`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to debounce.\r\n * @param {number} [wait=0] The number of milliseconds to delay.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=false]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {number} [options.maxWait]\r\n * The maximum time `func` is allowed to be delayed before it's invoked.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new debounced function.\r\n * @example\r\n *\r\n * // Avoid costly calculations while the window size is in flux.\r\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\r\n *\r\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\r\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\r\n * 'leading': true,\r\n * 'trailing': false\r\n * }));\r\n *\r\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\r\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\r\n * var source = new EventSource('/stream');\r\n * jQuery(source).on('message', debounced);\r\n *\r\n * // Cancel the trailing debounced invocation.\r\n * jQuery(window).on('popstate', debounced.cancel);\r\n */\r\n function debounce(func, wait, options) {\r\n var lastArgs,\r\n lastThis,\r\n maxWait,\r\n result,\r\n timerId,\r\n lastCallTime,\r\n lastInvokeTime = 0,\r\n leading = false,\r\n maxing = false,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n wait = toNumber(wait) || 0;\r\n if (isObject(options)) {\r\n leading = !!options.leading;\r\n maxing = 'maxWait' in options;\r\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n\r\n function invokeFunc(time) {\r\n var args = lastArgs,\r\n thisArg = lastThis;\r\n\r\n lastArgs = lastThis = undefined;\r\n lastInvokeTime = time;\r\n result = func.apply(thisArg, args);\r\n return result;\r\n }\r\n\r\n function leadingEdge(time) {\r\n // Reset any `maxWait` timer.\r\n lastInvokeTime = time;\r\n // Start the timer for the trailing edge.\r\n timerId = setTimeout(timerExpired, wait);\r\n // Invoke the leading edge.\r\n return leading ? invokeFunc(time) : result;\r\n }\r\n\r\n function remainingWait(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime,\r\n timeWaiting = wait - timeSinceLastCall;\r\n\r\n return maxing\r\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\r\n : timeWaiting;\r\n }\r\n\r\n function shouldInvoke(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime;\r\n\r\n // Either this is the first call, activity has stopped and we're at the\r\n // trailing edge, the system time has gone backwards and we're treating\r\n // it as the trailing edge, or we've hit the `maxWait` limit.\r\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\r\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\r\n }\r\n\r\n function timerExpired() {\r\n var time = now();\r\n if (shouldInvoke(time)) {\r\n return trailingEdge(time);\r\n }\r\n // Restart the timer.\r\n timerId = setTimeout(timerExpired, remainingWait(time));\r\n }\r\n\r\n function trailingEdge(time) {\r\n timerId = undefined;\r\n\r\n // Only invoke if we have `lastArgs` which means `func` has been\r\n // debounced at least once.\r\n if (trailing && lastArgs) {\r\n return invokeFunc(time);\r\n }\r\n lastArgs = lastThis = undefined;\r\n return result;\r\n }\r\n\r\n function cancel() {\r\n if (timerId !== undefined) {\r\n clearTimeout(timerId);\r\n }\r\n lastInvokeTime = 0;\r\n lastArgs = lastCallTime = lastThis = timerId = undefined;\r\n }\r\n\r\n function flush() {\r\n return timerId === undefined ? result : trailingEdge(now());\r\n }\r\n\r\n function debounced() {\r\n var time = now(),\r\n isInvoking = shouldInvoke(time);\r\n\r\n lastArgs = arguments;\r\n lastThis = this;\r\n lastCallTime = time;\r\n\r\n if (isInvoking) {\r\n if (timerId === undefined) {\r\n return leadingEdge(lastCallTime);\r\n }\r\n if (maxing) {\r\n // Handle invocations in a tight loop.\r\n timerId = setTimeout(timerExpired, wait);\r\n return invokeFunc(lastCallTime);\r\n }\r\n }\r\n if (timerId === undefined) {\r\n timerId = setTimeout(timerExpired, wait);\r\n }\r\n return result;\r\n }\r\n debounced.cancel = cancel;\r\n debounced.flush = flush;\r\n return debounced;\r\n }\r\n\r\n /**\r\n * Defers invoking the `func` until the current call stack has cleared. Any\r\n * additional arguments are provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to defer.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.defer(function(text) {\r\n * console.log(text);\r\n * }, 'deferred');\r\n * // => Logs 'deferred' after one millisecond.\r\n */\r\n var defer = baseRest(function(func, args) {\r\n return baseDelay(func, 1, args);\r\n });\r\n\r\n /**\r\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\r\n * provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.delay(function(text) {\r\n * console.log(text);\r\n * }, 1000, 'later');\r\n * // => Logs 'later' after one second.\r\n */\r\n var delay = baseRest(function(func, wait, args) {\r\n return baseDelay(func, toNumber(wait) || 0, args);\r\n });\r\n\r\n /**\r\n * Creates a function that memoizes the result of `func`. If `resolver` is\r\n * provided, it determines the cache key for storing the result based on the\r\n * arguments provided to the memoized function. By default, the first argument\r\n * provided to the memoized function is used as the map cache key. The `func`\r\n * is invoked with the `this` binding of the memoized function.\r\n *\r\n * **Note:** The cache is exposed as the `cache` property on the memoized\r\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\r\n * constructor with one whose instances implement the\r\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\r\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to have its output memoized.\r\n * @param {Function} [resolver] The function to resolve the cache key.\r\n * @returns {Function} Returns the new memoized function.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2 };\r\n * var other = { 'c': 3, 'd': 4 };\r\n *\r\n * var values = _.memoize(_.values);\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * values(other);\r\n * // => [3, 4]\r\n *\r\n * object.a = 2;\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * // Modify the result cache.\r\n * values.cache.set(object, ['a', 'b']);\r\n * values(object);\r\n * // => ['a', 'b']\r\n *\r\n * // Replace `_.memoize.Cache`.\r\n * _.memoize.Cache = WeakMap;\r\n */\r\n function memoize(func, resolver) {\r\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var memoized = function() {\r\n var args = arguments,\r\n key = resolver ? resolver.apply(this, args) : args[0],\r\n cache = memoized.cache;\r\n\r\n if (cache.has(key)) {\r\n return cache.get(key);\r\n }\r\n var result = func.apply(this, args);\r\n memoized.cache = cache.set(key, result) || cache;\r\n return result;\r\n };\r\n memoized.cache = new (memoize.Cache || MapCache);\r\n return memoized;\r\n }\r\n\r\n // Expose `MapCache`.\r\n memoize.Cache = MapCache;\r\n\r\n /**\r\n * Creates a function that negates the result of the predicate `func`. The\r\n * `func` predicate is invoked with the `this` binding and arguments of the\r\n * created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} predicate The predicate to negate.\r\n * @returns {Function} Returns the new negated function.\r\n * @example\r\n *\r\n * function isEven(n) {\r\n * return n % 2 == 0;\r\n * }\r\n *\r\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\r\n * // => [1, 3, 5]\r\n */\r\n function negate(predicate) {\r\n if (typeof predicate != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return function() {\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return !predicate.call(this);\r\n case 1: return !predicate.call(this, args[0]);\r\n case 2: return !predicate.call(this, args[0], args[1]);\r\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\r\n }\r\n return !predicate.apply(this, args);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that is restricted to invoking `func` once. Repeat calls\r\n * to the function return the value of the first invocation. The `func` is\r\n * invoked with the `this` binding and arguments of the created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var initialize = _.once(createApplication);\r\n * initialize();\r\n * initialize();\r\n * // => `createApplication` is invoked once\r\n */\r\n function once(func) {\r\n return before(2, func);\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of the\r\n * created function and arguments from `start` and beyond provided as\r\n * an array.\r\n *\r\n * **Note:** This method is based on the\r\n * [rest parameter](https://mdn.io/rest_parameters).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Function\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var say = _.rest(function(what, names) {\r\n * return what + ' ' + _.initial(names).join(', ') +\r\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\r\n * });\r\n *\r\n * say('hello', 'fred', 'barney', 'pebbles');\r\n * // => 'hello fred, barney, & pebbles'\r\n */\r\n function rest(func, start) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n start = start === undefined ? start : toInteger(start);\r\n return baseRest(func, start);\r\n }\r\n\r\n /**\r\n * Creates a throttled function that only invokes `func` at most once per\r\n * every `wait` milliseconds. The throttled function comes with a `cancel`\r\n * method to cancel delayed `func` invocations and a `flush` method to\r\n * immediately invoke them. Provide `options` to indicate whether `func`\r\n * should be invoked on the leading and/or trailing edge of the `wait`\r\n * timeout. The `func` is invoked with the last arguments provided to the\r\n * throttled function. Subsequent calls to the throttled function return the\r\n * result of the last `func` invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the throttled function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.throttle` and `_.debounce`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to throttle.\r\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=true]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new throttled function.\r\n * @example\r\n *\r\n * // Avoid excessively updating the position while scrolling.\r\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\r\n *\r\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\r\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\r\n * jQuery(element).on('click', throttled);\r\n *\r\n * // Cancel the trailing throttled invocation.\r\n * jQuery(window).on('popstate', throttled.cancel);\r\n */\r\n function throttle(func, wait, options) {\r\n var leading = true,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n if (isObject(options)) {\r\n leading = 'leading' in options ? !!options.leading : leading;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n return debounce(func, wait, {\r\n 'leading': leading,\r\n 'maxWait': wait,\r\n 'trailing': trailing\r\n });\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a shallow clone of `value`.\r\n *\r\n * **Note:** This method is loosely based on the\r\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\r\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\r\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\r\n * arrays. The own enumerable properties of `arguments` objects are cloned\r\n * as plain objects. An empty object is returned for uncloneable values such\r\n * as error objects, functions, DOM nodes, and WeakMaps.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to clone.\r\n * @returns {*} Returns the cloned value.\r\n * @see _.cloneDeep\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var shallow = _.clone(objects);\r\n * console.log(shallow[0] === objects[0]);\r\n * // => true\r\n */\r\n function clone(value) {\r\n return baseClone(value, CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * This method is like `_.clone` except that it recursively clones `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Lang\r\n * @param {*} value The value to recursively clone.\r\n * @returns {*} Returns the deep cloned value.\r\n * @see _.clone\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var deep = _.cloneDeep(objects);\r\n * console.log(deep[0] === objects[0]);\r\n * // => false\r\n */\r\n function cloneDeep(value) {\r\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * Performs a\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * comparison between two values to determine if they are equivalent.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.eq(object, object);\r\n * // => true\r\n *\r\n * _.eq(object, other);\r\n * // => false\r\n *\r\n * _.eq('a', 'a');\r\n * // => true\r\n *\r\n * _.eq('a', Object('a'));\r\n * // => false\r\n *\r\n * _.eq(NaN, NaN);\r\n * // => true\r\n */\r\n function eq(value, other) {\r\n return value === other || (value !== value && other !== other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely an `arguments` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArguments(function() { return arguments; }());\r\n * // => true\r\n *\r\n * _.isArguments([1, 2, 3]);\r\n * // => false\r\n */\r\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\r\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\r\n !propertyIsEnumerable.call(value, 'callee');\r\n };\r\n\r\n /**\r\n * Checks if `value` is classified as an `Array` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\r\n * @example\r\n *\r\n * _.isArray([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArray(document.body.children);\r\n * // => false\r\n *\r\n * _.isArray('abc');\r\n * // => false\r\n *\r\n * _.isArray(_.noop);\r\n * // => false\r\n */\r\n var isArray = Array.isArray;\r\n\r\n /**\r\n * Checks if `value` is array-like. A value is considered array-like if it's\r\n * not a function and has a `value.length` that's an integer greater than or\r\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\r\n * @example\r\n *\r\n * _.isArrayLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLike(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLike('abc');\r\n * // => true\r\n *\r\n * _.isArrayLike(_.noop);\r\n * // => false\r\n */\r\n function isArrayLike(value) {\r\n return value != null && isLength(value.length) && !isFunction(value);\r\n }\r\n\r\n /**\r\n * This method is like `_.isArrayLike` except that it also checks if `value`\r\n * is an object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array-like object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArrayLikeObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject('abc');\r\n * // => false\r\n *\r\n * _.isArrayLikeObject(_.noop);\r\n * // => false\r\n */\r\n function isArrayLikeObject(value) {\r\n return isObjectLike(value) && isArrayLike(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a boolean primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\r\n * @example\r\n *\r\n * _.isBoolean(false);\r\n * // => true\r\n *\r\n * _.isBoolean(null);\r\n * // => false\r\n */\r\n function isBoolean(value) {\r\n return value === true || value === false ||\r\n (isObjectLike(value) && baseGetTag(value) == boolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a buffer.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\r\n * @example\r\n *\r\n * _.isBuffer(new Buffer(2));\r\n * // => true\r\n *\r\n * _.isBuffer(new Uint8Array(2));\r\n * // => false\r\n */\r\n var isBuffer = nativeIsBuffer || stubFalse;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Date` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n * @example\r\n *\r\n * _.isDate(new Date);\r\n * // => true\r\n *\r\n * _.isDate('Mon April 23 2012');\r\n * // => false\r\n */\r\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\r\n\r\n /**\r\n * Checks if `value` is an empty object, collection, map, or set.\r\n *\r\n * Objects are considered empty if they have no own enumerable string keyed\r\n * properties.\r\n *\r\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\r\n * jQuery-like collections are considered empty if they have a `length` of `0`.\r\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\r\n * @example\r\n *\r\n * _.isEmpty(null);\r\n * // => true\r\n *\r\n * _.isEmpty(true);\r\n * // => true\r\n *\r\n * _.isEmpty(1);\r\n * // => true\r\n *\r\n * _.isEmpty([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isEmpty({ 'a': 1 });\r\n * // => false\r\n */\r\n function isEmpty(value) {\r\n if (value == null) {\r\n return true;\r\n }\r\n if (isArrayLike(value) &&\r\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\r\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\r\n return !value.length;\r\n }\r\n var tag = getTag(value);\r\n if (tag == mapTag || tag == setTag) {\r\n return !value.size;\r\n }\r\n if (isPrototype(value)) {\r\n return !baseKeys(value).length;\r\n }\r\n for (var key in value) {\r\n if (hasOwnProperty.call(value, key)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Performs a deep comparison between two values to determine if they are\r\n * equivalent.\r\n *\r\n * **Note:** This method supports comparing arrays, array buffers, booleans,\r\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\r\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\r\n * by their own, not inherited, enumerable properties. Functions and DOM\r\n * nodes are compared by strict equality, i.e. `===`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.isEqual(object, other);\r\n * // => true\r\n *\r\n * object === other;\r\n * // => false\r\n */\r\n function isEqual(value, other) {\r\n return baseIsEqual(value, other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a finite primitive number.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\r\n * @example\r\n *\r\n * _.isFinite(3);\r\n * // => true\r\n *\r\n * _.isFinite(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isFinite(Infinity);\r\n * // => false\r\n *\r\n * _.isFinite('3');\r\n * // => false\r\n */\r\n function isFinite(value) {\r\n return typeof value == 'number' && nativeIsFinite(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Function` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\r\n * @example\r\n *\r\n * _.isFunction(_);\r\n * // => true\r\n *\r\n * _.isFunction(/abc/);\r\n * // => false\r\n */\r\n function isFunction(value) {\r\n if (!isObject(value)) {\r\n return false;\r\n }\r\n // The use of `Object#toString` avoids issues with the `typeof` operator\r\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\r\n var tag = baseGetTag(value);\r\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like length.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\r\n * @example\r\n *\r\n * _.isLength(3);\r\n * // => true\r\n *\r\n * _.isLength(Number.MIN_VALUE);\r\n * // => false\r\n *\r\n * _.isLength(Infinity);\r\n * // => false\r\n *\r\n * _.isLength('3');\r\n * // => false\r\n */\r\n function isLength(value) {\r\n return typeof value == 'number' &&\r\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\r\n }\r\n\r\n /**\r\n * Checks if `value` is the\r\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\r\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\r\n * @example\r\n *\r\n * _.isObject({});\r\n * // => true\r\n *\r\n * _.isObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObject(_.noop);\r\n * // => true\r\n *\r\n * _.isObject(null);\r\n * // => false\r\n */\r\n function isObject(value) {\r\n var type = typeof value;\r\n return value != null && (type == 'object' || type == 'function');\r\n }\r\n\r\n /**\r\n * Checks if `value` is object-like. A value is object-like if it's not `null`\r\n * and has a `typeof` result of \"object\".\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\r\n * @example\r\n *\r\n * _.isObjectLike({});\r\n * // => true\r\n *\r\n * _.isObjectLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObjectLike(_.noop);\r\n * // => false\r\n *\r\n * _.isObjectLike(null);\r\n * // => false\r\n */\r\n function isObjectLike(value) {\r\n return value != null && typeof value == 'object';\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Map` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n * @example\r\n *\r\n * _.isMap(new Map);\r\n * // => true\r\n *\r\n * _.isMap(new WeakMap);\r\n * // => false\r\n */\r\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\r\n\r\n /**\r\n * Checks if `value` is `NaN`.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\r\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\r\n * `undefined` and other non-number values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n * @example\r\n *\r\n * _.isNaN(NaN);\r\n * // => true\r\n *\r\n * _.isNaN(new Number(NaN));\r\n * // => true\r\n *\r\n * isNaN(undefined);\r\n * // => true\r\n *\r\n * _.isNaN(undefined);\r\n * // => false\r\n */\r\n function isNaN(value) {\r\n // An `NaN` primitive is the only value that is not equal to itself.\r\n // Perform the `toStringTag` check first to avoid errors with some\r\n // ActiveX objects in IE.\r\n return isNumber(value) && value != +value;\r\n }\r\n\r\n /**\r\n * Checks if `value` is `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\r\n * @example\r\n *\r\n * _.isNull(null);\r\n * // => true\r\n *\r\n * _.isNull(void 0);\r\n * // => false\r\n */\r\n function isNull(value) {\r\n return value === null;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Number` primitive or object.\r\n *\r\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\r\n * classified as numbers, use the `_.isFinite` method.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\r\n * @example\r\n *\r\n * _.isNumber(3);\r\n * // => true\r\n *\r\n * _.isNumber(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isNumber(Infinity);\r\n * // => true\r\n *\r\n * _.isNumber('3');\r\n * // => false\r\n */\r\n function isNumber(value) {\r\n return typeof value == 'number' ||\r\n (isObjectLike(value) && baseGetTag(value) == numberTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a plain object, that is, an object created by the\r\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.8.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * _.isPlainObject(new Foo);\r\n * // => false\r\n *\r\n * _.isPlainObject([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isPlainObject({ 'x': 0, 'y': 0 });\r\n * // => true\r\n *\r\n * _.isPlainObject(Object.create(null));\r\n * // => true\r\n */\r\n function isPlainObject(value) {\r\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\r\n return false;\r\n }\r\n var proto = getPrototype(value);\r\n if (proto === null) {\r\n return true;\r\n }\r\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\r\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\r\n funcToString.call(Ctor) == objectCtorString;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `RegExp` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n * @example\r\n *\r\n * _.isRegExp(/abc/);\r\n * // => true\r\n *\r\n * _.isRegExp('/abc/');\r\n * // => false\r\n */\r\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Set` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n * @example\r\n *\r\n * _.isSet(new Set);\r\n * // => true\r\n *\r\n * _.isSet(new WeakSet);\r\n * // => false\r\n */\r\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\r\n\r\n /**\r\n * Checks if `value` is classified as a `String` primitive or object.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\r\n * @example\r\n *\r\n * _.isString('abc');\r\n * // => true\r\n *\r\n * _.isString(1);\r\n * // => false\r\n */\r\n function isString(value) {\r\n return typeof value == 'string' ||\r\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Symbol` primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\r\n * @example\r\n *\r\n * _.isSymbol(Symbol.iterator);\r\n * // => true\r\n *\r\n * _.isSymbol('abc');\r\n * // => false\r\n */\r\n function isSymbol(value) {\r\n return typeof value == 'symbol' ||\r\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a typed array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n * @example\r\n *\r\n * _.isTypedArray(new Uint8Array);\r\n * // => true\r\n *\r\n * _.isTypedArray([]);\r\n * // => false\r\n */\r\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\r\n\r\n /**\r\n * Checks if `value` is `undefined`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\r\n * @example\r\n *\r\n * _.isUndefined(void 0);\r\n * // => true\r\n *\r\n * _.isUndefined(null);\r\n * // => false\r\n */\r\n function isUndefined(value) {\r\n return value === undefined;\r\n }\r\n\r\n /**\r\n * Converts `value` to an array.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Array} Returns the converted array.\r\n * @example\r\n *\r\n * _.toArray({ 'a': 1, 'b': 2 });\r\n * // => [1, 2]\r\n *\r\n * _.toArray('abc');\r\n * // => ['a', 'b', 'c']\r\n *\r\n * _.toArray(1);\r\n * // => []\r\n *\r\n * _.toArray(null);\r\n * // => []\r\n */\r\n function toArray(value) {\r\n if (!value) {\r\n return [];\r\n }\r\n if (isArrayLike(value)) {\r\n return isString(value) ? stringToArray(value) : copyArray(value);\r\n }\r\n if (symIterator && value[symIterator]) {\r\n return iteratorToArray(value[symIterator]());\r\n }\r\n var tag = getTag(value),\r\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\r\n\r\n return func(value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a finite number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.12.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted number.\r\n * @example\r\n *\r\n * _.toFinite(3.2);\r\n * // => 3.2\r\n *\r\n * _.toFinite(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toFinite(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toFinite('3.2');\r\n * // => 3.2\r\n */\r\n function toFinite(value) {\r\n if (!value) {\r\n return value === 0 ? value : 0;\r\n }\r\n value = toNumber(value);\r\n if (value === INFINITY || value === -INFINITY) {\r\n var sign = (value < 0 ? -1 : 1);\r\n return sign * MAX_INTEGER;\r\n }\r\n return value === value ? value : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to an integer.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.toInteger(3.2);\r\n * // => 3\r\n *\r\n * _.toInteger(Number.MIN_VALUE);\r\n * // => 0\r\n *\r\n * _.toInteger(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toInteger('3.2');\r\n * // => 3\r\n */\r\n function toInteger(value) {\r\n var result = toFinite(value),\r\n remainder = result % 1;\r\n\r\n return result === result ? (remainder ? result - remainder : result) : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to a number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to process.\r\n * @returns {number} Returns the number.\r\n * @example\r\n *\r\n * _.toNumber(3.2);\r\n * // => 3.2\r\n *\r\n * _.toNumber(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toNumber(Infinity);\r\n * // => Infinity\r\n *\r\n * _.toNumber('3.2');\r\n * // => 3.2\r\n */\r\n function toNumber(value) {\r\n if (typeof value == 'number') {\r\n return value;\r\n }\r\n if (isSymbol(value)) {\r\n return NAN;\r\n }\r\n if (isObject(value)) {\r\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\r\n value = isObject(other) ? (other + '') : other;\r\n }\r\n if (typeof value != 'string') {\r\n return value === 0 ? value : +value;\r\n }\r\n value = value.replace(reTrim, '');\r\n var isBinary = reIsBinary.test(value);\r\n return (isBinary || reIsOctal.test(value))\r\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\r\n : (reIsBadHex.test(value) ? NAN : +value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a plain object flattening inherited enumerable string\r\n * keyed properties of `value` to own properties of the plain object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Object} Returns the converted plain object.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.assign({ 'a': 1 }, new Foo);\r\n * // => { 'a': 1, 'b': 2 }\r\n *\r\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\r\n * // => { 'a': 1, 'b': 2, 'c': 3 }\r\n */\r\n function toPlainObject(value) {\r\n return copyObject(value, keysIn(value));\r\n }\r\n\r\n /**\r\n * Converts `value` to a string. An empty string is returned for `null`\r\n * and `undefined` values. The sign of `-0` is preserved.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n * @example\r\n *\r\n * _.toString(null);\r\n * // => ''\r\n *\r\n * _.toString(-0);\r\n * // => '-0'\r\n *\r\n * _.toString([1, 2, 3]);\r\n * // => '1,2,3'\r\n */\r\n function toString(value) {\r\n return value == null ? '' : baseToString(value);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * This method is like `_.assign` except that it iterates over own and\r\n * inherited source properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias extend\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assign\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * function Bar() {\r\n * this.c = 3;\r\n * }\r\n *\r\n * Foo.prototype.b = 2;\r\n * Bar.prototype.d = 4;\r\n *\r\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\r\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\r\n */\r\n var assignIn = createAssigner(function(object, source) {\r\n copyObject(source, keysIn(source), object);\r\n });\r\n\r\n /**\r\n * Creates an object that inherits from the `prototype` object. If a\r\n * `properties` object is given, its own enumerable string keyed properties\r\n * are assigned to the created object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Object\r\n * @param {Object} prototype The object to inherit from.\r\n * @param {Object} [properties] The properties to assign to the object.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * function Shape() {\r\n * this.x = 0;\r\n * this.y = 0;\r\n * }\r\n *\r\n * function Circle() {\r\n * Shape.call(this);\r\n * }\r\n *\r\n * Circle.prototype = _.create(Shape.prototype, {\r\n * 'constructor': Circle\r\n * });\r\n *\r\n * var circle = new Circle;\r\n * circle instanceof Circle;\r\n * // => true\r\n *\r\n * circle instanceof Shape;\r\n * // => true\r\n */\r\n function create(prototype, properties) {\r\n var result = baseCreate(prototype);\r\n return properties == null ? result : baseAssign(result, properties);\r\n }\r\n\r\n /**\r\n * Assigns own and inherited enumerable string keyed properties of source\r\n * objects to the destination object for all destination properties that\r\n * resolve to `undefined`. Source objects are applied from left to right.\r\n * Once a property is set, additional values of the same property are ignored.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaultsDeep\r\n * @example\r\n *\r\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n var defaults = baseRest(function(object, sources) {\r\n object = Object(object);\r\n\r\n var index = -1;\r\n var length = sources.length;\r\n var guard = length > 2 ? sources[2] : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n length = 1;\r\n }\r\n\r\n while (++index < length) {\r\n var source = sources[index];\r\n var props = keysIn(source);\r\n var propsIndex = -1;\r\n var propsLength = props.length;\r\n\r\n while (++propsIndex < propsLength) {\r\n var key = props[propsIndex];\r\n var value = object[key];\r\n\r\n if (value === undefined ||\r\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\r\n object[key] = source[key];\r\n }\r\n }\r\n }\r\n\r\n return object;\r\n });\r\n\r\n /**\r\n * This method is like `_.defaults` except that it recursively assigns\r\n * default properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.10.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaults\r\n * @example\r\n *\r\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\r\n * // => { 'a': { 'b': 2, 'c': 3 } }\r\n */\r\n var defaultsDeep = baseRest(function(args) {\r\n args.push(undefined, customDefaultsMerge);\r\n return apply(mergeWith, undefined, args);\r\n });\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the key of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findKey(users, function(o) { return o.age < 40; });\r\n * // => 'barney' (iteration order is not guaranteed)\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findKey(users, { 'age': 1, 'active': true });\r\n * // => 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findKey(users, 'active');\r\n * // => 'barney'\r\n */\r\n function findKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);\r\n }\r\n\r\n /**\r\n * This method is like `_.findKey` except that it iterates over elements of\r\n * a collection in the opposite order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findLastKey(users, function(o) { return o.age < 40; });\r\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastKey(users, { 'age': 36, 'active': true });\r\n * // => 'barney'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastKey(users, 'active');\r\n * // => 'pebbles'\r\n */\r\n function findLastKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);\r\n }\r\n\r\n /**\r\n * Gets the value at `path` of `object`. If the resolved value is\r\n * `undefined`, the `defaultValue` is returned in its place.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.get(object, 'a[0].b.c');\r\n * // => 3\r\n *\r\n * _.get(object, ['a', '0', 'b', 'c']);\r\n * // => 3\r\n *\r\n * _.get(object, 'a.b.c', 'default');\r\n * // => 'default'\r\n */\r\n function get(object, path, defaultValue) {\r\n var result = object == null ? undefined : baseGet(object, path);\r\n return result === undefined ? defaultValue : result;\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct property of `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': { 'b': 2 } };\r\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.has(object, 'a');\r\n * // => true\r\n *\r\n * _.has(object, 'a.b');\r\n * // => true\r\n *\r\n * _.has(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.has(other, 'a');\r\n * // => false\r\n */\r\n function has(object, path) {\r\n return object != null && hasPath(object, path, baseHas);\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct or inherited property of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.hasIn(object, 'a');\r\n * // => true\r\n *\r\n * _.hasIn(object, 'a.b');\r\n * // => true\r\n *\r\n * _.hasIn(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.hasIn(object, 'b');\r\n * // => false\r\n */\r\n function hasIn(object, path) {\r\n return object != null && hasPath(object, path, baseHasIn);\r\n }\r\n\r\n /**\r\n * Creates an object composed of the inverted keys and values of `object`.\r\n * If `object` contains duplicate values, subsequent values overwrite\r\n * property assignments of previous values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invert(object);\r\n * // => { '1': 'c', '2': 'b' }\r\n */\r\n var invert = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n result[value] = key;\r\n }, constant(identity));\r\n\r\n /**\r\n * This method is like `_.invert` except that the inverted object is generated\r\n * from the results of running each element of `object` thru `iteratee`. The\r\n * corresponding inverted value of each inverted key is an array of keys\r\n * responsible for generating the inverted value. The iteratee is invoked\r\n * with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.1.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invertBy(object);\r\n * // => { '1': ['a', 'c'], '2': ['b'] }\r\n *\r\n * _.invertBy(object, function(value) {\r\n * return 'group' + value;\r\n * });\r\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\r\n */\r\n var invertBy = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n if (hasOwnProperty.call(result, value)) {\r\n result[value].push(key);\r\n } else {\r\n result[value] = [key];\r\n }\r\n }, baseIteratee);\r\n\r\n /**\r\n * Creates an array of the own enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects. See the\r\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * for more details.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keys(new Foo);\r\n * // => ['a', 'b'] (iteration order is not guaranteed)\r\n *\r\n * _.keys('hi');\r\n * // => ['0', '1']\r\n */\r\n function keys(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\r\n }\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keysIn(new Foo);\r\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\r\n */\r\n function keysIn(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\r\n }\r\n\r\n /**\r\n * This method is like `_.assign` except that it recursively merges own and\r\n * inherited enumerable string keyed properties of source objects into the\r\n * destination object. Source properties that resolve to `undefined` are\r\n * skipped if a destination value exists. Array and plain object properties\r\n * are merged recursively. Other objects and value types are overridden by\r\n * assignment. Source objects are applied from left to right. Subsequent\r\n * sources overwrite property assignments of previous sources.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = {\r\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\r\n * };\r\n *\r\n * var other = {\r\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\r\n * };\r\n *\r\n * _.merge(object, other);\r\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\r\n */\r\n var merge = createAssigner(function(object, source, srcIndex) {\r\n baseMerge(object, source, srcIndex);\r\n });\r\n\r\n /**\r\n * This method is like `_.merge` except that it accepts `customizer` which\r\n * is invoked to produce the merged values of the destination and source\r\n * properties. If `customizer` returns `undefined`, merging is handled by the\r\n * method instead. The `customizer` is invoked with six arguments:\r\n * (objValue, srcValue, key, object, source, stack).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} customizer The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * if (_.isArray(objValue)) {\r\n * return objValue.concat(srcValue);\r\n * }\r\n * }\r\n *\r\n * var object = { 'a': [1], 'b': [2] };\r\n * var other = { 'a': [3], 'b': [4] };\r\n *\r\n * _.mergeWith(object, other, customizer);\r\n * // => { 'a': [1, 3], 'b': [2, 4] }\r\n */\r\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\r\n baseMerge(object, source, srcIndex, customizer);\r\n });\r\n\r\n /**\r\n * The opposite of `_.pick`; this method creates an object composed of the\r\n * own and inherited enumerable property paths of `object` that are not omitted.\r\n *\r\n * **Note:** This method is considerably slower than `_.pick`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to omit.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omit(object, ['a', 'c']);\r\n * // => { 'b': '2' }\r\n */\r\n var omit = flatRest(function(object, paths) {\r\n var result = {};\r\n if (object == null) {\r\n return result;\r\n }\r\n var isDeep = false;\r\n paths = arrayMap(paths, function(path) {\r\n path = castPath(path, object);\r\n isDeep || (isDeep = path.length > 1);\r\n return path;\r\n });\r\n copyObject(object, getAllKeysIn(object), result);\r\n if (isDeep) {\r\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\r\n }\r\n var length = paths.length;\r\n while (length--) {\r\n baseUnset(result, paths[length]);\r\n }\r\n return result;\r\n });\r\n\r\n /**\r\n * The opposite of `_.pickBy`; this method creates an object composed of\r\n * the own and inherited enumerable string keyed properties of `object` that\r\n * `predicate` doesn't return truthy for. The predicate is invoked with two\r\n * arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omitBy(object, _.isNumber);\r\n * // => { 'b': '2' }\r\n */\r\n function omitBy(object, predicate) {\r\n return pickBy(object, negate(baseIteratee(predicate)));\r\n }\r\n\r\n /**\r\n * Creates an object composed of the picked `object` properties.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pick(object, ['a', 'c']);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n var pick = flatRest(function(object, paths) {\r\n return object == null ? {} : basePick(object, paths);\r\n });\r\n\r\n /**\r\n * Creates an object composed of the `object` properties `predicate` returns\r\n * truthy for. The predicate is invoked with two arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pickBy(object, _.isNumber);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n function pickBy(object, predicate) {\r\n if (object == null) {\r\n return {};\r\n }\r\n var props = arrayMap(getAllKeysIn(object), function(prop) {\r\n return [prop];\r\n });\r\n predicate = baseIteratee(predicate);\r\n return basePickBy(object, props, function(value, path) {\r\n return predicate(value, path[0]);\r\n });\r\n }\r\n\r\n /**\r\n * This method is like `_.get` except that if the resolved value is a\r\n * function it's invoked with the `this` binding of its parent object and\r\n * its result is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to resolve.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\r\n *\r\n * _.result(object, 'a[0].b.c1');\r\n * // => 3\r\n *\r\n * _.result(object, 'a[0].b.c2');\r\n * // => 4\r\n *\r\n * _.result(object, 'a[0].b.c3', 'default');\r\n * // => 'default'\r\n *\r\n * _.result(object, 'a[0].b.c3', _.constant('default'));\r\n * // => 'default'\r\n */\r\n function result(object, path, defaultValue) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length;\r\n\r\n // Ensure the loop is entered when path is empty.\r\n if (!length) {\r\n length = 1;\r\n object = undefined;\r\n }\r\n while (++index < length) {\r\n var value = object == null ? undefined : object[toKey(path[index])];\r\n if (value === undefined) {\r\n index = length;\r\n value = defaultValue;\r\n }\r\n object = isFunction(value) ? value.call(object) : value;\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\r\n * it's created. Arrays are created for missing index properties while objects\r\n * are created for all other missing properties. Use `_.setWith` to customize\r\n * `path` creation.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.set(object, 'a[0].b.c', 4);\r\n * console.log(object.a[0].b.c);\r\n * // => 4\r\n *\r\n * _.set(object, ['x', '0', 'y', 'z'], 5);\r\n * console.log(object.x[0].y.z);\r\n * // => 5\r\n */\r\n function set(object, path, value) {\r\n return object == null ? object : baseSet(object, path, value);\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable string keyed property values of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property values.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.values(new Foo);\r\n * // => [1, 2] (iteration order is not guaranteed)\r\n *\r\n * _.values('hi');\r\n * // => ['h', 'i']\r\n */\r\n function values(object) {\r\n return object == null ? [] : baseValues(object, keys(object));\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Number\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n * @example\r\n *\r\n * _.clamp(-10, -5, 5);\r\n * // => -5\r\n *\r\n * _.clamp(10, -5, 5);\r\n * // => 5\r\n */\r\n function clamp(number, lower, upper) {\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = undefined;\r\n }\r\n if (upper !== undefined) {\r\n upper = toNumber(upper);\r\n upper = upper === upper ? upper : 0;\r\n }\r\n if (lower !== undefined) {\r\n lower = toNumber(lower);\r\n lower = lower === lower ? lower : 0;\r\n }\r\n return baseClamp(toNumber(number), lower, upper);\r\n }\r\n\r\n /**\r\n * Produces a random number between the inclusive `lower` and `upper` bounds.\r\n * If only one argument is provided a number between `0` and the given number\r\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\r\n * floats, a floating-point number is returned instead of an integer.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Number\r\n * @param {number} [lower=0] The lower bound.\r\n * @param {number} [upper=1] The upper bound.\r\n * @param {boolean} [floating] Specify returning a floating-point number.\r\n * @returns {number} Returns the random number.\r\n * @example\r\n *\r\n * _.random(0, 5);\r\n * // => an integer between 0 and 5\r\n *\r\n * _.random(5);\r\n * // => also an integer between 0 and 5\r\n *\r\n * _.random(5, true);\r\n * // => a floating-point number between 0 and 5\r\n *\r\n * _.random(1.2, 5.2);\r\n * // => a floating-point number between 1.2 and 5.2\r\n */\r\n function random(lower, upper, floating) {\r\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\r\n upper = floating = undefined;\r\n }\r\n if (floating === undefined) {\r\n if (typeof upper == 'boolean') {\r\n floating = upper;\r\n upper = undefined;\r\n }\r\n else if (typeof lower == 'boolean') {\r\n floating = lower;\r\n lower = undefined;\r\n }\r\n }\r\n if (lower === undefined && upper === undefined) {\r\n lower = 0;\r\n upper = 1;\r\n }\r\n else {\r\n lower = toFinite(lower);\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = 0;\r\n } else {\r\n upper = toFinite(upper);\r\n }\r\n }\r\n if (lower > upper) {\r\n var temp = lower;\r\n lower = upper;\r\n upper = temp;\r\n }\r\n if (floating || lower % 1 || upper % 1) {\r\n var rand = nativeRandom();\r\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\r\n }\r\n return baseRandom(lower, upper);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\r\n * corresponding HTML entities.\r\n *\r\n * **Note:** No other characters are escaped. To escape additional\r\n * characters use a third-party library like [_he_](https://mths.be/he).\r\n *\r\n * Though the \">\" character is escaped for symmetry, characters like\r\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\r\n * unless they're part of a tag or unquoted attribute value. See\r\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\r\n * (under \"semi-related fun fact\") for more details.\r\n *\r\n * When working with HTML you should always\r\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\r\n * XSS vectors.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category String\r\n * @param {string} [string=''] The string to escape.\r\n * @returns {string} Returns the escaped string.\r\n * @example\r\n *\r\n * _.escape('fred, barney, & pebbles');\r\n * // => 'fred, barney, &amp; pebbles'\r\n */\r\n function escape(string) {\r\n string = toString(string);\r\n return (string && reHasUnescapedHtml.test(string))\r\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\r\n : string;\r\n }\r\n\r\n /**\r\n * Removes leading and trailing whitespace or specified characters from `string`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to trim.\r\n * @param {string} [chars=whitespace] The characters to trim.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {string} Returns the trimmed string.\r\n * @example\r\n *\r\n * _.trim(' abc ');\r\n * // => 'abc'\r\n *\r\n * _.trim('-_-abc-_-', '_-');\r\n * // => 'abc'\r\n *\r\n * _.map([' foo ', ' bar '], _.trim);\r\n * // => ['foo', 'bar']\r\n */\r\n function trim(string, chars, guard) {\r\n string = toString(string);\r\n if (string && (guard || chars === undefined)) {\r\n return string.replace(reTrim, '');\r\n }\r\n if (!string || !(chars = baseToString(chars))) {\r\n return string;\r\n }\r\n var strSymbols = stringToArray(string),\r\n chrSymbols = stringToArray(chars),\r\n start = charsStartIndex(strSymbols, chrSymbols),\r\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\r\n\r\n return castSlice(strSymbols, start, end).join('');\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a function that returns `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {*} value The value to return from the new function.\r\n * @returns {Function} Returns the new constant function.\r\n * @example\r\n *\r\n * var objects = _.times(2, _.constant({ 'a': 1 }));\r\n *\r\n * console.log(objects);\r\n * // => [{ 'a': 1 }, { 'a': 1 }]\r\n *\r\n * console.log(objects[0] === objects[1]);\r\n * // => true\r\n */\r\n function constant(value) {\r\n return function() {\r\n return value;\r\n };\r\n }\r\n\r\n /**\r\n * This method returns the first argument it receives.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} value Any value.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n *\r\n * console.log(_.identity(object) === object);\r\n * // => true\r\n */\r\n function identity(value) {\r\n return value;\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the arguments of the created\r\n * function. If `func` is a property name, the created function returns the\r\n * property value for a given element. If `func` is an array or object, the\r\n * created function returns `true` for elements that contain the equivalent\r\n * source properties, otherwise it returns `false`.\r\n *\r\n * @static\r\n * @since 4.0.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} [func=_.identity] The value to convert to a callback.\r\n * @returns {Function} Returns the callback.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\r\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, _.iteratee(['user', 'fred']));\r\n * // => [{ 'user': 'fred', 'age': 40 }]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, _.iteratee('user'));\r\n * // => ['barney', 'fred']\r\n *\r\n * // Create custom iteratee shorthands.\r\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\r\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\r\n * return func.test(string);\r\n * };\r\n * });\r\n *\r\n * _.filter(['abc', 'def'], /ef/);\r\n * // => ['def']\r\n */\r\n function iteratee(func) {\r\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Creates a function that performs a partial deep comparison between a given\r\n * object and `source`, returning `true` if the given object has equivalent\r\n * property values, else `false`.\r\n *\r\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\r\n * partially applied.\r\n *\r\n * Partial comparisons will match empty array and empty object `source`\r\n * values against any array or object value, respectively. See `_.isEqual`\r\n * for a list of supported value comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Util\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': 1, 'b': 2, 'c': 3 },\r\n * { 'a': 4, 'b': 5, 'c': 6 }\r\n * ];\r\n *\r\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\r\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\r\n */\r\n function matches(source) {\r\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Adds all own enumerable string keyed function properties of a source\r\n * object to the destination object. If `object` is a function, then methods\r\n * are added to its prototype as well.\r\n *\r\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\r\n * avoid conflicts caused by modifying the original.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {Function|Object} [object=lodash] The destination object.\r\n * @param {Object} source The object of functions to add.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\r\n * @returns {Function|Object} Returns `object`.\r\n * @example\r\n *\r\n * function vowels(string) {\r\n * return _.filter(string, function(v) {\r\n * return /[aeiou]/i.test(v);\r\n * });\r\n * }\r\n *\r\n * _.mixin({ 'vowels': vowels });\r\n * _.vowels('fred');\r\n * // => ['e']\r\n *\r\n * _('fred').vowels().value();\r\n * // => ['e']\r\n *\r\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\r\n * _('fred').vowels();\r\n * // => ['e']\r\n */\r\n function mixin(object, source, options) {\r\n var props = keys(source),\r\n methodNames = baseFunctions(source, props);\r\n\r\n if (options == null &&\r\n !(isObject(source) && (methodNames.length || !props.length))) {\r\n options = source;\r\n source = object;\r\n object = this;\r\n methodNames = baseFunctions(source, keys(source));\r\n }\r\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\r\n isFunc = isFunction(object);\r\n\r\n arrayEach(methodNames, function(methodName) {\r\n var func = source[methodName];\r\n object[methodName] = func;\r\n if (isFunc) {\r\n object.prototype[methodName] = function() {\r\n var chainAll = this.__chain__;\r\n if (chain || chainAll) {\r\n var result = object(this.__wrapped__),\r\n actions = result.__actions__ = copyArray(this.__actions__);\r\n\r\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\r\n result.__chain__ = chainAll;\r\n return result;\r\n }\r\n return func.apply(object, arrayPush([this.value()], arguments));\r\n };\r\n }\r\n });\r\n\r\n return object;\r\n }\r\n\r\n /**\r\n * Reverts the `_` variable to its previous value and returns a reference to\r\n * the `lodash` function.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @returns {Function} Returns the `lodash` function.\r\n * @example\r\n *\r\n * var lodash = _.noConflict();\r\n */\r\n function noConflict() {\r\n if (root._ === this) {\r\n root._ = oldDash;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * This method returns `undefined`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Util\r\n * @example\r\n *\r\n * _.times(2, _.noop);\r\n * // => [undefined, undefined]\r\n */\r\n function noop() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * Creates a function that returns the value at `path` of a given object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': { 'b': 2 } },\r\n * { 'a': { 'b': 1 } }\r\n * ];\r\n *\r\n * _.map(objects, _.property('a.b'));\r\n * // => [2, 1]\r\n *\r\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\r\n * // => [1, 2]\r\n */\r\n function property(path) {\r\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\r\n }\r\n\r\n /**\r\n * Creates an array of numbers (positive and/or negative) progressing from\r\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\r\n * `start` is specified without an `end` or `step`. If `end` is not specified,\r\n * it's set to `start` with `start` then set to `0`.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {number} [start=0] The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} [step=1] The value to increment or decrement by.\r\n * @returns {Array} Returns the range of numbers.\r\n * @see _.inRange, _.rangeRight\r\n * @example\r\n *\r\n * _.range(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * _.range(-4);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * _.range(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * _.range(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * _.range(0);\r\n * // => []\r\n */\r\n var range = createRange();\r\n\r\n /**\r\n * This method returns a new empty array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {Array} Returns the new empty array.\r\n * @example\r\n *\r\n * var arrays = _.times(2, _.stubArray);\r\n *\r\n * console.log(arrays);\r\n * // => [[], []]\r\n *\r\n * console.log(arrays[0] === arrays[1]);\r\n * // => false\r\n */\r\n function stubArray() {\r\n return [];\r\n }\r\n\r\n /**\r\n * This method returns `false`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {boolean} Returns `false`.\r\n * @example\r\n *\r\n * _.times(2, _.stubFalse);\r\n * // => [false, false]\r\n */\r\n function stubFalse() {\r\n return false;\r\n }\r\n\r\n /**\r\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {string} [prefix=''] The value to prefix the ID with.\r\n * @returns {string} Returns the unique ID.\r\n * @example\r\n *\r\n * _.uniqueId('contact_');\r\n * // => 'contact_104'\r\n *\r\n * _.uniqueId();\r\n * // => '105'\r\n */\r\n function uniqueId(prefix) {\r\n var id = ++idCounter;\r\n return toString(prefix) + id;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Computes the maximum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the maximum value.\r\n * @example\r\n *\r\n * _.max([4, 2, 8, 6]);\r\n * // => 8\r\n *\r\n * _.max([]);\r\n * // => undefined\r\n */\r\n function max(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseGt)\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Computes the minimum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the minimum value.\r\n * @example\r\n *\r\n * _.min([4, 2, 8, 6]);\r\n * // => 2\r\n *\r\n * _.min([]);\r\n * // => undefined\r\n */\r\n function min(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseLt)\r\n : undefined;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return wrapped values in chain sequences.\r\n lodash.assignIn = assignIn;\r\n lodash.before = before;\r\n lodash.bind = bind;\r\n lodash.chain = chain;\r\n lodash.compact = compact;\r\n lodash.concat = concat;\r\n lodash.countBy = countBy;\r\n lodash.create = create;\r\n lodash.debounce = debounce;\r\n lodash.defaults = defaults;\r\n lodash.defaultsDeep = defaultsDeep;\r\n lodash.defer = defer;\r\n lodash.delay = delay;\r\n lodash.difference = difference;\r\n lodash.drop = drop;\r\n lodash.filter = filter;\r\n lodash.flatten = flatten;\r\n lodash.flattenDeep = flattenDeep;\r\n lodash.groupBy = groupBy;\r\n lodash.initial = initial;\r\n lodash.intersection = intersection;\r\n lodash.invert = invert;\r\n lodash.invertBy = invertBy;\r\n lodash.iteratee = iteratee;\r\n lodash.keys = keys;\r\n lodash.map = map;\r\n lodash.matches = matches;\r\n lodash.merge = merge;\r\n lodash.mixin = mixin;\r\n lodash.negate = negate;\r\n lodash.omit = omit;\r\n lodash.omitBy = omitBy;\r\n lodash.once = once;\r\n lodash.pick = pick;\r\n lodash.range = range;\r\n lodash.reject = reject;\r\n lodash.rest = rest;\r\n lodash.set = set;\r\n lodash.slice = slice;\r\n lodash.sortBy = sortBy;\r\n lodash.take = take;\r\n lodash.takeRight = takeRight;\r\n lodash.tap = tap;\r\n lodash.throttle = throttle;\r\n lodash.thru = thru;\r\n lodash.toArray = toArray;\r\n lodash.union = union;\r\n lodash.uniq = uniq;\r\n lodash.uniqBy = uniqBy;\r\n lodash.unzip = unzip;\r\n lodash.values = values;\r\n lodash.without = without;\r\n lodash.zip = zip;\r\n lodash.zipObject = zipObject;\r\n\r\n // Add aliases.\r\n lodash.extend = assignIn;\r\n\r\n // Add methods to `lodash.prototype`.\r\n mixin(lodash, lodash);\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return unwrapped values in chain sequences.\r\n lodash.clamp = clamp;\r\n lodash.clone = clone;\r\n lodash.cloneDeep = cloneDeep;\r\n lodash.escape = escape;\r\n lodash.every = every;\r\n lodash.find = find;\r\n lodash.findIndex = findIndex;\r\n lodash.findKey = findKey;\r\n lodash.findLastIndex = findLastIndex;\r\n lodash.findLastKey = findLastKey;\r\n lodash.forEach = forEach;\r\n lodash.get = get;\r\n lodash.has = has;\r\n lodash.head = head;\r\n lodash.identity = identity;\r\n lodash.indexOf = indexOf;\r\n lodash.isArguments = isArguments;\r\n lodash.isArray = isArray;\r\n lodash.isArrayLike = isArrayLike;\r\n lodash.isBoolean = isBoolean;\r\n lodash.isDate = isDate;\r\n lodash.isEmpty = isEmpty;\r\n lodash.isEqual = isEqual;\r\n lodash.isFinite = isFinite;\r\n lodash.isFunction = isFunction;\r\n lodash.isNaN = isNaN;\r\n lodash.isNull = isNull;\r\n lodash.isNumber = isNumber;\r\n lodash.isObject = isObject;\r\n lodash.isPlainObject = isPlainObject;\r\n lodash.isRegExp = isRegExp;\r\n lodash.isString = isString;\r\n lodash.isUndefined = isUndefined;\r\n lodash.last = last;\r\n lodash.max = max;\r\n lodash.min = min;\r\n lodash.noConflict = noConflict;\r\n lodash.noop = noop;\r\n lodash.random = random;\r\n lodash.reduce = reduce;\r\n lodash.result = result;\r\n lodash.size = size;\r\n lodash.some = some;\r\n lodash.trim = trim;\r\n lodash.uniqueId = uniqueId;\r\n\r\n // Add aliases.\r\n lodash.each = forEach;\r\n lodash.first = head;\r\n\r\n mixin(lodash, (function() {\r\n var source = {};\r\n baseForOwn(lodash, function(func, methodName) {\r\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\r\n source[methodName] = func;\r\n }\r\n });\r\n return source;\r\n }()), { 'chain': false });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * The semantic version number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @type {string}\r\n */\r\n lodash.VERSION = VERSION;\r\n\r\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\r\n arrayEach(['drop', 'take'], function(methodName, index) {\r\n LazyWrapper.prototype[methodName] = function(n) {\r\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\r\n\r\n var result = (this.__filtered__ && !index)\r\n ? new LazyWrapper(this)\r\n : this.clone();\r\n\r\n if (result.__filtered__) {\r\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\r\n } else {\r\n result.__views__.push({\r\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\r\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\r\n });\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\r\n return this.reverse()[methodName](n).reverse();\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods that accept an `iteratee` value.\r\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\r\n var type = index + 1,\r\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\r\n\r\n LazyWrapper.prototype[methodName] = function(iteratee) {\r\n var result = this.clone();\r\n result.__iteratees__.push({\r\n 'iteratee': getIteratee(iteratee, 3),\r\n 'type': type\r\n });\r\n result.__filtered__ = result.__filtered__ || isFilter;\r\n return result;\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\r\n arrayEach(['head', 'last'], function(methodName, index) {\r\n var takeName = 'take' + (index ? 'Right' : '');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this[takeName](1).value()[0];\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\r\n arrayEach(['initial', 'tail'], function(methodName, index) {\r\n var dropName = 'drop' + (index ? '' : 'Right');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\r\n };\r\n });\r\n\r\n LazyWrapper.prototype.compact = function() {\r\n return this.filter(identity);\r\n };\r\n\r\n LazyWrapper.prototype.find = function(predicate) {\r\n return this.filter(predicate).head();\r\n };\r\n\r\n LazyWrapper.prototype.findLast = function(predicate) {\r\n return this.reverse().find(predicate);\r\n };\r\n\r\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\r\n if (typeof path == 'function') {\r\n return new LazyWrapper(this);\r\n }\r\n return this.map(function(value) {\r\n return baseInvoke(value, path, args);\r\n });\r\n });\r\n\r\n LazyWrapper.prototype.reject = function(predicate) {\r\n return this.filter(negate(getIteratee(predicate)));\r\n };\r\n\r\n LazyWrapper.prototype.slice = function(start, end) {\r\n start = toInteger(start);\r\n\r\n var result = this;\r\n if (result.__filtered__ && (start > 0 || end < 0)) {\r\n return new LazyWrapper(result);\r\n }\r\n if (start < 0) {\r\n result = result.takeRight(-start);\r\n } else if (start) {\r\n result = result.drop(start);\r\n }\r\n if (end !== undefined) {\r\n end = toInteger(end);\r\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\r\n return this.reverse().takeWhile(predicate).reverse();\r\n };\r\n\r\n LazyWrapper.prototype.toArray = function() {\r\n return this.take(MAX_ARRAY_LENGTH);\r\n };\r\n\r\n // Add `LazyWrapper` methods to `lodash.prototype`.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\r\n isTaker = /^(?:head|last)$/.test(methodName),\r\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\r\n retUnwrapped = isTaker || /^find/.test(methodName);\r\n\r\n if (!lodashFunc) {\r\n return;\r\n }\r\n lodash.prototype[methodName] = function() {\r\n var value = this.__wrapped__,\r\n args = isTaker ? [1] : arguments,\r\n isLazy = value instanceof LazyWrapper,\r\n iteratee = args[0],\r\n useLazy = isLazy || isArray(value);\r\n\r\n var interceptor = function(value) {\r\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\r\n return (isTaker && chainAll) ? result[0] : result;\r\n };\r\n\r\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\r\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\r\n isLazy = useLazy = false;\r\n }\r\n var chainAll = this.__chain__,\r\n isHybrid = !!this.__actions__.length,\r\n isUnwrapped = retUnwrapped && !chainAll,\r\n onlyLazy = isLazy && !isHybrid;\r\n\r\n if (!retUnwrapped && useLazy) {\r\n value = onlyLazy ? value : new LazyWrapper(this);\r\n var result = func.apply(value, args);\r\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\r\n return new LodashWrapper(result, chainAll);\r\n }\r\n if (isUnwrapped && onlyLazy) {\r\n return func.apply(this, args);\r\n }\r\n result = this.thru(interceptor);\r\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\r\n };\r\n });\r\n\r\n // Add `Array` methods to `lodash.prototype`.\r\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\r\n var func = arrayProto[methodName],\r\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\r\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\r\n\r\n lodash.prototype[methodName] = function() {\r\n var args = arguments;\r\n if (retUnwrapped && !this.__chain__) {\r\n var value = this.value();\r\n return func.apply(isArray(value) ? value : [], args);\r\n }\r\n return this[chainName](function(value) {\r\n return func.apply(isArray(value) ? value : [], args);\r\n });\r\n };\r\n });\r\n\r\n // Map minified method names to their real names.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var lodashFunc = lodash[methodName];\r\n if (lodashFunc) {\r\n var key = (lodashFunc.name + ''),\r\n names = realNames[key] || (realNames[key] = []);\r\n\r\n names.push({ 'name': methodName, 'func': lodashFunc });\r\n }\r\n });\r\n\r\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\r\n 'name': 'wrapper',\r\n 'func': undefined\r\n }];\r\n\r\n // Add methods to `LazyWrapper`.\r\n LazyWrapper.prototype.clone = lazyClone;\r\n LazyWrapper.prototype.reverse = lazyReverse;\r\n LazyWrapper.prototype.value = lazyValue;\r\n\r\n // Add lazy aliases.\r\n lodash.prototype.first = lodash.prototype.head;\r\n\r\n if (symIterator) {\r\n lodash.prototype[symIterator] = wrapperToIterator;\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n // Some AMD build optimizers, like r.js, check for condition patterns like:\r\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\r\n // Expose Lodash on the global object to prevent errors when Lodash is\r\n // loaded by a script tag in the presence of an AMD loader.\r\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\r\n // Use `_.noConflict` to remove Lodash from the global object.\r\n root._ = lodash;\r\n\r\n // Define as an anonymous module so, through path mapping, it can be\r\n // referenced as the \"underscore\" module.\r\n define(function() {\r\n return lodash;\r\n });\r\n }\r\n // Check for `exports` after `define` in case a build optimizer adds it.\r\n else if (freeModule) {\r\n // Export for Node.js.\r\n (freeModule.exports = lodash)._ = lodash;\r\n // Export for CommonJS support.\r\n freeExports._ = lodash;\r\n }\r\n else {\r\n // Export to the global object.\r\n root._ = lodash;\r\n }\r\n}.call(this));\r\n/**\r\n * 基本函数\r\n * Create By GUY 2014\\11\\17\r\n *\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (!_global.BI) {\r\n _global.BI = {};\r\n}\r\n\r\n!(function (undefined) {\r\n var traverse = function (func, context) {\r\n return function (value, key, obj) {\r\n return func.call(context, key, value, obj);\r\n };\r\n };\r\n var _apply = function (name) {\r\n return function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n };\r\n var _applyFunc = function (name) {\r\n return function () {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[1] = _.isFunction(args[1]) ? traverse(args[1], args[2]) : args[1];\r\n return _[name].apply(_, args);\r\n };\r\n };\r\n\r\n // Utility\r\n _.extend(BI, {\r\n assert: function (v, is) {\r\n if (this.isFunction(is)) {\r\n if (!is(v)) {\r\n throw new Error(v + \" error\");\r\n } else {\r\n return true;\r\n }\r\n }\r\n if (!this.isArray(is)) {\r\n is = [is];\r\n }\r\n if (!this.deepContains(is, v)) {\r\n throw new Error(v + \" error\");\r\n }\r\n },\r\n\r\n warn: function (message) {\r\n console.warn(message);\r\n },\r\n\r\n UUID: function () {\r\n var f = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n var str = \"\";\r\n for (var i = 0; i < 16; i++) {\r\n var r = parseInt(f.length * Math.random(), 10);\r\n str += f[r];\r\n }\r\n return str;\r\n },\r\n\r\n isWidget: function (widget) {\r\n return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);\r\n },\r\n\r\n createWidgets: function (items, options, context) {\r\n if (!BI.isArray(items)) {\r\n throw new Error(\"cannot create Widgets\");\r\n }\r\n if (BI.isWidget(options)) {\r\n context = options;\r\n options = {};\r\n } else {\r\n options || (options = {});\r\n }\r\n return BI.map(BI.flatten(items), function (i, item) {\r\n return BI.createWidget(item, BI.deepClone(options));\r\n });\r\n },\r\n\r\n createItems: function (data, innerAttr, outerAttr) {\r\n innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});\r\n outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});\r\n return BI.map(data, function (i, item) {\r\n if (BI.isArray(item)) {\r\n return BI.createItems(item, innerAttr, outerAttr);\r\n }\r\n if (item instanceof BI.Widget) {\r\n return BI.extend({}, innerAttr.shift(), outerAttr.shift(), {\r\n type: null,\r\n el: item\r\n });\r\n }\r\n if (innerAttr[0] instanceof BI.Widget) {\r\n outerAttr.shift();\r\n return BI.extend({}, item, {\r\n el: innerAttr.shift()\r\n });\r\n }\r\n if (item.el instanceof BI.Widget || (BI.View && item.el instanceof BI.View)) {\r\n innerAttr.shift();\r\n return BI.extend({}, outerAttr.shift(), {type: null}, item);\r\n }\r\n if (item.el) {\r\n return BI.extend({}, outerAttr.shift(), item, {\r\n el: BI.extend({}, innerAttr.shift(), item.el)\r\n });\r\n }\r\n return BI.extend({}, outerAttr.shift(), {\r\n el: BI.extend({}, innerAttr.shift(), item)\r\n });\r\n });\r\n },\r\n\r\n // 用容器包装items\r\n packageItems: function (items, layouts) {\r\n for (var i = layouts.length - 1; i >= 0; i--) {\r\n items = BI.map(items, function (k, it) {\r\n return BI.extend({}, layouts[i], {\r\n items: [\r\n BI.extend({}, layouts[i].el, {\r\n el: it\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return items;\r\n },\r\n\r\n formatEL: function (obj) {\r\n if (obj && !obj.type && obj.el) {\r\n return obj;\r\n }\r\n return {\r\n el: obj\r\n };\r\n },\r\n\r\n // 剥开EL\r\n stripEL: function (obj) {\r\n return obj.type && obj || obj.el || obj;\r\n },\r\n\r\n trans2Element: function (widgets) {\r\n return BI.map(widgets, function (i, wi) {\r\n return wi.element;\r\n });\r\n }\r\n });\r\n\r\n // 集合相关方法\r\n _.each([\"where\", \"findWhere\", \"invoke\", \"pluck\", \"shuffle\", \"sample\", \"toArray\", \"size\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"get\", \"set\", \"each\", \"map\", \"reduce\", \"reduceRight\", \"find\", \"filter\", \"reject\", \"every\", \"all\", \"some\", \"any\", \"max\", \"min\",\r\n \"sortBy\", \"groupBy\", \"indexBy\", \"countBy\", \"partition\", \"clamp\"], function (name) {\r\n if (name === \"any\") {\r\n BI[name] = _applyFunc(\"some\");\r\n } else {\r\n BI[name] = _applyFunc(name);\r\n }\r\n });\r\n _.extend(BI, {\r\n // 数数\r\n count: function (from, to, predicate) {\r\n var t;\r\n if (predicate) {\r\n for (t = from; t < to; t++) {\r\n predicate(t);\r\n }\r\n }\r\n return to - from;\r\n },\r\n\r\n // 倒数\r\n inverse: function (from, to, predicate) {\r\n return BI.count(to, from, predicate);\r\n },\r\n\r\n firstKey: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastKey: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n firstObject: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastObject: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n concat: function (obj1, obj2) {\r\n if (BI.isKey(obj1)) {\r\n return obj1 + \"\" + obj2;\r\n }\r\n if (BI.isArray(obj1)) {\r\n return obj1.concat(obj2);\r\n }\r\n if (BI.isObject(obj1)) {\r\n return _.extend({}, obj1, obj2);\r\n }\r\n },\r\n\r\n backEach: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n predicate(index, obj[index], obj);\r\n }\r\n return false;\r\n },\r\n\r\n backAny: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (predicate(index, obj[index], obj)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n backEvery: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (!predicate(index, obj[index], obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n backFindKey: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n var keys = _.keys(obj), key;\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n key = keys[i];\r\n if (predicate(obj[key], key, obj)) {\r\n return key;\r\n }\r\n }\r\n },\r\n\r\n backFind: function (obj, predicate, context) {\r\n var key;\r\n if (BI.isArray(obj)) {\r\n key = BI.findLastIndex(obj, predicate, context);\r\n } else {\r\n key = BI.backFindKey(obj, predicate, context);\r\n }\r\n if (key !== void 0 && key !== -1) {\r\n return obj[key];\r\n }\r\n },\r\n\r\n remove: function (obj, target, context) {\r\n var isFunction = BI.isFunction(target);\r\n target = isFunction || BI.isArray(target) ? target : [target];\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n obj.splice(i--, 1);\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n delete obj[i];\r\n }\r\n });\r\n }\r\n },\r\n\r\n removeAt: function (obj, index) {\r\n index = BI.isArray(index) ? index : [index];\r\n var isArray = BI.isArray(obj), i;\r\n for (i = 0; i < index.length; i++) {\r\n if (isArray) {\r\n obj[index[i]] = \"$deleteIndex\";\r\n } else {\r\n delete obj[index[i]];\r\n }\r\n }\r\n if (isArray) {\r\n BI.remove(obj, \"$deleteIndex\");\r\n }\r\n },\r\n\r\n string2Array: function (str) {\r\n return str.split(\"&-&\");\r\n },\r\n\r\n array2String: function (array) {\r\n return array.join(\"&-&\");\r\n },\r\n\r\n abc2Int: function (str) {\r\n var idx = 0, start = \"A\", str = str.toUpperCase();\r\n for (var i = 0, len = str.length; i < len; ++i) {\r\n idx = str.charAt(i).charCodeAt(0) - start.charCodeAt(0) + 26 * idx + 1;\r\n if (idx > (2147483646 - str.charAt(i).charCodeAt(0) + start.charCodeAt(0)) / 26) {\r\n return 0;\r\n }\r\n }\r\n return idx;\r\n },\r\n\r\n int2Abc: function (num) {\r\n var DIGITS = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\r\n var idx = num, str = \"\";\r\n if (num === 0) {\r\n return \"\";\r\n }\r\n while (idx !== 0) {\r\n var t = idx % 26;\r\n if (t === 0) {\r\n t = 26;\r\n }\r\n str = DIGITS[t - 1] + str;\r\n idx = (idx - t) / 26;\r\n }\r\n return str;\r\n }\r\n });\r\n\r\n // 数组相关的方法\r\n _.each([\"first\", \"initial\", \"last\", \"rest\", \"compact\", \"flatten\", \"without\", \"union\", \"intersection\",\r\n \"difference\", \"zip\", \"unzip\", \"object\", \"indexOf\", \"lastIndexOf\", \"sortedIndex\", \"range\", \"take\", \"takeRight\", \"uniqBy\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"findIndex\", \"findLastIndex\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n // 构建一个长度为length的数组\r\n makeArray: function (length, value) {\r\n var res = [];\r\n for (var i = 0; i < length; i++) {\r\n if (BI.isNull(value)) {\r\n res.push(i);\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n makeObject: function (array, value) {\r\n var map = {};\r\n for (var i = 0; i < array.length; i++) {\r\n if (BI.isNull(value)) {\r\n map[array[i]] = array[i];\r\n } else {\r\n map[array[i]] = BI.deepClone(value);\r\n }\r\n }\r\n return map;\r\n },\r\n\r\n makeArrayByArray: function (array, value) {\r\n var res = [];\r\n if (!array) {\r\n return res;\r\n }\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n if (BI.isArray(array[i])) {\r\n res.push(arguments.callee(array[i], value));\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n uniq: function (array, isSorted, iteratee, context) {\r\n if (array == null) {\r\n return [];\r\n }\r\n if (!_.isBoolean(isSorted)) {\r\n context = iteratee;\r\n iteratee = isSorted;\r\n isSorted = false;\r\n }\r\n iteratee && (iteratee = traverse(iteratee, context));\r\n return _.uniq.call(_, array, isSorted, iteratee, context);\r\n }\r\n });\r\n\r\n // 对象相关方法\r\n _.each([\"keys\", \"allKeys\", \"values\", \"pairs\", \"invert\", \"create\", \"functions\", \"extend\", \"extendOwn\",\r\n \"defaults\", \"clone\", \"property\", \"propertyOf\", \"matcher\", \"isEqual\", \"isMatch\", \"isEmpty\",\r\n \"isElement\", \"isNumber\", \"isString\", \"isArray\", \"isObject\", \"isPlainObject\", \"isArguments\", \"isFunction\", \"isFinite\",\r\n \"isBoolean\", \"isDate\", \"isRegExp\", \"isError\", \"isNaN\", \"isUndefined\", \"zipObject\", \"cloneDeep\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"mapObject\", \"findKey\", \"pick\", \"omit\", \"tap\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n\r\n inherit: function (sb, sp, overrides) {\r\n if (typeof sp === \"object\") {\r\n overrides = sp;\r\n sp = sb;\r\n sb = function () {\r\n return sp.apply(this, arguments);\r\n };\r\n }\r\n var F = function () {\r\n }, spp = sp.prototype;\r\n F.prototype = spp;\r\n sb.prototype = new F();\r\n sb.superclass = spp;\r\n _.extend(sb.prototype, overrides, {\r\n superclass: sp\r\n });\r\n return sb;\r\n },\r\n\r\n init: function () {\r\n // 先把准备环境准备好\r\n while (BI.prepares && BI.prepares.length > 0) {\r\n BI.prepares.shift()();\r\n }\r\n BI.initialized = true;\r\n },\r\n\r\n has: function (obj, keys) {\r\n if (BI.isArray(keys)) {\r\n if (keys.length === 0) {\r\n return false;\r\n }\r\n return BI.every(keys, function (i, key) {\r\n return _.has(obj, key);\r\n });\r\n }\r\n return _.has.apply(_, arguments);\r\n },\r\n\r\n freeze: function (value) {\r\n // 在ES5中,如果这个方法的参数不是一个对象(一个原始值),那么它会导致 TypeError\r\n // 在ES2015中,非对象参数将被视为要被冻结的普通对象,并被简单地返回\r\n if (Object.freeze && BI.isObject(value)) {\r\n return Object.freeze(value);\r\n }\r\n return value;\r\n },\r\n\r\n // 数字和字符串可以作为key\r\n isKey: function (key) {\r\n return BI.isNumber(key) || (BI.isString(key) && key.length > 0);\r\n },\r\n\r\n // 忽略大小写的等于\r\n isCapitalEqual: function (a, b) {\r\n a = BI.isNull(a) ? a : (\"\" + a).toLowerCase();\r\n b = BI.isNull(b) ? b : (\"\" + b).toLowerCase();\r\n return BI.isEqual(a, b);\r\n },\r\n\r\n isWidthOrHeight: function (w) {\r\n if (typeof w === \"number\") {\r\n return w >= 0;\r\n } else if (typeof w === \"string\") {\r\n return /^\\d{1,3}%$/.exec(w) || w == \"auto\" || /^\\d+px$/.exec(w);\r\n }\r\n },\r\n\r\n isNotNull: function (obj) {\r\n return !BI.isNull(obj);\r\n },\r\n\r\n isNull: function (obj) {\r\n return typeof obj === \"undefined\" || obj === null;\r\n },\r\n\r\n isEmptyArray: function (arr) {\r\n return BI.isArray(arr) && BI.isEmpty(arr);\r\n },\r\n\r\n isNotEmptyArray: function (arr) {\r\n return BI.isArray(arr) && !BI.isEmpty(arr);\r\n },\r\n\r\n isEmptyObject: function (obj) {\r\n return BI.isEqual(obj, {});\r\n },\r\n\r\n isNotEmptyObject: function (obj) {\r\n return BI.isPlainObject(obj) && !BI.isEmptyObject(obj);\r\n },\r\n\r\n isEmptyString: function (obj) {\r\n return BI.isString(obj) && obj.length === 0;\r\n },\r\n\r\n isNotEmptyString: function (obj) {\r\n return BI.isString(obj) && !BI.isEmptyString(obj);\r\n },\r\n\r\n isWindow: function (obj) {\r\n return obj != null && obj == obj.window;\r\n }\r\n });\r\n\r\n // deep方法\r\n _.extend(BI, {\r\n deepClone: _.cloneDeep,\r\n deepExtend: _.merge,\r\n\r\n isDeepMatch: function (object, attrs) {\r\n var keys = BI.keys(attrs), length = keys.length;\r\n if (object == null) {\r\n return !length;\r\n }\r\n var obj = Object(object);\r\n for (var i = 0; i < length; i++) {\r\n var key = keys[i];\r\n if (!BI.isEqual(attrs[key], obj[key]) || !(key in obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n contains: function (obj, target, fromIndex) {\r\n if (!_.isArrayLike(obj)) obj = _.values(obj);\r\n return _.indexOf(obj, target, typeof fromIndex === \"number\" && fromIndex) >= 0;\r\n },\r\n\r\n deepContains: function (obj, copy) {\r\n if (BI.isObject(copy)) {\r\n return BI.any(obj, function (i, v) {\r\n if (BI.isEqual(v, copy)) {\r\n return true;\r\n }\r\n });\r\n }\r\n return BI.contains(obj, copy);\r\n },\r\n\r\n deepIndexOf: function (obj, target) {\r\n for (var i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n },\r\n\r\n deepRemove: function (obj, target) {\r\n var done = false;\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n obj.splice(i--, 1);\r\n done = true;\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if (BI.isEqual(target, obj[i])) {\r\n delete obj[i];\r\n done = true;\r\n }\r\n });\r\n }\r\n return done;\r\n },\r\n\r\n deepWithout: function (obj, target) {\r\n if (BI.isArray(obj)) {\r\n var result = [];\r\n for (var i = 0; i < obj.length; i++) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result.push(obj[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n var result = {};\r\n BI.each(obj, function (i, v) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result[i] = v;\r\n }\r\n });\r\n return result;\r\n\r\n },\r\n\r\n deepUnique: function (array) {\r\n var result = [];\r\n BI.each(array, function (i, item) {\r\n if (!BI.deepContains(result, item)) {\r\n result.push(item);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n // 比较两个对象得出不一样的key值\r\n deepDiff: function (object, other) {\r\n object || (object = {});\r\n other || (other = {});\r\n var result = [];\r\n var used = [];\r\n for (var b in object) {\r\n if (this.has(object, b)) {\r\n if (!this.isEqual(object[b], other[b])) {\r\n result.push(b);\r\n }\r\n used.push(b);\r\n }\r\n }\r\n for (var b in other) {\r\n if (this.has(other, b) && !BI.contains(used, b)) {\r\n result.push(b);\r\n }\r\n }\r\n return result;\r\n }\r\n });\r\n\r\n // 通用方法\r\n _.each([\"uniqueId\", \"result\", \"chain\", \"iteratee\", \"escape\", \"unescape\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n // 事件相关方法\r\n _.each([\"bind\", \"once\", \"partial\", \"debounce\", \"throttle\", \"delay\", \"defer\", \"wrap\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n _.extend(BI, {\r\n nextTick: (function () {\r\n var callbacks = [];\r\n var pending = false;\r\n var timerFunc = void 0;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks.length = 0;\r\n for (var i = 0; i < copies.length; i++) {\r\n copies[i]();\r\n }\r\n }\r\n\r\n if (typeof Promise !== \"undefined\") {\r\n var p = Promise.resolve();\r\n timerFunc = function timerFunc() {\r\n p.then(nextTickHandler);\r\n };\r\n } else if (typeof MutationObserver !== \"undefined\") {\r\n var counter = 1;\r\n var observer = new MutationObserver(nextTickHandler);\r\n var textNode = document.createTextNode(String(counter));\r\n observer.observe(textNode, {\r\n characterData: true\r\n });\r\n timerFunc = function timerFunc() {\r\n counter = (counter + 1) % 2;\r\n textNode.data = String(counter);\r\n };\r\n } else if (typeof setImmediate !== \"undefined\") {\r\n timerFunc = function timerFunc() {\r\n setImmediate(nextTickHandler);\r\n };\r\n } else {\r\n // Fallback to setTimeout.\r\n timerFunc = function timerFunc() {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n\r\n return function queueNextTick(cb) {\r\n var _resolve = void 0;\r\n var args = [].slice.call(arguments, 1);\r\n callbacks.push(function () {\r\n if (cb) {\r\n try {\r\n cb.apply(null, args);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else if (_resolve) {\r\n _resolve.apply(null, args);\r\n }\r\n });\r\n if (!pending) {\r\n pending = true;\r\n timerFunc();\r\n }\r\n // $flow-disable-line\r\n if (!cb && typeof Promise !== 'undefined') {\r\n return new Promise(function (resolve, reject) {\r\n _resolve = resolve;\r\n });\r\n }\r\n };\r\n })()\r\n });\r\n\r\n // 数字相关方法\r\n _.each([\"random\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.extend(BI, {\r\n getTime: function () {\r\n if (_global.performance && _global.performance.now) {\r\n return _global.performance.now();\r\n }\r\n if (_global.performance && _global.performance.webkitNow) {\r\n return _global.performance.webkitNow();\r\n }\r\n if (Date.now) {\r\n return Date.now();\r\n }\r\n return BI.getDate().getTime();\r\n\r\n\r\n },\r\n\r\n parseInt: function (number) {\r\n var radix = 10;\r\n if (/^0x/g.test(number)) {\r\n radix = 16;\r\n }\r\n try {\r\n return parseInt(number, radix);\r\n } catch (e) {\r\n throw new Error(number + \"parse int error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n parseSafeInt: function (value) {\r\n var MAX_SAFE_INTEGER = 9007199254740991;\r\n return value\r\n ? this.clamp(this.parseInt(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\r\n : (value === 0 ? value : 0);\r\n },\r\n\r\n parseFloat: function (number) {\r\n try {\r\n return parseFloat(number);\r\n } catch (e) {\r\n throw new Error(number + \"parse float error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n isNaturalNumber: function (number) {\r\n if (/^\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isPositiveInteger: function (number) {\r\n if (/^\\+?[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNegativeInteger: function (number) {\r\n if (/^\\-[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isInteger: function (number) {\r\n if (/^\\-?\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNumeric: function (number) {\r\n return !isNaN(parseFloat(number)) && isFinite(number);\r\n },\r\n\r\n isFloat: function (number) {\r\n if (/^([+-]?)\\\\d*\\\\.\\\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isOdd: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 1;\r\n },\r\n\r\n isEven: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 0;\r\n },\r\n\r\n sum: function (array, iteratee, context) {\r\n var sum = 0;\r\n BI.each(array, function (i, item) {\r\n if (iteratee) {\r\n sum += Number(iteratee.apply(context, [i, item]));\r\n } else {\r\n sum += Number(item);\r\n }\r\n });\r\n return sum;\r\n },\r\n\r\n average: function (array, iteratee, context) {\r\n var sum = BI.sum(array, iteratee, context);\r\n return sum / array.length;\r\n }\r\n });\r\n\r\n // 字符串相关方法\r\n _.extend(BI, {\r\n trim: function () {\r\n return _.trim.apply(_, arguments);\r\n },\r\n\r\n toUpperCase: function (string) {\r\n return (string + \"\").toLocaleUpperCase();\r\n },\r\n\r\n toLowerCase: function (string) {\r\n return (string + \"\").toLocaleLowerCase();\r\n },\r\n\r\n isEndWithBlank: function (string) {\r\n return /(\\s|\\u00A0)$/.test(string);\r\n },\r\n\r\n isLiteral: function (exp) {\r\n var literalValueRE = /^\\s?(true|false|-?[\\d\\.]+|'[^']*'|\"[^\"]*\")\\s?$/;\r\n return literalValueRE.test(exp);\r\n },\r\n\r\n stripQuotes: function (str) {\r\n var a = str.charCodeAt(0);\r\n var b = str.charCodeAt(str.length - 1);\r\n return a === b && (a === 0x22 || a === 0x27)\r\n ? str.slice(1, -1)\r\n : str;\r\n },\r\n\r\n // background-color => backgroundColor\r\n camelize: function (str) {\r\n return str.replace(/-(.)/g, function (_, character) {\r\n return character.toUpperCase();\r\n });\r\n },\r\n\r\n // backgroundColor => background-color\r\n hyphenate: function (str) {\r\n return str.replace(/([A-Z])/g, \"-$1\").toLowerCase();\r\n },\r\n\r\n isNotEmptyString: function (str) {\r\n return BI.isString(str) && !BI.isEmpty(str);\r\n },\r\n\r\n isEmptyString: function (str) {\r\n return BI.isString(str) && BI.isEmpty(str);\r\n },\r\n\r\n /**\r\n * 通用加密方法\r\n */\r\n encrypt: function (type, text, key) {\r\n switch (type) {\r\n case BI.CRYPT_TYPE.AES:\r\n default:\r\n return BI.aesEncrypt(text, key);\r\n }\r\n },\r\n\r\n /**\r\n * 对字符串中的'和\\做编码处理\r\n * @static\r\n * @param {String} string 要做编码处理的字符串\r\n * @return {String} 编码后的字符串\r\n */\r\n escape: function (string) {\r\n return string.replace(/('|\\\\)/g, \"\\\\$1\");\r\n },\r\n\r\n /**\r\n * 让字符串通过指定字符做补齐的函数\r\n *\r\n * var s = BI.leftPad('123', 5, '0');//s的值为:'00123'\r\n *\r\n * @static\r\n * @param {String} val 原始值\r\n * @param {Number} size 总共需要的位数\r\n * @param {String} ch 用于补齐的字符\r\n * @return {String} 补齐后的字符串\r\n */\r\n leftPad: function (val, size, ch) {\r\n var result = String(val);\r\n if (!ch) {\r\n ch = \" \";\r\n }\r\n while (result.length < size) {\r\n result = ch + result;\r\n }\r\n return result.toString();\r\n },\r\n\r\n /**\r\n * 对字符串做替换的函数\r\n *\r\n * var cls = 'my-class', text = 'Some text';\r\n * var res = BI.format('<div class=\"{0}>{1}</div>\"', cls, text);\r\n * //res的值为:'<div class=\"my-class\">Some text</div>';\r\n *\r\n * @static\r\n * @param {String} format 要做替换的字符串,替换字符串1,替换字符串2...\r\n * @return {String} 做了替换后的字符串\r\n */\r\n format: function (format) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n return format.replace(/\\{(\\d+)\\}/g, function (m, i) {\r\n return args[i];\r\n });\r\n }\r\n });\r\n\r\n // 日期相关方法\r\n _.extend(BI, {\r\n /**\r\n * 是否是闰年\r\n * @param year\r\n * @returns {boolean}\r\n */\r\n isLeapYear: function (year) {\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n },\r\n\r\n /**\r\n * 检测是否在有效期\r\n *\r\n * @param YY 年\r\n * @param MM 月\r\n * @param DD 日\r\n * @param minDate '1900-01-01'\r\n * @param maxDate '2099-12-31'\r\n * @returns {Array} 若无效返回无效状态\r\n */\r\n checkDateVoid: function (YY, MM, DD, minDate, maxDate) {\r\n var back = [];\r\n YY = YY | 0;\r\n MM = MM | 0;\r\n DD = DD | 0;\r\n minDate = BI.isString(minDate) ? minDate.match(/\\d+/g) : minDate;\r\n maxDate = BI.isString(maxDate) ? maxDate.match(/\\d+/g) : maxDate;\r\n if (YY < minDate[0]) {\r\n back = [\"y\"];\r\n } else if (YY > maxDate[0]) {\r\n back = [\"y\", 1];\r\n } else if (YY >= minDate[0] && YY <= maxDate[0]) {\r\n if (YY == minDate[0]) {\r\n if (MM < minDate[1]) {\r\n back = [\"m\"];\r\n } else if (MM == minDate[1]) {\r\n if (DD < minDate[2]) {\r\n back = [\"d\"];\r\n }\r\n }\r\n }\r\n if (YY == maxDate[0]) {\r\n if (MM > maxDate[1]) {\r\n back = [\"m\", 1];\r\n } else if (MM == maxDate[1]) {\r\n if (DD > maxDate[2]) {\r\n back = [\"d\", 1];\r\n }\r\n }\r\n }\r\n }\r\n return back;\r\n },\r\n\r\n checkDateLegal: function (str) {\r\n var ar = str.match(/\\d+/g);\r\n var YY = ar[0] | 0, MM = ar[1] | 0, DD = ar[2] | 0;\r\n if (ar.length <= 1) {\r\n return true;\r\n }\r\n if (ar.length <= 2) {\r\n return MM >= 1 && MM <= 12;\r\n }\r\n var MD = BI.Date._MD.slice(0);\r\n MD[1] = BI.isLeapYear(YY) ? 29 : 28;\r\n return MM >= 1 && MM <= 12 && DD <= MD[MM - 1];\r\n },\r\n\r\n parseDateTime: function (str, fmt) {\r\n var today = BI.getDate();\r\n var y = 0;\r\n var m = 0;\r\n var d = 1;\r\n // wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。\r\n var a = str.split(/\\W+/);\r\n if (fmt.toLowerCase() == \"%y%x\" || fmt.toLowerCase() == \"%y%x%d\") {\r\n var yearlength = 4;\r\n var otherlength = 2;\r\n a[0] = str.substring(0, yearlength);\r\n a[1] = str.substring(yearlength, yearlength + otherlength);\r\n a[2] = str.substring(yearlength + otherlength, yearlength + otherlength * 2);\r\n }\r\n var b = fmt.match(/%./g);\r\n var i = 0, j = 0;\r\n var hr = 0;\r\n var min = 0;\r\n var sec = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n switch (b[i]) {\r\n case \"%d\":\r\n case \"%e\":\r\n d = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%X\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n case \"%x\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n\r\n case \"%Y\":\r\n case \"%y\":\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n break;\r\n\r\n case \"%b\":\r\n case \"%B\":\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n m = j;\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case \"%H\":\r\n case \"%I\":\r\n case \"%k\":\r\n case \"%l\":\r\n hr = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%P\":\r\n case \"%p\":\r\n if (/pm/i.test(a[i]) && hr < 12) {\r\n hr += 12;\r\n } else if (/am/i.test(a[i]) && hr >= 12) {\r\n hr -= 12;\r\n }\r\n break;\r\n\r\n case \"%M\":\r\n min = parseInt(a[i], 10);\r\n case \"%S\":\r\n sec = parseInt(a[i], 10);\r\n break;\r\n }\r\n }\r\n // if (!a[i]) {\r\n // continue;\r\n //\t}\r\n if (isNaN(y)) {\r\n y = today.getFullYear();\r\n }\r\n if (isNaN(m)) {\r\n m = today.getMonth();\r\n }\r\n if (isNaN(d)) {\r\n d = today.getDate();\r\n }\r\n if (isNaN(hr)) {\r\n hr = today.getHours();\r\n }\r\n if (isNaN(min)) {\r\n min = today.getMinutes();\r\n }\r\n if (isNaN(sec)) {\r\n sec = today.getSeconds();\r\n }\r\n if (y != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n y = 0;\r\n m = -1;\r\n d = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n if (a[i].search(/[a-zA-Z]+/) != -1) {\r\n var t = -1;\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n t = j;\r\n break;\r\n }\r\n }\r\n if (t != -1) {\r\n if (m != -1) {\r\n d = m + 1;\r\n }\r\n m = t;\r\n }\r\n } else if (parseInt(a[i], 10) <= 12 && m == -1) {\r\n m = a[i] - 1;\r\n } else if (parseInt(a[i], 10) > 31 && y == 0) {\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n } else if (d == 0) {\r\n d = a[i];\r\n }\r\n }\r\n if (y == 0) {\r\n y = today.getFullYear();\r\n }\r\n if (m != -1 && d != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n return today;\r\n },\r\n\r\n getDate: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {\r\n var localTime = dt.getTime();\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数\r\n var utc = localTime + localOffset; // utc即GMT时间标准时区\r\n return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);\r\n }\r\n return dt;\r\n\r\n },\r\n\r\n getTime: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone)) {\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;\r\n }\r\n return dt.getTime();\r\n\r\n }\r\n });\r\n})();\r\n!(function () {\r\n function extend () {\r\n var target = arguments[0] || {}, length = arguments.length, i = 1, options, name, src, copy;\r\n for (; i < length; i++) {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null) {\r\n // Extend the base object\r\n for (name in options) {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy) {\r\n continue;\r\n }\r\n\r\n if (copy !== undefined) {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n\r\n /**\r\n * 客户端观察者,主要处理事件的添加、删除、执行等\r\n * @class BI.OB\r\n * @abstract\r\n */\r\n BI.OB = function (config) {\r\n this._constructor(config);\r\n };\r\n _.extend(BI.OB.prototype, {\r\n props: {},\r\n init: null,\r\n destroyed: null,\r\n\r\n _constructor: function (config) {\r\n this._initProps(config);\r\n this._init();\r\n this._initRef();\r\n },\r\n\r\n _defaultConfig: function (config) {\r\n return {};\r\n },\r\n\r\n _initProps: function (config) {\r\n var props = this.props;\r\n if (BI.isFunction(this.props)) {\r\n props = this.props(config);\r\n }\r\n this.options = extend(this._defaultConfig(config), props, config);\r\n },\r\n\r\n _init: function () {\r\n this._initListeners();\r\n this.init && this.init();\r\n },\r\n\r\n _initListeners: function () {\r\n var self = this;\r\n if (this.options.listeners != null) {\r\n _.each(this.options.listeners, function (lis) {\r\n (lis.target ? lis.target : self)[lis.once ? \"once\" : \"on\"]\r\n (lis.eventName, _.bind(lis.action, self));\r\n });\r\n delete this.options.listeners;\r\n }\r\n },\r\n\r\n // 获得一个当前对象的引用\r\n _initRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(this, this);\r\n }\r\n },\r\n\r\n //释放当前对象\r\n _purgeRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(null);\r\n this.options.ref = null;\r\n }\r\n },\r\n\r\n _getEvents: function () {\r\n if (!_.isArray(this.events)) {\r\n this.events = [];\r\n }\r\n return this.events;\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n on: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (!_.isArray(fns)) {\r\n fns = [];\r\n this._getEvents()[eventName] = fns;\r\n }\r\n fns.push(fn);\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个只执行一次的事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n once: function (eventName, fn) {\r\n var proxy = function () {\r\n fn.apply(this, arguments);\r\n this.un(eventName, proxy);\r\n };\r\n this.on(eventName, proxy);\r\n },\r\n /**\r\n * 解除观察者绑定的指定事件\r\n * @param {String} eventName 要解除绑定事件的名字\r\n * @param {Function} fn 事件对应的执行函数,该参数是可选的,没有该参数时,将解除绑定所有同名字的事件\r\n */\r\n un: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n\r\n /* alex:如果fn是null,就是把eventName上面所有方法都un掉*/\r\n if (fn == null) {\r\n delete this._getEvents()[eventName];\r\n } else {\r\n var fns = this._getEvents()[eventName];\r\n if (_.isArray(fns)) {\r\n var newFns = [];\r\n _.each(fns, function (ifn) {\r\n if (ifn != fn) {\r\n newFns.push(ifn);\r\n }\r\n });\r\n this._getEvents()[eventName] = newFns;\r\n }\r\n }\r\n },\r\n /**\r\n * 清除观察者的所有事件绑定\r\n */\r\n purgeListeners: function () {\r\n /* alex:清空events*/\r\n this.events = [];\r\n },\r\n /**\r\n * 触发绑定过的事件\r\n *\r\n * @param {String} eventName 要触发的事件的名字\r\n * @returns {Boolean} 如果事件函数返回false,则返回false并中断其他同名事件的执行,否则执行所有的同名事件并返回true\r\n */\r\n fireEvent: function () {\r\n var eventName = arguments[0].toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (BI.isArray(fns)) {\r\n if (BI.isArguments(arguments[1])) {\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, arguments[1]) === false) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, args) === false) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n destroy: function () {\r\n this.destroyed && this.destroyed();\r\n this._purgeRef();\r\n this.purgeListeners();\r\n }\r\n });\r\n})();/**\r\n * Widget超类\r\n * @class BI.Widget\r\n * @extends BI.OB\r\n *\r\n * @cfg {JSON} options 配置属性\r\n */\r\n\r\n!(function () {\r\n BI.Widget = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Widget.superclass._defaultConfig.apply(this), {\r\n root: false,\r\n tagName: \"div\",\r\n attributes: null,\r\n data: null,\r\n\r\n tag: null,\r\n disabled: false,\r\n invisible: false,\r\n invalid: false,\r\n baseCls: \"\",\r\n extraCls: \"\",\r\n cls: \"\",\r\n css: null\r\n });\r\n },\r\n\r\n // 覆盖父类的_constructor方法,widget不走ob的生命周期\r\n _constructor: function () {\r\n },\r\n\r\n beforeInit: null,\r\n\r\n // 生命周期函数\r\n beforeCreate: null,\r\n\r\n created: null,\r\n\r\n render: null,\r\n\r\n beforeMount: null,\r\n\r\n mounted: null,\r\n\r\n shouldUpdate: null,\r\n\r\n update: function () {\r\n },\r\n\r\n beforeDestroy: null,\r\n\r\n destroyed: null,\r\n\r\n _init: function () {\r\n BI.Widget.superclass._init.apply(this, arguments);\r\n this._initRoot();\r\n this._initElementWidth();\r\n this._initElementHeight();\r\n this._initVisual();\r\n this._initState();\r\n this._initRender();\r\n },\r\n\r\n _initRender: function () {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.beforeInit(BI.bind(this._render, this));\r\n if (this.__asking === true) {\r\n this.__async = true;\r\n }\r\n } else {\r\n this._render();\r\n }\r\n },\r\n\r\n _render: function () {\r\n this.__asking = false;\r\n this.beforeCreate && this.beforeCreate();\r\n this._initElement();\r\n this._initEffects();\r\n this.created && this.created();\r\n },\r\n\r\n /**\r\n * 初始化根节点\r\n * @private\r\n */\r\n _initRoot: function () {\r\n var o = this.options;\r\n this.widgetName = o.widgetName || BI.uniqueId(\"widget\");\r\n this._isRoot = o.root;\r\n if (BI.isWidget(o.element)) {\r\n if (o.element instanceof BI.Widget) {\r\n this._parent = o.element;\r\n this._parent.addWidget(this.widgetName, this);\r\n } else {\r\n this._isRoot = true;\r\n }\r\n this.element = this.options.element.element;\r\n } else if (o.element) {\r\n // if (o.root !== true) {\r\n // throw new Error(\"root is a required property\");\r\n // }\r\n this.element = BI.Widget._renderEngine.createElement(this);\r\n this._isRoot = true;\r\n } else {\r\n this.element = BI.Widget._renderEngine.createElement(this);\r\n }\r\n this.element._isWidget = true;\r\n if (o._baseCls || o.baseCls || o.extraCls || o.cls) {\r\n this.element.addClass((o._baseCls || \"\") + \" \" + (o.baseCls || \"\") + \" \" + (o.extraCls || \"\") + \" \" + (o.cls || \"\"));\r\n }\r\n if (o.attributes) {\r\n this.element.attr(o.attributes);\r\n }\r\n if (o.data) {\r\n this.element.data(o.data);\r\n }\r\n if (o.css) {\r\n this.element.css(o.css);\r\n }\r\n this._children = {};\r\n },\r\n\r\n _initElementWidth: function () {\r\n var o = this.options;\r\n if (BI.isWidthOrHeight(o.width)) {\r\n this.element.css(\"width\", o.width);\r\n }\r\n },\r\n\r\n _initElementHeight: function () {\r\n var o = this.options;\r\n if (BI.isWidthOrHeight(o.height)) {\r\n this.element.css(\"height\", o.height);\r\n }\r\n },\r\n\r\n _initVisual: function () {\r\n var o = this.options;\r\n if (o.invisible) {\r\n // 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性\r\n this.element.css(\"display\", \"none\");\r\n }\r\n },\r\n\r\n _initEffects: function () {\r\n var o = this.options;\r\n if (o.disabled || o.invalid) {\r\n if (this.options.disabled) {\r\n this.setEnable(false);\r\n }\r\n if (this.options.invalid) {\r\n this.setValid(false);\r\n }\r\n }\r\n },\r\n\r\n _initState: function () {\r\n this._isMounted = false;\r\n },\r\n\r\n _initElement: function () {\r\n var self = this;\r\n var els = this.render && this.render();\r\n if (BI.isPlainObject(els)) {\r\n els = [els];\r\n }\r\n if (BI.isArray(els)) {\r\n BI.each(els, function (i, el) {\r\n BI.createWidget(el, {\r\n element: self\r\n });\r\n });\r\n }\r\n // if (this._isRoot === true || !(this instanceof BI.Layout)) {\r\n this._mount();\r\n // }\r\n },\r\n\r\n _setParent: function (parent) {\r\n this._parent = parent;\r\n },\r\n\r\n /**\r\n *\r\n * @param force 是否强制挂载子节点\r\n * @param deep 子节点是否也是按照当前force处理\r\n * @param lifeHook 生命周期钩子触不触发,默认触发\r\n * @param predicate 递归每个widget的回调\r\n * @returns {boolean}\r\n * @private\r\n */\r\n _mount: function (force, deep, lifeHook, predicate) {\r\n var self = this;\r\n if (!force && (this._isMounted || !this.isVisible() || this.__asking === true || !(this._isRoot === true || (this._parent && this._parent._isMounted === true)))) {\r\n return false;\r\n }\r\n lifeHook !== false && this.beforeMount && this.beforeMount();\r\n this._isMounted = true;\r\n this._mountChildren && this._mountChildren();\r\n BI.each(this._children, function (i, widget) {\r\n !self.isEnabled() && widget._setEnable(false);\r\n !self.isValid() && widget._setValid(false);\r\n widget._mount && widget._mount(deep ? force : false, deep, lifeHook, predicate);\r\n });\r\n lifeHook !== false && this.mounted && this.mounted();\r\n this.fireEvent(BI.Events.MOUNT);\r\n predicate && predicate(this);\r\n return true;\r\n },\r\n\r\n _mountChildren: null,\r\n\r\n isMounted: function () {\r\n return this._isMounted;\r\n },\r\n\r\n setWidth: function (w) {\r\n this.options.width = w;\r\n this._initElementWidth();\r\n },\r\n\r\n setHeight: function (h) {\r\n this.options.height = h;\r\n this._initElementHeight();\r\n },\r\n\r\n _setEnable: function (enable) {\r\n if (enable === true) {\r\n this.options.disabled = false;\r\n } else if (enable === false) {\r\n this.options.disabled = true;\r\n }\r\n // 递归将所有子组件使能\r\n BI.each(this._children, function (i, child) {\r\n !child._manualSetEnable && child._setEnable && child._setEnable(enable);\r\n });\r\n },\r\n\r\n _setValid: function (valid) {\r\n if (valid === true) {\r\n this.options.invalid = false;\r\n } else if (valid === false) {\r\n this.options.invalid = true;\r\n }\r\n // 递归将所有子组件使有效\r\n BI.each(this._children, function (i, child) {\r\n !child._manualSetValid && child._setValid && child._setValid(valid);\r\n });\r\n },\r\n\r\n _setVisible: function (visible) {\r\n if (visible === true) {\r\n this.options.invisible = false;\r\n } else if (visible === false) {\r\n this.options.invisible = true;\r\n }\r\n },\r\n\r\n setEnable: function (enable) {\r\n this._manualSetEnable = true;\r\n this._setEnable(enable);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setVisible: function (visible) {\r\n this._setVisible(visible);\r\n if (visible === true) {\r\n // 用this.element.show()会把display属性改成block\r\n this.element.css(\"display\", \"\");\r\n this._mount();\r\n } else if (visible === false) {\r\n this.element.css(\"display\", \"none\");\r\n }\r\n this.fireEvent(BI.Events.VIEW, visible);\r\n },\r\n\r\n setValid: function (valid) {\r\n this._manualSetValid = true;\r\n this._setValid(valid);\r\n if (valid === true) {\r\n this.element.removeClass(\"base-invalid invalid\");\r\n } else if (valid === false) {\r\n this.element.addClass(\"base-invalid invalid\");\r\n }\r\n },\r\n\r\n doBehavior: function () {\r\n var args = arguments;\r\n // 递归将所有子组件使有效\r\n BI.each(this._children, function (i, child) {\r\n child.doBehavior && child.doBehavior.apply(child, args);\r\n });\r\n },\r\n\r\n getWidth: function () {\r\n return this.options.width;\r\n },\r\n\r\n getHeight: function () {\r\n return this.options.height;\r\n },\r\n\r\n isValid: function () {\r\n return !this.options.invalid;\r\n },\r\n\r\n addWidget: function (name, widget) {\r\n var self = this;\r\n if (name instanceof BI.Widget) {\r\n widget = name;\r\n name = widget.getName();\r\n }\r\n if (BI.isKey(name)) {\r\n name = name + \"\";\r\n }\r\n name = name || widget.getName() || BI.uniqueId(\"widget\");\r\n if (this._children[name]) {\r\n throw new Error(\"name has already been existed\");\r\n }\r\n widget._setParent && widget._setParent(this);\r\n widget.on(BI.Events.DESTROY, function () {\r\n BI.remove(self._children, this);\r\n });\r\n return (this._children[name] = widget);\r\n },\r\n\r\n getWidgetByName: function (name) {\r\n if (!BI.isKey(name) || name === this.getName()) {\r\n return this;\r\n }\r\n name = name + \"\";\r\n var widget = void 0, other = {};\r\n BI.any(this._children, function (i, wi) {\r\n if (i === name) {\r\n widget = wi;\r\n return true;\r\n }\r\n other[i] = wi;\r\n });\r\n if (!widget) {\r\n BI.any(other, function (i, wi) {\r\n return (widget = wi.getWidgetByName(i));\r\n });\r\n }\r\n return widget;\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var self = this;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.remove(this._children, nameOrWidget);\r\n } else {\r\n delete this._children[nameOrWidget];\r\n }\r\n },\r\n\r\n hasWidget: function (name) {\r\n return this._children[name] != null;\r\n },\r\n\r\n getName: function () {\r\n return this.widgetName;\r\n },\r\n\r\n setTag: function (tag) {\r\n this.options.tag = tag;\r\n },\r\n\r\n getTag: function () {\r\n return this.options.tag;\r\n },\r\n\r\n attr: function (key, value) {\r\n var self = this;\r\n if (BI.isPlainObject(key)) {\r\n BI.each(key, function (k, v) {\r\n self.attr(k, v);\r\n });\r\n return;\r\n }\r\n if (BI.isNotNull(value)) {\r\n return this.options[key] = value;\r\n }\r\n return this.options[key];\r\n },\r\n\r\n css: function (name, value) {\r\n return this.element.css(name, value);\r\n },\r\n\r\n getText: function () {\r\n\r\n },\r\n\r\n setText: function (text) {\r\n\r\n },\r\n\r\n getValue: function () {\r\n\r\n },\r\n\r\n setValue: function (value) {\r\n\r\n },\r\n\r\n isEnabled: function () {\r\n return !this.options.disabled;\r\n },\r\n\r\n isVisible: function () {\r\n return !this.options.invisible;\r\n },\r\n\r\n disable: function () {\r\n this.setEnable(false);\r\n },\r\n\r\n enable: function () {\r\n this.setEnable(true);\r\n },\r\n\r\n valid: function () {\r\n this.setValid(true);\r\n },\r\n\r\n invalid: function () {\r\n this.setValid(false);\r\n },\r\n\r\n invisible: function () {\r\n this.setVisible(false);\r\n },\r\n\r\n visible: function () {\r\n this.setVisible(true);\r\n },\r\n\r\n __d: function () {\r\n this.beforeDestroy && this.beforeDestroy();\r\n this.beforeDestroy = null;\r\n BI.each(this._children, function (i, widget) {\r\n widget && widget._unMount && widget._unMount();\r\n });\r\n this._children = {};\r\n this._parent = null;\r\n this._isMounted = false;\r\n this.destroyed && this.destroyed();\r\n this.destroyed = null;\r\n },\r\n\r\n _unMount: function () {\r\n this.__d();\r\n this.fireEvent(BI.Events.UNMOUNT);\r\n this.purgeListeners();\r\n },\r\n\r\n isolate: function () {\r\n if (this._parent) {\r\n this._parent.removeWidget(this);\r\n }\r\n BI.DOM.hang([this]);\r\n },\r\n\r\n empty: function () {\r\n BI.each(this._children, function (i, widget) {\r\n widget && widget._unMount && widget._unMount();\r\n });\r\n this._children = {};\r\n this.element.empty();\r\n },\r\n\r\n _destroy: function () {\r\n this.__d();\r\n this.element.destroy();\r\n this.purgeListeners();\r\n },\r\n\r\n destroy: function () {\r\n this.__d();\r\n this.element.destroy();\r\n this.fireEvent(BI.Events.DESTROY);\r\n this._purgeRef();\r\n this.purgeListeners();\r\n }\r\n });\r\n BI.Widget.registerRenderEngine = function (engine) {\r\n BI.Widget._renderEngine = engine;\r\n };\r\n BI.Widget.registerRenderEngine({\r\n createElement: function (widget) {\r\n if (BI.isWidget(widget)) {\r\n var o = widget.options;\r\n if (o.element) {\r\n return BI.$(o.element);\r\n }\r\n return BI.$(document.createElement(o.tagName));\r\n }\r\n return BI.$(widget);\r\n },\r\n createFragment: function () {\r\n return document.createDocumentFragment();\r\n }\r\n });\r\n\r\n BI.mount = function (widget, container, predicate, hydrate) {\r\n if (hydrate === true) {\r\n // 将widget的element元素都挂载好,并建立相互关系\r\n widget.element.data(\"__widgets\", [widget]);\r\n var res = widget._mount(true, false, false, function (w) {\r\n BI.each(w._children, function (i, child) {\r\n var ws = child.element.data(\"__widgets\");\r\n if (!ws) {\r\n ws = [];\r\n }\r\n ws.push(child);\r\n child.element.data(\"__widgets\", ws);\r\n });\r\n predicate && predicate.apply(this, arguments);\r\n });\r\n // 将新的dom树属性(事件等)patch到已存在的dom上\r\n var c = BI.Widget._renderEngine.createElement;\r\n BI.DOM.patchProps(widget.element, c(c(container).children()[0]));\r\n\r\n var triggerLifeHook = function (w) {\r\n w.beforeMount && w.beforeMount();\r\n w.mounted && w.mounted();\r\n BI.each(w._children, function (i, child) {\r\n triggerLifeHook(child);\r\n });\r\n };\r\n // 最后触发组件树生命周期函数\r\n triggerLifeHook(widget);\r\n return res;\r\n }\r\n if (container) {\r\n BI.Widget._renderEngine.createElement(container).append(widget.element);\r\n }\r\n return widget._mount(true, false, false, predicate);\r\n };\r\n})();(function () {\r\n var kv = {};\r\n BI.shortcut = BI.component = function (xtype, cls) {\r\n if (kv[xtype] != null) {\r\n _global.console && console.error(\"shortcut:[\" + xtype + \"] has been registed\");\r\n }\r\n kv[xtype] = cls;\r\n };\r\n\r\n // 根据配置属性生成widget\r\n var createWidget = function (config) {\r\n var cls = kv[config.type];\r\n\r\n var widget = new cls();\r\n\r\n widget._initProps(config);\r\n widget._init();\r\n widget._initRef();\r\n\r\n return widget;\r\n };\r\n\r\n BI.createWidget = function (item, options, context) {\r\n // 先把准备环境准备好\r\n BI.init();\r\n var el, w;\r\n item || (item = {});\r\n if (BI.isWidget(options)) {\r\n context = options;\r\n options = {};\r\n } else {\r\n options || (options = {});\r\n }\r\n if (BI.isEmpty(item) && BI.isEmpty(options)) {\r\n return BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n }\r\n if (BI.isWidget(item)) {\r\n return item;\r\n }\r\n if (item.type || options.type) {\r\n el = BI.extend({}, options, item);\r\n w = BI.Plugin.getWidget(el.type, el);\r\n w.listeners = (w.listeners || []).concat([{\r\n eventName: BI.Events.MOUNT,\r\n action: function () {\r\n BI.Plugin.getObject(el.type, this);\r\n }\r\n }]);\r\n return w.type === el.type ? createWidget(w) : BI.createWidget(BI.extend({}, item, {type: w.type}, options));\r\n }\r\n if (item.el && (item.el.type || options.type)) {\r\n el = BI.extend({}, options, item.el);\r\n w = BI.Plugin.getWidget(el.type, el);\r\n w.listeners = (w.listeners || []).concat([{\r\n eventName: BI.Events.MOUNT,\r\n action: function () {\r\n BI.Plugin.getObject(el.type, this);\r\n }\r\n }]);\r\n return w.type === el.type ? createWidget(w) : BI.createWidget(BI.extend({}, item, {type: w.type}, options));\r\n }\r\n if (BI.isWidget(item.el)) {\r\n return item.el;\r\n }\r\n throw new Error(\"无法根据item创建组件\");\r\n };\r\n\r\n BI.createElement = function () {\r\n var widget = BI.createWidget.apply(this, arguments);\r\n return widget.element;\r\n };\r\n\r\n})();!(function () {\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * CryptoJS core components.\r\n */\r\n BI.CRYPT_TYPE = BI.CRYPT_TYPE || {};\r\n BI.CRYPT_TYPE.AES = \"aes\";\r\n\r\n var CryptoJS = CryptoJS || (function (Math, undefined) {\r\n /**\r\n * CryptoJS namespace.\r\n */\r\n var C = {};\r\n\r\n /**\r\n * Library namespace.\r\n */\r\n var C_lib = C.lib = {};\r\n\r\n /**\r\n * Base object for prototypal inheritance.\r\n */\r\n var Base = C_lib.Base = (function () {\r\n function F () {\r\n }\r\n\r\n return {\r\n /**\r\n * Creates a new object that inherits from this object.\r\n *\r\n * @param {Object} overrides Properties to copy into the new object.\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * field: 'value',\r\n *\r\n * method: function () {\r\n * }\r\n * });\r\n */\r\n extend: function (overrides) {\r\n // Spawn\r\n F.prototype = this;\r\n var subtype = new F();\r\n\r\n // Augment\r\n if (overrides) {\r\n subtype.mixIn(overrides);\r\n }\r\n\r\n // Create default initializer\r\n if (!subtype.hasOwnProperty('init')) {\r\n subtype.init = function () {\r\n subtype.$super.init.apply(this, arguments);\r\n };\r\n }\r\n\r\n // Initializer's prototype is the subtype object\r\n subtype.init.prototype = subtype;\r\n\r\n // Reference supertype\r\n subtype.$super = this;\r\n\r\n return subtype;\r\n },\r\n\r\n /**\r\n * Extends this object and runs the init method.\r\n * Arguments to create() will be passed to init().\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var instance = MyType.create();\r\n */\r\n create: function () {\r\n var instance = this.extend();\r\n instance.init.apply(instance, arguments);\r\n\r\n return instance;\r\n },\r\n\r\n /**\r\n * Initializes a newly created object.\r\n * Override this method to add some logic when your objects are created.\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * init: function () {\r\n * // ...\r\n * }\r\n * });\r\n */\r\n init: function () {\r\n },\r\n\r\n /**\r\n * Copies properties into this object.\r\n *\r\n * @param {Object} properties The properties to mix in.\r\n *\r\n * @example\r\n *\r\n * MyType.mixIn({\r\n * field: 'value'\r\n * });\r\n */\r\n mixIn: function (properties) {\r\n for (var propertyName in properties) {\r\n if (properties.hasOwnProperty(propertyName)) {\r\n this[propertyName] = properties[propertyName];\r\n }\r\n }\r\n\r\n // IE won't copy toString using the loop above\r\n if (properties.hasOwnProperty('toString')) {\r\n this.toString = properties.toString;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = instance.clone();\r\n */\r\n clone: function () {\r\n return this.init.prototype.extend(this);\r\n }\r\n };\r\n }());\r\n\r\n /**\r\n * An array of 32-bit words.\r\n *\r\n * @property {Array} words The array of 32-bit words.\r\n * @property {number} sigBytes The number of significant bytes in this word array.\r\n */\r\n var WordArray = C_lib.WordArray = Base.extend({\r\n /**\r\n * Initializes a newly created word array.\r\n *\r\n * @param {Array} words (Optional) An array of 32-bit words.\r\n * @param {number} sigBytes (Optional) The number of significant bytes in the words.\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.create();\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\r\n */\r\n init: function (words, sigBytes) {\r\n words = this.words = words || [];\r\n\r\n if (sigBytes != undefined) {\r\n this.sigBytes = sigBytes;\r\n } else {\r\n this.sigBytes = words.length * 4;\r\n }\r\n },\r\n\r\n /**\r\n * Converts this word array to a string.\r\n *\r\n * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\r\n *\r\n * @return {string} The stringified word array.\r\n *\r\n * @example\r\n *\r\n * var string = wordArray + '';\r\n * var string = wordArray.toString();\r\n * var string = wordArray.toString(CryptoJS.enc.Utf8);\r\n */\r\n toString: function (encoder) {\r\n return (encoder || Hex).stringify(this);\r\n },\r\n\r\n /**\r\n * Concatenates a word array to this word array.\r\n *\r\n * @param {WordArray} wordArray The word array to append.\r\n *\r\n * @return {WordArray} This word array.\r\n *\r\n * @example\r\n *\r\n * wordArray1.concat(wordArray2);\r\n */\r\n concat: function (wordArray) {\r\n // Shortcuts\r\n var thisWords = this.words;\r\n var thatWords = wordArray.words;\r\n var thisSigBytes = this.sigBytes;\r\n var thatSigBytes = wordArray.sigBytes;\r\n\r\n // Clamp excess bits\r\n this.clamp();\r\n\r\n // Concat\r\n if (thisSigBytes % 4) {\r\n // Copy one byte at a time\r\n for (var i = 0; i < thatSigBytes; i++) {\r\n var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\r\n }\r\n } else if (thatWords.length > 0xffff) {\r\n // Copy one word at a time\r\n for (var i = 0; i < thatSigBytes; i += 4) {\r\n thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\r\n }\r\n } else {\r\n // Copy all words at once\r\n thisWords.push.apply(thisWords, thatWords);\r\n }\r\n this.sigBytes += thatSigBytes;\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes insignificant bits.\r\n *\r\n * @example\r\n *\r\n * wordArray.clamp();\r\n */\r\n clamp: function () {\r\n // Shortcuts\r\n var words = this.words;\r\n var sigBytes = this.sigBytes;\r\n\r\n // Clamp\r\n words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\r\n words.length = Math.ceil(sigBytes / 4);\r\n },\r\n\r\n /**\r\n * Creates a copy of this word array.\r\n *\r\n * @return {WordArray} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = wordArray.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone.words = this.words.slice(0);\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Creates a word array filled with random bytes.\r\n *\r\n * @param {number} nBytes The number of random bytes to generate.\r\n *\r\n * @return {WordArray} The random word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.random(16);\r\n */\r\n random: function (nBytes) {\r\n var words = [];\r\n for (var i = 0; i < nBytes; i += 4) {\r\n words.push((Math.random() * 0x100000000) | 0);\r\n }\r\n\r\n return new WordArray.init(words, nBytes);\r\n }\r\n });\r\n\r\n /**\r\n * Encoder namespace.\r\n */\r\n var C_enc = C.enc = {};\r\n\r\n /**\r\n * Hex encoding strategy.\r\n */\r\n var Hex = C_enc.Hex = {\r\n /**\r\n * Converts a word array to a hex string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The hex string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var hexChars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n hexChars.push((bite >>> 4).toString(16));\r\n hexChars.push((bite & 0x0f).toString(16));\r\n }\r\n\r\n return hexChars.join('');\r\n },\r\n\r\n /**\r\n * Converts a hex string to a word array.\r\n *\r\n * @param {string} hexStr The hex string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Hex.parse(hexString);\r\n */\r\n parse: function (hexStr) {\r\n // Shortcut\r\n var hexStrLength = hexStr.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < hexStrLength; i += 2) {\r\n words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\r\n }\r\n\r\n return new WordArray.init(words, hexStrLength / 2);\r\n }\r\n };\r\n\r\n /**\r\n * Latin1 encoding strategy.\r\n */\r\n var Latin1 = C_enc.Latin1 = {\r\n /**\r\n * Converts a word array to a Latin1 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Latin1 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var latin1Chars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n latin1Chars.push(String.fromCharCode(bite));\r\n }\r\n\r\n return latin1Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Latin1 string to a word array.\r\n *\r\n * @param {string} latin1Str The Latin1 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\r\n */\r\n parse: function (latin1Str) {\r\n // Shortcut\r\n var latin1StrLength = latin1Str.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < latin1StrLength; i++) {\r\n words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\r\n }\r\n\r\n return new WordArray.init(words, latin1StrLength);\r\n }\r\n };\r\n\r\n /**\r\n * UTF-8 encoding strategy.\r\n */\r\n var Utf8 = C_enc.Utf8 = {\r\n /**\r\n * Converts a word array to a UTF-8 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The UTF-8 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n try {\r\n return decodeURIComponent(escape(Latin1.stringify(wordArray)));\r\n } catch (e) {\r\n throw new Error('Malformed UTF-8 data');\r\n }\r\n },\r\n\r\n /**\r\n * Converts a UTF-8 string to a word array.\r\n *\r\n * @param {string} utf8Str The UTF-8 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\r\n */\r\n parse: function (utf8Str) {\r\n return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\r\n }\r\n };\r\n\r\n /**\r\n * Abstract buffered block algorithm template.\r\n *\r\n * The property blockSize must be implemented in a concrete subtype.\r\n *\r\n * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\r\n */\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\r\n /**\r\n * Resets this block algorithm's data buffer to its initial state.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm.reset();\r\n */\r\n reset: function () {\r\n // Initial values\r\n this._data = new WordArray.init();\r\n this._nDataBytes = 0;\r\n },\r\n\r\n /**\r\n * Adds new data to this block algorithm's buffer.\r\n *\r\n * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm._append('data');\r\n * bufferedBlockAlgorithm._append(wordArray);\r\n */\r\n _append: function (data) {\r\n // Convert string to WordArray, else assume WordArray already\r\n if (typeof data == 'string') {\r\n data = Utf8.parse(data);\r\n }\r\n\r\n // Append\r\n this._data.concat(data);\r\n this._nDataBytes += data.sigBytes;\r\n },\r\n\r\n /**\r\n * Processes available data blocks.\r\n *\r\n * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\r\n *\r\n * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\r\n *\r\n * @return {WordArray} The processed data.\r\n *\r\n * @example\r\n *\r\n * var processedData = bufferedBlockAlgorithm._process();\r\n * var processedData = bufferedBlockAlgorithm._process(!!'flush');\r\n */\r\n _process: function (doFlush) {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n var dataSigBytes = data.sigBytes;\r\n var blockSize = this.blockSize;\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count blocks ready\r\n var nBlocksReady = dataSigBytes / blockSizeBytes;\r\n if (doFlush) {\r\n // Round up to include partial blocks\r\n nBlocksReady = Math.ceil(nBlocksReady);\r\n } else {\r\n // Round down to include only full blocks,\r\n // less the number of blocks that must remain in the buffer\r\n nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\r\n }\r\n\r\n // Count words ready\r\n var nWordsReady = nBlocksReady * blockSize;\r\n\r\n // Count bytes ready\r\n var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\r\n\r\n // Process blocks\r\n if (nWordsReady) {\r\n for (var offset = 0; offset < nWordsReady; offset += blockSize) {\r\n // Perform concrete-algorithm logic\r\n this._doProcessBlock(dataWords, offset);\r\n }\r\n\r\n // Remove processed words\r\n var processedWords = dataWords.splice(0, nWordsReady);\r\n data.sigBytes -= nBytesReady;\r\n }\r\n\r\n // Return processed words\r\n return new WordArray.init(processedWords, nBytesReady);\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = bufferedBlockAlgorithm.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone._data = this._data.clone();\r\n\r\n return clone;\r\n },\r\n\r\n _minBufferSize: 0\r\n });\r\n\r\n /**\r\n * Abstract hasher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\r\n */\r\n var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Initializes a newly created hasher.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\r\n *\r\n * @example\r\n *\r\n * var hasher = CryptoJS.algo.SHA256.create();\r\n */\r\n init: function (cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this hasher to its initial state.\r\n *\r\n * @example\r\n *\r\n * hasher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-hasher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Updates this hasher with a message.\r\n *\r\n * @param {WordArray|string} messageUpdate The message to append.\r\n *\r\n * @return {Hasher} This hasher.\r\n *\r\n * @example\r\n *\r\n * hasher.update('message');\r\n * hasher.update(wordArray);\r\n */\r\n update: function (messageUpdate) {\r\n // Append\r\n this._append(messageUpdate);\r\n\r\n // Update the hash\r\n this._process();\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Finalizes the hash computation.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} messageUpdate (Optional) A final message update.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @example\r\n *\r\n * var hash = hasher.finalize();\r\n * var hash = hasher.finalize('message');\r\n * var hash = hasher.finalize(wordArray);\r\n */\r\n finalize: function (messageUpdate) {\r\n // Final message update\r\n if (messageUpdate) {\r\n this._append(messageUpdate);\r\n }\r\n\r\n // Perform concrete-hasher logic\r\n var hash = this._doFinalize();\r\n\r\n return hash;\r\n },\r\n\r\n blockSize: 512 / 32,\r\n\r\n /**\r\n * Creates a shortcut function to a hasher's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to create a helper for.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHelper: function (hasher) {\r\n return function (message, cfg) {\r\n return new hasher.init(cfg).finalize(message);\r\n };\r\n },\r\n\r\n /**\r\n * Creates a shortcut function to the HMAC's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to use in this HMAC helper.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHmacHelper: function (hasher) {\r\n return function (message, key) {\r\n return new C_algo.HMAC.init(hasher, key).finalize(message);\r\n };\r\n }\r\n });\r\n\r\n /**\r\n * Algorithm namespace.\r\n */\r\n var C_algo = C.algo = {};\r\n\r\n return C;\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var C_enc = C.enc;\r\n\r\n /**\r\n * Base64 encoding strategy.\r\n */\r\n var Base64 = C_enc.Base64 = {\r\n /**\r\n * Converts a word array to a Base64 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Base64 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n var map = this._map;\r\n\r\n // Clamp excess bits\r\n wordArray.clamp();\r\n\r\n // Convert\r\n var base64Chars = [];\r\n for (var i = 0; i < sigBytes; i += 3) {\r\n var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\r\n var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\r\n\r\n var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\r\n\r\n for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\r\n base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\r\n }\r\n }\r\n\r\n // Add padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n while (base64Chars.length % 4) {\r\n base64Chars.push(paddingChar);\r\n }\r\n }\r\n\r\n return base64Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Base64 string to a word array.\r\n *\r\n * @param {string} base64Str The Base64 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Base64.parse(base64String);\r\n */\r\n parse: function (base64Str) {\r\n // Shortcuts\r\n var base64StrLength = base64Str.length;\r\n var map = this._map;\r\n\r\n // Ignore padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n var paddingIndex = base64Str.indexOf(paddingChar);\r\n if (paddingIndex != -1) {\r\n base64StrLength = paddingIndex;\r\n }\r\n }\r\n\r\n // Convert\r\n var words = [];\r\n var nBytes = 0;\r\n for (var i = 0; i < base64StrLength; i++) {\r\n if (i % 4) {\r\n var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2);\r\n var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2);\r\n words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);\r\n nBytes++;\r\n }\r\n }\r\n\r\n return WordArray.create(words, nBytes);\r\n },\r\n\r\n _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\r\n };\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function (Math) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var Hasher = C_lib.Hasher;\r\n var C_algo = C.algo;\r\n\r\n // Constants table\r\n var T = [];\r\n\r\n // Compute constants\r\n (function () {\r\n for (var i = 0; i < 64; i++) {\r\n T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\r\n }\r\n }());\r\n\r\n /**\r\n * MD5 hash algorithm.\r\n */\r\n var MD5 = C_algo.MD5 = Hasher.extend({\r\n _doReset: function () {\r\n this._hash = new WordArray.init([\r\n 0x67452301, 0xefcdab89,\r\n 0x98badcfe, 0x10325476\r\n ]);\r\n },\r\n\r\n _doProcessBlock: function (M, offset) {\r\n // Swap endian\r\n for (var i = 0; i < 16; i++) {\r\n // Shortcuts\r\n var offset_i = offset + i;\r\n var M_offset_i = M[offset_i];\r\n\r\n M[offset_i] = (\r\n (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\r\n (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\r\n );\r\n }\r\n\r\n // Shortcuts\r\n var H = this._hash.words;\r\n\r\n var M_offset_0 = M[offset + 0];\r\n var M_offset_1 = M[offset + 1];\r\n var M_offset_2 = M[offset + 2];\r\n var M_offset_3 = M[offset + 3];\r\n var M_offset_4 = M[offset + 4];\r\n var M_offset_5 = M[offset + 5];\r\n var M_offset_6 = M[offset + 6];\r\n var M_offset_7 = M[offset + 7];\r\n var M_offset_8 = M[offset + 8];\r\n var M_offset_9 = M[offset + 9];\r\n var M_offset_10 = M[offset + 10];\r\n var M_offset_11 = M[offset + 11];\r\n var M_offset_12 = M[offset + 12];\r\n var M_offset_13 = M[offset + 13];\r\n var M_offset_14 = M[offset + 14];\r\n var M_offset_15 = M[offset + 15];\r\n\r\n // Working varialbes\r\n var a = H[0];\r\n var b = H[1];\r\n var c = H[2];\r\n var d = H[3];\r\n\r\n // Computation\r\n a = FF(a, b, c, d, M_offset_0, 7, T[0]);\r\n d = FF(d, a, b, c, M_offset_1, 12, T[1]);\r\n c = FF(c, d, a, b, M_offset_2, 17, T[2]);\r\n b = FF(b, c, d, a, M_offset_3, 22, T[3]);\r\n a = FF(a, b, c, d, M_offset_4, 7, T[4]);\r\n d = FF(d, a, b, c, M_offset_5, 12, T[5]);\r\n c = FF(c, d, a, b, M_offset_6, 17, T[6]);\r\n b = FF(b, c, d, a, M_offset_7, 22, T[7]);\r\n a = FF(a, b, c, d, M_offset_8, 7, T[8]);\r\n d = FF(d, a, b, c, M_offset_9, 12, T[9]);\r\n c = FF(c, d, a, b, M_offset_10, 17, T[10]);\r\n b = FF(b, c, d, a, M_offset_11, 22, T[11]);\r\n a = FF(a, b, c, d, M_offset_12, 7, T[12]);\r\n d = FF(d, a, b, c, M_offset_13, 12, T[13]);\r\n c = FF(c, d, a, b, M_offset_14, 17, T[14]);\r\n b = FF(b, c, d, a, M_offset_15, 22, T[15]);\r\n\r\n a = GG(a, b, c, d, M_offset_1, 5, T[16]);\r\n d = GG(d, a, b, c, M_offset_6, 9, T[17]);\r\n c = GG(c, d, a, b, M_offset_11, 14, T[18]);\r\n b = GG(b, c, d, a, M_offset_0, 20, T[19]);\r\n a = GG(a, b, c, d, M_offset_5, 5, T[20]);\r\n d = GG(d, a, b, c, M_offset_10, 9, T[21]);\r\n c = GG(c, d, a, b, M_offset_15, 14, T[22]);\r\n b = GG(b, c, d, a, M_offset_4, 20, T[23]);\r\n a = GG(a, b, c, d, M_offset_9, 5, T[24]);\r\n d = GG(d, a, b, c, M_offset_14, 9, T[25]);\r\n c = GG(c, d, a, b, M_offset_3, 14, T[26]);\r\n b = GG(b, c, d, a, M_offset_8, 20, T[27]);\r\n a = GG(a, b, c, d, M_offset_13, 5, T[28]);\r\n d = GG(d, a, b, c, M_offset_2, 9, T[29]);\r\n c = GG(c, d, a, b, M_offset_7, 14, T[30]);\r\n b = GG(b, c, d, a, M_offset_12, 20, T[31]);\r\n\r\n a = HH(a, b, c, d, M_offset_5, 4, T[32]);\r\n d = HH(d, a, b, c, M_offset_8, 11, T[33]);\r\n c = HH(c, d, a, b, M_offset_11, 16, T[34]);\r\n b = HH(b, c, d, a, M_offset_14, 23, T[35]);\r\n a = HH(a, b, c, d, M_offset_1, 4, T[36]);\r\n d = HH(d, a, b, c, M_offset_4, 11, T[37]);\r\n c = HH(c, d, a, b, M_offset_7, 16, T[38]);\r\n b = HH(b, c, d, a, M_offset_10, 23, T[39]);\r\n a = HH(a, b, c, d, M_offset_13, 4, T[40]);\r\n d = HH(d, a, b, c, M_offset_0, 11, T[41]);\r\n c = HH(c, d, a, b, M_offset_3, 16, T[42]);\r\n b = HH(b, c, d, a, M_offset_6, 23, T[43]);\r\n a = HH(a, b, c, d, M_offset_9, 4, T[44]);\r\n d = HH(d, a, b, c, M_offset_12, 11, T[45]);\r\n c = HH(c, d, a, b, M_offset_15, 16, T[46]);\r\n b = HH(b, c, d, a, M_offset_2, 23, T[47]);\r\n\r\n a = II(a, b, c, d, M_offset_0, 6, T[48]);\r\n d = II(d, a, b, c, M_offset_7, 10, T[49]);\r\n c = II(c, d, a, b, M_offset_14, 15, T[50]);\r\n b = II(b, c, d, a, M_offset_5, 21, T[51]);\r\n a = II(a, b, c, d, M_offset_12, 6, T[52]);\r\n d = II(d, a, b, c, M_offset_3, 10, T[53]);\r\n c = II(c, d, a, b, M_offset_10, 15, T[54]);\r\n b = II(b, c, d, a, M_offset_1, 21, T[55]);\r\n a = II(a, b, c, d, M_offset_8, 6, T[56]);\r\n d = II(d, a, b, c, M_offset_15, 10, T[57]);\r\n c = II(c, d, a, b, M_offset_6, 15, T[58]);\r\n b = II(b, c, d, a, M_offset_13, 21, T[59]);\r\n a = II(a, b, c, d, M_offset_4, 6, T[60]);\r\n d = II(d, a, b, c, M_offset_11, 10, T[61]);\r\n c = II(c, d, a, b, M_offset_2, 15, T[62]);\r\n b = II(b, c, d, a, M_offset_9, 21, T[63]);\r\n\r\n // Intermediate hash value\r\n H[0] = (H[0] + a) | 0;\r\n H[1] = (H[1] + b) | 0;\r\n H[2] = (H[2] + c) | 0;\r\n H[3] = (H[3] + d) | 0;\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n\r\n var nBitsTotal = this._nDataBytes * 8;\r\n var nBitsLeft = data.sigBytes * 8;\r\n\r\n // Add padding\r\n dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\r\n\r\n var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\r\n var nBitsTotalL = nBitsTotal;\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\r\n (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\r\n );\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\r\n (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\r\n );\r\n\r\n data.sigBytes = (dataWords.length + 1) * 4;\r\n\r\n // Hash final blocks\r\n this._process();\r\n\r\n // Shortcuts\r\n var hash = this._hash;\r\n var H = hash.words;\r\n\r\n // Swap endian\r\n for (var i = 0; i < 4; i++) {\r\n // Shortcut\r\n var H_i = H[i];\r\n\r\n H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\r\n (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\r\n }\r\n\r\n // Return final computed hash\r\n return hash;\r\n },\r\n\r\n clone: function () {\r\n var clone = Hasher.clone.call(this);\r\n clone._hash = this._hash.clone();\r\n\r\n return clone;\r\n }\r\n });\r\n\r\n function FF (a, b, c, d, x, s, t) {\r\n var n = a + ((b & c) | (~b & d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function GG (a, b, c, d, x, s, t) {\r\n var n = a + ((b & d) | (c & ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function HH (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function II (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n /**\r\n * Shortcut function to the hasher's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hash = CryptoJS.MD5('message');\r\n * var hash = CryptoJS.MD5(wordArray);\r\n */\r\n C.MD5 = Hasher._createHelper(MD5);\r\n\r\n /**\r\n * Shortcut function to the HMAC's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n * @param {WordArray|string} key The secret key.\r\n *\r\n * @return {WordArray} The HMAC.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hmac = CryptoJS.HmacMD5(message, key);\r\n */\r\n C.HmacMD5 = Hasher._createHmacHelper(MD5);\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var C_algo = C.algo;\r\n var MD5 = C_algo.MD5;\r\n\r\n /**\r\n * This key derivation function is meant to conform with EVP_BytesToKey.\r\n * www.openssl.org/docs/crypto/EVP_BytesToKey.html\r\n */\r\n var EvpKDF = C_algo.EvpKDF = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\r\n * @property {Hasher} hasher The hash algorithm to use. Default: MD5\r\n * @property {number} iterations The number of iterations to perform. Default: 1\r\n */\r\n cfg: Base.extend({\r\n keySize: 128 / 32,\r\n hasher: MD5,\r\n iterations: 1\r\n }),\r\n\r\n /**\r\n * Initializes a newly created key derivation function.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for the derivation.\r\n *\r\n * @example\r\n *\r\n * var kdf = CryptoJS.algo.EvpKDF.create();\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\r\n */\r\n init: function (cfg) {\r\n this.cfg = this.cfg.extend(cfg);\r\n },\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @example\r\n *\r\n * var key = kdf.compute(password, salt);\r\n */\r\n compute: function (password, salt) {\r\n // Shortcut\r\n var cfg = this.cfg;\r\n\r\n // Init hasher\r\n var hasher = cfg.hasher.create();\r\n\r\n // Initial values\r\n var derivedKey = WordArray.create();\r\n\r\n // Shortcuts\r\n var derivedKeyWords = derivedKey.words;\r\n var keySize = cfg.keySize;\r\n var iterations = cfg.iterations;\r\n\r\n // Generate key\r\n while (derivedKeyWords.length < keySize) {\r\n if (block) {\r\n hasher.update(block);\r\n }\r\n var block = hasher.update(password).finalize(salt);\r\n hasher.reset();\r\n\r\n // Iterations\r\n for (var i = 1; i < iterations; i++) {\r\n block = hasher.finalize(block);\r\n hasher.reset();\r\n }\r\n\r\n derivedKey.concat(block);\r\n }\r\n derivedKey.sigBytes = keySize * 4;\r\n\r\n return derivedKey;\r\n }\r\n });\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n * @param {Object} cfg (Optional) The configuration options to use for this computation.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var key = CryptoJS.EvpKDF(password, salt);\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\r\n */\r\n C.EvpKDF = function (password, salt, cfg) {\r\n return EvpKDF.create(cfg).compute(password, salt);\r\n };\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Cipher core components.\r\n */\r\n CryptoJS.lib.Cipher || (function (undefined) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\r\n var C_enc = C.enc;\r\n var Utf8 = C_enc.Utf8;\r\n var Base64 = C_enc.Base64;\r\n var C_algo = C.algo;\r\n var EvpKDF = C_algo.EvpKDF;\r\n\r\n /**\r\n * Abstract base cipher template.\r\n *\r\n * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\r\n * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\r\n * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\r\n * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\r\n */\r\n var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {WordArray} iv The IV to use for this operation.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Creates this cipher in encryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createEncryptor: function (key, cfg) {\r\n return this.create(this._ENC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Creates this cipher in decryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createDecryptor: function (key, cfg) {\r\n return this.create(this._DEC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Initializes a newly created cipher.\r\n *\r\n * @param {number} xformMode Either the encryption or decryption transormation mode constant.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\r\n */\r\n init: function (xformMode, key, cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Store transform mode and key\r\n this._xformMode = xformMode;\r\n this._key = key;\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this cipher to its initial state.\r\n *\r\n * @example\r\n *\r\n * cipher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-cipher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Adds data to be encrypted or decrypted.\r\n *\r\n * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.process('data');\r\n * var encrypted = cipher.process(wordArray);\r\n */\r\n process: function (dataUpdate) {\r\n // Append\r\n this._append(dataUpdate);\r\n\r\n // Process available blocks\r\n return this._process();\r\n },\r\n\r\n /**\r\n * Finalizes the encryption or decryption process.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after final processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.finalize();\r\n * var encrypted = cipher.finalize('data');\r\n * var encrypted = cipher.finalize(wordArray);\r\n */\r\n finalize: function (dataUpdate) {\r\n // Final data update\r\n if (dataUpdate) {\r\n this._append(dataUpdate);\r\n }\r\n\r\n // Perform concrete-cipher logic\r\n var finalProcessedData = this._doFinalize();\r\n\r\n return finalProcessedData;\r\n },\r\n\r\n keySize: 128 / 32,\r\n\r\n ivSize: 128 / 32,\r\n\r\n _ENC_XFORM_MODE: 1,\r\n\r\n _DEC_XFORM_MODE: 2,\r\n\r\n /**\r\n * Creates shortcut functions to a cipher's object interface.\r\n *\r\n * @param {Cipher} cipher The cipher to create a helper for.\r\n *\r\n * @return {Object} An object with encrypt and decrypt shortcut functions.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\r\n */\r\n _createHelper: (function () {\r\n function selectCipherStrategy (key) {\r\n if (typeof key == 'string') {\r\n return PasswordBasedCipher;\r\n } else {\r\n return SerializableCipher;\r\n }\r\n }\r\n\r\n return function (cipher) {\r\n return {\r\n encrypt: function (message, key, cfg) {\r\n return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\r\n },\r\n\r\n decrypt: function (ciphertext, key, cfg) {\r\n return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\r\n }\r\n };\r\n };\r\n }())\r\n });\r\n\r\n /**\r\n * Abstract base stream cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\r\n */\r\n var StreamCipher = C_lib.StreamCipher = Cipher.extend({\r\n _doFinalize: function () {\r\n // Process partial blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 1\r\n });\r\n\r\n /**\r\n * Mode namespace.\r\n */\r\n var C_mode = C.mode = {};\r\n\r\n /**\r\n * Abstract base block cipher mode template.\r\n */\r\n var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\r\n /**\r\n * Creates this mode for encryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\r\n */\r\n createEncryptor: function (cipher, iv) {\r\n return this.Encryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Creates this mode for decryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\r\n */\r\n createDecryptor: function (cipher, iv) {\r\n return this.Decryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Initializes a newly created mode.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\r\n */\r\n init: function (cipher, iv) {\r\n this._cipher = cipher;\r\n this._iv = iv;\r\n }\r\n });\r\n\r\n /**\r\n * Cipher Block Chaining mode.\r\n */\r\n var CBC = C_mode.CBC = (function () {\r\n /**\r\n * Abstract base CBC mode.\r\n */\r\n var CBC = BlockCipherMode.extend();\r\n\r\n /**\r\n * CBC encryptor.\r\n */\r\n CBC.Encryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // XOR and encrypt\r\n xorBlock.call(this, words, offset, blockSize);\r\n cipher.encryptBlock(words, offset);\r\n\r\n // Remember this block to use with next block\r\n this._prevBlock = words.slice(offset, offset + blockSize);\r\n }\r\n });\r\n\r\n /**\r\n * CBC decryptor.\r\n */\r\n CBC.Decryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // Remember this block to use with next block\r\n var thisBlock = words.slice(offset, offset + blockSize);\r\n\r\n // Decrypt and XOR\r\n cipher.decryptBlock(words, offset);\r\n xorBlock.call(this, words, offset, blockSize);\r\n\r\n // This block becomes the previous block\r\n this._prevBlock = thisBlock;\r\n }\r\n });\r\n\r\n function xorBlock (words, offset, blockSize) {\r\n // Shortcut\r\n var iv = this._iv;\r\n\r\n // Choose mixing block\r\n if (iv) {\r\n var block = iv;\r\n\r\n // Remove IV for subsequent blocks\r\n this._iv = undefined;\r\n } else {\r\n var block = this._prevBlock;\r\n }\r\n\r\n // XOR blocks\r\n for (var i = 0; i < blockSize; i++) {\r\n words[offset + i] ^= block[i];\r\n }\r\n }\r\n\r\n return CBC;\r\n }());\r\n\r\n /**\r\n * Padding namespace.\r\n */\r\n var C_pad = C.pad = {};\r\n\r\n /**\r\n * PKCS #5/7 padding strategy.\r\n */\r\n var Pkcs7 = C_pad.Pkcs7 = {\r\n /**\r\n * Pads data using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to pad.\r\n * @param {number} blockSize The multiple that the data should be padded to.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\r\n */\r\n pad: function (data, blockSize) {\r\n // Shortcut\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count padding bytes\r\n var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\r\n\r\n // Create padding word\r\n var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\r\n\r\n // Create padding\r\n var paddingWords = [];\r\n for (var i = 0; i < nPaddingBytes; i += 4) {\r\n paddingWords.push(paddingWord);\r\n }\r\n var padding = WordArray.create(paddingWords, nPaddingBytes);\r\n\r\n // Add padding\r\n data.concat(padding);\r\n },\r\n\r\n /**\r\n * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to unpad.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.unpad(wordArray);\r\n */\r\n unpad: function (data) {\r\n // Get number of padding bytes from last byte\r\n var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\r\n\r\n // Remove padding\r\n data.sigBytes -= nPaddingBytes;\r\n }\r\n };\r\n\r\n /**\r\n * Abstract base block cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\r\n */\r\n var BlockCipher = C_lib.BlockCipher = Cipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Mode} mode The block mode to use. Default: CBC\r\n * @property {Padding} padding The padding strategy to use. Default: Pkcs7\r\n */\r\n cfg: Cipher.cfg.extend({\r\n mode: CBC,\r\n padding: Pkcs7\r\n }),\r\n\r\n reset: function () {\r\n // Reset cipher\r\n Cipher.reset.call(this);\r\n\r\n // Shortcuts\r\n var cfg = this.cfg;\r\n var iv = cfg.iv;\r\n var mode = cfg.mode;\r\n\r\n // Reset block mode\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n var modeCreator = mode.createEncryptor;\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n var modeCreator = mode.createDecryptor;\r\n\r\n // Keep at least one block in the buffer for unpadding\r\n this._minBufferSize = 1;\r\n }\r\n this._mode = modeCreator.call(mode, this, iv && iv.words);\r\n },\r\n\r\n _doProcessBlock: function (words, offset) {\r\n this._mode.processBlock(words, offset);\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcut\r\n var padding = this.cfg.padding;\r\n\r\n // Finalize\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n // Pad data\r\n padding.pad(this._data, this.blockSize);\r\n\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n // Unpad data\r\n padding.unpad(finalProcessedBlocks);\r\n }\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 128 / 32\r\n });\r\n\r\n /**\r\n * A collection of cipher parameters.\r\n *\r\n * @property {WordArray} ciphertext The raw ciphertext.\r\n * @property {WordArray} key The key to this ciphertext.\r\n * @property {WordArray} iv The IV used in the ciphering operation.\r\n * @property {WordArray} salt The salt used with a key derivation function.\r\n * @property {Cipher} algorithm The cipher algorithm.\r\n * @property {Mode} mode The block mode used in the ciphering operation.\r\n * @property {Padding} padding The padding scheme used in the ciphering operation.\r\n * @property {number} blockSize The block size of the cipher.\r\n * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\r\n */\r\n var CipherParams = C_lib.CipherParams = Base.extend({\r\n /**\r\n * Initializes a newly created cipher params object.\r\n *\r\n * @param {Object} cipherParams An object with any of the possible cipher parameters.\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.lib.CipherParams.create({\r\n * ciphertext: ciphertextWordArray,\r\n * key: keyWordArray,\r\n * iv: ivWordArray,\r\n * salt: saltWordArray,\r\n * algorithm: CryptoJS.algo.AES,\r\n * mode: CryptoJS.mode.CBC,\r\n * padding: CryptoJS.pad.PKCS7,\r\n * blockSize: 4,\r\n * formatter: CryptoJS.format.OpenSSL\r\n * });\r\n */\r\n init: function (cipherParams) {\r\n this.mixIn(cipherParams);\r\n },\r\n\r\n /**\r\n * Converts this cipher params object to a string.\r\n *\r\n * @param {Format} formatter (Optional) The formatting strategy to use.\r\n *\r\n * @return {string} The stringified cipher params.\r\n *\r\n * @throws Error If neither the formatter nor the default formatter is set.\r\n *\r\n * @example\r\n *\r\n * var string = cipherParams + '';\r\n * var string = cipherParams.toString();\r\n * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\r\n */\r\n toString: function (formatter) {\r\n return (formatter || this.formatter).stringify(this);\r\n }\r\n });\r\n\r\n /**\r\n * Format namespace.\r\n */\r\n var C_format = C.format = {};\r\n\r\n /**\r\n * OpenSSL formatting strategy.\r\n */\r\n var OpenSSLFormatter = C_format.OpenSSL = {\r\n /**\r\n * Converts a cipher params object to an OpenSSL-compatible string.\r\n *\r\n * @param {CipherParams} cipherParams The cipher params object.\r\n *\r\n * @return {string} The OpenSSL-compatible string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\r\n */\r\n stringify: function (cipherParams) {\r\n // Shortcuts\r\n var ciphertext = cipherParams.ciphertext;\r\n var salt = cipherParams.salt;\r\n\r\n // Format\r\n if (salt) {\r\n var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\r\n } else {\r\n var wordArray = ciphertext;\r\n }\r\n\r\n return wordArray.toString(Base64);\r\n },\r\n\r\n /**\r\n * Converts an OpenSSL-compatible string to a cipher params object.\r\n *\r\n * @param {string} openSSLStr The OpenSSL-compatible string.\r\n *\r\n * @return {CipherParams} The cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\r\n */\r\n parse: function (openSSLStr) {\r\n // Parse base64\r\n var ciphertext = Base64.parse(openSSLStr);\r\n\r\n // Shortcut\r\n var ciphertextWords = ciphertext.words;\r\n\r\n // Test for salt\r\n if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\r\n // Extract salt\r\n var salt = WordArray.create(ciphertextWords.slice(2, 4));\r\n\r\n // Remove salt from ciphertext\r\n ciphertextWords.splice(0, 4);\r\n ciphertext.sigBytes -= 16;\r\n }\r\n\r\n return CipherParams.create({ciphertext: ciphertext, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A cipher wrapper that returns ciphertext as a serializable cipher params object.\r\n */\r\n var SerializableCipher = C_lib.SerializableCipher = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\r\n */\r\n cfg: Base.extend({\r\n format: OpenSSLFormatter\r\n }),\r\n\r\n /**\r\n * Encrypts a message.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Encrypt\r\n var encryptor = cipher.createEncryptor(key, cfg);\r\n var ciphertext = encryptor.finalize(message);\r\n\r\n // Shortcut\r\n var cipherCfg = encryptor.cfg;\r\n\r\n // Create and return serializable cipher params\r\n return CipherParams.create({\r\n ciphertext: ciphertext,\r\n key: key,\r\n iv: cipherCfg.iv,\r\n algorithm: cipher,\r\n mode: cipherCfg.mode,\r\n padding: cipherCfg.padding,\r\n blockSize: cipher.blockSize,\r\n formatter: cfg.format\r\n });\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Decrypt\r\n var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\r\n\r\n return plaintext;\r\n },\r\n\r\n /**\r\n * Converts serialized ciphertext to CipherParams,\r\n * else assumed CipherParams already and returns ciphertext unchanged.\r\n *\r\n * @param {CipherParams|string} ciphertext The ciphertext.\r\n * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\r\n *\r\n * @return {CipherParams} The unserialized ciphertext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\r\n */\r\n _parse: function (ciphertext, format) {\r\n if (typeof ciphertext == 'string') {\r\n return format.parse(ciphertext, this);\r\n } else {\r\n return ciphertext;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Key derivation function namespace.\r\n */\r\n var C_kdf = C.kdf = {};\r\n\r\n /**\r\n * OpenSSL key derivation function.\r\n */\r\n var OpenSSLKdf = C_kdf.OpenSSL = {\r\n /**\r\n * Derives a key and IV from a password.\r\n *\r\n * @param {string} password The password to derive from.\r\n * @param {number} keySize The size in words of the key to generate.\r\n * @param {number} ivSize The size in words of the IV to generate.\r\n * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\r\n *\r\n * @return {CipherParams} A cipher params object with the key, IV, and salt.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\r\n */\r\n execute: function (password, keySize, ivSize, salt) {\r\n // Generate random salt\r\n if (!salt) {\r\n salt = WordArray.random(64 / 8);\r\n }\r\n\r\n // Derive key and IV\r\n var key = EvpKDF.create({keySize: keySize + ivSize}).compute(password, salt);\r\n\r\n // Separate key and IV\r\n var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\r\n key.sigBytes = keySize * 4;\r\n\r\n // Return params\r\n return CipherParams.create({key: key, iv: iv, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A serializable cipher wrapper that derives the key from a password,\r\n * and returns ciphertext as a serializable cipher params object.\r\n */\r\n var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\r\n */\r\n cfg: SerializableCipher.cfg.extend({\r\n kdf: OpenSSLKdf\r\n }),\r\n\r\n /**\r\n * Encrypts a message using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Encrypt\r\n var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\r\n\r\n // Mix in derived params\r\n ciphertext.mixIn(derivedParams);\r\n\r\n return ciphertext;\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Decrypt\r\n var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\r\n\r\n return plaintext;\r\n }\r\n });\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Electronic Codebook block mode.\r\n */\r\n CryptoJS.mode.ECB = (function () {\r\n var ECB = CryptoJS.lib.BlockCipherMode.extend();\r\n\r\n ECB.Encryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.encryptBlock(words, offset);\r\n }\r\n });\r\n\r\n ECB.Decryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.decryptBlock(words, offset);\r\n }\r\n });\r\n\r\n return ECB;\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var BlockCipher = C_lib.BlockCipher;\r\n var C_algo = C.algo;\r\n\r\n // Lookup tables\r\n var SBOX = [];\r\n var INV_SBOX = [];\r\n var SUB_MIX_0 = [];\r\n var SUB_MIX_1 = [];\r\n var SUB_MIX_2 = [];\r\n var SUB_MIX_3 = [];\r\n var INV_SUB_MIX_0 = [];\r\n var INV_SUB_MIX_1 = [];\r\n var INV_SUB_MIX_2 = [];\r\n var INV_SUB_MIX_3 = [];\r\n\r\n // Compute lookup tables\r\n (function () {\r\n // Compute double table\r\n var d = [];\r\n for (var i = 0; i < 256; i++) {\r\n if (i < 128) {\r\n d[i] = i << 1;\r\n } else {\r\n d[i] = (i << 1) ^ 0x11b;\r\n }\r\n }\r\n\r\n // Walk GF(2^8)\r\n var x = 0;\r\n var xi = 0;\r\n for (var i = 0; i < 256; i++) {\r\n // Compute sbox\r\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\r\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\r\n SBOX[x] = sx;\r\n INV_SBOX[sx] = x;\r\n\r\n // Compute multiplication\r\n var x2 = d[x];\r\n var x4 = d[x2];\r\n var x8 = d[x4];\r\n\r\n // Compute sub bytes, mix columns tables\r\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\r\n SUB_MIX_0[x] = (t << 24) | (t >>> 8);\r\n SUB_MIX_1[x] = (t << 16) | (t >>> 16);\r\n SUB_MIX_2[x] = (t << 8) | (t >>> 24);\r\n SUB_MIX_3[x] = t;\r\n\r\n // Compute inv sub bytes, inv mix columns tables\r\n var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\r\n INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\r\n INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\r\n INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\r\n INV_SUB_MIX_3[sx] = t;\r\n\r\n // Compute next counter\r\n if (!x) {\r\n x = xi = 1;\r\n } else {\r\n x = x2 ^ d[d[d[x8 ^ x2]]];\r\n xi ^= d[d[xi]];\r\n }\r\n }\r\n }());\r\n\r\n // Precomputed Rcon lookup\r\n var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\r\n\r\n /**\r\n * AES block cipher algorithm.\r\n */\r\n var AES = C_algo.AES = BlockCipher.extend({\r\n _doReset: function () {\r\n // Shortcuts\r\n var key = this._key;\r\n var keyWords = key.words;\r\n var keySize = key.sigBytes / 4;\r\n\r\n // Compute number of rounds\r\n var nRounds = this._nRounds = keySize + 6;\r\n\r\n // Compute number of key schedule rows\r\n var ksRows = (nRounds + 1) * 4;\r\n\r\n // Compute key schedule\r\n var keySchedule = this._keySchedule = [];\r\n for (var ksRow = 0; ksRow < ksRows; ksRow++) {\r\n if (ksRow < keySize) {\r\n keySchedule[ksRow] = keyWords[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 1];\r\n\r\n if (!(ksRow % keySize)) {\r\n // Rot word\r\n t = (t << 8) | (t >>> 24);\r\n\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n\r\n // Mix Rcon\r\n t ^= RCON[(ksRow / keySize) | 0] << 24;\r\n } else if (keySize > 6 && ksRow % keySize == 4) {\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n }\r\n\r\n keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\r\n }\r\n }\r\n\r\n // Compute inv key schedule\r\n var invKeySchedule = this._invKeySchedule = [];\r\n for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\r\n var ksRow = ksRows - invKsRow;\r\n\r\n if (invKsRow % 4) {\r\n var t = keySchedule[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 4];\r\n }\r\n\r\n if (invKsRow < 4 || ksRow <= 4) {\r\n invKeySchedule[invKsRow] = t;\r\n } else {\r\n invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\r\n INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\r\n }\r\n }\r\n },\r\n\r\n encryptBlock: function (M, offset) {\r\n this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\r\n },\r\n\r\n decryptBlock: function (M, offset) {\r\n // Swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n\r\n this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\r\n\r\n // Inv swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n },\r\n\r\n _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\r\n // Shortcut\r\n var nRounds = this._nRounds;\r\n\r\n // Get input, add round key\r\n var s0 = M[offset] ^ keySchedule[0];\r\n var s1 = M[offset + 1] ^ keySchedule[1];\r\n var s2 = M[offset + 2] ^ keySchedule[2];\r\n var s3 = M[offset + 3] ^ keySchedule[3];\r\n\r\n // Key schedule row counter\r\n var ksRow = 4;\r\n\r\n // Rounds\r\n for (var round = 1; round < nRounds; round++) {\r\n // Shift rows, sub bytes, mix columns, add round key\r\n var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\r\n var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\r\n var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\r\n var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\r\n\r\n // Update state\r\n s0 = t0;\r\n s1 = t1;\r\n s2 = t2;\r\n s3 = t3;\r\n }\r\n\r\n // Shift rows, sub bytes, add round key\r\n var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\r\n var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\r\n var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\r\n var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\r\n\r\n // Set output\r\n M[offset] = t0;\r\n M[offset + 1] = t1;\r\n M[offset + 2] = t2;\r\n M[offset + 3] = t3;\r\n },\r\n\r\n keySize: 256 / 32\r\n });\r\n\r\n /**\r\n * Shortcut functions to the cipher's object interface.\r\n *\r\n * @example\r\n *\r\n * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\r\n * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\r\n */\r\n C.AES = BlockCipher._createHelper(AES);\r\n }());\r\n\r\n\r\n _.extend(BI, {\r\n /**\r\n * aes加密方法\r\n * aes-128-ecb\r\n *\r\n * @example\r\n *\r\n * var ciphertext = BI.aesEncrypt(text, key);\r\n */\r\n aesEncrypt: function (text, key) {\r\n key = CryptoJS.enc.Utf8.parse(key);\r\n var cipher = CryptoJS.AES.encrypt(text, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n\r\n var base64Cipher = cipher.ciphertext.toString(CryptoJS.enc.Base64);\r\n return base64Cipher;\r\n }\r\n });\r\n}());!(function () {\r\n function aspect (type) {\r\n return function (target, methodName, advice) {\r\n var exist = target[methodName],\r\n dispatcher;\r\n\r\n if (!exist || exist.target != target) {\r\n dispatcher = target[methodName] = function () {\r\n // before methods\r\n var beforeArr = dispatcher.before;\r\n var args = arguments, next;\r\n for (var l = beforeArr.length; l--;) {\r\n next = beforeArr[l].advice.apply(this, args);\r\n if (next === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n // target method\r\n var rs = dispatcher.method.apply(this, args);\r\n // after methods\r\n var afterArr = dispatcher.after;\r\n for (var i = 0, ii = afterArr.length; i < ii; i++) {\r\n next = afterArr[i].advice.call(this, rs, args);\r\n if (rs === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n return rs;\r\n };\r\n\r\n dispatcher.before = [];\r\n dispatcher.after = [];\r\n\r\n if (exist) {\r\n dispatcher.method = exist;\r\n }\r\n dispatcher.target = target;\r\n }\r\n\r\n var aspectArr = (dispatcher || exist)[type];\r\n var obj = {\r\n advice: advice,\r\n _index: aspectArr.length,\r\n remove: function () {\r\n aspectArr.splice(this._index, 1);\r\n }\r\n };\r\n aspectArr.push(obj);\r\n\r\n return obj;\r\n };\r\n }\r\n\r\n BI.aspect = {\r\n before: aspect(\"before\"),\r\n after: aspect(\"after\")\r\n };\r\n\r\n return BI.aspect;\r\n\r\n})();\r\n!(function () {\r\n\r\n var _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\r\n\r\n\r\n // private method for UTF-8 encoding\r\n var _utf8_encode = function (string) {\r\n string = string.replace(/\\r\\n/g, \"\\n\");\r\n var utftext = \"\";\r\n\r\n for (var n = 0; n < string.length; n++) {\r\n\r\n var c = string.charCodeAt(n);\r\n\r\n if (c < 128) {\r\n utftext += String.fromCharCode(c);\r\n } else if ((c > 127) && (c < 2048)) {\r\n utftext += String.fromCharCode((c >> 6) | 192);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n } else {\r\n utftext += String.fromCharCode((c >> 12) | 224);\r\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n }\r\n\r\n }\r\n\r\n return utftext;\r\n };\r\n\r\n // private method for UTF-8 decoding\r\n var _utf8_decode = function (utftext) {\r\n var string = \"\";\r\n var i = 0;\r\n var c = 0, c3 = 0, c2 = 0;\r\n\r\n while (i < utftext.length) {\r\n\r\n c = utftext.charCodeAt(i);\r\n\r\n if (c < 128) {\r\n string += String.fromCharCode(c);\r\n i++;\r\n } else if ((c > 191) && (c < 224)) {\r\n c2 = utftext.charCodeAt(i + 1);\r\n string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\r\n i += 2;\r\n } else {\r\n c2 = utftext.charCodeAt(i + 1);\r\n c3 = utftext.charCodeAt(i + 2);\r\n string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\r\n i += 3;\r\n }\r\n\r\n }\r\n return string;\r\n };\r\n\r\n _.extend(BI, {\r\n\r\n encode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = _utf8_encode(input);\r\n\r\n while (i < input.length) {\r\n\r\n chr1 = input.charCodeAt(i++);\r\n chr2 = input.charCodeAt(i++);\r\n chr3 = input.charCodeAt(i++);\r\n\r\n enc1 = chr1 >> 2;\r\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\r\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\r\n enc4 = chr3 & 63;\r\n\r\n if (isNaN(chr2)) {\r\n enc3 = enc4 = 64;\r\n } else if (isNaN(chr3)) {\r\n enc4 = 64;\r\n }\r\n\r\n output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\r\n\r\n }\r\n\r\n return output;\r\n },\r\n\r\n // public method for decoding\r\n decode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3;\r\n var enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\r\n\r\n while (i < input.length) {\r\n\r\n enc1 = _keyStr.indexOf(input.charAt(i++));\r\n enc2 = _keyStr.indexOf(input.charAt(i++));\r\n enc3 = _keyStr.indexOf(input.charAt(i++));\r\n enc4 = _keyStr.indexOf(input.charAt(i++));\r\n\r\n chr1 = (enc1 << 2) | (enc2 >> 4);\r\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\r\n chr3 = ((enc3 & 3) << 6) | enc4;\r\n\r\n output = output + String.fromCharCode(chr1);\r\n\r\n if (enc3 != 64) {\r\n output = output + String.fromCharCode(chr2);\r\n }\r\n if (enc4 != 64) {\r\n output = output + String.fromCharCode(chr3);\r\n }\r\n\r\n }\r\n\r\n output = _utf8_decode(output);\r\n\r\n return output;\r\n\r\n }\r\n });\r\n})();\r\nBI.Cache = {\r\n _prefix: \"bi\",\r\n setUsername: function (username) {\r\n localStorage.setItem(BI.Cache._prefix + \".username\", (username + \"\" || \"\").toUpperCase());\r\n },\r\n getUsername: function () {\r\n return localStorage.getItem(BI.Cache._prefix + \".username\") || \"\";\r\n },\r\n _getKeyPrefix: function () {\r\n return BI.Cache.getUsername() + \".\" + BI.Cache._prefix + \".\";\r\n },\r\n _generateKey: function (key) {\r\n return BI.Cache._getKeyPrefix() + (key || \"\");\r\n },\r\n getItem: function (key) {\r\n return localStorage.getItem(BI.Cache._generateKey(key));\r\n },\r\n setItem: function (key, value) {\r\n localStorage.setItem(BI.Cache._generateKey(key), value);\r\n },\r\n removeItem: function (key) {\r\n localStorage.removeItem(BI.Cache._generateKey(key));\r\n },\r\n clear: function () {\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n if (key.indexOf(BI.Cache._getKeyPrefix()) === 0) {\r\n localStorage.removeItem(key);\r\n }\r\n }\r\n }\r\n },\r\n keys: function () {\r\n var result = [];\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n var prefix = BI.Cache._getKeyPrefix();\r\n if (key.indexOf(prefix) === 0) {\r\n result[result.length] = key.substring(prefix.length);\r\n }\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n addCookie: function (name, value, path, expiresHours) {\r\n var cookieString = name + \"=\" + escape(value);\r\n // 判断是否设置过期时间\r\n if (expiresHours && expiresHours > 0) {\r\n var date = new Date();\r\n // expires是标准GMT格式时间,应该使用时间戳作为起始时间\r\n date.setTime(date.getTime() + expiresHours * 3600 * 1000);\r\n cookieString = cookieString + \"; expires=\" + date.toUTCString();\r\n }\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n },\r\n getCookie: function (name) {\r\n var arr, reg = new RegExp(\"(^| )\" + name + \"=([^;]*)(;|$)\");\r\n if (arr = document.cookie.match(reg)) {return unescape(arr[2]);}\r\n return null;\r\n },\r\n deleteCookie: function (name, path) {\r\n var date = new Date();\r\n date.setTime(date.getTime() - 10000);\r\n var cookieString = name + \"=v; expires=\" + date.toUTCString();\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n }\r\n};BI.CellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize) {\r\n this._cellSizeGetter = cellSizeGetter;\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n this._cellSizeAndPositionData = {};\r\n this._lastMeasuredIndex = -1;\r\n};\r\n\r\nBI.CellSizeAndPositionManager.prototype = {\r\n constructor: BI.CellSizeAndPositionManager,\r\n configure: function (cellCount, estimatedCellSize) {\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellCount;\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._estimatedCellSize;\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._lastMeasuredIndex;\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n if (index < 0 || index >= this._cellCount) {\r\n return;\r\n }\r\n if (index > this._lastMeasuredIndex) {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\r\n\r\n for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {\r\n var size = this._cellSizeGetter(i);\r\n\r\n if (size == null || isNaN(size)) {\r\n continue;\r\n }\r\n\r\n this._cellSizeAndPositionData[i] = {\r\n offset: offset,\r\n size: size\r\n };\r\n\r\n offset += size;\r\n }\r\n\r\n this._lastMeasuredIndex = index;\r\n }\r\n return this._cellSizeAndPositionData[index];\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._lastMeasuredIndex >= 0\r\n ? this._cellSizeAndPositionData[this._lastMeasuredIndex]\r\n : {\r\n offset: 0,\r\n size: 0\r\n };\r\n },\r\n\r\n getTotalSize: function () {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n return lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n var datum = this.getSizeAndPositionOfCell(targetIndex);\r\n var maxOffset = datum.offset;\r\n var minOffset = maxOffset - containerSize + datum.size;\r\n\r\n var idealOffset;\r\n\r\n switch (align) {\r\n case \"start\":\r\n idealOffset = maxOffset;\r\n break;\r\n case \"end\":\r\n idealOffset = minOffset;\r\n break;\r\n case \"center\":\r\n idealOffset = maxOffset - ((containerSize - datum.size) / 2);\r\n break;\r\n default:\r\n idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));\r\n break;\r\n }\r\n\r\n var totalSize = this.getTotalSize();\r\n\r\n return Math.max(0, Math.min(totalSize - containerSize, idealOffset));\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n var totalSize = this.getTotalSize();\r\n\r\n if (totalSize === 0) {\r\n return {};\r\n }\r\n\r\n var maxOffset = offset + containerSize;\r\n var start = this._findNearestCell(offset);\r\n\r\n var datum = this.getSizeAndPositionOfCell(start);\r\n offset = datum.offset + datum.size;\r\n\r\n var stop = start;\r\n\r\n while (offset < maxOffset && stop < this._cellCount - 1) {\r\n stop++;\r\n offset += this.getSizeAndPositionOfCell(stop).size;\r\n }\r\n\r\n return {\r\n start: start,\r\n stop: stop\r\n };\r\n },\r\n\r\n resetCell: function (index) {\r\n this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);\r\n },\r\n\r\n _binarySearch: function (high, low, offset) {\r\n var middle;\r\n var currentOffset;\r\n\r\n while (low <= high) {\r\n middle = low + Math.floor((high - low) / 2);\r\n currentOffset = this.getSizeAndPositionOfCell(middle).offset;\r\n\r\n if (currentOffset === offset) {\r\n return middle;\r\n } else if (currentOffset < offset) {\r\n low = middle + 1;\r\n } else if (currentOffset > offset) {\r\n high = middle - 1;\r\n }\r\n }\r\n\r\n if (low > 0) {\r\n return low - 1;\r\n }\r\n },\r\n\r\n _exponentialSearch: function (index, offset) {\r\n var interval = 1;\r\n\r\n while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {\r\n index += interval;\r\n interval *= 2;\r\n }\r\n\r\n return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);\r\n },\r\n\r\n _findNearestCell: function (offset) {\r\n if (isNaN(offset)) {\r\n return;\r\n }\r\n\r\n offset = Math.max(0, offset);\r\n\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);\r\n\r\n if (lastMeasuredCellSizeAndPosition.offset >= offset) {\r\n return this._binarySearch(lastMeasuredIndex, 0, offset);\r\n }\r\n return this._exponentialSearch(lastMeasuredIndex, offset);\r\n \r\n }\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize, maxScrollSize) {\r\n this._cellSizeAndPositionManager = new BI.CellSizeAndPositionManager(cellCount, cellSizeGetter, estimatedCellSize);\r\n this._maxScrollSize = maxScrollSize || 10000000;\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager.prototype = {\r\n constructor: BI.ScalingCellSizeAndPositionManager,\r\n\r\n configure: function () {\r\n this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager, arguments);\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellSizeAndPositionManager.getCellCount();\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._cellSizeAndPositionManager.getEstimatedCellSize();\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._cellSizeAndPositionManager.getLastMeasuredIndex();\r\n },\r\n\r\n getOffsetAdjustment: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - totalSize));\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();\r\n },\r\n\r\n getTotalSize: function () {\r\n return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n currentOffset = this._safeOffsetToOffset(containerSize, currentOffset);\r\n\r\n var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(align, containerSize, currentOffset, targetIndex);\r\n\r\n return this._offsetToSafeOffset(containerSize, offset);\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n offset = this._safeOffsetToOffset(containerSize, offset);\r\n\r\n return this._cellSizeAndPositionManager.getVisibleCellRange(containerSize, offset);\r\n },\r\n\r\n resetCell: function (index) {\r\n this._cellSizeAndPositionManager.resetCell(index);\r\n },\r\n\r\n _getOffsetPercentage: function (containerSize, offset, totalSize) {\r\n return totalSize <= containerSize\r\n ? 0\r\n : offset / (totalSize - containerSize);\r\n },\r\n\r\n _offsetToSafeOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, totalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - containerSize));\r\n \r\n },\r\n\r\n _safeOffsetToOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (totalSize - containerSize));\r\n \r\n }\r\n};/**\r\n * 汉字拼音索引\r\n */\r\n\r\n!(function () {\r\n var _ChineseFirstPY = \"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHL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"DZ\",\r\n 19975: \"WM\",\r\n 19988: \"QJ\",\r\n 20048: \"YL\",\r\n 20056: \"SC\",\r\n 20060: \"NM\",\r\n 20094: \"QG\",\r\n 20127: \"QJ\",\r\n 20167: \"QC\",\r\n 20193: \"YG\",\r\n 20250: \"KH\",\r\n 20256: \"ZC\",\r\n 20282: \"SC\",\r\n 20285: \"QJG\",\r\n 20291: \"TD\",\r\n 20314: \"YD\",\r\n 20315: \"BF\",\r\n 20340: \"NE\",\r\n 20375: \"TD\",\r\n 20389: \"YJ\",\r\n 20391: \"CZ\",\r\n 20415: \"PB\",\r\n 20446: \"YS\",\r\n 20447: \"SQ\",\r\n 20504: \"TC\",\r\n 20608: \"KG\",\r\n 20854: \"QJ\",\r\n 20857: \"ZC\",\r\n 20911: \"PF\",\r\n 20985: \"AW\",\r\n 21032: \"PB\",\r\n 21048: \"XQ\",\r\n 21049: \"SC\",\r\n 21089: \"YS\",\r\n 21119: \"JC\",\r\n 21242: \"SB\",\r\n 21273: \"SC\",\r\n 21305: \"YP\",\r\n 21306: \"QO\",\r\n 21330: \"ZC\",\r\n 21333: \"SDC\",\r\n 21345: \"QK\",\r\n 21378: \"CA\",\r\n 21397: \"SC\",\r\n 21414: \"XS\",\r\n 21442: \"SC\",\r\n 21477: \"JG\",\r\n 21480: \"TD\",\r\n 21484: \"ZS\",\r\n 21494: \"YX\",\r\n 21505: \"YX\",\r\n 21512: \"HG\",\r\n 21523: \"XH\",\r\n 21537: \"PB\",\r\n 21542: \"PF\",\r\n 21549: \"KH\",\r\n 21571: \"E\",\r\n 21574: \"DA\",\r\n 21588: \"TD\",\r\n 21589: \"O\",\r\n 21618: \"ZC\",\r\n 21621: \"KHA\",\r\n 21632: \"ZJ\",\r\n 21654: \"KG\",\r\n 21679: \"LKG\",\r\n 21683: \"KH\",\r\n 21710: \"A\",\r\n 21719: \"YH\",\r\n 21734: \"WOE\",\r\n 21769: \"A\",\r\n 21780: \"WN\",\r\n 21804: \"XH\",\r\n 21834: \"A\",\r\n 21899: \"ZD\",\r\n 21903: \"RN\",\r\n 21908: \"WO\",\r\n 21939: \"ZC\",\r\n 21956: \"SA\",\r\n 21964: \"YA\",\r\n 21970: \"TD\",\r\n 22003: \"A\",\r\n 22031: \"JG\",\r\n 22040: \"XS\",\r\n 22060: \"ZC\",\r\n 22066: \"ZC\",\r\n 22079: \"MH\",\r\n 22129: \"XJ\",\r\n 22179: \"XA\",\r\n 22237: \"NJ\",\r\n 22244: \"TD\",\r\n 22280: \"JQ\",\r\n 22300: \"YH\",\r\n 22313: \"XW\",\r\n 22331: \"YQ\",\r\n 22343: \"YJ\",\r\n 22351: \"PH\",\r\n 22395: \"DC\",\r\n 22412: \"TD\",\r\n 22484: \"PB\",\r\n 22500: \"PB\",\r\n 22534: \"ZD\",\r\n 22549: \"DH\",\r\n 22561: \"PB\",\r\n 22612: \"TD\",\r\n 22771: \"KQ\",\r\n 22831: \"HB\",\r\n 22841: \"JG\",\r\n 22855: \"QJ\",\r\n 22865: \"XQ\",\r\n 23013: \"ML\",\r\n 23081: \"WM\",\r\n 23487: \"SX\",\r\n 23558: \"QJ\",\r\n 23561: \"YW\",\r\n 23586: \"YW\",\r\n 23614: \"YW\",\r\n 23615: \"SN\",\r\n 23631: \"PB\",\r\n 23646: \"ZS\",\r\n 23663: \"ZT\",\r\n 23673: \"YG\",\r\n 23762: \"TD\",\r\n 23769: \"ZS\",\r\n 23780: \"QJ\",\r\n 23884: \"QK\",\r\n 24055: \"XH\",\r\n 24113: \"DC\",\r\n 24162: \"ZC\",\r\n 24191: \"GA\",\r\n 24273: \"QJ\",\r\n 24324: \"NL\",\r\n 24377: \"TD\",\r\n 24378: \"QJ\",\r\n 24439: \"PF\",\r\n 24554: \"ZS\",\r\n 24683: \"TD\",\r\n 24694: \"WE\",\r\n 24733: \"LK\",\r\n 24925: \"TN\",\r\n 25094: \"ZG\",\r\n 25100: \"XQ\",\r\n 25103: \"XH\",\r\n 25153: \"PB\",\r\n 25170: \"PB\",\r\n 25179: \"KG\",\r\n 25203: \"PB\",\r\n 25240: \"ZS\",\r\n 25282: \"FB\",\r\n 25303: \"NA\",\r\n 25324: \"KG\",\r\n 25341: \"ZY\",\r\n 25373: \"WZ\",\r\n 25375: \"XJ\",\r\n 25384: \"A\",\r\n 25457: \"A\",\r\n 25528: \"SD\",\r\n 25530: \"SC\",\r\n 25552: \"TD\",\r\n 25774: \"ZC\",\r\n 25874: \"ZC\",\r\n 26044: \"YW\",\r\n 26080: \"WM\",\r\n 26292: \"PB\",\r\n 26333: \"PB\",\r\n 26355: \"ZY\",\r\n 26366: \"CZ\",\r\n 26397: \"ZC\",\r\n 26399: \"QJ\",\r\n 26415: \"ZS\",\r\n 26451: \"SB\",\r\n 26526: \"ZC\",\r\n 26552: \"JG\",\r\n 26561: \"TD\",\r\n 26588: \"JG\",\r\n 26597: \"CZ\",\r\n 26629: \"ZS\",\r\n 26638: \"YL\",\r\n 26646: \"XQ\",\r\n 26653: \"KG\",\r\n 26657: \"XJ\",\r\n 26727: \"HG\",\r\n 26894: \"ZC\",\r\n 26937: \"ZS\",\r\n 26946: \"ZC\",\r\n 26999: \"KJ\",\r\n 27099: \"KJ\",\r\n 27449: \"YQ\",\r\n 27481: \"XS\",\r\n 27542: \"ZS\",\r\n 27663: \"ZS\",\r\n 27748: \"TS\",\r\n 27784: \"SC\",\r\n 27788: \"ZD\",\r\n 27795: \"TD\",\r\n 27812: \"O\",\r\n 27850: \"PB\",\r\n 27852: \"MB\",\r\n 27895: \"SL\",\r\n 27898: \"PL\",\r\n 27973: \"QJ\",\r\n 27981: \"KH\",\r\n 27986: \"HX\",\r\n 27994: \"XJ\",\r\n 28044: \"YC\",\r\n 28065: \"WG\",\r\n 28177: \"SM\",\r\n 28267: \"QJ\",\r\n 28291: \"KH\",\r\n 28337: \"ZQ\",\r\n 28463: \"TL\",\r\n 28548: \"DC\",\r\n 28601: \"TD\",\r\n 28689: \"PB\",\r\n 28805: \"JG\",\r\n 28820: \"QG\",\r\n 28846: \"PB\",\r\n 28952: \"TD\",\r\n 28975: \"ZC\",\r\n 29100: \"A\",\r\n 29325: \"QJ\",\r\n 29575: \"SL\",\r\n 29602: \"FB\",\r\n 30010: \"TD\",\r\n 30044: \"CX\",\r\n 30058: \"PF\",\r\n 30091: \"YSP\",\r\n 30111: \"YN\",\r\n 30229: \"XJ\",\r\n 30427: \"SC\",\r\n 30465: \"SX\",\r\n 30631: \"YQ\",\r\n 30655: \"QJ\",\r\n 30684: \"QJG\",\r\n 30707: \"SD\",\r\n 30729: \"XH\",\r\n 30796: \"LG\",\r\n 30917: \"PB\",\r\n 31074: \"NM\",\r\n 31085: \"JZ\",\r\n 31109: \"SC\",\r\n 31181: \"ZC\",\r\n 31192: \"MLB\",\r\n 31293: \"JQ\",\r\n 31400: \"YX\",\r\n 31584: \"YJ\",\r\n 31896: \"ZN\",\r\n 31909: \"ZY\",\r\n 31995: \"XJ\",\r\n 32321: \"PF\",\r\n 32327: \"ZY\",\r\n 32418: \"HG\",\r\n 32420: \"XQ\",\r\n 32421: \"HG\",\r\n 32438: \"LG\",\r\n 32473: \"GJ\",\r\n 32488: \"TD\",\r\n 32521: \"QJ\",\r\n 32527: \"PB\",\r\n 32562: \"ZSQ\",\r\n 32564: \"JZ\",\r\n 32735: \"ZD\",\r\n 32793: \"PB\",\r\n 33071: \"PF\",\r\n 33098: \"XL\",\r\n 33100: \"YA\",\r\n 33152: \"PB\",\r\n 33261: \"CX\",\r\n 33324: \"BP\",\r\n 33333: \"TD\",\r\n 33406: \"YA\",\r\n 33426: \"WM\",\r\n 33432: \"PB\",\r\n 33445: \"JG\",\r\n 33486: \"ZN\",\r\n 33493: \"TS\",\r\n 33507: \"QJ\",\r\n 33540: \"QJ\",\r\n 33544: \"ZC\",\r\n 33564: \"XQ\",\r\n 33617: \"YT\",\r\n 33632: \"QJ\",\r\n 33636: \"XH\",\r\n 33637: \"YX\",\r\n 33694: \"WG\",\r\n 33705: \"PF\",\r\n 33728: \"YW\",\r\n 33882: \"SR\",\r\n 34067: \"WM\",\r\n 34074: \"YW\",\r\n 34121: \"QJ\",\r\n 34255: \"ZC\",\r\n 34259: \"XL\",\r\n 34425: \"JH\",\r\n 34430: \"XH\",\r\n 34485: \"KH\",\r\n 34503: \"YS\",\r\n 34532: \"HG\",\r\n 34552: \"XS\",\r\n 34558: \"YE\",\r\n 34593: \"ZL\",\r\n 34660: \"YQ\",\r\n 34892: \"XH\",\r\n 34928: \"SC\",\r\n 34999: \"QJ\",\r\n 35048: \"PB\",\r\n 35059: \"SC\",\r\n 35098: \"ZC\",\r\n 35203: \"TQ\",\r\n 35265: \"JX\",\r\n 35299: \"JX\",\r\n 35782: \"SZ\",\r\n 35828: \"YS\",\r\n 35830: \"E\",\r\n 35843: \"TD\",\r\n 35895: \"YG\",\r\n 35977: \"MH\",\r\n 36158: \"JG\",\r\n 36228: \"QJ\",\r\n 36426: \"XQ\",\r\n 36466: \"DC\",\r\n 36710: \"JC\",\r\n 36711: \"ZYG\",\r\n 36767: \"PB\",\r\n 36866: \"SK\",\r\n 36951: \"YW\",\r\n 37034: \"YX\",\r\n 37063: \"XH\",\r\n 37218: \"ZC\",\r\n 37325: \"ZC\",\r\n 38063: \"PB\",\r\n 38079: \"TD\",\r\n 38085: \"QY\",\r\n 38107: \"DC\",\r\n 38116: \"TD\",\r\n 38123: \"YD\",\r\n 38224: \"HG\",\r\n 38241: \"XTC\",\r\n 38271: \"ZC\",\r\n 38415: \"YE\",\r\n 38426: \"KH\",\r\n 38461: \"YD\",\r\n 38463: \"AE\",\r\n 38466: \"PB\",\r\n 38477: \"XJ\",\r\n 38518: \"YT\",\r\n 38551: \"WK\",\r\n 38585: \"ZC\",\r\n 38704: \"XS\",\r\n 38739: \"LJ\",\r\n 38761: \"GJ\",\r\n 38808: \"SQ\",\r\n 39048: \"JG\",\r\n 39049: \"XJ\",\r\n 39052: \"HG\",\r\n 39076: \"CZ\",\r\n 39271: \"XT\",\r\n 39534: \"TD\",\r\n 39552: \"TD\",\r\n 39584: \"PB\",\r\n 39647: \"SB\",\r\n 39730: \"LG\",\r\n 39748: \"TPB\",\r\n 40109: \"ZQ\",\r\n 40479: \"ND\",\r\n 40516: \"HG\",\r\n 40536: \"HG\",\r\n 40583: \"QJ\",\r\n 40765: \"YQ\",\r\n 40784: \"QJ\",\r\n 40840: \"YK\",\r\n 40863: \"QJG\"\r\n };\r\n\r\n var _checkPYCh = function (ch) {\r\n var uni = ch.charCodeAt(0);\r\n // 如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数\r\n if (uni > 40869 || uni < 19968) {return ch;} // dealWithOthers(ch);\r\n return (oMultiDiff[uni] ? oMultiDiff[uni] : (_ChineseFirstPY.charAt(uni - 19968)));\r\n };\r\n\r\n var _mkPYRslt = function (arr, options) {\r\n var ignoreMulti = options.ignoreMulti;\r\n var splitChar = options.splitChar;\r\n var arrRslt = [\"\"], k, multiLen = 0;\r\n for (var i = 0, len = arr.length; i < len; i++) {\r\n var str = arr[i];\r\n var strlen = str.length;\r\n // 多音字过多的情况下,指数增长会造成浏览器卡死,超过20完全卡死,18勉强能用,考虑到不同性能最好是16或者14\r\n // 超过14个多音字之后,后面的都用第一个拼音\r\n if (strlen == 1 || multiLen > 14 || ignoreMulti) {\r\n var tmpStr = str.substring(0, 1);\r\n for (k = 0; k < arrRslt.length; k++) {\r\n arrRslt[k] += tmpStr;\r\n }\r\n } else {\r\n var tmpArr = arrRslt.slice(0);\r\n arrRslt = [];\r\n multiLen ++;\r\n for (k = 0; k < strlen; k++) {\r\n // 复制一个相同的arrRslt\r\n var tmp = tmpArr.slice(0);\r\n // 把当前字符str[k]添加到每个元素末尾\r\n for (var j = 0; j < tmp.length; j++) {\r\n tmp[j] += str.charAt(k);\r\n }\r\n // 把复制并修改后的数组连接到arrRslt上\r\n arrRslt = arrRslt.concat(tmp);\r\n }\r\n }\r\n }\r\n // BI-56386 这边直接将所有多音字组合拼接是有风险的,因为丢失了每一组的起始索引信息, 外部使用indexOf等方法会造成错位\r\n // 一旦错位就可能认为不符合条件, 但实际上还是有可能符合条件的,故此处以一个无法搜索的不可见字符作为连接\r\n return arrRslt.join(splitChar || \"\").toLowerCase();\r\n };\r\n\r\n _.extend(BI, {\r\n makeFirstPY: function (str, options) {\r\n options = options || {};\r\n if (typeof (str) !== \"string\") {return \"\" + str;}\r\n var arrResult = []; // 保存中间结果的数组\r\n for (var i = 0, len = str.length; i < len; i++) {\r\n // 获得unicode码\r\n var ch = str.charAt(i);\r\n // 检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理\r\n arrResult.push(_checkPYCh(ch));\r\n }\r\n // 处理arrResult,返回所有可能的拼音首字母串数组\r\n return _mkPYRslt(arrResult, options);\r\n }\r\n });\r\n})();!(function () {\r\n var cancelAnimationFrame =\r\n _global.cancelAnimationFrame ||\r\n _global.webkitCancelAnimationFrame ||\r\n _global.mozCancelAnimationFrame ||\r\n _global.oCancelAnimationFrame ||\r\n _global.msCancelAnimationFrame ||\r\n _global.clearTimeout;\r\n\r\n var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout;\r\n\r\n\r\n BI.MouseMoveTracker = function (onMove, onMoveEnd, domNode) {\r\n this._isDragging = false;\r\n this._animationFrameID = null;\r\n this._domNode = domNode;\r\n this._onMove = onMove;\r\n this._onMoveEnd = onMoveEnd;\r\n\r\n this._onMouseMove = BI.bind(this._onMouseMove, this);\r\n this._onMouseUp = BI.bind(this._onMouseUp, this);\r\n this._didMouseMove = BI.bind(this._didMouseMove, this);\r\n };\r\n BI.MouseMoveTracker.prototype = {\r\n constructor: BI.MouseMoveTracker,\r\n captureMouseMoves: function (/* object*/ event) {\r\n if (!this._eventMoveToken && !this._eventUpToken) {\r\n this._eventMoveToken = BI.EventListener.listen(\r\n this._domNode,\r\n \"mousemove\",\r\n this._onMouseMove\r\n );\r\n this._eventUpToken = BI.EventListener.listen(\r\n this._domNode,\r\n \"mouseup\",\r\n this._onMouseUp\r\n );\r\n }\r\n\r\n if (!this._isDragging) {\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n this._isDragging = true;\r\n this._x = event.clientX;\r\n this._y = event.clientY;\r\n }\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n },\r\n\r\n releaseMouseMoves: function () {\r\n if (this._eventMoveToken && this._eventUpToken) {\r\n this._eventMoveToken.remove();\r\n this._eventMoveToken = null;\r\n this._eventUpToken.remove();\r\n this._eventUpToken = null;\r\n }\r\n\r\n if (this._animationFrameID !== null) {\r\n cancelAnimationFrame(this._animationFrameID);\r\n this._animationFrameID = null;\r\n }\r\n\r\n if (this._isDragging) {\r\n this._isDragging = false;\r\n this._x = null;\r\n this._y = null;\r\n }\r\n },\r\n\r\n isDragging: function () /* boolean*/ {\r\n return this._isDragging;\r\n },\r\n\r\n _onMouseMove: function (/* object*/ event) {\r\n var x = event.clientX;\r\n var y = event.clientY;\r\n\r\n this._deltaX += (x - this._x);\r\n this._deltaY += (y - this._y);\r\n\r\n if (this._animationFrameID === null) {\r\n // The mouse may move faster then the animation frame does.\r\n // Use `requestAnimationFrame` to avoid over-updating.\r\n this._animationFrameID =\r\n requestAnimationFrame(this._didMouseMove);\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n },\r\n\r\n _didMouseMove: function () {\r\n this._animationFrameID = null;\r\n this._onMove(this._deltaX, this._deltaY);\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n },\r\n\r\n _onMouseUp: function () {\r\n if (this._animationFrameID) {\r\n this._didMouseMove();\r\n }\r\n this._onMoveEnd();\r\n }\r\n };\r\n})();!(function () {\r\n var PIXEL_STEP = 10;\r\n var LINE_HEIGHT = 40;\r\n var PAGE_HEIGHT = 800;\r\n var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout;\r\n\r\n function normalizeWheel (/* object*/event) /* object*/ {\r\n var sX = 0,\r\n sY = 0,\r\n // spinX, spinY\r\n pX = 0,\r\n pY = 0; // pixelX, pixelY\r\n\r\n // Legacy\r\n if (\"detail\" in event) {\r\n sY = event.detail;\r\n }\r\n if (\"wheelDelta\" in event) {\r\n sY = -event.wheelDelta / 120;\r\n }\r\n if (\"wheelDeltaY\" in event) {\r\n sY = -event.wheelDeltaY / 120;\r\n }\r\n if (\"wheelDeltaX\" in event) {\r\n sX = -event.wheelDeltaX / 120;\r\n }\r\n\r\n // side scrolling on FF with DOMMouseScroll\r\n if (\"axis\" in event && event.axis === event.HORIZONTAL_AXIS) {\r\n sX = sY;\r\n sY = 0;\r\n }\r\n\r\n pX = sX * PIXEL_STEP;\r\n pY = sY * PIXEL_STEP;\r\n\r\n if (\"deltaY\" in event) {\r\n pY = event.deltaY;\r\n }\r\n if (\"deltaX\" in event) {\r\n pX = event.deltaX;\r\n }\r\n\r\n if ((pX || pY) && event.deltaMode) {\r\n if (event.deltaMode === 1) {\r\n // delta in LINE units\r\n pX *= LINE_HEIGHT;\r\n pY *= LINE_HEIGHT;\r\n } else {\r\n // delta in PAGE units\r\n pX *= PAGE_HEIGHT;\r\n pY *= PAGE_HEIGHT;\r\n }\r\n }\r\n\r\n // Fall-back if spin cannot be determined\r\n if (pX && !sX) {\r\n sX = pX < 1 ? -1 : 1;\r\n }\r\n if (pY && !sY) {\r\n sY = pY < 1 ? -1 : 1;\r\n }\r\n\r\n return {\r\n spinX: sX,\r\n spinY: sY,\r\n pixelX: pX,\r\n pixelY: pY\r\n };\r\n }\r\n\r\n BI.WheelHandler = function (onWheel, handleScrollX, handleScrollY, stopPropagation) {\r\n this._animationFrameID = null;\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n this._didWheel = BI.bind(this._didWheel, this);\r\n if (typeof handleScrollX !== \"function\") {\r\n handleScrollX = handleScrollX ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n if (typeof handleScrollY !== \"function\") {\r\n handleScrollY = handleScrollY ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n if (typeof stopPropagation !== \"function\") {\r\n stopPropagation = stopPropagation ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n this._handleScrollX = handleScrollX;\r\n this._handleScrollY = handleScrollY;\r\n this._stopPropagation = stopPropagation;\r\n this._onWheelCallback = onWheel;\r\n this.onWheel = BI.bind(this.onWheel, this);\r\n };\r\n BI.WheelHandler.prototype = {\r\n constructor: BI.WheelHandler,\r\n onWheel: function (/* object*/ event) {\r\n var normalizedEvent = normalizeWheel(event);\r\n var deltaX = this._deltaX + normalizedEvent.pixelX;\r\n var deltaY = this._deltaY + normalizedEvent.pixelY;\r\n var handleScrollX = this._handleScrollX(deltaX, deltaY);\r\n var handleScrollY = this._handleScrollY(deltaY, deltaX);\r\n if (!handleScrollX && !handleScrollY) {\r\n return;\r\n }\r\n\r\n this._deltaX += handleScrollX ? normalizedEvent.pixelX : 0;\r\n this._deltaY += handleScrollY ? normalizedEvent.pixelY : 0;\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n\r\n var changed;\r\n if (this._deltaX !== 0 || this._deltaY !== 0) {\r\n if (this._stopPropagation()) {\r\n event.stopPropagation ? event.stopPropagation() : (event.cancelBubble = true);\r\n }\r\n changed = true;\r\n }\r\n\r\n if (changed === true && this._animationFrameID === null) {\r\n this._animationFrameID = requestAnimationFrame(this._didWheel);\r\n }\r\n },\r\n\r\n _didWheel: function () {\r\n this._animationFrameID = null;\r\n this._onWheelCallback(this._deltaX, this._deltaY);\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n }\r\n };\r\n})();\r\n(function () {\r\n function defaultComparator (a, b) {\r\n return a < b;\r\n }\r\n\r\n BI.Heap = function (items, comparator) {\r\n this._items = items || [];\r\n this._size = this._items.length;\r\n this._comparator = comparator || defaultComparator;\r\n this._heapify();\r\n };\r\n\r\n BI.Heap.prototype = {\r\n constructor: BI.Heap,\r\n empty: function () {\r\n return this._size === 0;\r\n },\r\n\r\n pop: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n var elt = this._items[0];\r\n\r\n var lastElt = this._items.pop();\r\n this._size--;\r\n\r\n if (this._size > 0) {\r\n this._items[0] = lastElt;\r\n this._sinkDown(0);\r\n }\r\n\r\n return elt;\r\n },\r\n\r\n push: function (item) {\r\n this._items[this._size++] = item;\r\n this._bubbleUp(this._size - 1);\r\n },\r\n\r\n size: function () {\r\n return this._size;\r\n },\r\n\r\n peek: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n return this._items[0];\r\n },\r\n\r\n _heapify: function () {\r\n for (var index = Math.floor((this._size + 1) / 2); index >= 0; index--) {\r\n this._sinkDown(index);\r\n }\r\n },\r\n\r\n _bubbleUp: function (index) {\r\n var elt = this._items[index];\r\n while (index > 0) {\r\n var parentIndex = Math.floor((index + 1) / 2) - 1;\r\n var parentElt = this._items[parentIndex];\r\n\r\n // if parentElt < elt, stop\r\n if (this._comparator(parentElt, elt)) {\r\n return;\r\n }\r\n\r\n // swap\r\n this._items[parentIndex] = elt;\r\n this._items[index] = parentElt;\r\n index = parentIndex;\r\n }\r\n },\r\n\r\n _sinkDown: function (index) {\r\n var elt = this._items[index];\r\n\r\n while (true) {\r\n var leftChildIndex = 2 * (index + 1) - 1;\r\n var rightChildIndex = 2 * (index + 1);\r\n var swapIndex = -1;\r\n\r\n if (leftChildIndex < this._size) {\r\n var leftChild = this._items[leftChildIndex];\r\n if (this._comparator(leftChild, elt)) {\r\n swapIndex = leftChildIndex;\r\n }\r\n }\r\n\r\n if (rightChildIndex < this._size) {\r\n var rightChild = this._items[rightChildIndex];\r\n if (this._comparator(rightChild, elt)) {\r\n if (swapIndex === -1 ||\r\n this._comparator(rightChild, this._items[swapIndex])) {\r\n swapIndex = rightChildIndex;\r\n }\r\n }\r\n }\r\n\r\n // if we don't have a swap, stop\r\n if (swapIndex === -1) {\r\n return;\r\n }\r\n\r\n this._items[index] = this._items[swapIndex];\r\n this._items[swapIndex] = elt;\r\n index = swapIndex;\r\n }\r\n }\r\n };\r\n})();\r\n\r\n!(function () {\r\n BI.LinkHashMap = function () {\r\n this.array = [];\r\n this.map = {};\r\n };\r\n BI.LinkHashMap.prototype = {\r\n constructor: BI.LinkHashMap,\r\n has: function (key) {\r\n if (key in this.map) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n add: function (key, value) {\r\n if (typeof key === \"undefined\") {\r\n return;\r\n }\r\n if (key in this.map) {\r\n this.map[key] = value;\r\n } else {\r\n this.array.push(key);\r\n this.map[key] = value;\r\n }\r\n },\r\n\r\n remove: function (key) {\r\n if (key in this.map) {\r\n delete this.map[key];\r\n for (var i = 0; i < this.array.length; i++) {\r\n if (this.array[i] == key) {\r\n this.array.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var key = this.array[i];\r\n var value = this.map[key];\r\n var re = fn.call(scope, key, value, i, this.array, this.map);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n get: function (key) {\r\n return this.map[key];\r\n },\r\n\r\n toArray: function () {\r\n var array = [];\r\n this.each(function (key, value) {\r\n array.push(value);\r\n });\r\n return array;\r\n }\r\n };\r\n})();\r\n!(function () {\r\n BI.LRU = function (limit) {\r\n this.size = 0;\r\n this.limit = limit;\r\n this.head = this.tail = undefined;\r\n this._keymap = {};\r\n };\r\n\r\n var p = BI.LRU.prototype;\r\n\r\n p.put = function (key, value) {\r\n var removed;\r\n if (this.size === this.limit) {\r\n removed = this.shift();\r\n }\r\n\r\n var entry = this.get(key, true);\r\n if (!entry) {\r\n entry = {\r\n key: key\r\n };\r\n this._keymap[key] = entry;\r\n if (this.tail) {\r\n this.tail.newer = entry;\r\n entry.older = this.tail;\r\n } else {\r\n this.head = entry;\r\n }\r\n this.tail = entry;\r\n this.size++;\r\n }\r\n entry.value = value;\r\n\r\n return removed;\r\n };\r\n\r\n p.shift = function () {\r\n var entry = this.head;\r\n if (entry) {\r\n this.head = this.head.newer;\r\n this.head.older = undefined;\r\n entry.newer = entry.older = undefined;\r\n this._keymap[entry.key] = undefined;\r\n this.size--;\r\n }\r\n return entry;\r\n };\r\n\r\n\r\n p.get = function (key, returnEntry) {\r\n var entry = this._keymap[key];\r\n if (entry === undefined) return;\r\n if (entry === this.tail) {\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n }\r\n // HEAD--------------TAIL\r\n // <.older .newer>\r\n // <--- add direction --\r\n // A B C <D> E\r\n if (entry.newer) {\r\n if (entry === this.head) {\r\n this.head = entry.newer;\r\n }\r\n entry.newer.older = entry.older; // C <-- E.\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer; // C. --> E\r\n }\r\n entry.newer = undefined; // D --x\r\n entry.older = this.tail; // D. --> E\r\n if (this.tail) {\r\n this.tail.newer = entry; // E. <-- D\r\n }\r\n this.tail = entry;\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n };\r\n\r\n p.has = function (key) {\r\n return this._keymap[key] != null;\r\n };\r\n})();// 线段树\r\n(function () {\r\n var parent = function (node) {\r\n return Math.floor(node / 2);\r\n };\r\n\r\n var Int32Array = _global.Int32Array || function (size) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = 0;\r\n }\r\n return xs;\r\n };\r\n\r\n var ceilLog2 = function (x) {\r\n var y = 1;\r\n while (y < x) {\r\n y *= 2;\r\n }\r\n return y;\r\n };\r\n\r\n BI.PrefixIntervalTree = function (xs) {\r\n this._size = xs.length;\r\n this._half = ceilLog2(this._size);\r\n // _heap是一个_size两倍以上的堆\r\n this._heap = new Int32Array(2 * this._half);\r\n\r\n var i;\r\n // 初始化 >= _size 的堆空间, 即叶子节点\r\n for (i = 0; i < this._size; ++i) {\r\n this._heap[this._half + i] = xs[i];\r\n }\r\n // 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间\r\n for (i = this._half - 1; i > 0; --i) {\r\n this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.prototype = {\r\n constructor: BI.PrefixIntervalTree,\r\n // 往_half之后的空间set值,需要更新其所有祖先节点的值\r\n set: function (index, value) {\r\n var node = this._half + index;\r\n this._heap[node] = value;\r\n\r\n node = parent(node);\r\n for (; node !== 0; node = parent(node)) {\r\n this._heap[node] =\r\n this._heap[2 * node] + this._heap[2 * node + 1];\r\n }\r\n },\r\n\r\n get: function (index) {\r\n var node = this._half + index;\r\n return this._heap[node];\r\n },\r\n\r\n getSize: function () {\r\n return this._size;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(end - 1).\r\n */\r\n sumUntil: function (end) {\r\n if (end === 0) {\r\n return 0;\r\n }\r\n\r\n var node = this._half + end - 1;\r\n var sum = this._heap[node];\r\n for (; node !== 1; node = parent(node)) {\r\n if (node % 2 === 1) {\r\n sum += this._heap[node - 1];\r\n }\r\n }\r\n\r\n return sum;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(inclusiveEnd).\r\n */\r\n sumTo: function (inclusiveEnd) {\r\n return this.sumUntil(inclusiveEnd + 1);\r\n },\r\n\r\n /**\r\n * sum get(begin) + get(begin + 1) + ... + get(end - 1).\r\n */\r\n sum: function (begin, end) {\r\n return this.sumUntil(end) - this.sumUntil(begin);\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) <= t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestLowerBound: function (t) {\r\n if (t < 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] <= t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t < leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) < t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestStrictLowerBound: function (t) {\r\n if (t <= 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] < t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t <= leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t <= sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastUpperBound: function (t) {\r\n return this.greatestStrictLowerBound(t) + 1;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t < sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastStrictUpperBound: function (t) {\r\n return this.greatestLowerBound(t) + 1;\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.uniform = function (size, initialValue) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = initialValue;\r\n }\r\n\r\n return new BI.PrefixIntervalTree(xs);\r\n };\r\n\r\n BI.PrefixIntervalTree.empty = function (size) {\r\n return BI.PrefixIntervalTree.uniform(size, 0);\r\n };\r\n\r\n})();\r\n\r\n!(function () {\r\n BI.Queue = function (capacity) {\r\n this.capacity = capacity;\r\n this.array = [];\r\n };\r\n BI.Queue.prototype = {\r\n constructor: BI.Queue,\r\n\r\n contains: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n indexOf: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n getElementByIndex: function (index) {\r\n return this.array[index];\r\n },\r\n\r\n push: function (v) {\r\n this.array.push(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.shift();\r\n }\r\n },\r\n\r\n pop: function () {\r\n this.array.pop();\r\n },\r\n\r\n shift: function () {\r\n this.array.shift();\r\n },\r\n\r\n unshift: function (v) {\r\n this.array.unshift(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.pop();\r\n }\r\n },\r\n\r\n remove: function (v) {\r\n BI.remove(this.array, v);\r\n },\r\n\r\n splice: function () {\r\n this.array.splice.apply(this.array, arguments);\r\n },\r\n\r\n slice: function () {\r\n this.array.slice.apply(this.array, arguments);\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var re = fn.call(scope, i, this.array[i], this.array);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n toArray: function () {\r\n return this.array;\r\n },\r\n\r\n fromArray: function (array) {\r\n var self = this;\r\n BI.each(array, function (i, v) {\r\n self.push(v);\r\n });\r\n },\r\n\r\n clear: function () {\r\n this.array.length = 0;\r\n }\r\n };\r\n})();!(function () {\r\n var Section = function (height, width, x, y) {\r\n this.height = height;\r\n this.width = width;\r\n this.x = x;\r\n this.y = y;\r\n\r\n this._indexMap = {};\r\n this._indices = [];\r\n };\r\n\r\n Section.prototype = {\r\n constructor: Section,\r\n addCellIndex: function (index) {\r\n if (!this._indexMap[index]) {\r\n this._indexMap[index] = true;\r\n this._indices.push(index);\r\n }\r\n },\r\n\r\n getCellIndices: function () {\r\n return this._indices;\r\n }\r\n };\r\n\r\n var SECTION_SIZE = 100;\r\n BI.SectionManager = function (sectionSize) {\r\n this._sectionSize = sectionSize || SECTION_SIZE;\r\n this._cellMetadata = [];\r\n this._sections = {};\r\n };\r\n\r\n BI.SectionManager.prototype = {\r\n constructor: BI.SectionManager,\r\n getCellIndices: function (height, width, x, y) {\r\n var indices = {};\r\n\r\n BI.each(this.getSections(height, width, x, y), function (i, section) {\r\n BI.each(section.getCellIndices(), function (j, index) {\r\n indices[index] = index;\r\n });\r\n });\r\n\r\n return BI.map(BI.keys(indices), function (i, index) {\r\n return indices[index];\r\n });\r\n },\r\n\r\n getCellMetadata: function (index) {\r\n return this._cellMetadata[index];\r\n },\r\n\r\n getSections: function (height, width, x, y) {\r\n var sectionXStart = Math.floor(x / this._sectionSize);\r\n var sectionXStop = Math.floor((x + width - 1) / this._sectionSize);\r\n var sectionYStart = Math.floor(y / this._sectionSize);\r\n var sectionYStop = Math.floor((y + height - 1) / this._sectionSize);\r\n\r\n var sections = [];\r\n\r\n for (var sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) {\r\n for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) {\r\n var key = sectionX + \".\" + sectionY;\r\n\r\n if (!this._sections[key]) {\r\n this._sections[key] = new Section(this._sectionSize, this._sectionSize, sectionX * this._sectionSize, sectionY * this._sectionSize);\r\n }\r\n\r\n sections.push(this._sections[key]);\r\n }\r\n }\r\n\r\n return sections;\r\n },\r\n\r\n getTotalSectionCount: function () {\r\n return BI.size(this._sections);\r\n },\r\n\r\n registerCell: function (cellMetadatum, index) {\r\n this._cellMetadata[index] = cellMetadatum;\r\n\r\n BI.each(this.getSections(cellMetadatum.height, cellMetadatum.width, cellMetadatum.x, cellMetadatum.y), function (i, section) {\r\n section.addCellIndex(index);\r\n });\r\n }\r\n };\r\n})();(function () {\r\n BI.Tree = function () {\r\n this.root = new BI.Node(BI.UUID());\r\n };\r\n\r\n BI.Tree.prototype = {\r\n constructor: BI.Tree,\r\n addNode: function (node, newNode, index) {\r\n if (BI.isNull(newNode)) {\r\n this.root.addChild(node, index);\r\n } else if (BI.isNull(node)) {\r\n this.root.addChild(newNode, index);\r\n } else {\r\n node.addChild(newNode, index);\r\n }\r\n },\r\n\r\n isRoot: function (node) {\r\n return node === this.root;\r\n },\r\n\r\n getRoot: function () {\r\n return this.root;\r\n },\r\n\r\n clear: function () {\r\n this.root.clear();\r\n },\r\n\r\n initTree: function (nodes) {\r\n var self = this;\r\n this.clear();\r\n var queue = [];\r\n BI.each(nodes, function (i, node) {\r\n var n = new BI.Node(node);\r\n n.set(\"data\", node);\r\n self.addNode(n);\r\n queue.push(n);\r\n });\r\n while (!BI.isEmpty(queue)) {\r\n var parent = queue.shift();\r\n var node = parent.get(\"data\");\r\n BI.each(node.children, function (i, child) {\r\n var n = new BI.Node(child);\r\n n.set(\"data\", child);\r\n queue.push(n);\r\n self.addNode(parent, n);\r\n });\r\n }\r\n },\r\n\r\n _toJSON: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSON(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSON: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSON(child));\r\n });\r\n return result;\r\n },\r\n\r\n _toJSONWithNode: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSONWithNode(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), {\r\n node: node\r\n }, (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSONWithNode: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSONWithNode(child));\r\n });\r\n return result;\r\n },\r\n\r\n search: function (root, target, param) {\r\n if (!(root instanceof BI.Node)) {\r\n return arguments.callee.apply(this, [this.root, root, target]);\r\n }\r\n var self = this, next = null;\r\n\r\n if (BI.isNull(target)) {\r\n return null;\r\n }\r\n if (BI.isEqual(root[param || \"id\"], target)) {\r\n return root;\r\n }\r\n BI.any(root.getChildren(), function (i, child) {\r\n next = self.search(child, target, param);\r\n if (null !== next) {\r\n return true;\r\n }\r\n });\r\n return next;\r\n },\r\n\r\n _traverse: function (node, callback) {\r\n var queue = [];\r\n queue.push(node);\r\n while (!BI.isEmpty(queue)) {\r\n var temp = queue.shift();\r\n var b = callback && callback(temp);\r\n if (b === false) {\r\n break;\r\n }\r\n if (b === true) {\r\n continue;\r\n }\r\n if (temp != null) {\r\n queue = queue.concat(temp.getChildren());\r\n }\r\n }\r\n },\r\n\r\n traverse: function (callback) {\r\n this._traverse(this.root, callback);\r\n },\r\n\r\n _recursion: function (node, route, callback) {\r\n var self = this;\r\n return BI.every(node.getChildren(), function (i, child) {\r\n var next = BI.clone(route);\r\n next.push(child.id);\r\n var b = callback && callback(child, next);\r\n if (b === false) {\r\n return false;\r\n }\r\n if (b === true) {\r\n return true;\r\n }\r\n return self._recursion(child, next, callback);\r\n });\r\n },\r\n\r\n recursion: function (callback) {\r\n this._recursion(this.root, [], callback);\r\n },\r\n\r\n inOrderTraverse: function (callback) {\r\n this._inOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 中序遍历(递归)\r\n _inOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._inOrderTraverse(node.getLeft());\r\n callback && callback(node);\r\n this._inOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 中序遍历(非递归)\r\n nrInOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n while (node != null || !BI.isEmpty(stack)) {\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n callback && callback(node);\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n preOrderTraverse: function (callback) {\r\n this._preOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 先序遍历(递归)\r\n _preOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n callback && callback(node);\r\n this._preOrderTraverse(node.getLeft());\r\n this._preOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 先序遍历(非递归)\r\n nrPreOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n callback && callback(node);\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n postOrderTraverse: function (callback) {\r\n this._postOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 后序遍历(递归)\r\n _postOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._postOrderTraverse(node.getLeft());\r\n this._postOrderTraverse(node.getRight());\r\n callback && callback(node);\r\n }\r\n },\r\n\r\n // 后续遍历(非递归)\r\n nrPostOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n var preNode = null;// 表示最近一次访问的节点\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n\r\n node = BI.last(stack);\r\n\r\n if (node.getRight() == null || node.getRight() == preNode) {\r\n callback && callback(node);\r\n node = stack.pop();\r\n preNode = node;\r\n node = null;\r\n } else {\r\n node = node.getRight();\r\n }\r\n }\r\n }\r\n };\r\n\r\n BI.Node = function (id) {\r\n if (BI.isObject(id)) {\r\n BI.extend(this, id);\r\n } else {\r\n this.id = id;\r\n }\r\n this.clear.apply(this, arguments);\r\n };\r\n\r\n BI.Node.prototype = {\r\n constructor: BI.Node,\r\n\r\n set: function (key, value) {\r\n if (BI.isObject(key)) {\r\n BI.extend(this, key);\r\n return;\r\n }\r\n this[key] = value;\r\n },\r\n\r\n get: function (key) {\r\n return this[key];\r\n },\r\n\r\n isLeaf: function () {\r\n return BI.isEmpty(this.children);\r\n },\r\n\r\n getChildren: function () {\r\n return this.children;\r\n },\r\n\r\n getChildrenLength: function () {\r\n return this.children.length;\r\n },\r\n\r\n getFirstChild: function () {\r\n return BI.first(this.children);\r\n },\r\n\r\n getLastChild: function () {\r\n return BI.last(this.children);\r\n },\r\n\r\n setLeft: function (left) {\r\n this.left = left;\r\n },\r\n\r\n getLeft: function () {\r\n return this.left;\r\n },\r\n\r\n setRight: function (right) {\r\n this.right = right;\r\n },\r\n\r\n getRight: function () {\r\n return this.right;\r\n },\r\n\r\n setParent: function (parent) {\r\n this.parent = parent;\r\n },\r\n\r\n getParent: function () {\r\n return this.parent;\r\n },\r\n\r\n getChild: function (index) {\r\n return this.children[index];\r\n },\r\n\r\n getChildIndex: function (id) {\r\n return BI.findIndex(this.children, function (i, ch) {\r\n return ch.get(\"id\") === id;\r\n });\r\n },\r\n\r\n removeChild: function (id) {\r\n this.removeChildByIndex(this.getChildIndex(id));\r\n },\r\n\r\n removeChildByIndex: function (index) {\r\n var before = this.getChild(index - 1);\r\n var behind = this.getChild(index + 1);\r\n if (before != null) {\r\n before.setRight(behind || null);\r\n }\r\n if (behind != null) {\r\n behind.setLeft(before || null);\r\n }\r\n this.children.splice(index, 1);\r\n },\r\n\r\n removeAllChilds: function () {\r\n this.children = [];\r\n },\r\n\r\n addChild: function (child, index) {\r\n var cur = null;\r\n if (BI.isUndefined(index)) {\r\n cur = this.children.length - 1;\r\n } else {\r\n cur = index - 1;\r\n }\r\n child.setParent(this);\r\n if (cur >= 0) {\r\n this.getChild(cur) && this.getChild(cur).setRight(child);\r\n child.setLeft(this.getChild(cur));\r\n }\r\n if (BI.isUndefined(index)) {\r\n this.children.push(child);\r\n } else {\r\n this.children.splice(index, 0, child);\r\n }\r\n },\r\n\r\n equals: function (obj) {\r\n return this === obj || this.id === obj.id;\r\n },\r\n\r\n clear: function () {\r\n this.parent = null;\r\n this.left = null;\r\n this.right = null;\r\n this.children = [];\r\n }\r\n };\r\n\r\n BI.extend(BI.Tree, {\r\n transformToArrayFormat: function (nodes, pId) {\r\n if (!nodes) return [];\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = BI.clone(nodes[i]);\r\n node.pId = node.pId == null ? pId : node.pId;\r\n delete node.children;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = BI.clone(nodes);\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n delete newNodes.children;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n arrayFormat: function (nodes, pId) {\r\n if (!nodes) {\r\n return [];\r\n }\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = nodes[i];\r\n node.pId = node.pId == null ? pId : node.pId;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = nodes;\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n transformToTreeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = BI.clone(sNodes[i]);\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n delete tmpMap[sNodes[i].id].pId;\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n treeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = sNodes[i];\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n traversal: function (array, callback) {\r\n if (BI.isNull(array)) {\r\n return;\r\n }\r\n var self = this;\r\n BI.some(array, function (i, item) {\r\n if (callback(i, item) === false) {\r\n return true;\r\n }\r\n self.traversal(item.children, callback);\r\n });\r\n }\r\n });\r\n})();// 向量操作\r\nBI.Vector = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n};\r\nBI.Vector.prototype = {\r\n constructor: BI.Vector,\r\n cross: function (v) {\r\n return (this.x * v.y - this.y * v.x);\r\n },\r\n length: function (v) {\r\n return (Math.sqrt(this.x * v.x + this.y * v.y));\r\n }\r\n};\r\nBI.Region = function (x, y, w, h) {\r\n this.x = x;\r\n this.y = y;\r\n this.w = w;\r\n this.h = h;\r\n};\r\nBI.Region.prototype = {\r\n constructor: BI.Region,\r\n // 判断两个区域是否相交,若相交,则要么顶点互相包含,要么矩形边界(或对角线)相交\r\n isIntersects: function (obj) {\r\n if (this.isPointInside(obj.x, obj.y) ||\r\n this.isPointInside(obj.x + obj.w, obj.y) ||\r\n this.isPointInside(obj.x, obj.y + obj.h) ||\r\n this.isPointInside(obj.x + obj.w, obj.y + obj.h)) {\r\n return true;\r\n } else if (obj.isPointInside(this.x, this.y) ||\r\n obj.isPointInside(this.x + this.w, this.y) ||\r\n obj.isPointInside(this.x, this.y + this.h) ||\r\n obj.isPointInside(this.x + this.w, this.y + this.h)) {\r\n return true;\r\n } else if (obj.x != null && obj.y != null)// 判断矩形对角线相交 |v1 X v2||v1 X v3| < 0\r\n {\r\n var vector1 = new BI.Vector(this.w, this.h);// 矩形对角线向量\r\n var vector2 = new BI.Vector(obj.x - this.x, obj.y - this.y);\r\n var vector3 = new BI.Vector(vector2.x + obj.w, vector2.y + obj.h);\r\n if ((vector1.cross(vector2) * vector1.cross(vector3)) < 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n // 判断一个点是否在这个区域内部\r\n isPointInside: function (x, y) {\r\n if (this.x == null || this.y == null) {\r\n return false;\r\n }\r\n if (x >= this.x && x <= this.x + this.w && y >= this.y && y <= this.y + this.h) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n // 返回区域的重心,因为是矩形所以返回中点\r\n getPosition: function () {\r\n var pos = [];\r\n pos.push(this.x + this.w / 2);\r\n pos.push(this.y + this.h / 2);\r\n return pos;\r\n }\r\n};BI.BehaviorFactory = {\r\n createBehavior: function (key, options) {\r\n var behavior;\r\n switch (key) {\r\n case \"highlight\":\r\n behavior = BI.HighlightBehavior;\r\n break;\r\n case \"redmark\":\r\n behavior = BI.RedMarkBehavior;\r\n break;\r\n }\r\n return new behavior(options);\r\n }\r\n};\r\n\r\n/**\r\n * guy\r\n * 行为控件\r\n * @class BI.Behavior\r\n * @extends BI.OB\r\n */\r\nBI.Behavior = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this, arguments), {\r\n rule: function () {return true;}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Behavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function () {\r\n\r\n }\r\n});/**\r\n * 布局容器类\r\n * @class BI.Layout\r\n * @extends BI.Widget\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Boolean} [options.scrollable=false] 子组件超出容器边界之后是否会出现滚动条\r\n * @cfg {Boolean} [options.scrollx=false] 子组件超出容器边界之后是否会出现横向滚动条\r\n * @cfg {Boolean} [options.scrolly=false] 子组件超出容器边界之后是否会出现纵向滚动条\r\n */\r\nBI.Layout = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n scrollable: null, // true, false, null\r\n scrollx: false, // true, false\r\n scrolly: false, // true, false\r\n items: []\r\n };\r\n },\r\n\r\n render: function () {\r\n this._init4Margin();\r\n this._init4Scroll();\r\n },\r\n\r\n _init4Margin: function () {\r\n if (this.options.top) {\r\n this.element.css(\"top\", this.options.top);\r\n }\r\n if (this.options.left) {\r\n this.element.css(\"left\", this.options.left);\r\n }\r\n if (this.options.bottom) {\r\n this.element.css(\"bottom\", this.options.bottom);\r\n }\r\n if (this.options.right) {\r\n this.element.css(\"right\", this.options.right);\r\n }\r\n },\r\n\r\n _init4Scroll: function () {\r\n switch (this.options.scrollable) {\r\n case true:\r\n this.element.css(\"overflow\", \"auto\");\r\n break;\r\n case false:\r\n this.element.css(\"overflow\", \"hidden\");\r\n break;\r\n default :\r\n break;\r\n }\r\n if (this.options.scrollx) {\r\n this.element.css({\r\n \"overflow-x\": \"auto\",\r\n \"overflow-y\": \"hidden\"\r\n });\r\n }\r\n if (this.options.scrolly) {\r\n this.element.css({\r\n \"overflow-x\": \"hidden\",\r\n \"overflow-y\": \"auto\"\r\n });\r\n }\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.element.append(frag);\r\n },\r\n\r\n _mountChildren: function () {\r\n var self = this;\r\n var frag = BI.Widget._renderEngine.createFragment();\r\n var hasChild = false;\r\n BI.each(this._children, function (i, widget) {\r\n if (widget.element !== self.element) {\r\n frag.appendChild(widget.element[0]);\r\n hasChild = true;\r\n }\r\n });\r\n if (hasChild === true) {\r\n this.appendFragment(frag);\r\n }\r\n },\r\n\r\n _getChildName: function (index) {\r\n return index + \"\";\r\n },\r\n\r\n _addElement: function (i, item, context) {\r\n var self = this, w;\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n w = BI.createWidget(item, context);\r\n w.on(BI.Events.DESTROY, function () {\r\n BI.each(self._children, function (name, child) {\r\n if (child === w) {\r\n BI.remove(self._children, child);\r\n self.removeItemAt(name | 0);\r\n }\r\n });\r\n });\r\n this.addWidget(this._getChildName(i), w);\r\n } else {\r\n w = this.getWidgetByName(this._getChildName(i));\r\n }\r\n return w;\r\n },\r\n\r\n _getOptions: function (item) {\r\n if (item instanceof BI.Widget) {\r\n item = item.options;\r\n }\r\n item = BI.stripEL(item);\r\n if (item instanceof BI.Widget) {\r\n item = item.options;\r\n }\r\n return item;\r\n },\r\n\r\n _compare: function (item1, item2) {\r\n var self = this;\r\n return eq(item1, item2);\r\n\r\n // 不比较函数\r\n function eq (a, b, aStack, bStack) {\r\n if (a === b) {\r\n return a !== 0 || 1 / a === 1 / b;\r\n }\r\n if (a == null || b == null) {\r\n return a === b;\r\n }\r\n var className = Object.prototype.toString.call(a);\r\n switch (className) {\r\n case \"[object RegExp]\":\r\n case \"[object String]\":\r\n return \"\" + a === \"\" + b;\r\n case \"[object Number]\":\r\n if (+a !== +a) {\r\n return +b !== +b;\r\n }\r\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\r\n case \"[object Date]\":\r\n case \"[object Boolean]\":\r\n return +a === +b;\r\n }\r\n\r\n var areArrays = className === \"[object Array]\";\r\n if (!areArrays) {\r\n if (BI.isFunction(a) && BI.isFunction(b)) {\r\n return true;\r\n }\r\n a = self._getOptions(a);\r\n b = self._getOptions(b);\r\n }\r\n\r\n aStack = aStack || [];\r\n bStack = bStack || [];\r\n var length = aStack.length;\r\n while (length--) {\r\n if (aStack[length] === a) {\r\n return bStack[length] === b;\r\n }\r\n }\r\n\r\n aStack.push(a);\r\n bStack.push(b);\r\n\r\n if (areArrays) {\r\n length = a.length;\r\n if (length !== b.length) {\r\n return false;\r\n }\r\n while (length--) {\r\n if (!eq(a[length], b[length], aStack, bStack)) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n var keys = _.keys(a), key;\r\n length = keys.length;\r\n if (_.keys(b).length !== length) {\r\n return false;\r\n }\r\n while (length--) {\r\n key = keys[length];\r\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) {\r\n return false;\r\n }\r\n }\r\n }\r\n aStack.pop();\r\n bStack.pop();\r\n return true;\r\n }\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.element;\r\n },\r\n\r\n _addItemAt: function (index, item) {\r\n for (var i = this.options.items.length; i > index; i--) {\r\n this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)];\r\n }\r\n delete this._children[this._getChildName(index)];\r\n this.options.items.splice(index, 0, item);\r\n },\r\n\r\n _removeItemAt: function (index) {\r\n for (var i = index; i < this.options.items.length - 1; i++) {\r\n this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)];\r\n }\r\n delete this._children[this._getChildName(this.options.items.length - 1)];\r\n this.options.items.splice(index, 1);\r\n },\r\n\r\n /**\r\n * 添加一个子组件到容器中\r\n * @param {JSON/BI.Widget} item 子组件\r\n */\r\n addItem: function (item) {\r\n return this.addItemAt(this.options.items.length, item);\r\n },\r\n\r\n prependItem: function (item) {\r\n return this.addItemAt(0, item);\r\n },\r\n\r\n addItemAt: function (index, item) {\r\n if (index < 0 || index > this.options.items.length) {\r\n return;\r\n }\r\n this._addItemAt(index, item);\r\n var w = this._addElement(index, item);\r\n if (index > 0) {\r\n this._children[this._getChildName(index - 1)].element.after(w.element);\r\n } else {\r\n w.element.prependTo(this._getWrapper());\r\n }\r\n w._mount();\r\n return w;\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n indexes = BI.isArray(indexes) ? indexes : [indexes];\r\n var deleted = [];\r\n var newItems = [], newChildren = {};\r\n for (var i = 0, len = this.options.items.length; i < len; i++) {\r\n var child = this._children[this._getChildName(i)];\r\n if (BI.contains(indexes, i)) {\r\n child && deleted.push(child);\r\n } else {\r\n newChildren[this._getChildName(newItems.length)] = child;\r\n newItems.push(this.options.items[i]);\r\n }\r\n }\r\n this.options.items = newItems;\r\n this._children = newChildren;\r\n BI.each(deleted, function (i, c) {\r\n c._destroy();\r\n });\r\n },\r\n\r\n shouldUpdateItem: function (index, item) {\r\n if (index < 0 || index > this.options.items.length - 1) {\r\n return false;\r\n }\r\n var child = this._children[this._getChildName(index)];\r\n if (!child.shouldUpdate) {\r\n return null;\r\n }\r\n return child.shouldUpdate(this._getOptions(item)) === true;\r\n },\r\n\r\n updateItemAt: function (index, item) {\r\n if (index < 0 || index > this.options.items.length - 1) {\r\n return;\r\n }\r\n\r\n var child = this._children[this._getChildName(index)];\r\n var updated;\r\n if (updated = child.update(this._getOptions(item))) {\r\n return updated;\r\n }\r\n var del = this._children[this._getChildName(index)];\r\n delete this._children[this._getChildName(index)];\r\n this.options.items.splice(index, 1);\r\n var w = this._addElement(index, item);\r\n this.options.items.splice(index, 0, item);\r\n this._children[this._getChildName(index)] = w;\r\n if (index > 0) {\r\n this._children[this._getChildName(index - 1)].element.after(w.element);\r\n } else {\r\n w.element.prependTo(this._getWrapper());\r\n }\r\n del._destroy();\r\n w._mount();\r\n },\r\n\r\n addItems: function (items, context) {\r\n var self = this, o = this.options;\r\n var fragment = BI.Widget._renderEngine.createFragment();\r\n var added = [];\r\n BI.each(items, function (i, item) {\r\n var w = self._addElement(o.items.length, item, context);\r\n self._children[self._getChildName(o.items.length)] = w;\r\n o.items.push(item);\r\n added.push(w);\r\n fragment.appendChild(w.element[0]);\r\n });\r\n if (this._isMounted) {\r\n this._getWrapper().append(fragment);\r\n BI.each(added, function (i, w) {\r\n w._mount();\r\n });\r\n }\r\n },\r\n\r\n prependItems: function (items, context) {\r\n var self = this;\r\n items = items || [];\r\n var fragment = BI.Widget._renderEngine.createFragment();\r\n var added = [];\r\n for (var i = items.length - 1; i >= 0; i--) {\r\n this._addItemAt(0, items[i]);\r\n var w = this._addElement(0, items[i], context);\r\n self._children[self._getChildName(0)] = w;\r\n this.options.items.unshift(items[i]);\r\n added.push(w);\r\n fragment.appendChild(w.element[0]);\r\n }\r\n if (this._isMounted) {\r\n this._getWrapper().prepend(fragment);\r\n BI.each(added, function (i, w) {\r\n w._mount();\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var self = this, value = [], child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n var v = child.getValue();\r\n v = BI.isArray(v) ? v : [v];\r\n value = value.concat(v);\r\n }\r\n });\r\n return value;\r\n },\r\n\r\n setValue: function (v) {\r\n var self = this, child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n child.setValue(v);\r\n }\r\n });\r\n },\r\n\r\n setText: function (v) {\r\n var self = this, child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n child.setText(v);\r\n }\r\n });\r\n },\r\n\r\n patchItem: function (oldVnode, vnode, index) {\r\n var shouldUpdate = this.shouldUpdateItem(index, vnode);\r\n if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {\r\n return this.updateItemAt(index, vnode);\r\n }\r\n },\r\n\r\n updateChildren: function (oldCh, newCh) {\r\n var self = this;\r\n var oldStartIdx = 0, newStartIdx = 0;\r\n var oldEndIdx = oldCh.length - 1;\r\n var oldStartVnode = oldCh[0];\r\n var oldEndVnode = oldCh[oldEndIdx];\r\n var newEndIdx = newCh.length - 1;\r\n var newStartVnode = newCh[0];\r\n var newEndVnode = newCh[newEndIdx];\r\n var before;\r\n var updated;\r\n var children = {};\r\n BI.each(oldCh, function (i, child) {\r\n child = self._getOptions(child);\r\n var key = child.key == null ? i : child.key;\r\n if (BI.isKey(key)) {\r\n children[key] = self._children[self._getChildName(i)];\r\n }\r\n });\r\n\r\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\r\n if (BI.isNull(oldStartVnode)) {\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n } else if (BI.isNull(oldEndVnode)) {\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n } else if (sameVnode(oldStartVnode, newStartVnode, oldStartIdx, newStartIdx)) {\r\n updated = this.patchItem(oldStartVnode, newStartVnode, oldStartIdx) || updated;\r\n children[oldStartVnode.key == null ? this._getChildName(oldStartIdx) : oldStartVnode.key] = this._children[this._getChildName(oldStartIdx)];\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n newStartVnode = newCh[++newStartIdx];\r\n } else if (sameVnode(oldEndVnode, newEndVnode, oldEndIdx, newEndIdx)) {\r\n updated = this.patchItem(oldEndVnode, newEndVnode, oldEndIdx) || updated;\r\n children[oldEndVnode.key == null ? this._getChildName(oldEndIdx) : oldEndVnode.key] = this._children[this._getChildName(oldEndIdx)];\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n newEndVnode = newCh[--newEndIdx];\r\n } else if (sameVnode(oldStartVnode, newEndVnode)) {\r\n updated = this.patchItem(oldStartVnode, newEndVnode, oldStartIdx) || updated;\r\n children[oldStartVnode.key == null ? this._getChildName(oldStartIdx) : oldStartVnode.key] = this._children[this._getChildName(oldStartIdx)];\r\n insertBefore(oldStartVnode, oldEndVnode, true);\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n newEndVnode = newCh[--newEndIdx];\r\n } else if (sameVnode(oldEndVnode, newStartVnode)) {\r\n updated = this.patchItem(oldEndVnode, newStartVnode, oldEndIdx) || updated;\r\n children[oldEndVnode.key == null ? this._getChildName(oldEndIdx) : oldEndVnode.key] = this._children[this._getChildName(oldEndIdx)];\r\n insertBefore(oldEndVnode, oldStartVnode);\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n newStartVnode = newCh[++newStartIdx];\r\n } else {\r\n var sameOldVnode = findOldVnode(oldCh, newStartVnode, oldStartIdx, oldEndIdx);\r\n if (BI.isNull(sameOldVnode)) { // 不存在就把新的放到左边\r\n var node = addNode(newStartVnode);\r\n insertBefore(node, oldStartVnode);\r\n newStartVnode = newCh[++newStartIdx];\r\n } else { // 如果新节点在就旧节点区间中存在就复用一下\r\n BI.each(oldCh, function (index, child) {\r\n if (child && sameVnode(child, newStartVnode)) {\r\n updated = self.patchItem(sameOldVnode, newStartVnode, index) || updated;\r\n children[sameOldVnode.key == null ? self._getChildName(index) : sameOldVnode.key] = self._children[self._getChildName(index)];\r\n oldCh[index] = undefined;\r\n insertBefore(sameOldVnode, oldStartVnode);\r\n }\r\n });\r\n newStartVnode = newCh[++newStartIdx];\r\n }\r\n }\r\n }\r\n if (oldStartIdx > oldEndIdx) {\r\n before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];\r\n addVnodes(before, newCh, newStartIdx, newEndIdx);\r\n } else if (newStartIdx > newEndIdx) {\r\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\r\n }\r\n\r\n this._children = {};\r\n BI.each(newCh, function (i, child) {\r\n var node = self._getOptions(child);\r\n var key = node.key == null ? self._getChildName(i) : node.key;\r\n children[key]._mount();\r\n self._children[self._getChildName(i)] = children[key];\r\n });\r\n\r\n function sameVnode (vnode1, vnode2, oldIndex, newIndex) {\r\n vnode1 = self._getOptions(vnode1);\r\n vnode2 = self._getOptions(vnode2);\r\n if (BI.isKey(vnode1.key)) {\r\n return vnode1.key === vnode2.key;\r\n }\r\n if (oldIndex >= 0) {\r\n return oldIndex === newIndex;\r\n }\r\n }\r\n\r\n function addNode (vnode, index) {\r\n var opt = self._getOptions(vnode);\r\n var key = opt.key == null ? self._getChildName(index) : opt.key;\r\n return children[key] = self._addElement(key, vnode);\r\n }\r\n\r\n function addVnodes (before, vnodes, startIdx, endIdx) {\r\n for (; startIdx <= endIdx; ++startIdx) {\r\n var node = addNode(vnodes[startIdx], startIdx);\r\n insertBefore(node, before, false, startIdx);\r\n }\r\n }\r\n\r\n function removeVnodes (vnodes, startIdx, endIdx) {\r\n for (; startIdx <= endIdx; ++startIdx) {\r\n var ch = vnodes[startIdx];\r\n if (BI.isNotNull(ch)) {\r\n var node = self._getOptions(ch);\r\n var key = node.key == null ? self._getChildName(startIdx) : node.key;\r\n delete self._children[self._getChildName(key)];\r\n children[key]._destroy();\r\n }\r\n }\r\n }\r\n\r\n function insertBefore (insert, before, isNext, index) {\r\n insert = self._getOptions(insert);\r\n before = before && self._getOptions(before);\r\n var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);\r\n if (before && children[before.key]) {\r\n var beforeKey = BI.isKey(before.key) ? before.key : self._getChildName(index);\r\n var next;\r\n if (isNext) {\r\n next = children[beforeKey].element.next();\r\n } else {\r\n next = children[beforeKey].element;\r\n }\r\n if (next.length > 0) {\r\n next.before(children[insertKey].element);\r\n } else {\r\n self._getWrapper().append(children[insertKey].element);\r\n }\r\n } else {\r\n self._getWrapper().append(children[insertKey].element);\r\n }\r\n }\r\n\r\n function findOldVnode (vnodes, vNode, beginIdx, endIdx) {\r\n var i, found;\r\n for (i = beginIdx; i <= endIdx; ++i) {\r\n if (vnodes[i] && sameVnode(vnodes[i], vNode)) {\r\n found = vnodes[i];\r\n }\r\n }\r\n return found;\r\n }\r\n\r\n return updated;\r\n },\r\n\r\n update: function (opt) {\r\n var o = this.options;\r\n var items = opt.items || [];\r\n var updated = this.updateChildren(o.items, items);\r\n this.options.items = items;\r\n return updated;\r\n // var updated, i, len;\r\n // for (i = 0, len = Math.min(o.items.length, items.length); i < len; i++) {\r\n // if (!this._compare(o.items[i], items[i])) {\r\n // updated = this.updateItemAt(i, items[i]) || updated;\r\n // }\r\n // }\r\n // if (o.items.length > items.length) {\r\n // var deleted = [];\r\n // for (i = items.length; i < o.items.length; i++) {\r\n // deleted.push(this._children[this._getChildName(i)]);\r\n // delete this._children[this._getChildName(i)];\r\n // }\r\n // o.items.splice(items.length);\r\n // BI.each(deleted, function (i, w) {\r\n // w._destroy();\r\n // })\r\n // } else if (items.length > o.items.length) {\r\n // for (i = o.items.length; i < items.length; i++) {\r\n // this.addItemAt(i, items[i]);\r\n // }\r\n // }\r\n // return updated;\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n self._addElement(i, item);\r\n }\r\n });\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var removeIndex;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.each(this._children, function (name, child) {\r\n if (child === nameOrWidget) {\r\n removeIndex = name;\r\n }\r\n });\r\n } else {\r\n removeIndex = nameOrWidget;\r\n }\r\n if (removeIndex) {\r\n this._removeItemAt(removeIndex | 0);\r\n }\r\n },\r\n\r\n empty: function () {\r\n BI.Layout.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n destroy: function () {\r\n BI.Layout.superclass.destroy.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n items = items || [];\r\n if (this._isMounted) {\r\n this.update({items: items});\r\n return;\r\n }\r\n this.options.items = items;\r\n this.stroke(items);\r\n },\r\n\r\n resize: function () {\r\n\r\n }\r\n});\r\nBI.shortcut(\"bi.layout\", BI.Layout);\r\nBI.Plugin = BI.Plugin || {};\r\n!(function () {\r\n var _WidgetsPlugin = {};\r\n var _ObjectPlugin = {};\r\n var _ConfigPlugin = {};\r\n var _GlobalWidgetConfigFn, _GlobalObjectConfigFn;\r\n BI.extend(BI.Plugin, {\r\n\r\n getWidget: function (type, options) {\r\n if (_GlobalWidgetConfigFn) {\r\n _GlobalWidgetConfigFn(type, options);\r\n }\r\n var res;\r\n if (_ConfigPlugin[type]) {\r\n for (var i = _ConfigPlugin[type].length - 1; i >= 0; i--) {\r\n if (res = _ConfigPlugin[type][i](options)) {\r\n options = res;\r\n }\r\n }\r\n }\r\n // Deprecated\r\n if (_WidgetsPlugin[type]) {\r\n for (var i = _WidgetsPlugin[type].length - 1; i >= 0; i--) {\r\n if (res = _WidgetsPlugin[type][i](options)) {\r\n return res;\r\n }\r\n }\r\n }\r\n return options;\r\n },\r\n\r\n config: function (widgetConfigFn, objectConfigFn) {\r\n _GlobalWidgetConfigFn = widgetConfigFn;\r\n _GlobalObjectConfigFn = objectConfigFn;\r\n },\r\n\r\n configWidget: function (type, fn) {\r\n if (!_ConfigPlugin[type]) {\r\n _ConfigPlugin[type] = [];\r\n }\r\n _ConfigPlugin[type].push(fn);\r\n },\r\n\r\n registerWidget: function (type, fn) {\r\n if (!_WidgetsPlugin[type]) {\r\n _WidgetsPlugin[type] = [];\r\n }\r\n if (_WidgetsPlugin[type].length > 0) {\r\n console.log(\"组件已经注册过了!\");\r\n }\r\n _WidgetsPlugin[type].push(fn);\r\n },\r\n\r\n relieveWidget: function (type) {\r\n delete _WidgetsPlugin[type];\r\n },\r\n\r\n getObject: function (type, object) {\r\n if (_GlobalObjectConfigFn) {\r\n _GlobalObjectConfigFn(type, object);\r\n }\r\n if (_ObjectPlugin[type]) {\r\n var res;\r\n for (var i = 0, len = _ObjectPlugin[type].length; i < len; i++) {\r\n if (res = _ObjectPlugin[type][i](object)) {\r\n object = res;\r\n };\r\n }\r\n }\r\n return res || object;\r\n },\r\n\r\n registerObject: function (type, fn) {\r\n if (!_ObjectPlugin[type]) {\r\n _ObjectPlugin[type] = [];\r\n }\r\n if (_ObjectPlugin[type].length > 0) {\r\n console.log(\"对象已经注册过了!\");\r\n }\r\n _ObjectPlugin[type].push(fn);\r\n },\r\n\r\n relieveObject: function (type) {\r\n delete _ObjectPlugin[type];\r\n }\r\n });\r\n})();/**\r\n * guy\r\n * 由一个元素切换到另一个元素的行为\r\n * @class BI.Action\r\n * @extends BI.OB\r\n * @abstract\r\n */\r\nBI.Action = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Action.superclass._defaultConfig.apply(this, arguments), {\r\n src: null,\r\n tar: null\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Action.superclass._init.apply(this, arguments);\r\n },\r\n\r\n actionPerformed: function (src, tar, callback) {\r\n\r\n },\r\n\r\n actionBack: function (tar, src, callback) {\r\n\r\n }\r\n});\r\n\r\nBI.ActionFactory = {\r\n createAction: function (key, options) {\r\n var action;\r\n switch (key) {\r\n case \"show\":\r\n action = BI.ShowAction;\r\n break;\r\n }\r\n return new action(options);\r\n }\r\n};/**\r\n * guy\r\n * 由一个元素切换到另一个元素的行为\r\n * @class BI.ShowAction\r\n * @extends BI.Action\r\n */\r\nBI.ShowAction = BI.inherit(BI.Action, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ShowAction.superclass._init.apply(this, arguments);\r\n },\r\n\r\n actionPerformed: function (src, tar, callback) {\r\n tar = tar || this.options.tar;\r\n tar.setVisible(true);\r\n callback && callback();\r\n },\r\n\r\n actionBack: function (tar, src, callback) {\r\n tar = tar || this.options.tar;\r\n tar.setVisible(false);\r\n callback && callback();\r\n }\r\n});(function () {\r\n var _global;\r\n if (typeof window !== \"undefined\") {\r\n _global = window;\r\n } else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n } else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n } else {\r\n _global = this;\r\n }\r\n if (!_global.BI) {\r\n _global.BI = {};\r\n }\r\n\r\n function isEmpty (value) {\r\n // 判断是否为空值\r\n var result = value === \"\" || value === null || value === undefined;\r\n return result;\r\n }\r\n\r\n // 判断是否是无效的日期\r\n function isInvalidDate (date) {\r\n return date == \"Invalid Date\" || date == \"NaN\";\r\n }\r\n\r\n /**\r\n * CHART-1400\r\n * 使用数值计算的方式来获取任意数值的科学技术表示值。\r\n * 科学计数格式\r\n */\r\n function _eFormat (text, fmt) {\r\n text = +text;\r\n\r\n return eFormat(text, fmt);\r\n\r\n /**\r\n * 科学计数格式具体计算过程\r\n * @param num\r\n * @param format {String}有两种形式,\r\n * 1、\"0.00E00\"这样的字符串表示正常的科学计数表示,只不过规定了数值精确到百分位,\r\n * 而数量级的绝对值如果是10以下的时候在前面补零。\r\n * 2、 \"##0.0E0\"这样的字符串则规定用科学计数法表示之后的数值的整数部分是三位,精确到十分位,\r\n * 数量级没有规定,因为没见过实数里有用科学计数法表示之后E的后面会小于一位的情况(0无所谓)。\r\n * @returns {*}\r\n */\r\n function eFormat (num, format) {\r\n var neg = num < 0 ? (num *= -1, \"-\") : \"\",\r\n magnitudeNeg = \"\";\r\n\r\n var funcName = num > 0 && num < 1 ? \"floor\" : \"ceil\"; // -0.9999->-1\r\n // 数量级\r\n var magnitude = Math[funcName](Math.log(num) / Math.log(10));\r\n\r\n if (!isFinite(magnitude)) {\r\n return format.replace(/#/ig, \"\").replace(/\\.e/ig, \"E\");\r\n }\r\n\r\n num = num / Math.pow(10, magnitude);\r\n\r\n // 让num转化成[1, 10)区间上的数\r\n if (num > 0 && num < 1) {\r\n num *= 10;\r\n magnitude -= 1;\r\n }\r\n\r\n // 计算出format中需要显示的整数部分的位数,然后更新这个数值,也更新数量级\r\n var integerLen = getInteger(magnitude, format);\r\n integerLen > 1 && (magnitude -= integerLen - 1, num *= Math.pow(10, integerLen - 1));\r\n\r\n magnitude < 0 && (magnitudeNeg = \"-\", magnitude *= -1);\r\n\r\n // 获取科学计数法精确到的位数\r\n var precision = getPrecision(format);\r\n // 判断num经过四舍五入之后是否有进位\r\n var isValueCarry = isValueCarried(num);\r\n\r\n num *= Math.pow(10, precision);\r\n num = Math.round(num);\r\n // 如果出现进位的情况,将num除以10\r\n isValueCarry && (num /= 10, magnitude += magnitudeNeg === \"-\" ? -1 : 1);\r\n num /= Math.pow(10, precision);\r\n\r\n // 小数部分保留precision位\r\n num = num.toFixed(precision);\r\n // 格式化指数的部分\r\n magnitude = formatExponential(format, magnitude, magnitudeNeg);\r\n\r\n return neg + num + \"E\" + magnitude;\r\n }\r\n\r\n // 获取format格式规定的数量级的形式\r\n function formatExponential (format, num, magnitudeNeg) {\r\n num += \"\";\r\n if (!/e/ig.test(format)) {\r\n return num;\r\n }\r\n format = format.split(/e/ig)[1];\r\n\r\n while (num.length < format.length) {\r\n num = \"0\" + num;\r\n }\r\n\r\n // 如果magnitudeNeg是一个\"-\",而且num正好全是0,那么就别显示负号了\r\n var isAllZero = true;\r\n for (var i = 0, len = num.length; i < len; i++) {\r\n if (!isAllZero) {\r\n continue;\r\n }\r\n isAllZero = num.charAt(i) === \"0\";\r\n }\r\n magnitudeNeg = isAllZero ? \"\" : magnitudeNeg;\r\n\r\n return magnitudeNeg + num;\r\n }\r\n\r\n // 获取format规定的科学计数法精确到的位数\r\n function getPrecision (format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n var arr = format.split(/e/ig)[0].split(\".\");\r\n\r\n return arr.length > 1 ? arr[1].length : 0;\r\n }\r\n\r\n // 获取数值科学计数法表示之后整数的位数\r\n // 这边我们还需要考虑#和0的问题\r\n function getInteger (magnitude, format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n // return format.split(/e/ig)[0].split(\".\")[0].length;\r\n\r\n var formatLeft = format.split(/e/ig)[0].split(\".\")[0], i, f, len = formatLeft.length;\r\n var valueLeftLen = 0;\r\n\r\n for (i = 0; i < len; i++) {\r\n f = formatLeft.charAt(i);\r\n // \"#\"所在的位置到末尾长度小于等于值的整数部分长度,那么这个#才可以占位\r\n if (f == 0 || (f == \"#\" && (len - i <= magnitude + 1))) {\r\n valueLeftLen++;\r\n }\r\n }\r\n\r\n return valueLeftLen;\r\n }\r\n\r\n // 判断num通过round函数之后是否有进位\r\n function isValueCarried (num) {\r\n var roundNum = Math.round(num);\r\n num = (num + \"\").split(\".\")[0];\r\n roundNum = (roundNum + \"\").split(\".\")[0];\r\n return num.length !== roundNum.length;\r\n }\r\n }\r\n\r\n //'#.##'之类的格式处理 1.324e-18 这种的科学数字\r\n function _dealNumberPrecision (text, fright) {\r\n if (/[eE]/.test(text)) {\r\n var precision = 0, i = 0, ch;\r\n\r\n if (/[%‰]$/.test(fright)) {\r\n precision = /[%]$/.test(fright) ? 2 : 3;\r\n }\r\n\r\n for (var len = fright.length; i < len; i++) {\r\n if ((ch = fright.charAt(i)) == \"0\" || ch == \"#\") {\r\n precision++;\r\n }\r\n }\r\n return Number(text).toFixed(precision);\r\n }\r\n\r\n return text;\r\n }\r\n\r\n /**\r\n * 数字格式\r\n */\r\n function _numberFormat (text, format) {\r\n var text = text + \"\";\r\n\r\n //在调用数字格式的时候如果text里没有任何数字则不处理\r\n if (!(/[0-9]/.test(text)) || !format) {\r\n return text;\r\n }\r\n\r\n // 数字格式,区分正负数\r\n var numMod = format.indexOf(\";\");\r\n if (numMod > -1) {\r\n if (text >= 0) {\r\n return _numberFormat(text + \"\", format.substring(0, numMod));\r\n }\r\n return _numberFormat((-text) + \"\", format.substr(numMod + 1));\r\n\r\n } else {\r\n // 兼容格式处理负数的情况(copy:fr-jquery.format.js)\r\n if (+text < 0 && format.charAt(0) !== \"-\") {\r\n return _numberFormat((-text) + \"\", \"-\" + format);\r\n }\r\n }\r\n\r\n var fp = format.split(\".\"), fleft = fp[0] || \"\", fright = fp[1] || \"\";\r\n text = _dealNumberPrecision(text, fright);\r\n var tp = text.split(\".\"), tleft = tp[0] || \"\", tright = tp[1] || \"\";\r\n\r\n // 百分比,千分比的小数点移位处理\r\n if (/[%‰]$/.test(format)) {\r\n var paddingZero = /[%]$/.test(format) ? \"00\" : \"000\";\r\n tright += paddingZero;\r\n tleft += tright.substr(0, paddingZero.length);\r\n tleft = tleft.replace(/^0+/gi, \"\");\r\n tright = tright.substr(paddingZero.length).replace(/0+$/gi, \"\");\r\n }\r\n var right = _dealWithRight(tright, fright);\r\n if (right.leftPlus) {\r\n // 小数点后有进位\r\n tleft = parseInt(tleft) + 1 + \"\";\r\n\r\n tleft = isNaN(tleft) ? \"1\" : tleft;\r\n }\r\n right = right.num;\r\n var left = _dealWithLeft(tleft, fleft);\r\n if (!(/[0-9]/.test(left))) {\r\n left = left + \"0\";\r\n }\r\n if (!(/[0-9]/.test(right))) {\r\n return left + right;\r\n } else {\r\n return left + \".\" + right;\r\n }\r\n }\r\n\r\n /**\r\n * 处理小数点右边小数部分\r\n * @param tright 右边内容\r\n * @param fright 右边格式\r\n * @returns {JSON} 返回处理结果和整数部分是否需要进位\r\n * @private\r\n */\r\n function _dealWithRight (tright, fright) {\r\n var right = \"\", j = 0, i = 0;\r\n for (var len = fright.length; i < len; i++) {\r\n var ch = fright.charAt(i);\r\n var c = tright.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n right += c;\r\n j++;\r\n break;\r\n case \"#\":\r\n right += c;\r\n j++;\r\n break;\r\n default :\r\n right += ch;\r\n break;\r\n }\r\n }\r\n var rll = tright.substr(j);\r\n var result = {};\r\n if (!isEmpty(rll) && rll.charAt(0) > 4) {\r\n // 有多余字符,需要四舍五入\r\n result.leftPlus = true;\r\n var numReg = right.match(/^[0-9]+/);\r\n if (numReg) {\r\n var num = numReg[0];\r\n var orilen = num.length;\r\n var newnum = parseInt(num) + 1 + \"\";\r\n // 进位到整数部分\r\n if (newnum.length > orilen) {\r\n newnum = newnum.substr(1);\r\n } else {\r\n newnum = BI.leftPad(newnum, orilen, \"0\");\r\n result.leftPlus = false;\r\n }\r\n right = right.replace(/^[0-9]+/, newnum);\r\n }\r\n }\r\n result.num = right;\r\n return result;\r\n }\r\n\r\n /**\r\n * 处理小数点左边整数部分\r\n * @param tleft 左边内容\r\n * @param fleft 左边格式\r\n * @returns {string} 返回处理结果\r\n * @private\r\n */\r\n function _dealWithLeft (tleft, fleft) {\r\n var left = \"\";\r\n var j = tleft.length - 1;\r\n var combo = -1, last = -1;\r\n var i = fleft.length - 1;\r\n for (; i >= 0; i--) {\r\n var ch = fleft.charAt(i);\r\n var c = tleft.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n last = -1;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \"#\":\r\n last = i;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \",\":\r\n if (!isEmpty(c)) {\r\n // 计算一个,分隔区间的长度\r\n var com = fleft.match(/,[#0]+/);\r\n if (com) {\r\n combo = com[0].length - 1;\r\n }\r\n left = \",\" + left;\r\n }\r\n break;\r\n default :\r\n left = ch + left;\r\n break;\r\n }\r\n }\r\n if (last > -1) {\r\n // 处理剩余字符\r\n var tll = tleft.substr(0, j + 1);\r\n left = left.substr(0, last) + tll + left.substr(last);\r\n }\r\n if (combo > 0) {\r\n // 处理,分隔区间\r\n var res = left.match(/[0-9]+,/);\r\n if (res) {\r\n res = res[0];\r\n var newstr = \"\", n = res.length - 1 - combo;\r\n for (; n >= 0; n = n - combo) {\r\n newstr = res.substr(n, combo) + \",\" + newstr;\r\n }\r\n var lres = res.substr(0, n + combo);\r\n if (!isEmpty(lres)) {\r\n newstr = lres + \",\" + newstr;\r\n }\r\n }\r\n left = left.replace(/[0-9]+,/, newstr);\r\n }\r\n return left;\r\n }\r\n\r\n\r\n BI.cjkEncode = function (text) {\r\n // alex:如果非字符串,返回其本身(cjkEncode(234) 返回 \"\"是不对的)\r\n if (typeof text !== \"string\") {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var code = text.charCodeAt(i);\r\n if (code >= 128 || code === 91 || code === 93) {// 91 is \"[\", 93 is \"]\".\r\n newText += \"[\" + code.toString(16) + \"]\";\r\n } else {\r\n newText += text.charAt(i);\r\n }\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n /**\r\n * 将cjkEncode处理过的字符串转化为原始字符串\r\n *\r\n * @static\r\n * @param text 需要做解码的字符串\r\n * @return {String} 解码后的字符串\r\n */\r\n BI.cjkDecode = function (text) {\r\n if (text == null) {\r\n return \"\";\r\n }\r\n // 查找没有 \"[\", 直接返回. kunsnat:数字的时候, 不支持indexOf方法, 也是直接返回.\r\n if (!isNaN(text) || text.indexOf(\"[\") == -1) {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var ch = text.charAt(i);\r\n if (ch == \"[\") {\r\n var rightIdx = text.indexOf(\"]\", i + 1);\r\n if (rightIdx > i + 1) {\r\n var subText = text.substring(i + 1, rightIdx);\r\n // james:主要是考虑[CDATA[]]这样的值的出现\r\n if (subText.length > 0) {\r\n ch = String.fromCharCode(eval(\"0x\" + subText));\r\n }\r\n\r\n i = rightIdx;\r\n }\r\n }\r\n\r\n newText += ch;\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n // replace the html special tags\r\n var SPECIAL_TAGS = {\r\n \"&\": \"&amp;\",\r\n \"\\\"\": \"&quot;\",\r\n \"<\": \"&lt;\",\r\n \">\": \"&gt;\",\r\n \" \": \"&nbsp;\"\r\n };\r\n BI.htmlEncode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|\\\"|<|>|\\\\s\", function (v) {\r\n return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : \"&nbsp;\";\r\n });\r\n };\r\n // html decode\r\n BI.htmlDecode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&amp;|&quot;|&lt;|&gt;|&nbsp;\", function (v) {\r\n switch (v) {\r\n case \"&amp;\":\r\n return \"&\";\r\n case \"&quot;\":\r\n return \"\\\"\";\r\n case \"&lt;\":\r\n return \"<\";\r\n case \"&gt;\":\r\n return \">\";\r\n case \"&nbsp;\":\r\n default:\r\n return \" \";\r\n }\r\n });\r\n };\r\n\r\n BI.cjkEncodeDO = function (o) {\r\n if (BI.isPlainObject(o)) {\r\n var result = {};\r\n _.each(o, function (v, k) {\r\n if (!(typeof v === \"string\")) {\r\n v = BI.jsonEncode(v);\r\n }\r\n // wei:bug 43338,如果key是中文,cjkencode后o的长度就加了1,ie9以下版本死循环,所以新建对象result。\r\n k = BI.cjkEncode(k);\r\n result[k] = BI.cjkEncode(v);\r\n });\r\n return result;\r\n }\r\n return o;\r\n };\r\n\r\n BI.jsonEncode = function (o) {\r\n // james:这个Encode是抄的EXT的\r\n var useHasOwn = !!{}.hasOwnProperty;\r\n\r\n // crashes Safari in some instances\r\n // var validRE = /^(\"(\\\\.|[^\"\\\\\\n\\r])*?\"|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$/;\r\n\r\n var m = {\r\n \"\\b\": \"\\\\b\",\r\n \"\\t\": \"\\\\t\",\r\n \"\\n\": \"\\\\n\",\r\n \"\\f\": \"\\\\f\",\r\n \"\\r\": \"\\\\r\",\r\n \"\\\"\": \"\\\\\\\"\",\r\n \"\\\\\": \"\\\\\\\\\"\r\n };\r\n\r\n var encodeString = function (s) {\r\n if (/[\"\\\\\\x00-\\x1f]/.test(s)) {\r\n return \"\\\"\" + s.replace(/([\\x00-\\x1f\\\\\"])/g, function (a, b) {\r\n var c = m[b];\r\n if (c) {\r\n return c;\r\n }\r\n c = b.charCodeAt();\r\n return \"\\\\u00\" +\r\n Math.floor(c / 16).toString(16) +\r\n (c % 16).toString(16);\r\n }) + \"\\\"\";\r\n }\r\n return \"\\\"\" + s + \"\\\"\";\r\n };\r\n\r\n var encodeArray = function (o) {\r\n var a = [\"[\"], b, i, l = o.length, v;\r\n for (i = 0; i < l; i += 1) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"function\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n a.push(\"]\");\r\n return a.join(\"\");\r\n };\r\n\r\n if (typeof o === \"undefined\" || o === null) {\r\n return \"null\";\r\n } else if (BI.isArray(o)) {\r\n return encodeArray(o);\r\n } else if (o instanceof Date) {\r\n /*\r\n * alex:原来只是把年月日时分秒简单地拼成一个String,无法decode\r\n * 现在这么处理就可以decode了,但是JS.jsonDecode和Java.JSONObject也要跟着改一下\r\n */\r\n return BI.jsonEncode({\r\n __time__: o.getTime()\r\n });\r\n } else if (typeof o === \"string\") {\r\n return encodeString(o);\r\n } else if (typeof o === \"number\") {\r\n return isFinite(o) ? String(o) : \"null\";\r\n } else if (typeof o === \"boolean\") {\r\n return String(o);\r\n } else if (BI.isFunction(o)) {\r\n return String(o);\r\n }\r\n var a = [\"{\"], b, i, v;\r\n for (i in o) {\r\n if (!useHasOwn || o.hasOwnProperty(i)) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(BI.jsonEncode(i), \":\",\r\n v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n }\r\n a.push(\"}\");\r\n return a.join(\"\");\r\n\r\n };\r\n\r\n BI.jsonDecode = function (text) {\r\n\r\n try {\r\n // 注意0啊\r\n // var jo = $.parseJSON(text) || {};\r\n var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);\r\n if (jo == null) {\r\n jo = {};\r\n }\r\n } catch (e) {\r\n /*\r\n * richie:浏览器只支持标准的JSON字符串转换,而jQuery会默认调用浏览器的window.JSON.parse()函数进行解析\r\n * 比如:var str = \"{'a':'b'}\",这种形式的字符串转换为JSON就会抛异常\r\n */\r\n try {\r\n jo = new Function(\"return \" + text)() || {};\r\n } catch (e) {\r\n // do nothing\r\n }\r\n if (jo == null) {\r\n jo = [];\r\n }\r\n }\r\n if (!_hasDateInJson(text)) {\r\n return jo;\r\n }\r\n\r\n function _hasDateInJson (json) {\r\n if (!json || typeof json !== \"string\") {\r\n return false;\r\n }\r\n return json.indexOf(\"__time__\") != -1;\r\n }\r\n\r\n return (function (o) {\r\n if (typeof o === \"string\") {\r\n return o;\r\n }\r\n if (o && o.__time__ != null) {\r\n return new Date(o.__time__);\r\n }\r\n for (var a in o) {\r\n if (o[a] == o || typeof o[a] === \"object\" || _.isFunction(o[a])) {\r\n break;\r\n }\r\n o[a] = arguments.callee(o[a]);\r\n }\r\n\r\n return o;\r\n })(jo);\r\n };\r\n\r\n /**\r\n * 获取编码后的url\r\n * @param urlTemplate url模板\r\n * @param param 参数\r\n * @returns {*|String}\r\n * @example\r\n * BI.getEncodeURL(\"design/{tableName}/{fieldName}\",{tableName: \"A\", fieldName: \"a\"}) // design/A/a\r\n */\r\n BI.getEncodeURL = function (urlTemplate, param) {\r\n return urlTemplate.replaceAll(\"\\\\{(.*?)\\\\}\", function (ori, str) {\r\n return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);\r\n });\r\n };\r\n\r\n BI.encodeURIComponent = function (url) {\r\n BI.specialCharsMap = BI.specialCharsMap || {};\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(BI.specialCharsMap || []).join(\"|\"), function (str) {\r\n switch (str) {\r\n case \"\\\\\":\r\n return BI.specialCharsMap[\"\\\\\\\\\"] || str;\r\n default:\r\n return BI.specialCharsMap[str] || str;\r\n }\r\n });\r\n return _global.encodeURIComponent(url);\r\n };\r\n\r\n BI.decodeURIComponent = function (url) {\r\n var reserveSpecialCharsMap = {};\r\n BI.each(BI.specialCharsMap, function (initialChar, encodeChar) {\r\n reserveSpecialCharsMap[encodeChar] = initialChar === \"\\\\\\\\\" ? \"\\\\\" : initialChar;\r\n });\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(reserveSpecialCharsMap || []).join(\"|\"), function (str) {\r\n return reserveSpecialCharsMap[str] || str;\r\n });\r\n return _global.decodeURIComponent(url);\r\n };\r\n\r\n BI.contentFormat = function (cv, fmt) {\r\n if (isEmpty(cv)) {\r\n // 原值为空,返回空字符\r\n return \"\";\r\n }\r\n var text = cv.toString();\r\n if (isEmpty(fmt)) {\r\n // 格式为空,返回原字符\r\n return text;\r\n }\r\n if (fmt.match(/^T/)) {\r\n // T - 文本格式\r\n return text;\r\n } else if (fmt.match(/^D/)) {\r\n // D - 日期(时间)格式\r\n if (!(cv instanceof Date)) {\r\n if (typeof cv === \"number\") {\r\n // 毫秒数类型\r\n cv = new Date(cv);\r\n } else {\r\n //字符串类型转化为date类型\r\n cv = new Date(Date.parse((\"\" + cv).replace(/-|\\./g, \"/\")));\r\n }\r\n }\r\n if (!isInvalidDate(cv) && !BI.isNull(cv)) {\r\n var needTrim = fmt.match(/^DT/);\r\n text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));\r\n }\r\n } else if (fmt.match(/E/)) {\r\n // 科学计数格式\r\n text = _eFormat(text, fmt);\r\n } else {\r\n // 数字格式\r\n text = _numberFormat(text, fmt);\r\n }\r\n // ¤ - 货币格式\r\n text = text.replace(/¤/g, \"¥\");\r\n return text;\r\n };\r\n\r\n /**\r\n * 将Java提供的日期格式字符串装换为JS识别的日期格式字符串\r\n * @class FR.parseFmt\r\n * @param fmt 日期格式\r\n * @returns {String}\r\n */\r\n BI.parseFmt = function (fmt) {\r\n if (!fmt) {\r\n return \"\";\r\n }\r\n //日期\r\n fmt = String(fmt)\r\n //年\r\n .replace(/y{4,}/g, \"%Y\")//yyyy的时候替换为Y\r\n .replace(/y{2}/g, \"%y\")//yy的时候替换为y\r\n //月\r\n .replace(/M{4,}/g, \"%b\")//MMMM的时候替换为b,八\r\n .replace(/M{3}/g, \"%B\")//MMM的时候替换为M,八月\r\n .replace(/M{2}/g, \"%X\")//MM的时候替换为X,08\r\n .replace(/M{1}/g, \"%x\")//M的时候替换为x,8\r\n .replace(/a{1}/g, \"%p\");\r\n //天\r\n if (new RegExp(\"d{2,}\", \"g\").test(fmt)) {\r\n fmt = fmt.replace(/d{2,}/g, \"%d\");//dd的时候替换为d\r\n } else {\r\n fmt = fmt.replace(/d{1}/g, \"%e\");//d的时候替换为j\r\n }\r\n //时\r\n if (new RegExp(\"h{2,}\", \"g\").test(fmt)) {//12小时制\r\n fmt = fmt.replace(/h{2,}/g, \"%I\");\r\n } else {\r\n fmt = fmt.replace(/h{1}/g, \"%I\");\r\n }\r\n if (new RegExp(\"H{2,}\", \"g\").test(fmt)) {//24小时制\r\n fmt = fmt.replace(/H{2,}/g, \"%H\");\r\n } else {\r\n fmt = fmt.replace(/H{1}/g, \"%H\");\r\n }\r\n fmt = fmt.replace(/m{2,}/g, \"%M\")//分\r\n //秒\r\n .replace(/s{2,}/g, \"%S\");\r\n\r\n return fmt;\r\n };\r\n\r\n /**\r\n * 把字符串按照对应的格式转化成日期对象\r\n *\r\n * @example\r\n * var result = BI.str2Date('2013-12-12', 'yyyy-MM-dd');//Thu Dec 12 2013 00:00:00 GMT+0800\r\n *\r\n * @class BI.str2Date\r\n * @param str 字符串\r\n * @param format 日期格式\r\n * @returns {*}\r\n */\r\n BI.str2Date = function (str, format) {\r\n if (typeof str != \"string\" || typeof format != \"string\") {\r\n return null;\r\n }\r\n var fmt = BI.parseFmt(format);\r\n return BI.parseDateTime(str, fmt);\r\n };\r\n\r\n /**\r\n * 把日期对象按照指定格式转化成字符串\r\n *\r\n * @example\r\n * var date = new Date('Thu Dec 12 2013 00:00:00 GMT+0800');\r\n * var result = BI.date2Str(date, 'yyyy-MM-dd');//2013-12-12\r\n *\r\n * @class BI.date2Str\r\n * @param date 日期\r\n * @param format 日期格式\r\n * @returns {String}\r\n */\r\n BI.date2Str = function (date, format) {\r\n if (!date) {\r\n return \"\";\r\n }\r\n // O(len(format))\r\n var len = format.length, result = \"\";\r\n if (len > 0) {\r\n var flagch = format.charAt(0), start = 0, str = flagch;\r\n for (var i = 1; i < len; i++) {\r\n var ch = format.charAt(i);\r\n if (flagch !== ch) {\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: i - start\r\n }, date);\r\n flagch = ch;\r\n start = i;\r\n str = flagch;\r\n } else {\r\n str += ch;\r\n }\r\n }\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: len - start\r\n }, date);\r\n }\r\n return result;\r\n\r\n function compileJFmt (jfmt, date) {\r\n var str = jfmt.str, len = jfmt.len, ch = jfmt[\"char\"];\r\n switch (ch) {\r\n case \"E\": // 星期\r\n str = BI.Date._DN[date.getDay()];\r\n break;\r\n case \"y\": // 年\r\n if (len <= 3) {\r\n str = (date.getFullYear() + \"\").slice(2, 4);\r\n } else {\r\n str = date.getFullYear();\r\n }\r\n break;\r\n case \"M\": // 月\r\n if (len > 2) {\r\n str = BI.Date._MN[date.getMonth()];\r\n } else if (len < 2) {\r\n str = date.getMonth() + 1;\r\n } else {\r\n str = BI.leftPad(date.getMonth() + 1 + \"\", 2, \"0\");\r\n }\r\n break;\r\n case \"d\": // 日\r\n if (len > 1) {\r\n str = BI.leftPad(date.getDate() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getDate();\r\n }\r\n break;\r\n case \"h\": // 时(12)\r\n var hour = date.getHours() % 12;\r\n if (hour === 0) {\r\n hour = 12;\r\n }\r\n if (len > 1) {\r\n str = BI.leftPad(hour + \"\", 2, \"0\");\r\n } else {\r\n str = hour;\r\n }\r\n break;\r\n case \"H\": // 时(24)\r\n if (len > 1) {\r\n str = BI.leftPad(date.getHours() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getHours();\r\n }\r\n break;\r\n case \"m\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getMinutes() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getMinutes();\r\n }\r\n break;\r\n case \"s\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getSeconds() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getSeconds();\r\n }\r\n break;\r\n case \"a\":\r\n str = date.getHours() < 12 ? \"am\" : \"pm\";\r\n break;\r\n case \"z\":\r\n str = BI.getTimezone(date);\r\n break;\r\n default:\r\n str = jfmt.str;\r\n break;\r\n }\r\n return str;\r\n }\r\n };\r\n\r\n BI.object2Number = function (value) {\r\n if (value == null) {\r\n return 0;\r\n }\r\n if (typeof value === \"number\") {\r\n return value;\r\n }\r\n var str = value + \"\";\r\n if (str.indexOf(\".\") === -1) {\r\n return parseInt(str);\r\n }\r\n return parseFloat(str);\r\n };\r\n\r\n BI.object2Date = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n } else if (typeof obj === \"number\") {\r\n return new Date(obj);\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n\r\n return new Date();\r\n\r\n };\r\n\r\n BI.object2Time = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n if (str.indexOf(\"/\") === -1 && str.indexOf(\":\") !== -1) {\r\n dt = new Date(\"1970/01/01 \" + str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n }\r\n dt = BI.parseDateTime(str, \"HH:mm:ss\");\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n return new Date();\r\n\r\n };\r\n})();\r\n/**\r\n * guy\r\n *\r\n * @class BI.HighlightBehavior\r\n * @extends BI.Behavior\r\n */\r\nBI.HighlightBehavior = BI.inherit(BI.Behavior, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.HighlightBehavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function (items) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n o = this.options;\r\n BI.each(items, function (i, item) {\r\n if (item instanceof BI.Single) {\r\n var rule = o.rule(item.getValue(), item);\r\n\r\n function doBe (run) {\r\n if (run === true) {\r\n item.doHighLight && item.doHighLight.apply(item, args);\r\n } else {\r\n item.unHighLight && item.unHighLight.apply(item, args);\r\n }\r\n }\r\n\r\n if (BI.isFunction(rule)) {\r\n rule(doBe);\r\n } else {\r\n doBe(rule);\r\n }\r\n } else {\r\n item.doBehavior && item.doBehavior.apply(item, args);\r\n }\r\n });\r\n }\r\n});/**\r\n * guy\r\n * 标红行为\r\n * @class BI.RedMarkBehavior\r\n * @extends BI.Behavior\r\n */\r\nBI.RedMarkBehavior = BI.inherit(BI.Behavior, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this, arguments), {\r\n\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.RedMarkBehavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function (items) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n o = this.options;\r\n BI.each(items, function (i, item) {\r\n if(item instanceof BI.Single) {\r\n if (o.rule(item.getValue(), item)) {\r\n item.doRedMark && item.doRedMark.apply(item, args);\r\n } else {\r\n item.doRedMark && item.unRedMark.apply(item, args);\r\n }\r\n } else {\r\n item.doBehavior && item.doBehavior.apply(item, args);\r\n }\r\n });\r\n }\r\n});/**\r\n * guy\r\n * 控制器\r\n * Controller层超类\r\n * @class BI.Controller\r\n * @extends BI.OB\r\n * @abstract\r\n */\r\nBI.Controller = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Controller.superclass._defaultConfig.apply(this, arguments), {\r\n\r\n });\r\n },\r\n _init: function () {\r\n BI.Controller.superclass._init.apply(this, arguments);\r\n },\r\n\r\n destroy: function () {\r\n\r\n }\r\n});\r\nBI.Controller.EVENT_CHANGE = \"__EVENT_CHANGE__\";/**\r\n * 广播\r\n *\r\n * Created by GUY on 2015/12/23.\r\n * @class\r\n */\r\nBI.BroadcastController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BroadcastController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.BroadcastController.superclass._init.apply(this, arguments);\r\n this._broadcasts = {};\r\n },\r\n\r\n on: function (name, fn) {\r\n var self = this;\r\n if (!this._broadcasts[name]) {\r\n this._broadcasts[name] = [];\r\n }\r\n this._broadcasts[name].push(fn);\r\n return function () {\r\n self.remove(name, fn);\r\n };\r\n },\r\n\r\n send: function (name) {\r\n var args = [].slice.call(arguments, 1);\r\n BI.each(this._broadcasts[name], function (i, fn) {\r\n fn.apply(null, args);\r\n });\r\n },\r\n\r\n remove: function (name, fn) {\r\n var self = this;\r\n if (fn) {\r\n BI.remove(this._broadcasts[name], function (idx) {\r\n return self._broadcasts[name].indexOf(fn) === idx;\r\n });\r\n this._broadcasts[name].remove(fn);\r\n if (this._broadcasts[name].length === 0) {\r\n delete this._broadcasts[name];\r\n }\r\n } else {\r\n delete this._broadcasts[name];\r\n }\r\n return this;\r\n }\r\n});/**\r\n * 气泡图控制器\r\n * 控制气泡图的显示方向\r\n *\r\n * Created by GUY on 2015/8/21.\r\n * @class\r\n */\r\nBI.BubblesController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubblesController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _const: {\r\n bubbleHeight: 18\r\n },\r\n\r\n _init: function () {\r\n BI.BubblesController.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.bubblesManager = {};\r\n this.storeBubbles = {};\r\n BI.Resizers.add(\"bubbleController\" + BI.uniqueId(), function () {\r\n BI.each(self.bubblesManager, function (name) {\r\n self.remove(name);\r\n });\r\n self.bubblesManager = {};\r\n self.storeBubbles = {};\r\n });\r\n },\r\n\r\n _createBubble: function (direct, text, level, height) {\r\n return BI.createWidget({\r\n type: \"bi.bubble\",\r\n text: text,\r\n level: level,\r\n height: height || 18,\r\n direction: direct\r\n });\r\n },\r\n\r\n _getOffsetLeft: function (name, context, offsetStyle) {\r\n var left = 0;\r\n if (\"center\" === offsetStyle) {\r\n left = context.element.offset().left + (context.element.bounds().width - this.get(name).element.bounds().width) / 2;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return left;\r\n }\r\n if (\"right\" === offsetStyle) {\r\n left = context.element.offset().left + context.element.bounds().width - this.get(name).element.bounds().width;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return left;\r\n }\r\n return context.element.offset().left;\r\n },\r\n\r\n _getOffsetTop: function (name, context, offsetStyle) {\r\n var top = 0;\r\n if (\"center\" === offsetStyle) {\r\n top = context.element.offset().top + (context.element.bounds().height - this.get(name).element.bounds().height) / 2;\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return top;\r\n } else if (\"right\" === offsetStyle) {\r\n top = context.element.offset().top + context.element.bounds().height - this.get(name).element.bounds().height;\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return top;\r\n }\r\n return context.element.offset().top;\r\n },\r\n\r\n _getLeftPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getLeftPosition(context, this.get(name));\r\n position.top = this._getOffsetTop(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getBottomPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getBottomPosition(context, this.get(name));\r\n position.left = this._getOffsetLeft(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getTopPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getTopPosition(context, this.get(name));\r\n position.left = this._getOffsetLeft(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getRightPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getRightPosition(context, this.get(name));\r\n position.top = this._getOffsetTop(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n /**\r\n *\r\n * @param name\r\n * @param text\r\n * @param context\r\n * @param offsetStyle center, left, right三种类型, 默认left\r\n * @returns {BI.BubblesController}\r\n */\r\n show: function (name, text, context, opt) {\r\n opt || (opt = {});\r\n var container = opt.container || context;\r\n var offsetStyle = opt.offsetStyle || {};\r\n var level = opt.level || \"error\";\r\n var adjustYOffset = opt.adjustYOffset || 0;\r\n var adjustXOffset = opt.adjustXOffset || 0;\r\n if (!this.storeBubbles[name]) {\r\n this.storeBubbles[name] = {};\r\n }\r\n if (!this.storeBubbles[name][\"top\"]) {\r\n this.storeBubbles[name][\"top\"] = this._createBubble(\"top\", text, level);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"top\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"top\"]);\r\n var position = this._getTopPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {\r\n if (!this.storeBubbles[name][\"left\"]) {\r\n this.storeBubbles[name][\"left\"] = this._createBubble(\"left\", text, level, 30);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"left\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"left\"]);\r\n var position = this._getLeftPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left - adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isLeftSpaceEnough(context, this.get(name), adjustXOffset)) {\r\n if (!this.storeBubbles[name][\"right\"]) {\r\n this.storeBubbles[name][\"right\"] = this._createBubble(\"right\", text, level, 30);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"right\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"right\"]);\r\n var position = this._getRightPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {\r\n if (!this.storeBubbles[name][\"bottom\"]) {\r\n this.storeBubbles[name][\"bottom\"] = this._createBubble(\"bottom\", text, level);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"bottom\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"bottom\"]);\r\n var position = this._getBottomPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});\r\n this.get(name).invisible();\r\n }\r\n }\r\n }\r\n this.get(name).setText(text);\r\n this.get(name).visible();\r\n return this;\r\n },\r\n\r\n hide: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.get(name).invisible();\r\n return this;\r\n },\r\n\r\n add: function (name, bubble) {\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.set(name, bubble);\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.bubblesManager[name];\r\n },\r\n\r\n set: function (name, bubble) {\r\n this.bubblesManager[name] = bubble;\r\n },\r\n\r\n has: function (name) {\r\n return this.bubblesManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n BI.each(this.storeBubbles[name], function (dir, bubble) {\r\n bubble.destroy();\r\n });\r\n delete this.storeBubbles[name];\r\n delete this.bubblesManager[name];\r\n return this;\r\n }\r\n});/**\r\n * 弹出层面板控制器, z-index在10w层级\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.LayerController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LayerController.superclass._defaultConfig.apply(this, arguments), {\r\n render: \"body\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LayerController.superclass._init.apply(this, arguments);\r\n this.layerManager = {};\r\n this.layouts = {};\r\n this.zindex = BI.zIndex_layer;\r\n BI.Resizers.add(\"layerController\" + BI.uniqueId(), BI.bind(this._resize, this));\r\n },\r\n\r\n _resize: function () {\r\n BI.each(this.layouts, function (i, layer) {\r\n if (layer.element.is(\":visible\")) {\r\n layer.element.trigger(\"__resize__\");\r\n }\r\n });\r\n },\r\n\r\n make: function (name, container, op, context) {\r\n if (BI.isWidget(container)) {\r\n op = op || {};\r\n op.container = container;\r\n } else {\r\n context = op;\r\n op = container;\r\n }\r\n return this.create(name, null, op, context);\r\n },\r\n\r\n create: function (name, from, op, context) {\r\n if (this.has(name)) {\r\n return this.get(name);\r\n }\r\n op || (op = {});\r\n var offset = op.offset || {};\r\n var w = from;\r\n if (BI.isWidget(from)) {\r\n w = from.element;\r\n }\r\n if (BI.isNotEmptyString(w)) {\r\n w = BI.Widget._renderEngine.createElement(w);\r\n }\r\n if (this.has(name)) {\r\n return this.get(name);\r\n }\r\n var widget = BI.createWidget((op.render || {}), BI.extend({\r\n type: \"bi.layout\"\r\n }, op), context);\r\n var layout = BI.createWidget({\r\n type: \"bi.absolute\",\r\n invisible: true,\r\n items: [{\r\n el: widget,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, context);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: op.container || this.options.render,\r\n items: [{\r\n el: layout,\r\n left: offset.left || 0,\r\n right: offset.right || 0,\r\n top: offset.top || 0,\r\n bottom: offset.bottom || 0\r\n }]\r\n });\r\n if (w) {\r\n layout.element.addClass(\"bi-popup-view\");\r\n layout.element.css({\r\n left: w.offset().left + (offset.left || 0),\r\n top: w.offset().top + (offset.top || 0),\r\n width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || \"\",\r\n height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || \"\"\r\n });\r\n layout.element.on(\"__resize__\", function () {\r\n w.is(\":visible\") &&\r\n layout.element.css({\r\n left: w.offset().left + (offset.left || 0),\r\n top: w.offset().top + (offset.top || 0),\r\n width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || \"\",\r\n height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || \"\"\r\n });\r\n });\r\n }\r\n this.add(name, widget, layout);\r\n return widget;\r\n },\r\n\r\n hide: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this._getLayout(name).invisible();\r\n this._getLayout(name).element.hide(0, callback);\r\n return this;\r\n },\r\n\r\n show: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this._getLayout(name).visible();\r\n this._getLayout(name).element.css(\"z-index\", this.zindex++).show(0, callback).trigger(\"__resize__\");\r\n return this;\r\n },\r\n\r\n isVisible: function (name) {\r\n return this.has(name) && this._getLayout(name).isVisible();\r\n },\r\n\r\n add: function (name, layer, layout) {\r\n if (this.has(name)) {\r\n throw new Error(\"name is already exist\");\r\n }\r\n layout.setVisible(false);\r\n this.layerManager[name] = layer;\r\n this.layouts[name] = layout;\r\n layout.element.css(\"z-index\", this.zindex++);\r\n return this;\r\n },\r\n\r\n _getLayout: function (name) {\r\n return this.layouts[name];\r\n },\r\n\r\n get: function (name) {\r\n return this.layerManager[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.layerManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.layerManager[name].destroy();\r\n this.layouts[name].destroy();\r\n delete this.layerManager[name];\r\n delete this.layouts[name];\r\n return this;\r\n },\r\n\r\n removeAll: function () {\r\n var self = this;\r\n BI.each(BI.keys(this.layerManager), function (index, name) {\r\n self.layerManager[name].destroy();\r\n self.layouts[name].destroy();\r\n });\r\n this.layerManager = {};\r\n this.layouts = {};\r\n return this;\r\n }\r\n});/**\r\n * 遮罩面板, z-index在1亿层级\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.MaskersController = BI.inherit(BI.LayerController, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MaskersController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.MaskersController.superclass._init.apply(this, arguments);\r\n this.zindex = BI.zIndex_masker;\r\n }\r\n});/**\r\n * guy\r\n * popover弹出层控制器, z-index在100w层级\r\n * @class BI.popoverController\r\n * @extends BI.Controller\r\n */\r\nBI.PopoverController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PopoverController.superclass._defaultConfig.apply(this, arguments), {\r\n modal: true, // 模态窗口\r\n render: \"body\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopoverController.superclass._init.apply(this, arguments);\r\n this.modal = this.options.modal;\r\n this.floatManager = {};\r\n this.floatLayer = {};\r\n this.floatContainer = {};\r\n this.floatOpened = {};\r\n this.zindex = BI.zIndex_popover;\r\n this.zindexMap = {};\r\n },\r\n\r\n _check: function (name) {\r\n return BI.isNotNull(this.floatManager[name]);\r\n },\r\n\r\n create: function (name, options, context) {\r\n if (this._check(name)) {\r\n return this;\r\n }\r\n var popover = BI.createWidget(options || {}, {\r\n type: \"bi.popover\"\r\n }, context);\r\n this.add(name, popover, options, context);\r\n return this;\r\n },\r\n\r\n add: function (name, popover, options, context) {\r\n var self = this;\r\n options || (options = {});\r\n if (this._check(name)) {\r\n return this;\r\n }\r\n this.floatContainer[name] = BI.createWidget({\r\n type: \"bi.absolute\",\r\n cls: \"bi-popup-view\",\r\n items: [{\r\n el: (this.floatLayer[name] = BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [popover]\r\n }, context)),\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.floatManager[name] = popover;\r\n (function (key) {\r\n popover.on(BI.Popover.EVENT_CLOSE, function () {\r\n self.close(key);\r\n });\r\n })(name);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: options.container || this.options.render,\r\n items: [{\r\n el: this.floatContainer[name],\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n return this;\r\n },\r\n\r\n open: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n if (!this.floatOpened[name]) {\r\n this.floatOpened[name] = true;\r\n var container = this.floatContainer[name];\r\n container.element.css(\"zIndex\", this.zindex++);\r\n this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);\r\n this.zindexMap[name] = this.zindex;\r\n this.modal && container.element.__buildZIndexMask__(this.zindex++);\r\n this.get(name).setZindex(this.zindex++);\r\n this.floatContainer[name].visible();\r\n var popover = this.get(name);\r\n popover.show && popover.show();\r\n var W = BI.Widget._renderEngine.createElement(this.options.render).width(), H = BI.Widget._renderEngine.createElement(this.options.render).height();\r\n var w = popover.element.width(), h = popover.element.height();\r\n var left = (W - w) / 2, top = (H - h) / 2;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n popover.element.css({\r\n left: left + \"px\",\r\n top: top + \"px\"\r\n });\r\n }\r\n return this;\r\n },\r\n\r\n close: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n if (this.floatOpened[name]) {\r\n delete this.floatOpened[name];\r\n this.floatContainer[name].invisible();\r\n this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);\r\n }\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.floatManager[name];\r\n },\r\n\r\n remove: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n this.floatContainer[name].destroy();\r\n this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);\r\n delete this.floatManager[name];\r\n delete this.floatLayer[name];\r\n delete this.zindexMap[name];\r\n delete this.floatContainer[name];\r\n delete this.floatOpened[name];\r\n return this;\r\n },\r\n\r\n removeAll: function () {\r\n var self = this;\r\n BI.each(this.floatContainer, function (name, container) {\r\n container.destroy();\r\n self.modal && self.floatContainer[name].element.__releaseZIndexMask__(self.zindexMap[name]);\r\n });\r\n this.floatManager = {};\r\n this.floatLayer = {};\r\n this.floatContainer = {};\r\n this.floatOpened = {};\r\n this.zindexMap = {};\r\n return this;\r\n }\r\n});/**\r\n * window.resize 控制器\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.ResizeController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ResizeController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ResizeController.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.resizerManger = {};\r\n var fn = BI.debounce(function (ev) {\r\n // if (BI.isWindow(ev.target)) {\r\n self._resize(ev);\r\n // }\r\n }, 30);\r\n BI.Widget._renderEngine.createElement(_global).resize(fn);\r\n },\r\n\r\n _resize: function (ev) {\r\n BI.each(this.resizerManger, function (key, resizer) {\r\n if (resizer instanceof BI.$) {\r\n if (resizer.is(\":visible\")) {\r\n resizer.trigger(\"__resize__\");\r\n }\r\n return;\r\n }\r\n if (resizer instanceof BI.Layout) {\r\n resizer.resize();\r\n return;\r\n }\r\n if (BI.isFunction(resizer)) {\r\n resizer(ev);\r\n return;\r\n }\r\n });\r\n },\r\n\r\n add: function (name, resizer) {\r\n var self = this;\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.resizerManger[name] = resizer;\r\n return function () {\r\n self.remove(name);\r\n };\r\n },\r\n\r\n get: function (name) {\r\n return this.resizerManger[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.resizerManger[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n delete this.resizerManger[name];\r\n return this;\r\n }\r\n});/**\r\n * tooltip控制器\r\n * 控制tooltip的显示, 且页面中只有一个tooltip显示\r\n *\r\n * Created by GUY on 2015/9/8.\r\n * @class BI.TooltipsController\r\n * @extends BI.Controller\r\n */\r\nBI.TooltipsController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TooltipsController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _const: {\r\n height: 18\r\n },\r\n\r\n _init: function () {\r\n BI.TooltipsController.superclass._init.apply(this, arguments);\r\n this.tooltipsManager = {};\r\n this.showingTips = {};// 存储正在显示的tooltip\r\n },\r\n\r\n _createTooltip: function (text, level) {\r\n return BI.createWidget({\r\n type: \"bi.tooltip\",\r\n text: text,\r\n level: level,\r\n stopEvent: true\r\n });\r\n },\r\n\r\n hide: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n delete this.showingTips[name];\r\n this.get(name).element.hide(0, callback);\r\n this.get(name).invisible();\r\n return this;\r\n },\r\n\r\n create: function (name, text, level, context) {\r\n if (!this.has(name)) {\r\n var tooltip = this._createTooltip(text, level);\r\n this.add(name, tooltip);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: context || \"body\",\r\n items: [{\r\n el: tooltip\r\n }]\r\n });\r\n tooltip.invisible();\r\n }\r\n return this.get(name);\r\n },\r\n\r\n // opt: {container: '', belowMouse: false}\r\n show: function (e, name, text, level, context, opt) {\r\n opt || (opt = {});\r\n var self = this;\r\n BI.each(this.showingTips, function (i, tip) {\r\n self.hide(i);\r\n });\r\n this.showingTips = {};\r\n if (!this.has(name)) {\r\n this.create(name, text, level, opt.container || \"body\");\r\n }\r\n if (!opt.belowMouse) {\r\n var offset = context.element.offset();\r\n var bounds = context.element.bounds();\r\n if (bounds.height === 0 || bounds.width === 0) {\r\n return;\r\n }\r\n var top = offset.top + bounds.height + 5;\r\n }\r\n var tooltip = this.get(name);\r\n tooltip.setText(text);\r\n tooltip.element.css({\r\n left: \"0px\",\r\n top: \"0px\"\r\n });\r\n tooltip.visible();\r\n tooltip.element.height(tooltip.element[0].scrollHeight);\r\n this.showingTips[name] = true;\r\n // scale影响要计算在内\r\n // var scale = context.element.offset().left / context.element.get(0).getBoundingClientRect().left;\r\n // var x = (e.pageX || e.clientX) * scale + 15, y = (e.pageY || e.clientY) * scale + 15;\r\n var x = (e.pageX || e.clientX) + 15, y = (e.pageY || e.clientY) + 15;\r\n if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement(\"body\").outerWidth()) {\r\n x -= tooltip.element.outerWidth() + 15;\r\n }\r\n var bodyHeight = BI.Widget._renderEngine.createElement(\"body\").outerHeight();\r\n if (y + tooltip.element.outerHeight() > bodyHeight || top + tooltip.element.outerHeight() > bodyHeight) {\r\n y -= tooltip.element.outerHeight() + 15;\r\n !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));\r\n } else {\r\n !opt.belowMouse && (y = Math.max(y, top));\r\n }\r\n tooltip.element.css({\r\n left: x < 0 ? 0 : x + \"px\",\r\n top: y < 0 ? 0 : y + \"px\"\r\n });\r\n tooltip.element.hover(function () {\r\n self.remove(name);\r\n context.element.trigger(\"mouseleave.title\" + context.getName());\r\n });\r\n return this;\r\n },\r\n\r\n add: function (name, bubble) {\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.set(name, bubble);\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.tooltipsManager[name];\r\n },\r\n\r\n set: function (name, bubble) {\r\n this.tooltipsManager[name] = bubble;\r\n },\r\n\r\n has: function (name) {\r\n return this.tooltipsManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.tooltipsManager[name].destroy();\r\n delete this.tooltipsManager[name];\r\n return this;\r\n }\r\n});/**\r\n * 事件集合\r\n * @class BI.Events\r\n */\r\n_.extend(BI, {\r\n Events: {\r\n\r\n /**\r\n * @static\r\n * @property keydown事件\r\n */\r\n KEYDOWN: \"_KEYDOWN\",\r\n\r\n /**\r\n * @static\r\n * @property 回撤事件\r\n */\r\n BACKSPACE: \"_BACKSPACE\",\r\n\r\n /**\r\n * @static\r\n * @property 空格事件\r\n */\r\n SPACE: \"_SPACE\",\r\n\r\n /**\r\n * @static\r\n * @property 回车事件\r\n */\r\n ENTER: \"_ENTER\",\r\n\r\n /**\r\n * @static\r\n * @property 确定事件\r\n */\r\n CONFIRM: \"_CONFIRM\",\r\n\r\n /**\r\n * @static\r\n * @property 错误事件\r\n */\r\n ERROR: \"_ERROR\",\r\n\r\n /**\r\n * @static\r\n * @property 暂停事件\r\n */\r\n PAUSE: \"_PAUSE\",\r\n\r\n /**\r\n * @static\r\n * @property destroy事件\r\n */\r\n DESTROY: \"_DESTROY\",\r\n\r\n /**\r\n * @static\r\n * @property 挂载事件\r\n */\r\n MOUNT: \"_MOUNT\",\r\n\r\n /**\r\n * @static\r\n * @property 取消挂载事件\r\n */\r\n UNMOUNT: \"_UNMOUNT\",\r\n\r\n /**\r\n * @static\r\n * @property 清除选择\r\n */\r\n CLEAR: \"_CLEAR\",\r\n\r\n /**\r\n * @static\r\n * @property 添加数据\r\n */\r\n ADD: \"_ADD\",\r\n\r\n /**\r\n * @static\r\n * @property 正在编辑状态事件\r\n */\r\n EDITING: \"_EDITING\",\r\n\r\n /**\r\n * @static\r\n * @property 空状态事件\r\n */\r\n EMPTY: \"_EMPTY\",\r\n\r\n /**\r\n * @static\r\n * @property 显示隐藏事件\r\n */\r\n VIEW: \"_VIEW\",\r\n\r\n /**\r\n * @static\r\n * @property 窗体改变大小\r\n */\r\n RESIZE: \"_RESIZE\",\r\n\r\n /**\r\n * @static\r\n * @property 编辑前事件\r\n */\r\n BEFOREEDIT: \"_BEFOREEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 编辑后事件\r\n */\r\n AFTEREDIT: \"_AFTEREDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 开始编辑事件\r\n */\r\n STARTEDIT: \"_STARTEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 停止编辑事件\r\n */\r\n STOPEDIT: \"_STOPEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 值改变事件\r\n */\r\n CHANGE: \"_CHANGE\",\r\n\r\n /**\r\n * @static\r\n * @property 下拉弹出菜单事件\r\n */\r\n EXPAND: \"_EXPAND\",\r\n\r\n /**\r\n * @static\r\n * @property 关闭下拉菜单事件\r\n */\r\n COLLAPSE: \"_COLLAPSE\",\r\n\r\n /**\r\n * @static\r\n * @property 回调事件\r\n */\r\n CALLBACK: \"_CALLBACK\",\r\n\r\n /**\r\n * @static\r\n * @property 点击事件\r\n */\r\n CLICK: \"_CLICK\",\r\n\r\n /**\r\n * @static\r\n * @property 状态改变事件,一般是用在复选按钮和单选按钮\r\n */\r\n STATECHANGE: \"_STATECHANGE\",\r\n\r\n /**\r\n * @static\r\n * @property 状态改变前事件\r\n */\r\n BEFORESTATECHANGE: \"_BEFORESTATECHANGE\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 初始化事件\r\n */\r\n INIT: \"_INIT\",\r\n\r\n /**\r\n * @static\r\n * @property 初始化后事件\r\n */\r\n AFTERINIT: \"_AFTERINIT\",\r\n\r\n /**\r\n * @static\r\n * @property 滚动条滚动事件\r\n */\r\n SCROLL: \"_SCROLL\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 开始加载事件\r\n */\r\n STARTLOAD: \"_STARTLOAD\",\r\n\r\n /**\r\n * @static\r\n * @property 加载后事件\r\n */\r\n AFTERLOAD: \"_AFTERLOAD\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 提交前事件\r\n */\r\n BS: \"beforesubmit\",\r\n\r\n /**\r\n * @static\r\n * @property 提交后事件\r\n */\r\n AS: \"aftersubmit\",\r\n\r\n /**\r\n * @static\r\n * @property 提交完成事件\r\n */\r\n SC: \"submitcomplete\",\r\n\r\n /**\r\n * @static\r\n * @property 提交失败事件\r\n */\r\n SF: \"submitfailure\",\r\n\r\n /**\r\n * @static\r\n * @property 提交成功事件\r\n */\r\n SS: \"submitsuccess\",\r\n\r\n /**\r\n * @static\r\n * @property 校验提交前事件\r\n */\r\n BVW: \"beforeverifywrite\",\r\n\r\n /**\r\n * @static\r\n * @property 校验提交后事件\r\n */\r\n AVW: \"afterverifywrite\",\r\n\r\n /**\r\n * @static\r\n * @property 校验后事件\r\n */\r\n AV: \"afterverify\",\r\n\r\n /**\r\n * @static\r\n * @property 填报前事件\r\n */\r\n BW: \"beforewrite\",\r\n\r\n /**\r\n * @static\r\n * @property 填报后事件\r\n */\r\n AW: \"afterwrite\",\r\n\r\n /**\r\n * @static\r\n * @property 填报成功事件\r\n */\r\n WS: \"writesuccess\",\r\n\r\n /**\r\n * @static\r\n * @property 填报失败事件\r\n */\r\n WF: \"writefailure\",\r\n\r\n /**\r\n * @static\r\n * @property 添加行前事件\r\n */\r\n BA: \"beforeappend\",\r\n\r\n /**\r\n * @static\r\n * @property 添加行后事件\r\n */\r\n AA: \"afterappend\",\r\n\r\n /**\r\n * @static\r\n * @property 删除行前事件\r\n */\r\n BD: \"beforedelete\",\r\n\r\n /**\r\n * @static\r\n * @property 删除行后事件\r\n */\r\n AD: \"beforedelete\",\r\n\r\n /**\r\n * @static\r\n * @property 未提交离开事件\r\n */\r\n UC: \"unloadcheck\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property PDF导出前事件\r\n */\r\n BTOPDF: \"beforetopdf\",\r\n\r\n /**\r\n * @static\r\n * @property PDF导出后事件\r\n */\r\n ATOPDF: \"aftertopdf\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出前事件\r\n */\r\n BTOEXCEL: \"beforetoexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出后事件\r\n */\r\n ATOEXCEL: \"aftertoexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Word导出前事件\r\n */\r\n BTOWORD: \"beforetoword\",\r\n\r\n /**\r\n * @static\r\n * @property Word导出后事件\r\n */\r\n ATOWORD: \"aftertoword\",\r\n\r\n /**\r\n * @static\r\n * @property 图片导出前事件\r\n */\r\n BTOIMAGE: \"beforetoimage\",\r\n\r\n /**\r\n * @static\r\n * @property 图片导出后事件\r\n */\r\n ATOIMAGE: \"aftertoimage\",\r\n\r\n /**\r\n * @static\r\n * @property HTML导出前事件\r\n */\r\n BTOHTML: \"beforetohtml\",\r\n\r\n /**\r\n * @static\r\n * @property HTML导出后事件\r\n */\r\n ATOHTML: \"aftertohtml\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导入前事件\r\n */\r\n BIMEXCEL: \"beforeimportexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出后事件\r\n */\r\n AIMEXCEL: \"afterimportexcel\",\r\n\r\n /**\r\n * @static\r\n * @property PDF打印前事件\r\n */\r\n BPDFPRINT: \"beforepdfprint\",\r\n\r\n /**\r\n * @static\r\n * @property PDF打印后事件\r\n */\r\n APDFPRINT: \"afterpdfprint\",\r\n\r\n /**\r\n * @static\r\n * @property Flash打印前事件\r\n */\r\n BFLASHPRINT: \"beforeflashprint\",\r\n\r\n /**\r\n * @static\r\n * @property Flash打印后事件\r\n */\r\n AFLASHPRINT: \"afterflashprint\",\r\n\r\n /**\r\n * @static\r\n * @property Applet打印前事件\r\n */\r\n BAPPLETPRINT: \"beforeappletprint\",\r\n\r\n /**\r\n * @static\r\n * @property Applet打印后事件\r\n */\r\n AAPPLETPRINT: \"afterappletprint\",\r\n\r\n /**\r\n * @static\r\n * @property 服务器打印前事件\r\n */\r\n BSEVERPRINT: \"beforeserverprint\",\r\n\r\n /**\r\n * @static\r\n * @property 服务器打印后事件\r\n */\r\n ASERVERPRINT: \"afterserverprint\",\r\n\r\n /**\r\n * @static\r\n * @property 邮件发送前事件\r\n */\r\n BEMAIL: \"beforeemail\",\r\n\r\n /**\r\n * @static\r\n * @property 邮件发送后事件\r\n */\r\n AEMAIL: \"afteremail\"\r\n }\r\n});/**\r\n * 对数组对象的扩展\r\n * @class Array\r\n */\r\n_.extend(BI, {\r\n\r\n pushArray: function (sArray, array) {\r\n for (var i = 0; i < array.length; i++) {\r\n sArray.push(array[i]);\r\n }\r\n },\r\n pushDistinct: function (sArray, obj) {\r\n if (!BI.contains(sArray, obj)) {\r\n sArray.push(obj);\r\n }\r\n },\r\n pushDistinctArray: function (sArray, array) {\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n BI.pushDistinct(sArray, array[i]);\r\n }\r\n }\r\n});\r\nBI.prepares.push(function () {\r\n BI.Date = BI.Date || {};\r\n // 牵扯到国际化这些常量在页面加载后再生效\r\n // full day names\r\n BI.Date._DN = [BI.i18nText(\"BI-Basic_Sunday\"),\r\n BI.i18nText(\"BI-Basic_Monday\"),\r\n BI.i18nText(\"BI-Basic_Tuesday\"),\r\n BI.i18nText(\"BI-Basic_Wednesday\"),\r\n BI.i18nText(\"BI-Basic_Thursday\"),\r\n BI.i18nText(\"BI-Basic_Friday\"),\r\n BI.i18nText(\"BI-Basic_Saturday\"),\r\n BI.i18nText(\"BI-Basic_Sunday\")];\r\n\r\n // short day names\r\n BI.Date._SDN = [BI.i18nText(\"BI-Basic_Simple_Sunday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Monday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Tuesday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Wednesday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Thursday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Friday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Saturday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Sunday\")];\r\n\r\n // Monday first, etc.\r\n BI.Date._FD = 1;\r\n\r\n // full month namesdat\r\n BI.Date._MN = [\r\n BI.i18nText(\"BI-Basic_January\"),\r\n BI.i18nText(\"BI-Basic_February\"),\r\n BI.i18nText(\"BI-Basic_March\"),\r\n BI.i18nText(\"BI-Basic_April\"),\r\n BI.i18nText(\"BI-Basic_May\"),\r\n BI.i18nText(\"BI-Basic_June\"),\r\n BI.i18nText(\"BI-Basic_July\"),\r\n BI.i18nText(\"BI-Basic_August\"),\r\n BI.i18nText(\"BI-Basic_September\"),\r\n BI.i18nText(\"BI-Basic_October\"),\r\n BI.i18nText(\"BI-Basic_November\"),\r\n BI.i18nText(\"BI-Basic_December\")];\r\n\r\n // short month names\r\n BI.Date._SMN = [0,\r\n 1,\r\n 2,\r\n 3,\r\n 4,\r\n 5,\r\n 6,\r\n 7,\r\n 8,\r\n 9,\r\n 10,\r\n 11];\r\n\r\n BI.Date._QN = [\"\", BI.i18nText(\"BI-Quarter_1\"),\r\n BI.i18nText(\"BI-Quarter_2\"),\r\n BI.i18nText(\"BI-Quarter_3\"),\r\n BI.i18nText(\"BI-Quarter_4\")];\r\n\r\n /** Adds the number of days array to the Date object. */\r\n BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n // 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以\r\n BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];\r\n});/** Constants used for time computations */\r\nBI.Date = BI.Date || {};\r\nBI.Date.SECOND = 1000;\r\nBI.Date.MINUTE = 60 * BI.Date.SECOND;\r\nBI.Date.HOUR = 60 * BI.Date.MINUTE;\r\nBI.Date.DAY = 24 * BI.Date.HOUR;\r\nBI.Date.WEEK = 7 * BI.Date.DAY;\r\n\r\n_.extend(BI, {\r\n /**\r\n * 获取时区\r\n * @returns {String}\r\n */\r\n getTimezone: function (date) {\r\n return date.toString().replace(/^.* (?:\\((.*)\\)|([A-Z]{1,4})(?:[\\-+][0-9]{4})?(?: -?\\d+)?)$/, \"$1$2\").replace(/[^A-Z]/g, \"\");\r\n },\r\n\r\n /** Returns the number of days in the current month */\r\n getMonthDays: function (date, month) {\r\n var year = date.getFullYear();\r\n if (typeof month === \"undefined\") {\r\n month = date.getMonth();\r\n }\r\n if (((0 == (year % 4)) && ((0 != (year % 100)) || (0 == (year % 400)))) && month == 1) {\r\n return 29;\r\n }\r\n return BI.Date._MD[month];\r\n\r\n },\r\n\r\n /**\r\n * 获取每月的最后一天\r\n * @returns {Date}\r\n */\r\n getLastDateOfMonth: function (date) {\r\n return BI.getDate(date.getFullYear(), date.getMonth(), BI.getMonthDays(date));\r\n },\r\n\r\n /** Returns the number of day in the year. */\r\n getDayOfYear: function (date) {\r\n var now = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var then = BI.getDate(date.getFullYear(), 0, 0, 0, 0, 0);\r\n var time = now - then;\r\n return Math.floor(time / BI.Date.DAY);\r\n },\r\n\r\n /** Returns the number of the week in year, as defined in ISO 8601. */\r\n getWeekNumber: function (date) {\r\n var d = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var week = d.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n var middleDay = (startOfWeek + 3) % 7;\r\n middleDay = middleDay || 7;\r\n // 偏移到周周首之前需要多少天\r\n var offsetWeekStartCount = week < startOfWeek ? (7 + week - startOfWeek) : (week - startOfWeek);\r\n var offsetWeekMiddleCount = middleDay < startOfWeek ? (7 + middleDay - startOfWeek) : (middleDay - startOfWeek);\r\n d.setDate(d.getDate() - offsetWeekStartCount + offsetWeekMiddleCount);\r\n var ms = d.valueOf();\r\n d.setMonth(0);\r\n d.setDate(1);\r\n return Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;\r\n },\r\n\r\n getQuarter: function (date) {\r\n return Math.floor(date.getMonth() / 3) + 1;\r\n },\r\n\r\n // 离当前时间多少天的时间\r\n getOffsetDate: function (date, offset) {\r\n return BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()) + offset * 864e5);\r\n },\r\n\r\n getOffsetQuarter: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + BI.parseInt(n) * 3, 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n) * 3);\r\n return dt;\r\n },\r\n\r\n // 得到本季度的起始月份\r\n getQuarterStartMonth: function (date) {\r\n var quarterStartMonth = 0;\r\n var nowMonth = date.getMonth();\r\n if (nowMonth < 3) {\r\n quarterStartMonth = 0;\r\n }\r\n if (2 < nowMonth && nowMonth < 6) {\r\n quarterStartMonth = 3;\r\n }\r\n if (5 < nowMonth && nowMonth < 9) {\r\n quarterStartMonth = 6;\r\n }\r\n if (nowMonth > 8) {\r\n quarterStartMonth = 9;\r\n }\r\n return quarterStartMonth;\r\n },\r\n // 获得本季度的起始日期\r\n getQuarterStartDate: function (date) {\r\n return BI.getDate(date.getFullYear(), BI.getQuarterStartMonth(date), 1);\r\n },\r\n // 得到本季度的结束日期\r\n getQuarterEndDate: function (date) {\r\n var quarterEndMonth = BI.getQuarterStartMonth(date) + 2;\r\n return BI.getDate(date.getFullYear(), quarterEndMonth, BI.getMonthDays(date, quarterEndMonth));\r\n },\r\n\r\n // 指定日期n个月之前或之后的日期\r\n getOffsetMonth: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + parseInt(n), 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n));\r\n return dt;\r\n },\r\n\r\n // 获得本周的起始日期\r\n getWeekStartDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)]);\r\n },\r\n // 得到本周的结束日期\r\n getWeekEndDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)] + 6);\r\n },\r\n\r\n // 格式化打印日期\r\n print: function (date, str) {\r\n var m = date.getMonth();\r\n var d = date.getDate();\r\n var y = date.getFullYear();\r\n var yWith4number = y + \"\";\r\n while (yWith4number.length < 4) {\r\n yWith4number = \"0\" + yWith4number;\r\n }\r\n var wn = BI.getWeekNumber(date);\r\n var qr = BI.getQuarter(date);\r\n var w = date.getDay();\r\n var s = {};\r\n var hr = date.getHours();\r\n var pm = (hr >= 12);\r\n var ir = (pm) ? (hr - 12) : hr;\r\n var dy = BI.getDayOfYear(date);\r\n if (ir == 0) {\r\n ir = 12;\r\n }\r\n var min = date.getMinutes();\r\n var sec = date.getSeconds();\r\n s[\"%a\"] = BI.Date._SDN[w]; // abbreviated weekday name [FIXME: I18N]\r\n s[\"%A\"] = BI.Date._DN[w]; // full weekday name\r\n s[\"%b\"] = BI.Date._SMN[m]; // abbreviated month name [FIXME: I18N]\r\n s[\"%B\"] = BI.Date._MN[m]; // full month name\r\n // FIXME: %c : preferred date and time representation for the current locale\r\n s[\"%C\"] = 1 + Math.floor(y / 100); // the century number\r\n s[\"%d\"] = (d < 10) ? (\"0\" + d) : d; // the day of the month (range 01 to 31)\r\n s[\"%e\"] = d; // the day of the month (range 1 to 31)\r\n // FIXME: %D : american date style: %m/%d/%y\r\n // FIXME: %E, %F, %G, %g, %h (man strftime)\r\n s[\"%H\"] = (hr < 10) ? (\"0\" + hr) : hr; // hour, range 00 to 23 (24h format)\r\n s[\"%I\"] = (ir < 10) ? (\"0\" + ir) : ir; // hour, range 01 to 12 (12h format)\r\n s[\"%j\"] = (dy < 100) ? ((dy < 10) ? (\"00\" + dy) : (\"0\" + dy)) : dy; // day of the year (range 001 to 366)\r\n s[\"%k\"] = hr + \"\";\t\t// hour, range 0 to 23 (24h format)\r\n s[\"%l\"] = ir + \"\";\t\t// hour, range 1 to 12 (12h format)\r\n s[\"%X\"] = (m < 9) ? (\"0\" + (1 + m)) : (1 + m); // month, range 01 to 12\r\n s[\"%x\"] = m + 1; // month, range 1 to 12\r\n s[\"%M\"] = (min < 10) ? (\"0\" + min) : min; // minute, range 00 to 59\r\n s[\"%n\"] = \"\\n\";\t\t// a newline character\r\n s[\"%p\"] = pm ? \"PM\" : \"AM\";\r\n s[\"%P\"] = pm ? \"pm\" : \"am\";\r\n // FIXME: %r : the time in am/pm notation %I:%M:%S %p\r\n // FIXME: %R : the time in 24-hour notation %H:%M\r\n s[\"%s\"] = Math.floor(date.getTime() / 1000);\r\n s[\"%S\"] = (sec < 10) ? (\"0\" + sec) : sec; // seconds, range 00 to 59\r\n s[\"%t\"] = \"\\t\";\t\t// a tab character\r\n // FIXME: %T : the time in 24-hour notation (%H:%M:%S)\r\n s[\"%U\"] = s[\"%W\"] = s[\"%V\"] = (wn < 10) ? (\"0\" + wn) : wn;\r\n s[\"%u\"] = w + 1;\t// the day of the week (range 1 to 7, 1 = MON)\r\n s[\"%w\"] = w;\t\t// the day of the week (range 0 to 6, 0 = SUN)\r\n // FIXME: %x : preferred date representation for the current locale without the time\r\n // FIXME: %X : preferred time representation for the current locale without the date\r\n s[\"%y\"] = yWith4number.substr(2, 2); // year without the century (range 00 to 99)\r\n s[\"%Y\"] = yWith4number;\t\t// year with the century\r\n s[\"%%\"] = \"%\";\t\t// a literal '%' character\r\n s[\"%Q\"] = qr;\r\n\r\n var re = /%./g;\r\n BI.isKhtml = BI.isKhtml || function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);\r\n };\r\n\r\n // 包含年周的格式化,ISO8601标准周的计数会影响年\r\n if ((str.indexOf(\"%Y\") !== -1 || str.indexOf(\"%y\") !== -1) && (str.indexOf(\"%W\") !== -1 || str.indexOf(\"%U\") !== -1 || str.indexOf(\"%V\") !== -1)) {\r\n switch (wn) {\r\n // 如果周数是1,但是当前却在12月,表示此周数为下一年的\r\n case 1:\r\n if (m === 11) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) + 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) + 1;\r\n }\r\n break;\r\n // 如果周数是53,但是当前却在1月,表示此周数为上一年的\r\n case 53:\r\n if (m === 0) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) - 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) - 1;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n if (!BI.isKhtml()) {\r\n return str.replace(re, function (par) {\r\n return s[par] || par;\r\n });\r\n }\r\n var a = str.match(re);\r\n for (var i = 0; i < a.length; i++) {\r\n var tmp = s[a[i]];\r\n if (tmp) {\r\n re = new RegExp(a[i], \"g\");\r\n str = str.replace(re, tmp);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n});\r\n/**\r\n * 基本的函数\r\n * Created by GUY on 2015/6/24.\r\n */\r\nBI.Func = {};\r\n_.extend(BI.Func, {\r\n /**\r\n * 创建唯一的名字\r\n * @param array\r\n * @param name\r\n * @returns {*}\r\n */\r\n createDistinctName: function (array, name) {\r\n var src = name, idx = 1;\r\n name = name || \"\";\r\n while (true) {\r\n if (BI.every(array, function (i, item) {\r\n return BI.isKey(item) ? item !== name : item.name !== name;\r\n })) {\r\n break;\r\n }\r\n name = src + (idx++);\r\n }\r\n return name;\r\n },\r\n\r\n /**\r\n * 获取字符宽度\r\n * @param str\r\n * @return {number}\r\n */\r\n getGBWidth: function (str) {\r\n str = str + \"\";\r\n str = str.replace(/[^\\x00-\\xff]/g, \"xx\");\r\n return Math.ceil(str.length / 2);\r\n },\r\n\r\n /**\r\n * 获取搜索结果\r\n * @param items\r\n * @param keyword\r\n * @param param 搜索哪个属性\r\n */\r\n getSearchResult: function (items, keyword, param) {\r\n var isArray = BI.isArray(items);\r\n items = isArray ? BI.flatten(items) : items;\r\n param || (param = \"text\");\r\n if (!BI.isKey(keyword)) {\r\n return {\r\n find: BI.deepClone(items),\r\n match: isArray ? [] : {}\r\n };\r\n }\r\n var t, text, py;\r\n keyword = BI.toUpperCase(keyword);\r\n var matched = isArray ? [] : {}, find = isArray ? [] : {};\r\n BI.each(items, function (i, item) {\r\n // 兼容item为null的处理\r\n if (BI.isNull(item)) {\r\n return;\r\n }\r\n item = BI.deepClone(item);\r\n t = BI.stripEL(item);\r\n text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {\r\n return BI.isNotNull(val);\r\n });\r\n\r\n if (BI.isNull(text) || BI.isObject(text)) return;\r\n\r\n py = BI.makeFirstPY(text, {\r\n splitChar: \"\\u200b\"\r\n });\r\n text = BI.toUpperCase(text);\r\n py = BI.toUpperCase(py);\r\n var pidx;\r\n if (text.indexOf(keyword) > -1) {\r\n if (text === keyword) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件\r\n } else if (pidx = py.indexOf(keyword), (pidx > -1)) {\r\n if (text === keyword || keyword.length === text.length) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n }\r\n });\r\n return {\r\n match: matched,\r\n find: find\r\n };\r\n }\r\n});\r\n\r\n_.extend(BI, {\r\n beforeFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n if (func.apply(sFunc, arguments) === false) {\r\n return false;\r\n }\r\n return __self.apply(sFunc, arguments);\r\n };\r\n },\r\n\r\n afterFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n var ret = __self.apply(sFunc, arguments);\r\n if (ret === false) {\r\n return false;\r\n }\r\n func.apply(sFunc, arguments);\r\n return ret;\r\n };\r\n }\r\n});_.extend(BI, {\r\n // 给Number类型增加一个add方法,调用起来更加方便。\r\n add: function (num, arg) {\r\n return accAdd(arg, num);\r\n\r\n /**\r\n ** 加法函数,用来得到精确的加法结果\r\n ** 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。\r\n ** 调用:accAdd(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accAdd (arg1, arg2) {\r\n var r1, r2, m, c;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n c = Math.abs(r1 - r2);\r\n m = Math.pow(10, Math.max(r1, r2));\r\n if (c > 0) {\r\n var cm = Math.pow(10, c);\r\n if (r1 > r2) {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\")) * cm;\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\")) * cm;\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n return (arg1 + arg2) / m;\r\n }\r\n },\r\n\r\n // 给Number类型增加一个sub方法,调用起来更加方便。\r\n sub: function (num, arg) {\r\n return accSub(num, arg);\r\n\r\n /**\r\n ** 减法函数,用来得到精确的减法结果\r\n ** 说明:javascript的减法结果会有误差,在两个浮点数相减的时候会比较明显。这个函数返回较为精确的减法结果。\r\n ** 调用:accSub(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accSub (arg1, arg2) {\r\n var r1, r2, m, n;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n m = Math.pow(10, Math.max(r1, r2)); // last modify by deeka //动态控制精度长度\r\n n = (r1 >= r2) ? r1 : r2;\r\n return ((arg1 * m - arg2 * m) / m).toFixed(n);\r\n }\r\n },\r\n\r\n // 给Number类型增加一个mul方法,调用起来更加方便。\r\n mul: function (num, arg) {\r\n return accMul(arg, num);\r\n\r\n /**\r\n ** 乘法函数,用来得到精确的乘法结果\r\n ** 说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。\r\n ** 调用:accMul(arg1,arg2)\r\n ** 返回值:arg1乘以 arg2的精确结果\r\n **/\r\n function accMul (arg1, arg2) {\r\n var m = 0, s1 = arg1.toString(), s2 = arg2.toString();\r\n try {\r\n m += s1.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n try {\r\n m += s2.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n return Number(s1.replace(\".\", \"\")) * Number(s2.replace(\".\", \"\")) / Math.pow(10, m);\r\n }\r\n },\r\n \r\n // 给Number类型增加一个div方法,调用起来更加方便。\r\n div: function (num, arg) {\r\n return accDivide(num, arg);\r\n\r\n /**\r\n * Return digits length of a number\r\n * @param {*number} num Input number\r\n */\r\n function digitLength (num) {\r\n // Get digit length of e\r\n var eSplit = num.toString().split(/[eE]/);\r\n var len = (eSplit[0].split(\".\")[1] || \"\").length - (+(eSplit[1] || 0));\r\n return len > 0 ? len : 0;\r\n }\r\n /**\r\n * 把小数转成整数,支持科学计数法。如果是小数则放大成整数\r\n * @param {*number} num 输入数\r\n */\r\n function float2Fixed (num) {\r\n if (num.toString().indexOf(\"e\") === -1) {\r\n return Number(num.toString().replace(\".\", \"\"));\r\n }\r\n var dLen = digitLength(num);\r\n return dLen > 0 ? num * Math.pow(10, dLen) : num;\r\n }\r\n\r\n /**\r\n * 精确乘法\r\n */\r\n function times (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return times.apply(void 0, [times(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n var baseNum = digitLength(num1) + digitLength(num2);\r\n var leftValue = num1Changed * num2Changed;\r\n return leftValue / Math.pow(10, baseNum);\r\n }\r\n\r\n /**\r\n * 精确除法\r\n */\r\n function accDivide (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return accDivide.apply(void 0, [accDivide(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n return times((num1Changed / num2Changed), Math.pow(10, digitLength(num2) - digitLength(num1)));\r\n }\r\n }\r\n\r\n});/**\r\n * 对字符串对象的扩展\r\n * @class String\r\n */\r\n_.extend(BI, {\r\n\r\n /**\r\n * 判断字符串是否已指定的字符串开始\r\n * @param str source字符串\r\n * @param {String} startTag 指定的开始字符串\r\n * @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false\r\n */\r\n startWith: function (str, startTag) {\r\n str = str || \"\";\r\n if (startTag == null || startTag == \"\" || str.length === 0 || startTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substr(0, startTag.length) == startTag;\r\n },\r\n /**\r\n * 判断字符串是否以指定的字符串结束\r\n * @param str source字符串\r\n * @param {String} endTag 指定的字符串\r\n * @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false\r\n */\r\n endWith: function (str, endTag) {\r\n if (endTag == null || endTag == \"\" || str.length === 0 || endTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substring(str.length - endTag.length) == endTag;\r\n },\r\n\r\n /**\r\n * 获取url中指定名字的参数\r\n * @param str source字符串\r\n * @param {String} name 参数的名字\r\n * @return {String} 参数的值\r\n */\r\n getQuery: function (str, name) {\r\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\r\n var r = str.substr(str.indexOf(\"?\") + 1).match(reg);\r\n if (r) {\r\n return unescape(r[2]);\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * 给url加上给定的参数\r\n * @param str source字符串\r\n * @param {Object} paras 参数对象,是一个键值对对象\r\n * @return {String} 添加了给定参数的url\r\n */\r\n appendQuery: function (str, paras) {\r\n if (!paras) {\r\n return str;\r\n }\r\n var src = str;\r\n // 没有问号说明还没有参数\r\n if (src.indexOf(\"?\") === -1) {\r\n src += \"?\";\r\n }\r\n // 如果以问号结尾,说明没有其他参数\r\n if (src.endWith(\"?\") !== false) {\r\n } else {\r\n src += \"&\";\r\n }\r\n _.each(paras, function (value, name) {\r\n if (typeof(name) === \"string\") {\r\n src += name + \"=\" + value + \"&\";\r\n }\r\n });\r\n src = src.substr(0, src.length - 1);\r\n return src;\r\n },\r\n /**\r\n * 将所有符合第一个字符串所表示的字符串替换成为第二个字符串\r\n * @param str source字符串\r\n * @param {String} s1 要替换的字符串的正则表达式\r\n * @param {String} s2 替换的结果字符串\r\n * @returns {String} 替换后的字符串\r\n */\r\n replaceAll: function (str, s1, s2) {\r\n return str.replace(new RegExp(s1, \"gm\"), s2);\r\n },\r\n /**\r\n * 总是让字符串以指定的字符开头\r\n * @param str source字符串\r\n * @param {String} start 指定的字符\r\n * @returns {String} 以指定字符开头的字符串\r\n */\r\n perfectStart: function (str, start) {\r\n if (str.startWith(start)) {\r\n return str;\r\n }\r\n return start + str;\r\n\r\n },\r\n\r\n /**\r\n * 获取字符串中某字符串的所有项位置数组\r\n * @param str source字符串\r\n * @param {String} sub 子字符串\r\n * @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组\r\n */\r\n allIndexOf: function (str, sub) {\r\n if (typeof sub !== \"string\") {\r\n return [];\r\n }\r\n var location = [];\r\n var offset = 0;\r\n while (str.length > 0) {\r\n var loc = str.indexOf(sub);\r\n if (loc === -1) {\r\n break;\r\n }\r\n location.push(offset + loc);\r\n str = str.substring(loc + sub.length, str.length);\r\n offset += loc + sub.length;\r\n }\r\n return location;\r\n }\r\n});!(function () {\r\n var i18nStore = {};\r\n _.extend(BI, {\r\n addI18n: function (i18n) {\r\n BI.extend(i18nStore, i18n);\r\n },\r\n i18nText: function (key) {\r\n var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || \"\";\r\n if (!localeText) {\r\n localeText = key;\r\n }\r\n var len = arguments.length;\r\n if (len > 1) {\r\n if (localeText.indexOf(\"{R1}\") > -1) {\r\n for (var i = 1; i < len; i++) {\r\n var key = \"{R\" + i + \"}\";\r\n localeText = BI.replaceAll(localeText, key, arguments[i] + \"\");\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments);\r\n var count = 1;\r\n return BI.replaceAll(localeText, \"\\\\{\\\\s*\\\\}\", function () {\r\n return args[count++] + \"\";\r\n });\r\n }\r\n }\r\n return localeText;\r\n }\r\n });\r\n})();(function () {\r\n var moduleInjection = {};\r\n BI.module = function (xtype, cls) {\r\n if (moduleInjection[xtype] != null) {\r\n _global.console && console.error(\"module:[\" + xtype + \"] has been registed\");\r\n }\r\n moduleInjection[xtype] = cls;\r\n };\r\n\r\n var constantInjection = {};\r\n BI.constant = function (xtype, cls) {\r\n if (constantInjection[xtype] != null) {\r\n _global.console && console.error(\"constant:[\" + xtype + \"] has been registed\");\r\n }\r\n constantInjection[xtype] = cls;\r\n };\r\n\r\n var modelInjection = {};\r\n BI.model = function (xtype, cls) {\r\n if (modelInjection[xtype] != null) {\r\n _global.console && console.error(\"model:[\" + xtype + \"] has been registed\");\r\n }\r\n modelInjection[xtype] = cls;\r\n };\r\n\r\n var storeInjection = {};\r\n BI.store = function (xtype, cls) {\r\n if (storeInjection[xtype] != null) {\r\n _global.console && console.error(\"store:[\" + xtype + \"] has been registed\");\r\n }\r\n storeInjection[xtype] = cls;\r\n };\r\n\r\n var serviceInjection = {};\r\n BI.service = function (xtype, cls) {\r\n if (serviceInjection[xtype] != null) {\r\n _global.console && console.error(\"service:[\" + xtype + \"] has been registed\");\r\n }\r\n serviceInjection[xtype] = cls;\r\n };\r\n\r\n var providerInjection = {};\r\n BI.provider = function (xtype, cls) {\r\n if (providerInjection[xtype] != null) {\r\n _global.console && console.error(\"provider:[\" + xtype + \"] has been registed\");\r\n }\r\n providerInjection[xtype] = cls;\r\n };\r\n\r\n var configFunctions = {};\r\n BI.config = function (type, configFn) {\r\n if (BI.initialized) {\r\n if (constantInjection[type]) {\r\n return (constantInjection[type] = configFn(constantInjection[type]));\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n return configFn(providers[type]);\r\n }\r\n return BI.Plugin.configWidget(type, configFn);\r\n }\r\n if (!configFunctions[type]) {\r\n configFunctions[type] = [];\r\n BI.prepares.push(function () {\r\n var queue = configFunctions[type];\r\n for (var i = 0; i < queue.length; i++) {\r\n if (constantInjection[type]) {\r\n constantInjection[type] = queue[i](constantInjection[type]);\r\n continue;\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n queue[i](providers[type]);\r\n continue;\r\n }\r\n BI.Plugin.configWidget(type, queue[i]);\r\n }\r\n configFunctions[type] = null;\r\n });\r\n }\r\n configFunctions[type].push(configFn);\r\n };\r\n\r\n var actions = {};\r\n var globalAction = [];\r\n BI.action = function (type, actionFn) {\r\n if (BI.isFunction(type)) {\r\n globalAction.push(type);\r\n return function () {\r\n BI.remove(globalAction, function (idx) {\r\n return globalAction.indexOf(actionFn) === idx;\r\n });\r\n };\r\n }\r\n if (!actions[type]) {\r\n actions[type] = [];\r\n }\r\n actions[type].push(actionFn);\r\n return function () {\r\n BI.remove(actions[type], function (idx) {\r\n return actions[type].indexOf(actionFn) === idx;\r\n });\r\n if (actions[type].length === 0) {\r\n delete actions[type];\r\n }\r\n };\r\n };\r\n\r\n var points = {};\r\n BI.point = function (type, action, pointFn, after) {\r\n if (!points[type]) {\r\n points[type] = {};\r\n }\r\n if (!points[type][action]) {\r\n points[type][action] = {};\r\n }\r\n if (!points[type][action][after ? \"after\" : \"before\"]) {\r\n points[type][action][after ? \"after\" : \"before\"] = [];\r\n }\r\n points[type][action][after ? \"after\" : \"before\"].push(pointFn);\r\n };\r\n\r\n BI.Modules = {\r\n getModule: function (type) {\r\n if (!moduleInjection[type]) {\r\n _global.console && console.error(\"module:[\" + type + \"] does not exists\");\r\n return false;\r\n }\r\n return moduleInjection[type];\r\n },\r\n getAllModules: function () {\r\n return moduleInjection;\r\n }\r\n };\r\n\r\n BI.Constants = {\r\n getConstant: function (type) {\r\n return constantInjection[type];\r\n }\r\n };\r\n\r\n var callPoint = function (inst, type) {\r\n if (points[type]) {\r\n for (var action in points[type]) {\r\n var bfns = points[type][action].before;\r\n if (bfns) {\r\n BI.aspect.before(inst, action, function (bfns) {\r\n return function () {\r\n for (var i = 0, len = bfns.length; i < len; i++) {\r\n try {\r\n bfns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(bfns));\r\n }\r\n var afns = points[type][action].after;\r\n if (afns) {\r\n BI.aspect.after(inst, action, function (afns) {\r\n return function () {\r\n for (var i = 0, len = afns.length; i < len; i++) {\r\n try {\r\n afns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(afns));\r\n }\r\n }\r\n }\r\n };\r\n\r\n BI.Models = {\r\n getModel: function (type, config) {\r\n var inst = new modelInjection[type](config);\r\n inst._constructor && inst._constructor(config);\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var stores = {};\r\n\r\n BI.Stores = {\r\n getStore: function (type, config) {\r\n if (stores[type]) {\r\n return stores[type];\r\n }\r\n var inst = stores[type] = new storeInjection[type](config);\r\n inst._constructor && inst._constructor(config);\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var services = {};\r\n\r\n BI.Services = {\r\n getService: function (type, config) {\r\n if (services[type]) {\r\n return services[type];\r\n }\r\n services[type] = new serviceInjection[type](config);\r\n callPoint(services[type], type);\r\n return services[type];\r\n }\r\n };\r\n\r\n var providers = {},\r\n providerInstance = {};\r\n\r\n BI.Providers = {\r\n getProvider: function (type, config) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n if (!providerInstance[type]) {\r\n providerInstance[type] = new (providers[type].$get())(config);\r\n }\r\n return providerInstance[type];\r\n }\r\n };\r\n\r\n BI.Actions = {\r\n runAction: function (type, event, config) {\r\n BI.each(actions[type], function (i, act) {\r\n try {\r\n act(event, config);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n },\r\n runGlobalAction: function () {\r\n var args = [].slice.call(arguments);\r\n BI.each(globalAction, function (i, act) {\r\n try {\r\n act.apply(null, args);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n }\r\n };\r\n\r\n BI.getContext = function (type, config) {\r\n if (constantInjection[type]) {\r\n return BI.Constants.getConstant(type);\r\n }\r\n if (modelInjection[type]) {\r\n return BI.Models.getModel(type, config);\r\n }\r\n if (storeInjection[type]) {\r\n return BI.Stores.getStore(type, config);\r\n }\r\n if (serviceInjection[type]) {\r\n return BI.Services.getService(type, config);\r\n }\r\n if (providerInjection[type]) {\r\n return BI.Providers.getProvider(type, config);\r\n }\r\n };\r\n})();/**\r\n * guy\r\n * 检测某个Widget的EventChange事件然后去show某个card\r\n * @type {*|void|Object}\r\n * @class BI.ShowListener\r\n * @extends BI.OB\r\n */\r\nBI.ShowListener = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ShowListener.superclass._defaultConfig.apply(this, arguments), {\r\n eventObj: BI.createWidget(),\r\n cardLayout: null,\r\n cardNameCreator: function (v) {\r\n return v;\r\n },\r\n cardCreator: BI.emptyFn,\r\n afterCardCreated: BI.emptyFn,\r\n afterCardShow: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ShowListener.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.eventObj) {\r\n o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) {\r\n if (type === BI.Events.CLICK) {\r\n v = v || o.eventObj.getValue();\r\n v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v;\r\n if (BI.isNull(v)) {\r\n throw new Error(\"value cannot be null\");\r\n }\r\n var cardName = o.cardNameCreator(v);\r\n if (!o.cardLayout.isCardExisted(cardName)) {\r\n var card = o.cardCreator(cardName);\r\n o.cardLayout.addCardByName(cardName, card);\r\n o.afterCardCreated(cardName);\r\n }\r\n o.cardLayout.showCardByName(cardName);\r\n BI.nextTick(function () {\r\n o.afterCardShow(cardName);\r\n self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName);\r\n });\r\n }\r\n });\r\n }\r\n }\r\n});\r\nBI.ShowListener.EVENT_CHANGE = \"EVENT_CHANGE\";/**\r\n * style加载管理器\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class\r\n */\r\nBI.StyleLoaderManager = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.StyleLoaderManager.superclass._init.apply(this, arguments);\r\n this.stylesManager = {};\r\n },\r\n\r\n loadStyle: function (name, styleString) {\r\n if(!_global.document) {\r\n return;\r\n }\r\n var d = document, styles = d.createElement(\"style\");\r\n d.getElementsByTagName(\"head\")[0].appendChild(styles);\r\n styles.setAttribute(\"type\", \"text/css\");\r\n if (styles.styleSheet) {\r\n styles.styleSheet.cssText = styleString;\r\n } else {\r\n styles.appendChild(document.createTextNode(styleString));\r\n }\r\n this.stylesManager[name] = styles;\r\n\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.stylesManager[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.stylesManager[name] != null;\r\n },\r\n\r\n removeStyle: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.stylesManager[name].parentNode.removeChild(this.stylesManager[name]);\r\n delete this.stylesManager[name];\r\n return this;\r\n }\r\n});/**\r\n * @class BI.Logic\r\n * @extends BI.OB\r\n */\r\nBI.Logic = BI.inherit(BI.OB, {\r\n createLogic: function () {\r\n return this.options || {};\r\n }\r\n});\r\n\r\nBI.LogicFactory = {\r\n Type: {\r\n Vertical: \"vertical\",\r\n Horizontal: \"horizontal\",\r\n Table: \"table\",\r\n HorizontalFill: \"horizontal_fill\"\r\n },\r\n createLogic: function (key, options) {\r\n var logic;\r\n switch (key) {\r\n case BI.LogicFactory.Type.Vertical:\r\n logic = BI.VerticalLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.Horizontal:\r\n logic = BI.HorizontalLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.Table:\r\n logic = BI.TableLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.HorizontalFill:\r\n logic = BI.HorizontalFillLayoutLogic;\r\n break;\r\n default :\r\n logic = BI.Logic;\r\n break;\r\n }\r\n return new logic(options).createLogic();\r\n },\r\n\r\n createLogicTypeByDirection: function (direction) {\r\n switch (direction) {\r\n case BI.Direction.Top:\r\n case BI.Direction.Bottom:\r\n case BI.Direction.Custom:\r\n return BI.LogicFactory.Type.Vertical;\r\n break;\r\n case BI.Direction.Left:\r\n case BI.Direction.Right:\r\n return BI.LogicFactory.Type.Horizontal;\r\n }\r\n },\r\n\r\n createLogicItemsByDirection: function (direction) {\r\n var layout;\r\n var items = Array.prototype.slice.call(arguments, 1);\r\n items = BI.map(items, function (i, item) {\r\n if (BI.isWidget(item)) {\r\n return {\r\n el: item,\r\n width: item.options.width,\r\n height: item.options.height\r\n };\r\n }\r\n return item;\r\n });\r\n switch (direction) {\r\n case BI.Direction.Bottom:\r\n layout = BI.LogicFactory.Type.Vertical;\r\n items.reverse();\r\n break;\r\n case BI.Direction.Right:\r\n layout = BI.LogicFactory.Type.Horizontal;\r\n items.reverse();\r\n break;\r\n case BI.Direction.Custom:\r\n items = items.slice(1);\r\n break;\r\n }\r\n return items;\r\n }\r\n};/**\r\n * guy\r\n * 上下布局逻辑\r\n * 上下布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.VerticalLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.VerticalLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.vertical\";\r\n } else {\r\n layout = \"bi.vtape\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.VerticalLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n\r\n/**\r\n * guy\r\n * 左右布局逻辑\r\n * 左右布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.HorizontalLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.HorizontalLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.vertical_adapt\";\r\n } else {\r\n layout = \"bi.htape\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.HorizontalLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n/**\r\n * guy\r\n * 表格布局逻辑\r\n * 表格布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.TableLayoutLogic\r\n * @extends BI.OB\r\n */\r\nBI.TableLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n columns: 0,\r\n rows: 0,\r\n columnSize: [],\r\n rowSize: [],\r\n hgap: 0,\r\n vgap: 0,\r\n items: []\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.table\";\r\n } else {\r\n layout = \"bi.window\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n columns: o.columns,\r\n rows: o.rows,\r\n columnSize: o.columnSize,\r\n rowSize: o.rowSize,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.TableLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n/**\r\n * guy\r\n * 左右充满布局逻辑\r\n *\r\n * @class BI.HorizontalFillLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n var columnSize = [];\r\n BI.each(o.items, function (i, item) {\r\n columnSize.push(item.width || 0);\r\n });\r\n if (o.dynamic) {\r\n layout = \"bi.horizontal_adapt\";\r\n } else {\r\n layout = \"bi.htape\";\r\n }\r\n return {\r\n type: layout,\r\n columnSize: columnSize,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.HorizontalFillLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});// 工程配置\r\nBI.prepares.push(function () {\r\n // 注册布局\r\n // adapt类布局优先级规则\r\n // 1、在非IE且支持flex的浏览器下使用flex布局\r\n // 2、IE或者不支持flex的浏览器下使用inline布局\r\n // 3、在2的情况下如果布局的items大于1的话使用display:table的布局\r\n // 4、在3的情况下如果IE版本低于8使用table标签布局\r\n var _isSupportFlex;\r\n var isSupportFlex = function () {\r\n if (_isSupportFlex == null) {\r\n _isSupportFlex = !!(BI.isSupportCss3 && BI.isSupportCss3(\"flex\"));\r\n }\r\n return _isSupportFlex;\r\n };\r\n BI.Plugin.registerWidget(\"bi.horizontal\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;\r\n // center_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n // vertical_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n // horizontal_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n if (!isIE) {\r\n if (supportFlex) {\r\n return BI.extend(ob, {type: \"bi.flex_horizontal\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.center_adapt\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);\r\n if (!isIE && supportFlex && justOneItem) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex_scrollable_center_adapt布局\r\n return BI.extend(ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_center_adapt\"});\r\n }\r\n // 一个item的情况下inline布局睥睨天下\r\n if (justOneItem) {\r\n return BI.extend(ob, {type: \"bi.inline_center_adapt\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.vertical_adapt\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex();\r\n if (!isIE && supportFlex) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex__scrollable_center_adapt布局\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_vertical_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.inline_vertical_adapt\"});\r\n });\r\n BI.Plugin.registerWidget(\"bi.horizontal_adapt\", function (ob) {\r\n if (ob.items && ob.items.length <= 1) {\r\n return BI.extend(ob, {type: \"bi.horizontal_auto\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.float_center_adapt\", function (ob) {\r\n if (!BI.isIE() && isSupportFlex()) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex_scrollable_center_adapt布局\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.inline_center_adapt\"});\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.radio\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return BI.extend(ob, {type: \"bi.image_radio\"});\r\n }\r\n return ob;\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.checkbox\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return BI.extend(ob, {type: \"bi.image_checkbox\"});\r\n }\r\n return ob;\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.half_icon_button\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.half_button\"});\r\n });\r\n});/**\r\n * Detect Element Resize.\r\n * Forked in order to guard against unsafe 'window' and 'document' references.\r\n *\r\n * https://github.com/sdecima/javascript-detect-element-resize\r\n * Sebastian Decima\r\n *\r\n * version: 0.5.3\r\n **/\r\n!(function () {\r\n var attachEvent = _global.document && _global.document.attachEvent,\r\n stylesCreated = false;\r\n\r\n if (_global.document && !attachEvent) {\r\n var requestFrame = (function () {\r\n var raf = _global.requestAnimationFrame || _global.mozRequestAnimationFrame || _global.webkitRequestAnimationFrame ||\r\n function (fn) { return _global.setTimeout(fn, 20); };\r\n return function (fn) { return raf(fn); };\r\n })();\r\n\r\n var cancelFrame = (function () {\r\n var cancel = _global.cancelAnimationFrame || _global.mozCancelAnimationFrame || _global.webkitCancelAnimationFrame ||\r\n _global.clearTimeout;\r\n return function (id) { return cancel(id); };\r\n })();\r\n\r\n var resetTriggers = function (element) {\r\n var triggers = element.__resizeTriggers__,\r\n expand = triggers.firstElementChild,\r\n contract = triggers.lastElementChild,\r\n expandChild = expand.firstElementChild;\r\n contract.scrollLeft = contract.scrollWidth;\r\n contract.scrollTop = contract.scrollHeight;\r\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\r\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\r\n expand.scrollLeft = expand.scrollWidth;\r\n expand.scrollTop = expand.scrollHeight;\r\n };\r\n\r\n var checkTriggers = function (element) {\r\n return element.offsetWidth !== element.__resizeLast__.width ||\r\n element.offsetHeight !== element.__resizeLast__.height;\r\n };\r\n\r\n var scrollListener = function (e) {\r\n var element = this;\r\n resetTriggers(this);\r\n if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);\r\n this.__resizeRAF__ = requestFrame(function () {\r\n if (checkTriggers(element)) {\r\n element.__resizeLast__.width = element.offsetWidth;\r\n element.__resizeLast__.height = element.offsetHeight;\r\n element.__resizeListeners__.forEach(function (fn) {\r\n fn.call(element, e);\r\n });\r\n }\r\n });\r\n };\r\n\r\n /* Detect CSS Animations support to detect element display/re-attach */\r\n var animation = false,\r\n animationstring = \"animation\",\r\n keyframeprefix = \"\",\r\n animationstartevent = \"animationstart\",\r\n domPrefixes = \"Webkit Moz O ms\".split(\" \"),\r\n startEvents = \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\" \"),\r\n pfx = \"\";\r\n {\r\n var elm = document.createElement(\"fakeelement\");\r\n if (elm.style.animationName !== undefined) {\r\n animation = true;\r\n }\r\n\r\n if (animation === false) {\r\n for (var i = 0; i < domPrefixes.length; i++) {\r\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\r\n pfx = domPrefixes[i];\r\n animationstring = pfx + \"Animation\";\r\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\r\n animationstartevent = startEvents[i];\r\n animation = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var animationName = \"resizeanim\";\r\n var animationKeyframes = \"@\" + keyframeprefix + \"keyframes \" + animationName + \" { from { opacity: 0; } to { opacity: 0; } } \";\r\n var animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\r\n }\r\n\r\n var createStyles = function () {\r\n if (!stylesCreated) {\r\n // opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\r\n var css = (animationKeyframes ? animationKeyframes : \"\") +\r\n \".resize-triggers { \" + (animationStyle ? animationStyle : \"\") + \"visibility: hidden; opacity: 0; } \" +\r\n \".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%; }\",\r\n head = document.head || document.getElementsByTagName(\"head\")[0],\r\n style = document.createElement(\"style\");\r\n\r\n style.type = \"text/css\";\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n\r\n head.appendChild(style);\r\n stylesCreated = true;\r\n }\r\n };\r\n\r\n var addResizeListener = function (element, fn) {\r\n if (attachEvent) {\r\n element.attachEvent(\"onresize\", fn);\r\n BI.nextTick(fn);\r\n } else {\r\n if (!element.__resizeTriggers__) {\r\n if (getComputedStyle(element).position === \"static\") element.style.position = \"relative\";\r\n createStyles();\r\n element.__resizeLast__ = {};\r\n element.__resizeListeners__ = [];\r\n (element.__resizeTriggers__ = document.createElement(\"div\")).className = \"resize-triggers\";\r\n element.__resizeTriggers__.innerHTML = \"<div class=\\\"expand-trigger\\\"><div></div></div>\" +\r\n \"<div class=\\\"contract-trigger\\\"></div>\";\r\n element.appendChild(element.__resizeTriggers__);\r\n resetTriggers(element);\r\n element.addEventListener(\"scroll\", scrollListener, true);\r\n\r\n /* Listen for a css animation to detect element display/re-attach */\r\n animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function (e) {\r\n if (e.animationName === animationName) {resetTriggers(element);}\r\n });\r\n }\r\n element.__resizeListeners__.push(fn);\r\n }\r\n };\r\n var removeResizeListener = function (element, fn) {\r\n if (attachEvent) element.detachEvent(\"onresize\", fn);\r\n else {\r\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\r\n if (!element.__resizeListeners__.length) {\r\n element.removeEventListener(\"scroll\", scrollListener);\r\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\r\n }\r\n }\r\n };\r\n\r\n BI.ResizeDetector = {\r\n addResizeListener: function (widget, fn) {\r\n addResizeListener(widget.element[0], fn);\r\n return function () {\r\n removeResizeListener(widget.element[0], fn);\r\n };\r\n },\r\n removeResizeListener: function (widget, fn) {\r\n removeResizeListener(widget.element[0], fn);\r\n }\r\n };\r\n})();\r\n/**\r\n * 对DOM操作的通用函数\r\n * @type {{}}\r\n */\r\n!(function () {\r\n BI.DOM = {};\r\n\r\n BI.extend(BI.DOM, {\r\n ready: function (fn) {\r\n BI.Widget._renderEngine.createElement(document).ready(fn);\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n\r\n patchProps: function (fromElement, toElement) {\r\n var elemData = BI.jQuery._data(fromElement[0]);\r\n var events = elemData.events;\r\n BI.each(events, function (eventKey, event) {\r\n BI.each(event, function (i, handler) {\r\n toElement.on(eventKey + (handler.namespace ? (\".\" + handler.namespace) : \"\"), handler);\r\n });\r\n });\r\n var fromChildren = fromElement.children(), toChildren = toElement.children();\r\n if (fromChildren.length !== toChildren.length) {\r\n throw new Error(\"不匹配\");\r\n }\r\n BI.each(fromChildren, function (i, child) {\r\n BI.DOM.patchProps(BI.jQuery(child), BI.jQuery(toChildren[i]));\r\n });\r\n BI.each(fromElement.data(\"__widgets\"), function (i, widget) {\r\n widget.element = toElement;\r\n });\r\n },\r\n /**\r\n * 把dom数组或元素悬挂起来,使其不对html产生影响\r\n * @param dom\r\n */\r\n hang: function (doms) {\r\n if (BI.isEmpty(doms)) {\r\n return;\r\n }\r\n var frag = BI.Widget._renderEngine.createFragment();\r\n BI.each(doms, function (i, dom) {\r\n dom instanceof BI.Widget && (dom = dom.element);\r\n dom instanceof BI.$ && dom[0] && frag.appendChild(dom[0]);\r\n });\r\n return frag;\r\n },\r\n\r\n isExist: function (obj) {\r\n return BI.Widget._renderEngine.createElement(\"body\").find(obj.element).length > 0;\r\n },\r\n\r\n // 预加载图片\r\n preloadImages: function (srcArray, onload) {\r\n var count = 0, images = [];\r\n\r\n function complete () {\r\n count++;\r\n if (count >= srcArray.length) {\r\n onload();\r\n }\r\n }\r\n\r\n BI.each(srcArray, function (i, src) {\r\n images[i] = new Image();\r\n images[i].src = src;\r\n images[i].onload = function () {\r\n complete();\r\n };\r\n images[i].onerror = function () {\r\n complete();\r\n };\r\n });\r\n },\r\n\r\n getTextSizeWidth: function (text, fontSize) {\r\n var span = BI.Widget._renderEngine.createElement(\"<span></span>\").addClass(\"text-width-span\").appendTo(\"body\");\r\n\r\n if (fontSize == null) {\r\n fontSize = 12;\r\n }\r\n fontSize = fontSize + \"px\";\r\n\r\n span.css(\"font-size\", fontSize).text(text);\r\n\r\n var width = span.width();\r\n span.remove();\r\n\r\n return width;\r\n },\r\n\r\n getTextSizeHeight: function (text, fontSize) {\r\n var span = BI.Widget._renderEngine.createElement(\"<span></span>\").addClass(\"text-width-span\").appendTo(\"body\");\r\n\r\n if (fontSize == null) {\r\n fontSize = 12;\r\n }\r\n fontSize = fontSize + \"px\";\r\n\r\n span.css(\"font-size\", fontSize).text(text);\r\n\r\n var height = span.height();\r\n span.remove();\r\n\r\n return height;\r\n },\r\n\r\n // 获取滚动条的宽度,页面display: none时候获取到的为0\r\n getScrollWidth: function () {\r\n if (BI.isNull(this._scrollWidth) || this._scrollWidth === 0) {\r\n var ul = BI.Widget._renderEngine.createElement(\"<div>\").width(50).height(50).css({\r\n position: \"absolute\",\r\n top: \"-9999px\",\r\n overflow: \"scroll\"\r\n }).appendTo(\"body\");\r\n this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth;\r\n ul.destroy();\r\n }\r\n return this._scrollWidth;\r\n },\r\n\r\n getImage: function (param, fillStyle, backgroundColor) {\r\n var canvas = document.createElement(\"canvas\");\r\n var ratio = 2;\r\n BI.Widget._renderEngine.createElement(\"body\").append(canvas);\r\n\r\n var ctx = canvas.getContext(\"2d\");\r\n ctx.font = \"12px Georgia\";\r\n var w = ctx.measureText(param).width + 4;\r\n canvas.width = w * ratio;\r\n canvas.height = 16 * ratio;\r\n ctx.font = 12 * ratio + \"px Georgia\";\r\n ctx.fillStyle = fillStyle || \"#3685f2\";\r\n ctx.textBaseline = \"middle\";\r\n // ctx.fillStyle = \"#EAF2FD\";\r\n ctx.fillText(param, 2 * ratio, 9 * ratio);\r\n BI.Widget._renderEngine.createElement(canvas).destroy();\r\n var backColor = backgroundColor || \"rgba(54, 133, 242, 0.1)\";\r\n // IE可以放大缩小所以要固定最大最小宽高\r\n return {\r\n width: w,\r\n height: 16,\r\n src: canvas.toDataURL(\"image/png\"),\r\n style: \"background-color: \" + backColor + \";vertical-align: middle; margin: 0 1px; width:\" + w + \"px;height: 16px; max-width:\" + w + \"px;max-height: 16px; min-width:\" + w + \"px;min-height: 16px\",\r\n param: param\r\n };\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n isColor: function (color) {\r\n return color && (this.isRGBColor(color) || this.isHexColor(color));\r\n },\r\n\r\n isRGBColor: function (color) {\r\n if (!color) {\r\n return false;\r\n }\r\n return color.substr(0, 3) === \"rgb\";\r\n },\r\n\r\n isHexColor: function (color) {\r\n if (!color) {\r\n return false;\r\n }\r\n return color[0] === \"#\" && color.length === 7;\r\n },\r\n\r\n isDarkColor: function (hex) {\r\n if (!hex || !this.isHexColor(hex)) {\r\n return false;\r\n }\r\n var rgb = this.rgb2json(this.hex2rgb(hex));\r\n var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114);\r\n if (grayLevel < 192/** 网上给的是140**/) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n // 获取对比颜色\r\n getContrastColor: function (color) {\r\n if (!color || !this.isColor(color)) {\r\n return \"\";\r\n }\r\n if (this.isDarkColor(color)) {\r\n return \"#ffffff\";\r\n }\r\n return \"#1a1a1a\";\r\n },\r\n\r\n rgb2hex: function (rgbColour) {\r\n if (!rgbColour || rgbColour.substr(0, 3) != \"rgb\") {\r\n return \"\";\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n var red = BI.parseInt(rgbValues[0]);\r\n var green = BI.parseInt(rgbValues[1]);\r\n var blue = BI.parseInt(rgbValues[2]);\r\n\r\n var hexColour = \"#\" + this.int2hex(red) + this.int2hex(green) + this.int2hex(blue);\r\n\r\n return hexColour;\r\n },\r\n\r\n rgb2json: function (rgbColour) {\r\n if (!rgbColour) {\r\n return {};\r\n }\r\n if (!this.isRGBColor(rgbColour)) {\r\n return {};\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n return {\r\n r: BI.parseInt(rgbValues[0]),\r\n g: BI.parseInt(rgbValues[1]),\r\n b: BI.parseInt(rgbValues[2])\r\n };\r\n },\r\n\r\n rgba2json: function (rgbColour) {\r\n if (!rgbColour) {\r\n return {};\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n return {\r\n r: BI.parseInt(rgbValues[0]),\r\n g: BI.parseInt(rgbValues[1]),\r\n b: BI.parseInt(rgbValues[2]),\r\n a: BI.parseFloat(rgbValues[3])\r\n };\r\n },\r\n\r\n json2rgb: function (rgb) {\r\n if (!BI.isKey(rgb.r) || !BI.isKey(rgb.g) || !BI.isKey(rgb.b)) {\r\n return \"\";\r\n }\r\n return \"rgb(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \")\";\r\n },\r\n\r\n json2rgba: function (rgba) {\r\n if (!BI.isKey(rgba.r) || !BI.isKey(rgba.g) || !BI.isKey(rgba.b)) {\r\n return \"\";\r\n }\r\n return \"rgba(\" + rgba.r + \",\" + rgba.g + \",\" + rgba.b + \",\" + rgba.a + \")\";\r\n },\r\n\r\n int2hex: function (strNum) {\r\n var hexdig = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\r\n return hexdig[strNum >>> 4] + \"\" + hexdig[strNum & 15];\r\n },\r\n\r\n hex2rgb: function (color) {\r\n if (!color) {\r\n return \"\";\r\n }\r\n if (!this.isHexColor(color)) {\r\n return color;\r\n }\r\n var tempValue = \"rgb(\", colorArray;\r\n\r\n if (color.length === 7) {\r\n colorArray = [BI.parseInt(\"0x\" + color.substring(1, 3)),\r\n BI.parseInt(\"0x\" + color.substring(3, 5)),\r\n BI.parseInt(\"0x\" + color.substring(5, 7))];\r\n } else if (color.length === 4) {\r\n colorArray = [BI.parseInt(\"0x\" + color.substring(1, 2)),\r\n BI.parseInt(\"0x\" + color.substring(2, 3)),\r\n BI.parseInt(\"0x\" + color.substring(3, 4))];\r\n }\r\n tempValue += colorArray[0] + \",\";\r\n tempValue += colorArray[1] + \",\";\r\n tempValue += colorArray[2] + \")\";\r\n\r\n return tempValue;\r\n },\r\n\r\n rgba2rgb: function (rgbColor, bgColor) {\r\n if (BI.isNull(bgColor)) {\r\n bgColor = 1;\r\n }\r\n if (rgbColor.substr(0, 4) != \"rgba\") {\r\n return \"\";\r\n }\r\n var rgbValues = rgbColor.match(/\\d+(\\.\\d+)?/g);\r\n if (rgbValues.length < 4) {\r\n return \"\";\r\n }\r\n var R = BI.parseFloat(rgbValues[0]);\r\n var G = BI.parseFloat(rgbValues[1]);\r\n var B = BI.parseFloat(rgbValues[2]);\r\n var A = BI.parseFloat(rgbValues[3]);\r\n\r\n return \"rgb(\" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + \",\" +\r\n Math.floor(255 * (bgColor * (1 - A)) + G * A) + \",\" +\r\n Math.floor(255 * (bgColor * (1 - A)) + B * A) + \")\";\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n\r\n getLeftPosition: function (combo, popup, extraWidth) {\r\n return {\r\n left: combo.element.offset().left - popup.element.outerWidth() - (extraWidth || 0)\r\n };\r\n },\r\n\r\n getInnerLeftPosition: function (combo, popup, extraWidth) {\r\n return {\r\n left: combo.element.offset().left + (extraWidth || 0)\r\n };\r\n },\r\n\r\n getRightPosition: function (combo, popup, extraWidth) {\r\n var el = combo.element;\r\n return {\r\n left: el.offset().left + el.outerWidth() + (extraWidth || 0)\r\n };\r\n },\r\n\r\n getInnerRightPosition: function (combo, popup, extraWidth) {\r\n var el = combo.element, viewBounds = popup.element.bounds();\r\n return {\r\n left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)\r\n };\r\n },\r\n\r\n getTopPosition: function (combo, popup, extraHeight) {\r\n return {\r\n top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)\r\n };\r\n },\r\n\r\n getBottomPosition: function (combo, popup, extraHeight) {\r\n var el = combo.element;\r\n return {\r\n top: el.offset().top + el.outerHeight() + (extraHeight || 0)\r\n };\r\n },\r\n\r\n isLeftSpaceEnough: function (combo, popup, extraWidth) {\r\n return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;\r\n },\r\n\r\n isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;\r\n },\r\n\r\n isRightSpaceEnough: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;\r\n },\r\n\r\n isInnerRightSpaceEnough: function (combo, popup, extraWidth) {\r\n return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;\r\n },\r\n\r\n isTopSpaceEnough: function (combo, popup, extraHeight) {\r\n return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;\r\n },\r\n\r\n isBottomSpaceEnough: function (combo, popup, extraHeight) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;\r\n },\r\n\r\n isRightSpaceLarger: function (combo) {\r\n var windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return windowBounds.width - combo.element.offset().left - combo.element.bounds().width >= combo.element.offset().left;\r\n },\r\n\r\n isBottomSpaceLarger: function (combo) {\r\n var windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top;\r\n },\r\n\r\n getLeftAlignPosition: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var left = combo.element.offset().left + extraWidth;\r\n if (left + viewBounds.width > windowBounds.width) {\r\n left = windowBounds.width - viewBounds.width;\r\n }\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getLeftAdaptPosition: function (combo, popup, extraWidth) {\r\n if (BI.DOM.isLeftSpaceEnough(combo, popup, extraWidth)) {\r\n return BI.DOM.getLeftPosition(combo, popup, extraWidth);\r\n }\r\n return {\r\n left: 0\r\n };\r\n },\r\n\r\n getRightAlignPosition: function (combo, popup, extraWidth) {\r\n var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds();\r\n var left = combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getRightAdaptPosition: function (combo, popup, extraWidth) {\r\n if (BI.DOM.isRightSpaceEnough(combo, popup, extraWidth)) {\r\n return BI.DOM.getRightPosition(combo, popup, extraWidth);\r\n }\r\n return {\r\n left: BI.Widget._renderEngine.createElement(\"body\").bounds().width - popup.element.bounds().width\r\n };\r\n },\r\n\r\n getTopAlignPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top, adaptHeight;\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {\r\n top = comboOffset.top + extraHeight;\r\n } else if (needAdaptHeight) {\r\n top = comboOffset.top + extraHeight;\r\n adaptHeight = windowBounds.height - top;\r\n } else {\r\n top = windowBounds.height - popupBounds.height;\r\n if (top < extraHeight) {\r\n adaptHeight = windowBounds.height - extraHeight;\r\n }\r\n }\r\n if (top < extraHeight) {\r\n top = extraHeight;\r\n }\r\n return adaptHeight ? {\r\n top: top,\r\n adaptHeight: adaptHeight\r\n } : {\r\n top: top\r\n };\r\n },\r\n\r\n getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {\r\n return BI.DOM.getTopPosition(combo, popup, extraHeight);\r\n }\r\n if (needAdaptHeight) {\r\n return {\r\n top: 0,\r\n adaptHeight: combo.element.offset().top - extraHeight\r\n };\r\n }\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n return {\r\n top: 0,\r\n adaptHeight: windowBounds.height - extraHeight\r\n };\r\n }\r\n return {\r\n top: 0\r\n };\r\n },\r\n\r\n getBottomAlignPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top, adaptHeight;\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {\r\n top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;\r\n } else if (needAdaptHeight) {\r\n top = 0;\r\n adaptHeight = comboOffset.top + comboBounds.height - extraHeight;\r\n } else {\r\n top = 0;\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n adaptHeight = windowBounds.height - extraHeight;\r\n }\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return adaptHeight ? {\r\n top: top,\r\n adaptHeight: adaptHeight\r\n } : {\r\n top: top\r\n };\r\n },\r\n\r\n getBottomAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, extraHeight)) {\r\n return BI.DOM.getBottomPosition(combo, popup, extraHeight);\r\n }\r\n if (needAdaptHeight) {\r\n return {\r\n top: comboOffset.top + comboBounds.height + extraHeight,\r\n adaptHeight: windowBounds.height - comboOffset.top - comboBounds.height - extraHeight\r\n };\r\n }\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n return {\r\n top: extraHeight,\r\n adaptHeight: windowBounds.height - extraHeight\r\n };\r\n }\r\n return {\r\n top: windowBounds.height - popupBounds.height - extraHeight\r\n };\r\n },\r\n\r\n getCenterAdaptPosition: function (combo, popup) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var left;\r\n if (comboOffset.left + comboBounds.width / 2 + popupBounds.width / 2 > windowBounds.width) {\r\n left = windowBounds.width - popupBounds.width;\r\n } else {\r\n left = comboOffset.left + comboBounds.width / 2 - popupBounds.width / 2;\r\n }\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getMiddleAdaptPosition: function (combo, popup) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top;\r\n if (comboOffset.top + comboBounds.height / 2 + popupBounds.height / 2 > windowBounds.height) {\r\n top = windowBounds.height - popupBounds.height;\r\n } else {\r\n top = comboOffset.top + comboBounds.height / 2 - popupBounds.height / 2;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return {\r\n top: top\r\n };\r\n },\r\n\r\n getComboPositionByDirections: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions) {\r\n extraWidth || (extraWidth = 0);\r\n extraHeight || (extraHeight = 0);\r\n var i, direct;\r\n var leftRight = [], topBottom = [], innerLeftRight = [];\r\n var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;\r\n var left, top, pos, firstDir = directions[0];\r\n for (i = 0; i < directions.length; i++) {\r\n direct = directions[i];\r\n switch (direct) {\r\n case \"left\":\r\n leftRight.push(direct);\r\n break;\r\n case \"right\":\r\n leftRight.push(direct);\r\n break;\r\n case \"top\":\r\n topBottom.push(direct);\r\n break;\r\n case \"bottom\":\r\n topBottom.push(direct);\r\n break;\r\n case \"innerLeft\":\r\n innerLeftRight.push(direct);\r\n break;\r\n case \"innerRight\":\r\n innerLeftRight.push(direct);\r\n break;\r\n }\r\n }\r\n for (i = 0; i < directions.length; i++) {\r\n direct = directions[i];\r\n switch (direct) {\r\n case \"left\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;\r\n if (BI.DOM.isLeftSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getLeftPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"left,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"left,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"left\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"right\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isRightSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getRightPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"right,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"right,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"right\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"top\":\r\n var tW = lrFirst ? extraHeight : extraWidth, tH = lrFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, tH)) {\r\n top = BI.DOM.getTopPosition(combo, popup, tH).top;\r\n if (leftRight[0] === \"right\") {\r\n pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);\r\n pos.dir = \"top,right\";\r\n } else {\r\n pos = BI.DOM.getRightAlignPosition(combo, popup, tW);\r\n pos.dir = \"top,left\";\r\n }\r\n if (lrFirst) {\r\n pos.change = \"top\";\r\n }\r\n pos.top = top;\r\n return pos;\r\n }\r\n if (needAdaptHeight) {\r\n isNeedAdaptHeight = true;\r\n }\r\n tbFirst = true;\r\n break;\r\n case \"bottom\":\r\n var tW = lrFirst ? extraHeight : extraWidth, tH = lrFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, tH)) {\r\n top = BI.DOM.getBottomPosition(combo, popup, tH).top;\r\n if (leftRight[0] === \"right\") {\r\n pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);\r\n pos.dir = \"bottom,right\";\r\n } else {\r\n pos = BI.DOM.getRightAlignPosition(combo, popup, tW);\r\n pos.dir = \"bottom,left\";\r\n }\r\n if (lrFirst) {\r\n pos.change = \"bottom\";\r\n }\r\n pos.top = top;\r\n return pos;\r\n }\r\n if (needAdaptHeight) {\r\n isNeedAdaptHeight = true;\r\n }\r\n tbFirst = true;\r\n break;\r\n case \"innerLeft\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;\r\n if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerLeft,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerLeft,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"innerLeft\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"innerRight\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerRight,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerRight,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"innerRight\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n break;\r\n\r\n }\r\n }\r\n\r\n // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为\"bottom,left\",\r\n // 最后发现实际弹出方向可能是\"top,left\",那么此时外界获取popup的方向应该是\"top,left\"\r\n switch (directions[0]) {\r\n case \"left\":\r\n case \"right\":\r\n if (BI.DOM.isRightSpaceLarger(combo)) {\r\n left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left;\r\n firstDir = \"right\";\r\n } else {\r\n left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left;\r\n firstDir = \"left\";\r\n }\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight);\r\n pos.left = left;\r\n pos.dir = firstDir + \",bottom\";\r\n return pos;\r\n }\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight);\r\n pos.left = left;\r\n pos.dir = firstDir + \",top\";\r\n return pos;\r\n default :\r\n if (BI.DOM.isBottomSpaceLarger(combo)) {\r\n pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight);\r\n firstDir = \"bottom\";\r\n } else {\r\n pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight);\r\n firstDir = \"top\";\r\n }\r\n if (leftRight[0] === \"right\") {\r\n left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left;\r\n pos.left = left;\r\n pos.dir = firstDir + \",right\";\r\n return pos;\r\n }\r\n left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left;\r\n pos.left = left;\r\n pos.dir = firstDir + \",left\";\r\n return pos;\r\n }\r\n },\r\n\r\n\r\n getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) {\r\n extraWidth || (extraWidth = 0);\r\n extraHeight || (extraHeight = 0);\r\n var bodyHeight = BI.Widget._renderEngine.createElement(\"body\").bounds().height - extraHeight;\r\n var maxHeight = Math.min(popup.attr(\"maxHeight\") || bodyHeight, bodyHeight);\r\n popup.resetHeight && popup.resetHeight(maxHeight);\r\n var position = BI.DOM.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || [\"bottom\", \"top\", \"right\", \"left\"]);\r\n switch (offsetStyle) {\r\n case \"center\":\r\n if (position.change) {\r\n var p = BI.DOM.getMiddleAdaptPosition(combo, popup);\r\n position.top = p.top;\r\n } else {\r\n var p = BI.DOM.getCenterAdaptPosition(combo, popup);\r\n position.left = p.left;\r\n }\r\n break;\r\n case \"middle\":\r\n if (position.change) {\r\n var p = BI.DOM.getCenterAdaptPosition(combo, popup);\r\n position.left = p.left;\r\n } else {\r\n var p = BI.DOM.getMiddleAdaptPosition(combo, popup);\r\n position.top = p.top;\r\n }\r\n break;\r\n }\r\n if (needAdaptHeight === true) {\r\n popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));\r\n }\r\n return position;\r\n }\r\n });\r\n})();\r\nBI.EventListener = {\r\n listen: function listen (target, eventType, callback) {\r\n if (target.addEventListener) {\r\n target.addEventListener(eventType, callback, false);\r\n return {\r\n remove: function remove () {\r\n target.removeEventListener(eventType, callback, false);\r\n }\r\n };\r\n } else if (target.attachEvent) {\r\n target.attachEvent(\"on\" + eventType, callback);\r\n return {\r\n remove: function remove () {\r\n target.detachEvent(\"on\" + eventType, callback);\r\n }\r\n };\r\n }\r\n },\r\n\r\n capture: function capture (target, eventType, callback) {\r\n if (target.addEventListener) {\r\n target.addEventListener(eventType, callback, true);\r\n return {\r\n remove: function remove () {\r\n target.removeEventListener(eventType, callback, true);\r\n }\r\n };\r\n }\r\n return {\r\n remove: BI.emptyFn\r\n };\r\n \r\n },\r\n\r\n registerDefault: function registerDefault () {\r\n }\r\n};// 浏览器相关方法\r\n_.extend(BI, {\r\n isIE: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n if (this.__isIE == null) {\r\n this.__isIE = /(msie|trident)/i.test(navigator.userAgent.toLowerCase());\r\n }\r\n return this.__isIE;\r\n },\r\n\r\n getIEVersion: function () {\r\n if(!_global.navigator) {\r\n return 0;\r\n }\r\n if (this.__IEVersion != null) {\r\n return this.__IEVersion;\r\n }\r\n var version = 0;\r\n var agent = navigator.userAgent.toLowerCase();\r\n var v1 = agent.match(/(?:msie\\s([\\w.]+))/);\r\n var v2 = agent.match(/(?:trident.*rv:([\\w.]+))/);\r\n if (v1 && v2 && v1[1] && v2[1]) {\r\n version = Math.max(v1[1] * 1, v2[1] * 1);\r\n } else if (v1 && v1[1]) {\r\n version = v1[1] * 1;\r\n } else if (v2 && v2[1]) {\r\n version = v2[1] * 1;\r\n } else {\r\n version = 0;\r\n }\r\n return this.__IEVersion = version;\r\n },\r\n\r\n isIE9Below: function () {\r\n if (!BI.isIE()) {\r\n return false;\r\n }\r\n return this.getIEVersion() < 9;\r\n },\r\n\r\n isEdge: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /edge/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isChrome: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /chrome/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isFireFox: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /firefox/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isOpera: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /opera/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isSafari: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /safari/i.test(navigator.userAgent.toLowerCase()) && !/chrome/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isKhtml: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);\r\n },\r\n\r\n isMac: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /macintosh|mac os x/i.test(navigator.userAgent);\r\n },\r\n\r\n isWindows: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /windows|win32/i.test(navigator.userAgent);\r\n },\r\n\r\n isSupportCss3: function (style) {\r\n if(!_global.document) {\r\n return false;\r\n }\r\n var prefix = [\"webkit\", \"Moz\", \"ms\", \"o\"],\r\n i, len,\r\n humpString = [],\r\n htmlStyle = document.documentElement.style,\r\n _toHumb = function (string) {\r\n if (!BI.isString(string)) {\r\n return \"\";\r\n }\r\n\r\n return string.replace(/-(\\w)/g, function ($0, $1) {\r\n return $1.toUpperCase();\r\n });\r\n };\r\n\r\n for ( i = 0; i < prefix.length; i++) {\r\n humpString.push(_toHumb(prefix[i] + \"-\" + style));\r\n }\r\n humpString.push(_toHumb(style));\r\n\r\n for (i = 0, len = humpString.length; i < len; i++) {\r\n if (humpString[i] in htmlStyle) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n});/*!\r\n * jQuery JavaScript Library v1.9.1\r\n * http://jquery.com/\r\n *\r\n * Includes Sizzle.js\r\n * http://sizzlejs.com/\r\n *\r\n * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2013-2-4\r\n */\r\n(function( window, undefined ) {\r\n\r\n// Can't do this because several apps including ASP.NET trace\r\n// the stack via arguments.caller.callee and Firefox dies if\r\n// you try to trace through \"use strict\" call chains. (#13335)\r\n// Support: Firefox 18+\r\n//\"use strict\";\r\nvar\r\n\t// The deferred used on DOM ready\r\n\treadyList,\r\n\r\n\t// A central reference to the root jQuery(document)\r\n\trootjQuery,\r\n\r\n\t// Support: IE<9\r\n\t// For `typeof node.method` instead of `node.method !== undefined`\r\n\tcore_strundefined = typeof undefined,\r\n\r\n\t// Use the correct document accordingly with window argument (sandbox)\r\n\tdocument = window.document,\r\n\tlocation = window.location,\r\n\r\n\t// Map over jQuery in case of overwrite\r\n\t_jQuery = window.jQuery,\r\n\r\n\t// Map over the $ in case of overwrite\r\n\t_$ = window.$,\r\n\r\n\t// [[Class]] -> type pairs\r\n\tclass2type = {},\r\n\r\n\t// List of deleted data cache ids, so we can reuse them\r\n\tcore_deletedIds = [],\r\n\r\n\tcore_version = \"1.12.4\",\r\n\r\n\t// Save a reference to some core methods\r\n\tcore_concat = core_deletedIds.concat,\r\n\tcore_push = core_deletedIds.push,\r\n\tcore_slice = core_deletedIds.slice,\r\n\tcore_indexOf = core_deletedIds.indexOf,\r\n\tcore_toString = class2type.toString,\r\n\tcore_hasOwn = class2type.hasOwnProperty,\r\n\tcore_trim = core_version.trim,\r\n\r\n\t// Define a local copy of jQuery\r\n\tjQuery = function( selector, context ) {\r\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\r\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\r\n\t},\r\n\r\n\t// Used for matching numbers\r\n\tcore_pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,\r\n\r\n\t// Used for splitting on whitespace\r\n\tcore_rnotwhite = /\\S+/g,\r\n\r\n\t// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)\r\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\r\n\r\n\t// A simple way to check for HTML strings\r\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\r\n\t// Strict HTML recognition (#11290: must start with <)\r\n\trquickExpr = /^(?:(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\r\n\r\n\t// Match a standalone tag\r\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\r\n\r\n\t// JSON RegExp\r\n\trvalidchars = /^[\\],:{}\\s]*$/,\r\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\r\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,\r\n\trvalidtokens = /\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d+\\.|)\\d+(?:[eE][+-]?\\d+|)/g,\r\n\r\n\t// Matches dashed string for camelizing\r\n\trmsPrefix = /^-ms-/,\r\n\trdashAlpha = /-([\\da-z])/gi,\r\n\r\n\t// Used by jQuery.camelCase as callback to replace()\r\n\tfcamelCase = function( all, letter ) {\r\n\t\treturn letter.toUpperCase();\r\n\t},\r\n\r\n\t// The ready event handler\r\n\tcompleted = function( event ) {\r\n\r\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\r\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\r\n\t\t\tdetach();\r\n\t\t\tjQuery.ready();\r\n\t\t}\r\n\t},\r\n\t// Clean-up method for dom ready events\r\n\tdetach = function() {\r\n\t\tif ( document.addEventListener ) {\r\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed, false );\r\n\t\t\twindow.removeEventListener( \"load\", completed, false );\r\n\r\n\t\t} else {\r\n\t\t\tdocument.detachEvent( \"onreadystatechange\", completed );\r\n\t\t\twindow.detachEvent( \"onload\", completed );\r\n\t\t}\r\n\t};\r\n\r\njQuery.fn = jQuery.prototype = {\r\n\t// The current version of jQuery being used\r\n\tjquery: core_version,\r\n\r\n\tconstructor: jQuery,\r\n\tinit: function( selector, context, rootjQuery ) {\r\n\t\tvar match, elem;\r\n\r\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\r\n\t\tif ( !selector ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// Handle HTML strings\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\tif ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\r\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\r\n\t\t\t\tmatch = [ null, selector, null ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\tmatch = rquickExpr.exec( selector );\r\n\t\t\t}\r\n\r\n\t\t\t// Match html or make sure no context is specified for #id\r\n\t\t\tif ( match && (match[1] || !context) ) {\r\n\r\n\t\t\t\t// HANDLE: $(html) -> $(array)\r\n\t\t\t\tif ( match[1] ) {\r\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\r\n\r\n\t\t\t\t\t// scripts is true for back-compat\r\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\r\n\t\t\t\t\t\tmatch[1],\r\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\r\n\t\t\t\t\t\ttrue\r\n\t\t\t\t\t) );\r\n\r\n\t\t\t\t\t// HANDLE: $(html, props)\r\n\t\t\t\t\tif ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\r\n\t\t\t\t\t\tfor ( match in context ) {\r\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\r\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\r\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\r\n\r\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this;\r\n\r\n\t\t\t\t// HANDLE: $(#id)\r\n\t\t\t\t} else {\r\n\t\t\t\t\telem = document.getElementById( match[2] );\r\n\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\r\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\r\n\t\t\t\t\t\tthis.length = 1;\r\n\t\t\t\t\t\tthis[0] = elem;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.context = document;\r\n\t\t\t\t\tthis.selector = selector;\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\r\n\t\t\t// HANDLE: $(expr, $(...))\r\n\t\t\t} else if ( !context || context.jquery ) {\r\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\r\n\r\n\t\t\t// HANDLE: $(expr, context)\r\n\t\t\t// (which is just equivalent to: $(context).find(expr)\r\n\t\t\t} else {\r\n\t\t\t\treturn this.constructor( context ).find( selector );\r\n\t\t\t}\r\n\r\n\t\t// HANDLE: $(DOMElement)\r\n\t\t} else if ( selector.nodeType ) {\r\n\t\t\tthis.context = this[0] = selector;\r\n\t\t\tthis.length = 1;\r\n\t\t\treturn this;\r\n\r\n\t\t// HANDLE: $(function)\r\n\t\t// Shortcut for document ready\r\n\t\t} else if ( jQuery.isFunction( selector ) ) {\r\n\t\t\treturn rootjQuery.ready( selector );\r\n\t\t}\r\n\r\n\t\tif ( selector.selector !== undefined ) {\r\n\t\t\tthis.selector = selector.selector;\r\n\t\t\tthis.context = selector.context;\r\n\t\t}\r\n\r\n\t\treturn jQuery.makeArray( selector, this );\r\n\t},\r\n\r\n\t// Start with an empty selector\r\n\tselector: \"\",\r\n\r\n\t// The default length of a jQuery object is 0\r\n\tlength: 0,\r\n\r\n\t// The number of elements contained in the matched element set\r\n\tsize: function() {\r\n\t\treturn this.length;\r\n\t},\r\n\r\n\ttoArray: function() {\r\n\t\treturn core_slice.call( this );\r\n\t},\r\n\r\n\t// Get the Nth element in the matched element set OR\r\n\t// Get the whole matched element set as a clean array\r\n\tget: function( num ) {\r\n\t\treturn num == null ?\r\n\r\n\t\t\t// Return a 'clean' array\r\n\t\t\tthis.toArray() :\r\n\r\n\t\t\t// Return just the object\r\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\r\n\t},\r\n\r\n\t// Take an array of elements and push it onto the stack\r\n\t// (returning the new matched element set)\r\n\tpushStack: function( elems ) {\r\n\r\n\t\t// Build a new jQuery matched element set\r\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\r\n\r\n\t\t// Add the old object onto the stack (as a reference)\r\n\t\tret.prevObject = this;\r\n\t\tret.context = this.context;\r\n\r\n\t\t// Return the newly-formed element set\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// Execute a callback for every element in the matched set.\r\n\t// (You can seed the arguments with an array of args, but this is\r\n\t// only used internally.)\r\n\teach: function( callback, args ) {\r\n\t\treturn jQuery.each( this, callback, args );\r\n\t},\r\n\r\n\tready: function( fn ) {\r\n\t\t// Add the callback\r\n\t\tjQuery.ready.promise().done( fn );\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tslice: function() {\r\n\t\treturn this.pushStack( core_slice.apply( this, arguments ) );\r\n\t},\r\n\r\n\tfirst: function() {\r\n\t\treturn this.eq( 0 );\r\n\t},\r\n\r\n\tlast: function() {\r\n\t\treturn this.eq( -1 );\r\n\t},\r\n\r\n\teq: function( i ) {\r\n\t\tvar len = this.length,\r\n\t\t\tj = +i + ( i < 0 ? len : 0 );\r\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\r\n\t},\r\n\r\n\tmap: function( callback ) {\r\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\r\n\t\t\treturn callback.call( elem, i, elem );\r\n\t\t}));\r\n\t},\r\n\r\n\tend: function() {\r\n\t\treturn this.prevObject || this.constructor(null);\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t// Behaves like an Array's method, not like a jQuery method.\r\n\tpush: core_push,\r\n\tsort: [].sort,\r\n\tsplice: [].splice\r\n};\r\n\r\n// Give the init function the jQuery prototype for later instantiation\r\njQuery.fn.init.prototype = jQuery.fn;\r\n\r\njQuery.extend = jQuery.fn.extend = function() {\r\n\tvar src, copyIsArray, copy, name, options, clone,\r\n\t\ttarget = arguments[0] || {},\r\n\t\ti = 1,\r\n\t\tlength = arguments.length,\r\n\t\tdeep = false;\r\n\r\n\t// Handle a deep copy situation\r\n\tif ( typeof target === \"boolean\" ) {\r\n\t\tdeep = target;\r\n\t\ttarget = arguments[1] || {};\r\n\t\t// skip the boolean and the target\r\n\t\ti = 2;\r\n\t}\r\n\r\n\t// Handle case when target is a string or something (possible in deep copy)\r\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\r\n\t\ttarget = {};\r\n\t}\r\n\r\n\t// extend jQuery itself if only one argument is passed\r\n\tif ( length === i ) {\r\n\t\ttarget = this;\r\n\t\t--i;\r\n\t}\r\n\r\n\tfor ( ; i < length; i++ ) {\r\n\t\t// Only deal with non-null/undefined values\r\n\t\tif ( (options = arguments[ i ]) != null ) {\r\n\t\t\t// Extend the base object\r\n\t\t\tfor ( name in options ) {\r\n\t\t\t\tsrc = target[ name ];\r\n\t\t\t\tcopy = options[ name ];\r\n\r\n\t\t\t\t// Prevent never-ending loop\r\n\t\t\t\tif ( target === copy ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Recurse if we're merging plain objects or arrays\r\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\r\n\t\t\t\t\tif ( copyIsArray ) {\r\n\t\t\t\t\t\tcopyIsArray = false;\r\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Never move original objects, clone them\r\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\r\n\r\n\t\t\t\t// Don't bring in undefined values\r\n\t\t\t\t} else if ( copy !== undefined ) {\r\n\t\t\t\t\ttarget[ name ] = copy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the modified object\r\n\treturn target;\r\n};\r\n\r\njQuery.extend({\r\n\tnoConflict: function( deep ) {\r\n\t\tif ( window.$ === jQuery ) {\r\n\t\t\twindow.$ = _$;\r\n\t\t}\r\n\r\n\t\tif ( deep && window.jQuery === jQuery ) {\r\n\t\t\twindow.jQuery = _jQuery;\r\n\t\t}\r\n\r\n\t\treturn jQuery;\r\n\t},\r\n\r\n\t// Is the DOM ready to be used? Set to true once it occurs.\r\n\tisReady: false,\r\n\r\n\t// A counter to track how many items to wait for before\r\n\t// the ready event fires. See #6781\r\n\treadyWait: 1,\r\n\r\n\t// Hold (or release) the ready event\r\n\tholdReady: function( hold ) {\r\n\t\tif ( hold ) {\r\n\t\t\tjQuery.readyWait++;\r\n\t\t} else {\r\n\t\t\tjQuery.ready( true );\r\n\t\t}\r\n\t},\r\n\r\n\t// Handle when the DOM is ready\r\n\tready: function( wait ) {\r\n\r\n\t\t// Abort if there are pending holds or we're already ready\r\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\r\n\t\tif ( !document.body ) {\r\n\t\t\treturn setTimeout( jQuery.ready );\r\n\t\t}\r\n\r\n\t\t// Remember that the DOM is ready\r\n\t\tjQuery.isReady = true;\r\n\r\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\r\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If there are functions bound, to execute\r\n\t\treadyList.resolveWith( document, [ jQuery ] );\r\n\r\n\t\t// Trigger any bound ready events\r\n\t\tif ( jQuery.fn.trigger ) {\r\n\t\t\tjQuery( document ).trigger(\"ready\").off(\"ready\");\r\n\t\t}\r\n\t},\r\n\r\n\t// See test/unit/core.js for details concerning isFunction.\r\n\t// Since version 1.3, DOM methods and functions like alert\r\n\t// aren't supported. They return false on IE (#2968).\r\n\tisFunction: function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"function\";\r\n\t},\r\n\r\n\tisArray: Array.isArray || function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"array\";\r\n\t},\r\n\r\n\tisWindow: function( obj ) {\r\n\t\treturn obj != null && obj == obj.window;\r\n\t},\r\n\r\n\tisNumeric: function( obj ) {\r\n\t\treturn !isNaN( parseFloat(obj) ) && isFinite( obj );\r\n\t},\r\n\r\n\ttype: function( obj ) {\r\n\t\tif ( obj == null ) {\r\n\t\t\treturn String( obj );\r\n\t\t}\r\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\r\n\t\t\tclass2type[ core_toString.call(obj) ] || \"object\" :\r\n\t\t\ttypeof obj;\r\n\t},\r\n\r\n\tisPlainObject: function( obj ) {\r\n\t\t// Must be an Object.\r\n\t\t// Because of IE, we also have to check the presence of the constructor property.\r\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\r\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// Not own constructor property must be Object\r\n\t\t\tif ( obj.constructor &&\r\n\t\t\t\t!core_hasOwn.call(obj, \"constructor\") &&\r\n\t\t\t\t!core_hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch ( e ) {\r\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Own properties are enumerated firstly, so to speed up,\r\n\t\t// if last one is own, then all properties are own.\r\n\r\n\t\tvar key;\r\n\t\tfor ( key in obj ) {}\r\n\r\n\t\treturn key === undefined || core_hasOwn.call( obj, key );\r\n\t},\r\n\r\n\tisEmptyObject: function( obj ) {\r\n\t\tvar name;\r\n\t\tfor ( name in obj ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\terror: function( msg ) {\r\n\t\tthrow new Error( msg );\r\n\t},\r\n\r\n\t// data: string of html\r\n\t// context (optional): If specified, the fragment will be created in this context, defaults to document\r\n\t// keepScripts (optional): If true, will include scripts passed in the html string\r\n\tparseHTML: function( data, context, keepScripts ) {\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif ( typeof context === \"boolean\" ) {\r\n\t\t\tkeepScripts = context;\r\n\t\t\tcontext = false;\r\n\t\t}\r\n\t\tcontext = context || document;\r\n\r\n\t\tvar parsed = rsingleTag.exec( data ),\r\n\t\t\tscripts = !keepScripts && [];\r\n\r\n\t\t// Single tag\r\n\t\tif ( parsed ) {\r\n\t\t\treturn [ context.createElement( parsed[1] ) ];\r\n\t\t}\r\n\r\n\t\tparsed = jQuery.buildFragment( [ data ], context, scripts );\r\n\t\tif ( scripts ) {\r\n\t\t\tjQuery( scripts ).remove();\r\n\t\t}\r\n\t\treturn jQuery.merge( [], parsed.childNodes );\r\n\t},\r\n\r\n\tparseJSON: function( data ) {\r\n\t\t// Attempt to parse using the native JSON parser first\r\n\t\tif ( window.JSON && window.JSON.parse ) {\r\n\t\t\treturn window.JSON.parse( data );\r\n\t\t}\r\n\r\n\t\tif ( data === null ) {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\r\n\t\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\r\n\t\t\tdata = jQuery.trim( data );\r\n\r\n\t\t\tif ( data ) {\r\n\t\t\t\t// Make sure the incoming data is actual JSON\r\n\t\t\t\t// Logic borrowed from http://json.org/json2.js\r\n\t\t\t\tif ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\r\n\t\t\t\t\t.replace( rvalidtokens, \"]\" )\r\n\t\t\t\t\t.replace( rvalidbraces, \"\")) ) {\r\n\r\n\t\t\t\t\treturn ( new Function( \"return \" + data ) )();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tjQuery.error( \"Invalid JSON: \" + data );\r\n\t},\r\n\r\n\t// Cross-browser xml parsing\r\n\tparseXML: function( data ) {\r\n\t\tvar xml, tmp;\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif ( window.DOMParser ) { // Standard\r\n\t\t\t\ttmp = new DOMParser();\r\n\t\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\r\n\t\t\t} else { // IE\r\n\t\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\r\n\t\t\t\txml.async = \"false\";\r\n\t\t\t\txml.loadXML( data );\r\n\t\t\t}\r\n\t\t} catch( e ) {\r\n\t\t\txml = undefined;\r\n\t\t}\r\n\t\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\r\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\r\n\t\t}\r\n\t\treturn xml;\r\n\t},\r\n\r\n\tnoop: function() {},\r\n\r\n\t// Evaluates a script in a global context\r\n\t// Workarounds based on findings by Jim Driscoll\r\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\r\n\tglobalEval: function( data ) {\r\n\t\tif ( data && jQuery.trim( data ) ) {\r\n\t\t\t// We use execScript on Internet Explorer\r\n\t\t\t// We use an anonymous function so that context is window\r\n\t\t\t// rather than jQuery in Firefox\r\n\t\t\t( window.execScript || function( data ) {\r\n\t\t\t\twindow[ \"eval\" ].call( window, data );\r\n\t\t\t} )( data );\r\n\t\t}\r\n\t},\r\n\r\n\t// Convert dashed to camelCase; used by the css and data modules\r\n\t// Microsoft forgot to hump their vendor prefix (#9572)\r\n\tcamelCase: function( string ) {\r\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n\t},\r\n\r\n\tnodeName: function( elem, name ) {\r\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\r\n\t},\r\n\r\n\t// args is for internal usage only\r\n\teach: function( obj, callback, args ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = obj.length,\r\n\t\t\tisArray = isArraylike( obj );\r\n\r\n\t\tif ( args ) {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// A special, fast, case for the most common use of each\r\n\t\t} else {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn obj;\r\n\t},\r\n\r\n\t// Use native String.trim function wherever possible\r\n\ttrim: core_trim && !core_trim.call(\"\\uFEFF\\xA0\") ?\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\tcore_trim.call( text );\r\n\t\t} :\r\n\r\n\t\t// Otherwise use our own trimming functionality\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\t( text + \"\" ).replace( rtrim, \"\" );\r\n\t\t},\r\n\r\n\t// results is for internal usage only\r\n\tmakeArray: function( arr, results ) {\r\n\t\tvar ret = results || [];\r\n\r\n\t\tif ( arr != null ) {\r\n\t\t\tif ( isArraylike( Object(arr) ) ) {\r\n\t\t\t\tjQuery.merge( ret,\r\n\t\t\t\t\ttypeof arr === \"string\" ?\r\n\t\t\t\t\t[ arr ] : arr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tcore_push.call( ret, arr );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\tinArray: function( elem, arr, i ) {\r\n\t\tvar len;\r\n\r\n\t\tif ( arr ) {\r\n\t\t\tif ( core_indexOf ) {\r\n\t\t\t\treturn core_indexOf.call( arr, elem, i );\r\n\t\t\t}\r\n\r\n\t\t\tlen = arr.length;\r\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t// Skip accessing in sparse arrays\r\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tmerge: function( first, second ) {\r\n\t\tvar l = second.length,\r\n\t\t\ti = first.length,\r\n\t\t\tj = 0;\r\n\r\n\t\tif ( typeof l === \"number\" ) {\r\n\t\t\tfor ( ; j < l; j++ ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j ];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\twhile ( second[j] !== undefined ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfirst.length = i;\r\n\r\n\t\treturn first;\r\n\t},\r\n\r\n\tgrep: function( elems, callback, inv ) {\r\n\t\tvar retVal,\r\n\t\t\tret = [],\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length;\r\n\t\tinv = !!inv;\r\n\r\n\t\t// Go through the array, only saving the items\r\n\t\t// that pass the validator function\r\n\t\tfor ( ; i < length; i++ ) {\r\n\t\t\tretVal = !!callback( elems[ i ], i );\r\n\t\t\tif ( inv !== retVal ) {\r\n\t\t\t\tret.push( elems[ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// arg is for internal usage only\r\n\tmap: function( elems, callback, arg ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tisArray = isArraylike( elems ),\r\n\t\t\tret = [];\r\n\r\n\t\t// Go through the array, translating each of the items to their\r\n\t\tif ( isArray ) {\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Go through every key on the object,\r\n\t\t} else {\r\n\t\t\tfor ( i in elems ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\treturn core_concat.apply( [], ret );\r\n\t},\r\n\r\n\t// A global GUID counter for objects\r\n\tguid: 1,\r\n\r\n\t// Bind a function to a context, optionally partially applying any\r\n\t// arguments.\r\n\tproxy: function( fn, context ) {\r\n\t\tvar args, proxy, tmp;\r\n\r\n\t\tif ( typeof context === \"string\" ) {\r\n\t\t\ttmp = fn[ context ];\r\n\t\t\tcontext = fn;\r\n\t\t\tfn = tmp;\r\n\t\t}\r\n\r\n\t\t// Quick check to determine if target is callable, in the spec\r\n\t\t// this throws a TypeError, but we will just return undefined.\r\n\t\tif ( !jQuery.isFunction( fn ) ) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\t// Simulated bind\r\n\t\targs = core_slice.call( arguments, 2 );\r\n\t\tproxy = function() {\r\n\t\t\treturn fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );\r\n\t\t};\r\n\r\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\r\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\r\n\r\n\t\treturn proxy;\r\n\t},\r\n\r\n\t// Multifunctional method to get and set values of a collection\r\n\t// The value/s can optionally be executed if it's a function\r\n\taccess: function( elems, fn, key, value, chainable, emptyGet, raw ) {\r\n\t\tvar i = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tbulk = key == null;\r\n\r\n\t\t// Sets many values\r\n\t\tif ( jQuery.type( key ) === \"object\" ) {\r\n\t\t\tchainable = true;\r\n\t\t\tfor ( i in key ) {\r\n\t\t\t\tjQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\r\n\t\t\t}\r\n\r\n\t\t// Sets one value\r\n\t\t} else if ( value !== undefined ) {\r\n\t\t\tchainable = true;\r\n\r\n\t\t\tif ( !jQuery.isFunction( value ) ) {\r\n\t\t\t\traw = true;\r\n\t\t\t}\r\n\r\n\t\t\tif ( bulk ) {\r\n\t\t\t\t// Bulk operations run against the entire set\r\n\t\t\t\tif ( raw ) {\r\n\t\t\t\t\tfn.call( elems, value );\r\n\t\t\t\t\tfn = null;\r\n\r\n\t\t\t\t// ...except when executing function values\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbulk = fn;\r\n\t\t\t\t\tfn = function( elem, key, value ) {\r\n\t\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( fn ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tfn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn chainable ?\r\n\t\t\telems :\r\n\r\n\t\t\t// Gets\r\n\t\t\tbulk ?\r\n\t\t\t\tfn.call( elems ) :\r\n\t\t\t\tlength ? fn( elems[0], key ) : emptyGet;\r\n\t},\r\n\r\n\tnow: function() {\r\n\t\treturn ( new Date() ).getTime();\r\n\t}\r\n});\r\n\r\njQuery.ready.promise = function( obj ) {\r\n\tif ( !readyList ) {\r\n\r\n\t\treadyList = jQuery.Deferred();\r\n\r\n\t\t// Catch cases where $(document).ready() is called after the browser event has already occurred.\r\n\t\t// we once tried to use readyState \"interactive\" here, but it caused issues like the one\r\n\t\t// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\r\n\t\tif ( document.readyState === \"complete\" ) {\r\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\r\n\t\t\tsetTimeout( jQuery.ready );\r\n\r\n\t\t// Standards-based browsers support DOMContentLoaded\r\n\t\t} else if ( document.addEventListener ) {\r\n\t\t\t// Use the handy event callback\r\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed, false );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.addEventListener( \"load\", completed, false );\r\n\r\n\t\t// If IE event model is used\r\n\t\t} else {\r\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\r\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.attachEvent( \"onload\", completed );\r\n\r\n\t\t\t// If IE and not a frame\r\n\t\t\t// continually check to see if the document is ready\r\n\t\t\tvar top = false;\r\n\r\n\t\t\ttry {\r\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\r\n\t\t\t} catch(e) {}\r\n\r\n\t\t\tif ( top && top.doScroll ) {\r\n\t\t\t\t(function doScrollCheck() {\r\n\t\t\t\t\tif ( !jQuery.isReady ) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\r\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\r\n\t\t\t\t\t\t\ttop.doScroll(\"left\");\r\n\t\t\t\t\t\t} catch(e) {\r\n\t\t\t\t\t\t\treturn setTimeout( doScrollCheck, 50 );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// detach all dom ready events\r\n\t\t\t\t\t\tdetach();\r\n\r\n\t\t\t\t\t\t// and execute any waiting functions\r\n\t\t\t\t\t\tjQuery.ready();\r\n\t\t\t\t\t}\r\n\t\t\t\t})();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn readyList.promise( obj );\r\n};\r\n\r\n// Populate the class2type map\r\njQuery.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\r\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\r\n});\r\n\r\nfunction isArraylike( obj ) {\r\n\tvar length = obj.length,\r\n\t\ttype = jQuery.type( obj );\r\n\r\n\tif ( jQuery.isWindow( obj ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( obj.nodeType === 1 && length ) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn type === \"array\" || type !== \"function\" &&\r\n\t\t( length === 0 ||\r\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj );\r\n}\r\n\r\n// All jQuery objects should point back to these\r\nrootjQuery = jQuery(document);\r\n// String to Object options format cache\r\nvar optionsCache = {};\r\n\r\n// Convert String-formatted options into Object-formatted ones and store in cache\r\nfunction createOptions( options ) {\r\n\tvar object = optionsCache[ options ] = {};\r\n\tjQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {\r\n\t\tobject[ flag ] = true;\r\n\t});\r\n\treturn object;\r\n}\r\n\r\n/*\r\n * Create a callback list using the following parameters:\r\n *\r\n *\toptions: an optional list of space-separated options that will change how\r\n *\t\t\tthe callback list behaves or a more traditional option object\r\n *\r\n * By default a callback list will act like an event callback list and can be\r\n * \"fired\" multiple times.\r\n *\r\n * Possible options:\r\n *\r\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\r\n *\r\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\r\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\r\n *\t\t\t\t\tvalues (like a Deferred)\r\n *\r\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\r\n *\r\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\r\n *\r\n */\r\njQuery.Callbacks = function( options ) {\r\n\r\n\t// Convert options from String-formatted to Object-formatted if needed\r\n\t// (we check in cache first)\r\n\toptions = typeof options === \"string\" ?\r\n\t\t( optionsCache[ options ] || createOptions( options ) ) :\r\n\t\tjQuery.extend( {}, options );\r\n\r\n\tvar // Flag to know if list is currently firing\r\n\t\tfiring,\r\n\t\t// Last fire value (for non-forgettable lists)\r\n\t\tmemory,\r\n\t\t// Flag to know if list was already fired\r\n\t\tfired,\r\n\t\t// End of the loop when firing\r\n\t\tfiringLength,\r\n\t\t// Index of currently firing callback (modified by remove if needed)\r\n\t\tfiringIndex,\r\n\t\t// First callback to fire (used internally by add and fireWith)\r\n\t\tfiringStart,\r\n\t\t// Actual callback list\r\n\t\tlist = [],\r\n\t\t// Stack of fire calls for repeatable lists\r\n\t\tstack = !options.once && [],\r\n\t\t// Fire callbacks\r\n\t\tfire = function( data ) {\r\n\t\t\tmemory = options.memory && data;\r\n\t\t\tfired = true;\r\n\t\t\tfiringIndex = firingStart || 0;\r\n\t\t\tfiringStart = 0;\r\n\t\t\tfiringLength = list.length;\r\n\t\t\tfiring = true;\r\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\r\n\t\t\t\tif ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\r\n\t\t\t\t\tmemory = false; // To prevent further calls using add\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfiring = false;\r\n\t\t\tif ( list ) {\r\n\t\t\t\tif ( stack ) {\r\n\t\t\t\t\tif ( stack.length ) {\r\n\t\t\t\t\t\tfire( stack.shift() );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\tlist = [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Actual Callbacks object\r\n\t\tself = {\r\n\t\t\t// Add a callback or a collection of callbacks to the list\r\n\t\t\tadd: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\t// First, we save the current length\r\n\t\t\t\t\tvar start = list.length;\r\n\t\t\t\t\t(function add( args ) {\r\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\r\n\t\t\t\t\t\t\tvar type = jQuery.type( arg );\r\n\t\t\t\t\t\t\tif ( type === \"function\" ) {\r\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\r\n\t\t\t\t\t\t\t\t\tlist.push( arg );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if ( arg && arg.length && type !== \"string\" ) {\r\n\t\t\t\t\t\t\t\t// Inspect recursively\r\n\t\t\t\t\t\t\t\tadd( arg );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t})( arguments );\r\n\t\t\t\t\t// Do we need to add the callbacks to the\r\n\t\t\t\t\t// current firing batch?\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tfiringLength = list.length;\r\n\t\t\t\t\t// With memory, if we're not firing then\r\n\t\t\t\t\t// we should call right away\r\n\t\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\t\tfiringStart = start;\r\n\t\t\t\t\t\tfire( memory );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Remove a callback from the list\r\n\t\t\tremove: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\tjQuery.each( arguments, function( _, arg ) {\r\n\t\t\t\t\t\tvar index;\r\n\t\t\t\t\t\twhile( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\r\n\t\t\t\t\t\t\tlist.splice( index, 1 );\r\n\t\t\t\t\t\t\t// Handle firing indexes\r\n\t\t\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\t\t\tif ( index <= firingLength ) {\r\n\t\t\t\t\t\t\t\t\tfiringLength--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ( index <= firingIndex ) {\r\n\t\t\t\t\t\t\t\t\tfiringIndex--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Check if a given callback is in the list.\r\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\r\n\t\t\thas: function( fn ) {\r\n\t\t\t\treturn fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\r\n\t\t\t},\r\n\t\t\t// Remove all callbacks from the list\r\n\t\t\tempty: function() {\r\n\t\t\t\tlist = [];\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Have the list do nothing anymore\r\n\t\t\tdisable: function() {\r\n\t\t\t\tlist = stack = memory = undefined;\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it disabled?\r\n\t\t\tdisabled: function() {\r\n\t\t\t\treturn !list;\r\n\t\t\t},\r\n\t\t\t// Lock the list in its current state\r\n\t\t\tlock: function() {\r\n\t\t\t\tstack = undefined;\r\n\t\t\t\tif ( !memory ) {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it locked?\r\n\t\t\tlocked: function() {\r\n\t\t\t\treturn !stack;\r\n\t\t\t},\r\n\t\t\t// Call all callbacks with the given context and arguments\r\n\t\t\tfireWith: function( context, args ) {\r\n\t\t\t\targs = args || [];\r\n\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\r\n\t\t\t\tif ( list && ( !fired || stack ) ) {\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tstack.push( args );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfire( args );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Call all the callbacks with the given arguments\r\n\t\t\tfire: function() {\r\n\t\t\t\tself.fireWith( this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// To know if the callbacks have already been called at least once\r\n\t\t\tfired: function() {\r\n\t\t\t\treturn !!fired;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\treturn self;\r\n};\r\njQuery.extend({\r\n\r\n\tDeferred: function( func ) {\r\n\t\tvar tuples = [\r\n\t\t\t\t// action, add listener, listener list, final state\r\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\" ],\r\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\" ],\r\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks(\"memory\") ]\r\n\t\t\t],\r\n\t\t\tstate = \"pending\",\r\n\t\t\tpromise = {\r\n\t\t\t\tstate: function() {\r\n\t\t\t\t\treturn state;\r\n\t\t\t\t},\r\n\t\t\t\talways: function() {\r\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\r\n\t\t\t\t\tvar fns = arguments;\r\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\r\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\t\t\t\t\tvar action = tuple[ 0 ],\r\n\t\t\t\t\t\t\t\tfn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\r\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\r\n\t\t\t\t\t\t\tdeferred[ tuple[1] ](function() {\r\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\r\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\r\n\t\t\t\t\t\t\t\t\treturned.promise()\r\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\r\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject )\r\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnewDefer[ action + \"With\" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tfns = null;\r\n\t\t\t\t\t}).promise();\r\n\t\t\t\t},\r\n\t\t\t\t// Get a promise for this deferred\r\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\r\n\t\t\t\tpromise: function( obj ) {\r\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdeferred = {};\r\n\r\n\t\t// Keep pipe for back-compat\r\n\t\tpromise.pipe = promise.then;\r\n\r\n\t\t// Add list-specific methods\r\n\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\tvar list = tuple[ 2 ],\r\n\t\t\t\tstateString = tuple[ 3 ];\r\n\r\n\t\t\t// promise[ done | fail | progress ] = list.add\r\n\t\t\tpromise[ tuple[1] ] = list.add;\r\n\r\n\t\t\t// Handle state\r\n\t\t\tif ( stateString ) {\r\n\t\t\t\tlist.add(function() {\r\n\t\t\t\t\t// state = [ resolved | rejected ]\r\n\t\t\t\t\tstate = stateString;\r\n\r\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\r\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\r\n\t\t\t}\r\n\r\n\t\t\t// deferred[ resolve | reject | notify ]\r\n\t\t\tdeferred[ tuple[0] ] = function() {\r\n\t\t\t\tdeferred[ tuple[0] + \"With\" ]( this === deferred ? promise : this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t};\r\n\t\t\tdeferred[ tuple[0] + \"With\" ] = list.fireWith;\r\n\t\t});\r\n\r\n\t\t// Make the deferred a promise\r\n\t\tpromise.promise( deferred );\r\n\r\n\t\t// Call given func if any\r\n\t\tif ( func ) {\r\n\t\t\tfunc.call( deferred, deferred );\r\n\t\t}\r\n\r\n\t\t// All done!\r\n\t\treturn deferred;\r\n\t},\r\n\r\n\t// Deferred helper\r\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\r\n\t\tvar i = 0,\r\n\t\t\tresolveValues = core_slice.call( arguments ),\r\n\t\t\tlength = resolveValues.length,\r\n\r\n\t\t\t// the count of uncompleted subordinates\r\n\t\t\tremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\r\n\r\n\t\t\t// the master Deferred. If resolveValues consist of only a single Deferred, just use that.\r\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\r\n\r\n\t\t\t// Update function for both resolve and progress values\r\n\t\t\tupdateFunc = function( i, contexts, values ) {\r\n\t\t\t\treturn function( value ) {\r\n\t\t\t\t\tcontexts[ i ] = this;\r\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;\r\n\t\t\t\t\tif( values === progressValues ) {\r\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\r\n\t\t\t\t\t} else if ( !( --remaining ) ) {\r\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t},\r\n\r\n\t\t\tprogressValues, progressContexts, resolveContexts;\r\n\r\n\t\t// add listeners to Deferred subordinates; treat others as resolved\r\n\t\tif ( length > 1 ) {\r\n\t\t\tprogressValues = new Array( length );\r\n\t\t\tprogressContexts = new Array( length );\r\n\t\t\tresolveContexts = new Array( length );\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\r\n\t\t\t\t\tresolveValues[ i ].promise()\r\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\r\n\t\t\t\t\t\t.fail( deferred.reject )\r\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t--remaining;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if we're not waiting on anything, resolve the master\r\n\t\tif ( !remaining ) {\r\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\r\n\t\t}\r\n\r\n\t\treturn deferred.promise();\r\n\t}\r\n});\r\njQuery.support = (function() {\r\n\r\n\tvar support, all, a,\r\n\t\tinput, select, fragment,\r\n\t\topt, eventName, isSupported, i,\r\n\t\tdiv = document.createElement(\"div\");\r\n\r\n\t// Setup\r\n\tdiv.setAttribute( \"className\", \"t\" );\r\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\r\n\r\n\t// Support tests won't run in some limited or non-browser environments\r\n\tall = div.getElementsByTagName(\"*\");\r\n\ta = div.getElementsByTagName(\"a\")[ 0 ];\r\n\tif ( !all || !a || !all.length ) {\r\n\t\treturn {};\r\n\t}\r\n\r\n\t// First batch of tests\r\n\tselect = document.createElement(\"select\");\r\n\topt = select.appendChild( document.createElement(\"option\") );\r\n\tinput = div.getElementsByTagName(\"input\")[ 0 ];\r\n\r\n\ta.style.cssText = \"top:1px;float:left;opacity:.5\";\r\n\tsupport = {\r\n\t\t// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\r\n\t\tgetSetAttribute: div.className !== \"t\",\r\n\r\n\t\t// IE strips leading whitespace when .innerHTML is used\r\n\t\tleadingWhitespace: div.firstChild.nodeType === 3,\r\n\r\n\t\t// Make sure that tbody elements aren't automatically inserted\r\n\t\t// IE will insert them into empty tables\r\n\t\ttbody: !div.getElementsByTagName(\"tbody\").length,\r\n\r\n\t\t// Make sure that link elements get serialized correctly by innerHTML\r\n\t\t// This requires a wrapper element in IE\r\n\t\thtmlSerialize: !!div.getElementsByTagName(\"link\").length,\r\n\r\n\t\t// Get the style information from getAttribute\r\n\t\t// (IE uses .cssText instead)\r\n\t\tstyle: /top/.test( a.getAttribute(\"style\") ),\r\n\r\n\t\t// Make sure that URLs aren't manipulated\r\n\t\t// (IE normalizes it by default)\r\n\t\threfNormalized: a.getAttribute(\"href\") === \"/a\",\r\n\r\n\t\t// Make sure that element opacity exists\r\n\t\t// (IE uses filter instead)\r\n\t\t// Use a regex to work around a WebKit issue. See #5145\r\n\t\topacity: /^0.5/.test( a.style.opacity ),\r\n\r\n\t\t// Verify style float existence\r\n\t\t// (IE uses styleFloat instead of cssFloat)\r\n\t\tcssFloat: !!a.style.cssFloat,\r\n\r\n\t\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\r\n\t\tcheckOn: !!input.value,\r\n\r\n\t\t// Make sure that a selected-by-default option has a working selected property.\r\n\t\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\r\n\t\toptSelected: opt.selected,\r\n\r\n\t\t// Tests for enctype support on a form (#6743)\r\n\t\tenctype: !!document.createElement(\"form\").enctype,\r\n\r\n\t\t// Makes sure cloning an html5 element does not cause problems\r\n\t\t// Where outerHTML is undefined, this still works\r\n\t\thtml5Clone: document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\",\r\n\r\n\t\t// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode\r\n\t\tboxModel: document.compatMode === \"CSS1Compat\",\r\n\r\n\t\t// Will be defined later\r\n\t\tdeleteExpando: true,\r\n\t\tnoCloneEvent: true,\r\n\t\tinlineBlockNeedsLayout: false,\r\n\t\tshrinkWrapBlocks: false,\r\n\t\treliableMarginRight: true,\r\n\t\tboxSizingReliable: true,\r\n\t\tpixelPosition: false\r\n\t};\r\n\r\n\t// Make sure checked status is properly cloned\r\n\tinput.checked = true;\r\n\tsupport.noCloneChecked = input.cloneNode( true ).checked;\r\n\r\n\t// Make sure that the options inside disabled selects aren't marked as disabled\r\n\t// (WebKit marks them as disabled)\r\n\tselect.disabled = true;\r\n\tsupport.optDisabled = !opt.disabled;\r\n\r\n\t// Support: IE<9\r\n\ttry {\r\n\t\tdelete div.test;\r\n\t} catch( e ) {\r\n\t\tsupport.deleteExpando = false;\r\n\t}\r\n\r\n\t// Check if we can trust getAttribute(\"value\")\r\n\tinput = document.createElement(\"input\");\r\n\tinput.setAttribute( \"value\", \"\" );\r\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\r\n\r\n\t// Check if an input maintains its value after becoming a radio\r\n\tinput.value = \"t\";\r\n\tinput.setAttribute( \"type\", \"radio\" );\r\n\tsupport.radioValue = input.value === \"t\";\r\n\r\n\t// #11217 - WebKit loses check when the name is after the checked attribute\r\n\tinput.setAttribute( \"checked\", \"t\" );\r\n\tinput.setAttribute( \"name\", \"t\" );\r\n\r\n\tfragment = document.createDocumentFragment();\r\n\tfragment.appendChild( input );\r\n\r\n\t// Check if a disconnected checkbox will retain its checked\r\n\t// value of true after appended to the DOM (IE6/7)\r\n\tsupport.appendChecked = input.checked;\r\n\r\n\t// WebKit doesn't clone checked state correctly in fragments\r\n\tsupport.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\r\n\r\n\t// Support: IE<9\r\n\t// Opera does not clone events (and typeof div.attachEvent === undefined).\r\n\t// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()\r\n\tif ( div.attachEvent ) {\r\n\t\tdiv.attachEvent( \"onclick\", function() {\r\n\t\t\tsupport.noCloneEvent = false;\r\n\t\t});\r\n\r\n\t\tdiv.cloneNode( true ).click();\r\n\t}\r\n\r\n\t// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)\r\n\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php\r\n\tfor ( i in { submit: true, change: true, focusin: true }) {\r\n\t\tdiv.setAttribute( eventName = \"on\" + i, \"t\" );\r\n\r\n\t\tsupport[ i + \"Bubbles\" ] = eventName in window || div.attributes[ eventName ].expando === false;\r\n\t}\r\n\r\n\tdiv.style.backgroundClip = \"content-box\";\r\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\r\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\r\n\r\n\t// Run tests that need a body at doc ready\r\n\tjQuery(function() {\r\n\t\tvar container, marginDiv, tds,\r\n\t\t\tdivReset = \"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;\",\r\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\r\n\r\n\t\tif ( !body ) {\r\n\t\t\t// Return for frameset docs that don't have a body\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcontainer = document.createElement(\"div\");\r\n\t\tcontainer.style.cssText = \"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px\";\r\n\r\n\t\tbody.appendChild( container ).appendChild( div );\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if table cells still have offsetWidth/Height when they are set\r\n\t\t// to display:none and there are still other visible table cells in a\r\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\r\n\t\t// determining if an element has been hidden directly using\r\n\t\t// display:none (it is still safe to use offsets if a parent element is\r\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\r\n\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\r\n\t\ttds = div.getElementsByTagName(\"td\");\r\n\t\ttds[ 0 ].style.cssText = \"padding:0;margin:0;border:0;display:none\";\r\n\t\tisSupported = ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\ttds[ 0 ].style.display = \"\";\r\n\t\ttds[ 1 ].style.display = \"none\";\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if empty table cells still have offsetWidth/Height\r\n\t\tsupport.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\t// Check box-sizing and margin behavior\r\n\t\tdiv.innerHTML = \"\";\r\n\t\tdiv.style.cssText = \"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\";\r\n\t\tsupport.boxSizing = ( div.offsetWidth === 4 );\r\n\t\tsupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );\r\n\r\n\t\t// Use window.getComputedStyle because jsdom on node.js will break without it.\r\n\t\tif ( window.getComputedStyle ) {\r\n\t\t\tsupport.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== \"1%\";\r\n\t\t\tsupport.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: \"4px\" } ).width === \"4px\";\r\n\r\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\r\n\t\t\t// gets computed margin-right based on width of container. (#3333)\r\n\t\t\t// Fails in WebKit before Feb 2011 nightlies\r\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\tmarginDiv = div.appendChild( document.createElement(\"div\") );\r\n\t\t\tmarginDiv.style.cssText = div.style.cssText = divReset;\r\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\r\n\t\t\tdiv.style.width = \"1px\";\r\n\r\n\t\t\tsupport.reliableMarginRight =\r\n\t\t\t\t!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );\r\n\t\t}\r\n\r\n\t\tif ( typeof div.style.zoom !== core_strundefined ) {\r\n\t\t\t// Support: IE<8\r\n\t\t\t// Check if natively block-level elements act like inline-block\r\n\t\t\t// elements when setting their display to 'inline' and giving\r\n\t\t\t// them layout\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tdiv.style.cssText = divReset + \"width:1px;padding:1px;display:inline;zoom:1\";\r\n\t\t\tsupport.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );\r\n\r\n\t\t\t// Support: IE6\r\n\t\t\t// Check if elements with layout shrink-wrap their children\r\n\t\t\tdiv.style.display = \"block\";\r\n\t\t\tdiv.innerHTML = \"<div></div>\";\r\n\t\t\tdiv.firstChild.style.width = \"5px\";\r\n\t\t\tsupport.shrinkWrapBlocks = ( div.offsetWidth !== 3 );\r\n\r\n\t\t\tif ( support.inlineBlockNeedsLayout ) {\r\n\t\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\r\n\t\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\r\n\t\t\t\t// Support: IE<8\r\n\t\t\t\tbody.style.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbody.removeChild( container );\r\n\r\n\t\t// Null elements to avoid leaks in IE\r\n\t\tcontainer = div = tds = marginDiv = null;\r\n\t});\r\n\r\n\t// Null elements to avoid leaks in IE\r\n\tall = select = fragment = opt = a = input = null;\r\n\r\n\treturn support;\r\n})();\r\n\r\nvar rbrace = /(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,\r\n\trmultiDash = /([A-Z])/g;\r\n\r\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ){\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar thisCache, ret,\r\n\t\tinternalKey = jQuery.expando,\r\n\t\tgetByName = typeof name === \"string\",\r\n\r\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\r\n\t\t// can't GC object references properly across the DOM-JS boundary\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\r\n\t\t// attached directly to the object so GC can occur automatically\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\r\n\t\t// Only defining an ID for JS objects if its cache already exists allows\r\n\t\t// the code to shortcut on the same path as a DOM node with no cache\r\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\r\n\r\n\t// Avoid doing any more work than we need to when trying to get data on an\r\n\t// object that has no data at all\r\n\tif ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( !id ) {\r\n\t\t// Only DOM nodes need a new unique ID for each element since their data\r\n\t\t// ends up in the global cache\r\n\t\tif ( isNode ) {\r\n\t\t\telem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;\r\n\t\t} else {\r\n\t\t\tid = internalKey;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !cache[ id ] ) {\r\n\t\tcache[ id ] = {};\r\n\r\n\t\t// Avoids exposing jQuery metadata on plain JS objects when the object\r\n\t\t// is serialized using JSON.stringify\r\n\t\tif ( !isNode ) {\r\n\t\t\tcache[ id ].toJSON = jQuery.noop;\r\n\t\t}\r\n\t}\r\n\r\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\r\n\t// shallow copied over onto the existing cache\r\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\r\n\t\tif ( pvt ) {\r\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\r\n\t\t} else {\r\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\r\n\t\t}\r\n\t}\r\n\r\n\tthisCache = cache[ id ];\r\n\r\n\t// jQuery data() is stored in a separate object inside the object's internal data\r\n\t// cache in order to avoid key collisions between internal data and user-defined\r\n\t// data.\r\n\tif ( !pvt ) {\r\n\t\tif ( !thisCache.data ) {\r\n\t\t\tthisCache.data = {};\r\n\t\t}\r\n\r\n\t\tthisCache = thisCache.data;\r\n\t}\r\n\r\n\tif ( data !== undefined ) {\r\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\r\n\t}\r\n\r\n\t// Check for both converted-to-camel and non-converted data property names\r\n\t// If a data property was specified\r\n\tif ( getByName ) {\r\n\r\n\t\t// First Try to find as-is property data\r\n\t\tret = thisCache[ name ];\r\n\r\n\t\t// Test for null|undefined property data\r\n\t\tif ( ret == null ) {\r\n\r\n\t\t\t// Try to find the camelCased property\r\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\r\n\t\t}\r\n\t} else {\r\n\t\tret = thisCache;\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\nfunction internalRemoveData( elem, name, pvt ) {\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar i, l, thisCache,\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// See jQuery.data for more information\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\r\n\r\n\t// If there is already no cache entry for this object, there is no\r\n\t// purpose in continuing\r\n\tif ( !cache[ id ] ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( name ) {\r\n\r\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\r\n\r\n\t\tif ( thisCache ) {\r\n\r\n\t\t\t// Support array or space separated string names for data keys\r\n\t\t\tif ( !jQuery.isArray( name ) ) {\r\n\r\n\t\t\t\t// try the string as a key before any manipulation\r\n\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\tname = [ name ];\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\r\n\t\t\t\t\tname = jQuery.camelCase( name );\r\n\t\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\t\tname = [ name ];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tname = name.split(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// If \"name\" is an array of keys...\r\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\r\n\t\t\t\t// keys will be converted to camelCase.\r\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\r\n\t\t\t\t// both plain key and camelCase key. #12786\r\n\t\t\t\t// This will only penalize the array argument path.\r\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\r\n\t\t\t}\r\n\r\n\t\t\tfor ( i = 0, l = name.length; i < l; i++ ) {\r\n\t\t\t\tdelete thisCache[ name[i] ];\r\n\t\t\t}\r\n\r\n\t\t\t// If there is no data left in the cache, we want to continue\r\n\t\t\t// and let the cache object itself get destroyed\r\n\t\t\tif ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// See jQuery.data for more information\r\n\tif ( !pvt ) {\r\n\t\tdelete cache[ id ].data;\r\n\r\n\t\t// Don't destroy the parent cache unless the internal data object\r\n\t\t// had been the only thing left in it\r\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t// Destroy the cache\r\n\tif ( isNode ) {\r\n\t\tjQuery.cleanData( [ elem ], true );\r\n\r\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\r\n\t} else if ( jQuery.support.deleteExpando || cache != cache.window ) {\r\n\t\tdelete cache[ id ];\r\n\r\n\t// When all else fails, null\r\n\t} else {\r\n\t\tcache[ id ] = null;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tcache: {},\r\n\r\n\t// Unique for each copy of jQuery on the page\r\n\t// Non-digits removed to match rinlinejQuery\r\n\texpando: \"jQuery\" + ( core_version + Math.random() ).replace( /\\D/g, \"\" ),\r\n\r\n\t// The following elements throw uncatchable exceptions if you\r\n\t// attempt to add expando properties to them.\r\n\tnoData: {\r\n\t\t\"embed\": true,\r\n\t\t// Ban all objects except for Flash (which handle expandos)\r\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",\r\n\t\t\"applet\": true\r\n\t},\r\n\r\n\thasData: function( elem ) {\r\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\r\n\t\treturn !!elem && !isEmptyDataObject( elem );\r\n\t},\r\n\r\n\tdata: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data );\r\n\t},\r\n\r\n\tremoveData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name );\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t_data: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data, true );\r\n\t},\r\n\r\n\t_removeData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name, true );\r\n\t},\r\n\r\n\t// A method for determining if a DOM node can handle the data expando\r\n\tacceptData: function( elem ) {\r\n\t\t// Do not set data on non-element because it will not be cleared (#8335).\r\n\t\tif ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t// nodes accept data unless otherwise specified; rejection can be conditional\r\n\t\treturn !noData || noData !== true && elem.getAttribute(\"classid\") === noData;\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tdata: function( key, value ) {\r\n\t\tvar attrs, name,\r\n\t\t\telem = this[0],\r\n\t\t\ti = 0,\r\n\t\t\tdata = null;\r\n\r\n\t\t// Gets all values\r\n\t\tif ( key === undefined ) {\r\n\t\t\tif ( this.length ) {\r\n\t\t\t\tdata = jQuery.data( elem );\r\n\r\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\r\n\t\t\t\t\tattrs = elem.attributes;\r\n\t\t\t\t\tfor ( ; i < attrs.length; i++ ) {\r\n\t\t\t\t\t\tname = attrs[i].name;\r\n\r\n\t\t\t\t\t\tif ( !name.indexOf( \"data-\" ) ) {\r\n\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice(5) );\r\n\r\n\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\t// Sets multiple values\r\n\t\tif ( typeof key === \"object\" ) {\r\n\t\t\treturn this.each(function() {\r\n\t\t\t\tjQuery.data( this, key );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\t// Try to fetch any internally stored data first\r\n\t\t\t\treturn elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;\r\n\t\t\t}\r\n\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tjQuery.data( this, key, value );\r\n\t\t\t});\r\n\t\t}, null, value, arguments.length > 1, null, true );\r\n\t},\r\n\r\n\tremoveData: function( key ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeData( this, key );\r\n\t\t});\r\n\t}\r\n});\r\n\r\nfunction dataAttr( elem, key, data ) {\r\n\t// If nothing was found internally, try to fetch any\r\n\t// data from the HTML5 data-* attribute\r\n\tif ( data === undefined && elem.nodeType === 1 ) {\r\n\r\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\r\n\r\n\t\tdata = elem.getAttribute( name );\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\ttry {\r\n\t\t\t\tdata = data === \"true\" ? true :\r\n\t\t\t\t\tdata === \"false\" ? false :\r\n\t\t\t\t\tdata === \"null\" ? null :\r\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\r\n\t\t\t\t\t+data + \"\" === data ? +data :\r\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\r\n\t\t\t\t\t\tdata;\r\n\t\t\t} catch( e ) {}\r\n\r\n\t\t\t// Make sure we set the data so it isn't changed later\r\n\t\t\tjQuery.data( elem, key, data );\r\n\r\n\t\t} else {\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\n// checks a cache object for emptiness\r\nfunction isEmptyDataObject( obj ) {\r\n\tvar name;\r\n\tfor ( name in obj ) {\r\n\r\n\t\t// if the public data object is empty, the private is still empty\r\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( name !== \"toJSON\" ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n}\r\njQuery.extend({\r\n\tqueue: function( elem, type, data ) {\r\n\t\tvar queue;\r\n\r\n\t\tif ( elem ) {\r\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\r\n\t\t\tqueue = jQuery._data( elem, type );\r\n\r\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\r\n\t\t\tif ( data ) {\r\n\t\t\t\tif ( !queue || jQuery.isArray(data) ) {\r\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray(data) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tqueue.push( data );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn queue || [];\r\n\t\t}\r\n\t},\r\n\r\n\tdequeue: function( elem, type ) {\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\tvar queue = jQuery.queue( elem, type ),\r\n\t\t\tstartLength = queue.length,\r\n\t\t\tfn = queue.shift(),\r\n\t\t\thooks = jQuery._queueHooks( elem, type ),\r\n\t\t\tnext = function() {\r\n\t\t\t\tjQuery.dequeue( elem, type );\r\n\t\t\t};\r\n\r\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\r\n\t\tif ( fn === \"inprogress\" ) {\r\n\t\t\tfn = queue.shift();\r\n\t\t\tstartLength--;\r\n\t\t}\r\n\r\n\t\thooks.cur = fn;\r\n\t\tif ( fn ) {\r\n\r\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\r\n\t\t\t// automatically dequeued\r\n\t\t\tif ( type === \"fx\" ) {\r\n\t\t\t\tqueue.unshift( \"inprogress\" );\r\n\t\t\t}\r\n\r\n\t\t\t// clear up the last queue stop function\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tfn.call( elem, next, hooks );\r\n\t\t}\r\n\r\n\t\tif ( !startLength && hooks ) {\r\n\t\t\thooks.empty.fire();\r\n\t\t}\r\n\t},\r\n\r\n\t// not intended for public consumption - generates a queueHooks object, or returns the current one\r\n\t_queueHooks: function( elem, type ) {\r\n\t\tvar key = type + \"queueHooks\";\r\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\r\n\t\t\tempty: jQuery.Callbacks(\"once memory\").add(function() {\r\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\r\n\t\t\t\tjQuery._removeData( elem, key );\r\n\t\t\t})\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tqueue: function( type, data ) {\r\n\t\tvar setter = 2;\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tdata = type;\r\n\t\t\ttype = \"fx\";\r\n\t\t\tsetter--;\r\n\t\t}\r\n\r\n\t\tif ( arguments.length < setter ) {\r\n\t\t\treturn jQuery.queue( this[0], type );\r\n\t\t}\r\n\r\n\t\treturn data === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\r\n\r\n\t\t\t\t// ensure a hooks for this queue\r\n\t\t\t\tjQuery._queueHooks( this, type );\r\n\r\n\t\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\r\n\t\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t},\r\n\tdequeue: function( type ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.dequeue( this, type );\r\n\t\t});\r\n\t},\r\n\t// Based off of the plugin by Clint Helfers, with permission.\r\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\r\n\tdelay: function( time, type ) {\r\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\treturn this.queue( type, function( next, hooks ) {\r\n\t\t\tvar timeout = setTimeout( next, time );\r\n\t\t\thooks.stop = function() {\r\n\t\t\t\tclearTimeout( timeout );\r\n\t\t\t};\r\n\t\t});\r\n\t},\r\n\tclearQueue: function( type ) {\r\n\t\treturn this.queue( type || \"fx\", [] );\r\n\t},\r\n\t// Get a promise resolved when queues of a certain type\r\n\t// are emptied (fx is the type by default)\r\n\tpromise: function( type, obj ) {\r\n\t\tvar tmp,\r\n\t\t\tcount = 1,\r\n\t\t\tdefer = jQuery.Deferred(),\r\n\t\t\telements = this,\r\n\t\t\ti = this.length,\r\n\t\t\tresolve = function() {\r\n\t\t\t\tif ( !( --count ) ) {\r\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tobj = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\twhile( i-- ) {\r\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\r\n\t\t\tif ( tmp && tmp.empty ) {\r\n\t\t\t\tcount++;\r\n\t\t\t\ttmp.empty.add( resolve );\r\n\t\t\t}\r\n\t\t}\r\n\t\tresolve();\r\n\t\treturn defer.promise( obj );\r\n\t}\r\n});\r\nvar nodeHook, boolHook,\r\n\trclass = /[\\t\\r\\n]/g,\r\n\trreturn = /\\r/g,\r\n\trfocusable = /^(?:input|select|textarea|button|object)$/i,\r\n\trclickable = /^(?:a|area)$/i,\r\n\trboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,\r\n\truseDefault = /^(?:checked|selected)$/i,\r\n\tgetSetAttribute = jQuery.support.getSetAttribute,\r\n\tgetSetInput = jQuery.support.input;\r\n\r\njQuery.fn.extend({\r\n\tattr: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveAttr: function( name ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeAttr( this, name );\r\n\t\t});\r\n\t},\r\n\r\n\tprop: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveProp: function( name ) {\r\n\t\tname = jQuery.propFix[ name ] || name;\r\n\t\treturn this.each(function() {\r\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\r\n\t\t\ttry {\r\n\t\t\t\tthis[ name ] = undefined;\r\n\t\t\t\tdelete this[ name ];\r\n\t\t\t} catch( e ) {}\r\n\t\t});\r\n\t},\r\n\r\n\taddClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( proceed ) {\r\n\t\t\t// The disjunction here is for better compressibility (see removeClass)\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\" \"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\r\n\t\t\t\t\t\t\tcur += clazz + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = jQuery.trim( cur );\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = arguments.length === 0 || typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\t\tif ( proceed ) {\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\t// This expression is here for better compressibility (see addClass)\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\"\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\t// Remove *all* instances\r\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) >= 0 ) {\r\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = value ? jQuery.trim( cur ) : \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\ttoggleClass: function( value, stateVal ) {\r\n\t\tvar type = typeof value,\r\n\t\t\tisBool = typeof stateVal === \"boolean\";\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( i ) {\r\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( type === \"string\" ) {\r\n\t\t\t\t// toggle individual class names\r\n\t\t\t\tvar className,\r\n\t\t\t\t\ti = 0,\r\n\t\t\t\t\tself = jQuery( this ),\r\n\t\t\t\t\tstate = stateVal,\r\n\t\t\t\t\tclassNames = value.match( core_rnotwhite ) || [];\r\n\r\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\r\n\t\t\t\t\t// check each className given, space separated list\r\n\t\t\t\t\tstate = isBool ? state : !self.hasClass( className );\r\n\t\t\t\t\tself[ state ? \"addClass\" : \"removeClass\" ]( className );\r\n\t\t\t\t}\r\n\r\n\t\t\t// Toggle whole class name\r\n\t\t\t} else if ( type === core_strundefined || type === \"boolean\" ) {\r\n\t\t\t\tif ( this.className ) {\r\n\t\t\t\t\t// store className if set\r\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\r\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\r\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\r\n\t\t\t\t// falling back to the empty string if nothing was stored.\r\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\thasClass: function( selector ) {\r\n\t\tvar className = \" \" + selector + \" \",\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length;\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) >= 0 ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\tval: function( value ) {\r\n\t\tvar ret, hooks, isFunction,\r\n\t\t\telem = this[0];\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\tif ( elem ) {\r\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tret = elem.value;\r\n\r\n\t\t\t\treturn typeof ret === \"string\" ?\r\n\t\t\t\t\t// handle most common string cases\r\n\t\t\t\t\tret.replace(rreturn, \"\") :\r\n\t\t\t\t\t// handle cases where value is null/undef or number\r\n\t\t\t\t\tret == null ? \"\" : ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\treturn this.each(function( i ) {\r\n\t\t\tvar val,\r\n\t\t\t\tself = jQuery(this);\r\n\r\n\t\t\tif ( this.nodeType !== 1 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( isFunction ) {\r\n\t\t\t\tval = value.call( this, i, self.val() );\r\n\t\t\t} else {\r\n\t\t\t\tval = value;\r\n\t\t\t}\r\n\r\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\tval = \"\";\r\n\t\t\t} else if ( typeof val === \"number\" ) {\r\n\t\t\t\tval += \"\";\r\n\t\t\t} else if ( jQuery.isArray( val ) ) {\r\n\t\t\t\tval = jQuery.map(val, function ( value ) {\r\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\r\n\r\n\t\t\t// If set returns undefined, fall back to normal setting\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\r\n\t\t\t\tthis.value = val;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\tvalHooks: {\r\n\t\toption: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// attributes.value is undefined in Blackberry 4.7 but\r\n\t\t\t\t// uses .value. See #6932\r\n\t\t\t\tvar val = elem.attributes.value;\r\n\t\t\t\treturn !val || val.specified ? elem.value : elem.text;\r\n\t\t\t}\r\n\t\t},\r\n\t\tselect: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar value, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tindex = elem.selectedIndex,\r\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\r\n\t\t\t\t\tvalues = one ? null : [],\r\n\t\t\t\t\tmax = one ? index + 1 : options.length,\r\n\t\t\t\t\ti = index < 0 ?\r\n\t\t\t\t\t\tmax :\r\n\t\t\t\t\t\tone ? index : 0;\r\n\r\n\t\t\t\t// Loop through all the selected options\r\n\t\t\t\tfor ( ; i < max; i++ ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\r\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\r\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\r\n\t\t\t\t\t\t\t( jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null ) &&\r\n\t\t\t\t\t\t\t( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\r\n\r\n\t\t\t\t\t\t// Get the specific value for the option\r\n\t\t\t\t\t\tvalue = jQuery( option ).val();\r\n\r\n\t\t\t\t\t\t// We don't need an array for one selects\r\n\t\t\t\t\t\tif ( one ) {\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Multi-Selects return an array\r\n\t\t\t\t\t\tvalues.push( value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn values;\r\n\t\t\t},\r\n\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tvar values = jQuery.makeArray( value );\r\n\r\n\t\t\t\tjQuery(elem).find(\"option\").each(function() {\r\n\t\t\t\t\tthis.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif ( !values.length ) {\r\n\t\t\t\t\telem.selectedIndex = -1;\r\n\t\t\t\t}\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattr: function( elem, name, value ) {\r\n\t\tvar hooks, notxml, ret,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set attributes on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Fallback to prop when attributes are not supported\r\n\t\tif ( typeof elem.getAttribute === core_strundefined ) {\r\n\t\t\treturn jQuery.prop( elem, name, value );\r\n\t\t}\r\n\r\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\r\n\r\n\t\t// All attributes are lowercase\r\n\t\t// Grab necessary hook if one is defined\r\n\t\tif ( notxml ) {\r\n\t\t\tname = name.toLowerCase();\r\n\t\t\thooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\r\n\t\t\tif ( value === null ) {\r\n\t\t\t\tjQuery.removeAttr( elem, name );\r\n\r\n\t\t\t} else if ( hooks && notxml && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem.setAttribute( name, value + \"\" );\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\r\n\t\t} else if ( hooks && notxml && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\r\n\t\t\treturn ret;\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// In IE9+, Flash objects don't have .getAttribute (#12945)\r\n\t\t\t// Support: IE9+\r\n\t\t\tif ( typeof elem.getAttribute !== core_strundefined ) {\r\n\t\t\t\tret = elem.getAttribute( name );\r\n\t\t\t}\r\n\r\n\t\t\t// Non-existent attributes return null, we normalize to undefined\r\n\t\t\treturn ret == null ?\r\n\t\t\t\tundefined :\r\n\t\t\t\tret;\r\n\t\t}\r\n\t},\r\n\r\n\tremoveAttr: function( elem, value ) {\r\n\t\tvar name, propName,\r\n\t\t\ti = 0,\r\n\t\t\tattrNames = value && value.match( core_rnotwhite );\r\n\r\n\t\tif ( attrNames && elem.nodeType === 1 ) {\r\n\t\t\twhile ( (name = attrNames[i++]) ) {\r\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\r\n\r\n\t\t\t\t// Boolean attributes get special treatment (#10870)\r\n\t\t\t\tif ( rboolean.test( name ) ) {\r\n\t\t\t\t\t// Set corresponding property to false for boolean attributes\r\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate) for IE<8\r\n\t\t\t\t\tif ( !getSetAttribute && ruseDefault.test( name ) ) {\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\r\n\t\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattrHooks: {\r\n\t\ttype: {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\r\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE6-9\r\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\r\n\t\t\t\t\tvar val = elem.value;\r\n\t\t\t\t\telem.setAttribute( \"type\", value );\r\n\t\t\t\t\tif ( val ) {\r\n\t\t\t\t\t\telem.value = val;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropFix: {\r\n\t\ttabindex: \"tabIndex\",\r\n\t\treadonly: \"readOnly\",\r\n\t\t\"for\": \"htmlFor\",\r\n\t\t\"class\": \"className\",\r\n\t\tmaxlength: \"maxLength\",\r\n\t\tcellspacing: \"cellSpacing\",\r\n\t\tcellpadding: \"cellPadding\",\r\n\t\trowspan: \"rowSpan\",\r\n\t\tcolspan: \"colSpan\",\r\n\t\tusemap: \"useMap\",\r\n\t\tframeborder: \"frameBorder\",\r\n\t\tcontenteditable: \"contentEditable\"\r\n\t},\r\n\r\n\tprop: function( elem, name, value ) {\r\n\t\tvar ret, hooks, notxml,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set properties on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\r\n\r\n\t\tif ( notxml ) {\r\n\t\t\t// Fix name and attach hooks\r\n\t\t\tname = jQuery.propFix[ name ] || name;\r\n\t\t\thooks = jQuery.propHooks[ name ];\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\tif ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn ( elem[ name ] = value );\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn elem[ name ];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropHooks: {\r\n\t\ttabIndex: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\r\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\r\n\t\t\t\tvar attributeNode = elem.getAttributeNode(\"tabindex\");\r\n\r\n\t\t\t\treturn attributeNode && attributeNode.specified ?\r\n\t\t\t\t\tparseInt( attributeNode.value, 10 ) :\r\n\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\r\n\t\t\t\t\t\t0 :\r\n\t\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Hook for boolean attributes\r\nboolHook = {\r\n\tget: function( elem, name ) {\r\n\t\tvar\r\n\t\t\t// Use .prop to determine if this attribute is understood as boolean\r\n\t\t\tprop = jQuery.prop( elem, name ),\r\n\r\n\t\t\t// Fetch it accordingly\r\n\t\t\tattr = typeof prop === \"boolean\" && elem.getAttribute( name ),\r\n\t\t\tdetail = typeof prop === \"boolean\" ?\r\n\r\n\t\t\t\tgetSetInput && getSetAttribute ?\r\n\t\t\t\t\tattr != null :\r\n\t\t\t\t\t// oldIE fabricates an empty string for missing boolean attributes\r\n\t\t\t\t\t// and conflates checked/selected into attroperties\r\n\t\t\t\t\truseDefault.test( name ) ?\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] :\r\n\t\t\t\t\t\t!!attr :\r\n\r\n\t\t\t\t// fetch an attribute node for properties not recognized as boolean\r\n\t\t\t\telem.getAttributeNode( name );\r\n\r\n\t\treturn detail && detail.value !== false ?\r\n\t\t\tname.toLowerCase() :\r\n\t\t\tundefined;\r\n\t},\r\n\tset: function( elem, value, name ) {\r\n\t\tif ( value === false ) {\r\n\t\t\t// Remove boolean attributes when set to false\r\n\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\t\t\t// IE<8 needs the *property* name\r\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\r\n\r\n\t\t// Use defaultChecked and defaultSelected for oldIE\r\n\t\t} else {\r\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\r\n\t\t}\r\n\r\n\t\treturn name;\r\n\t}\r\n};\r\n\r\n// fix oldIE value attroperty\r\nif ( !getSetInput || !getSetAttribute ) {\r\n\tjQuery.attrHooks.value = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\treturn jQuery.nodeName( elem, \"input\" ) ?\r\n\r\n\t\t\t\t// Ignore the value *property* by using defaultValue\r\n\t\t\t\telem.defaultValue :\r\n\r\n\t\t\t\tret && ret.specified ? ret.value : undefined;\r\n\t\t},\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\r\n\t\t\t\t// Does not return so that setAttribute is also used\r\n\t\t\t\telem.defaultValue = value;\r\n\t\t\t} else {\r\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\r\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\r\nif ( !getSetAttribute ) {\r\n\r\n\t// Use this for any attribute in IE6/7\r\n\t// This fixes almost every IE6/7 issue\r\n\tnodeHook = jQuery.valHooks.button = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\treturn ret && ( name === \"id\" || name === \"name\" || name === \"coords\" ? ret.value !== \"\" : ret.specified ) ?\r\n\t\t\t\tret.value :\r\n\t\t\t\tundefined;\r\n\t\t},\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\t// Set the existing or create a new attribute node\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\tif ( !ret ) {\r\n\t\t\t\telem.setAttributeNode(\r\n\t\t\t\t\t(ret = elem.ownerDocument.createAttribute( name ))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tret.value = value += \"\";\r\n\r\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\r\n\t\t\treturn name === \"value\" || value === elem.getAttribute( name ) ?\r\n\t\t\t\tvalue :\r\n\t\t\t\tundefined;\r\n\t\t}\r\n\t};\r\n\r\n\t// Set contenteditable to false on removals(#10429)\r\n\t// Setting to empty string throws an error as an invalid value\r\n\tjQuery.attrHooks.contenteditable = {\r\n\t\tget: nodeHook.get,\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\r\n\t// This is for removals\r\n\tjQuery.each([ \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( value === \"\" ) {\r\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n\r\n// Some attributes require a special call on IE\r\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\r\nif ( !jQuery.support.hrefNormalized ) {\r\n\tjQuery.each([ \"href\", \"src\", \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar ret = elem.getAttribute( name, 2 );\r\n\t\t\t\treturn ret == null ? undefined : ret;\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n\t// href/src property should get the full normalized URL (#10299/#12915)\r\n\tjQuery.each([ \"href\", \"src\" ], function( i, name ) {\r\n\t\tjQuery.propHooks[ name ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( name, 4 );\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\nif ( !jQuery.support.style ) {\r\n\tjQuery.attrHooks.style = {\r\n\t\tget: function( elem ) {\r\n\t\t\t// Return undefined in the case of empty string\r\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\r\n\t\t\t// .cssText, that would destroy case senstitivity in URL's, like in \"background\"\r\n\t\t\treturn elem.style.cssText || undefined;\r\n\t\t},\r\n\t\tset: function( elem, value ) {\r\n\t\t\treturn ( elem.style.cssText = value + \"\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Safari mis-reports the default selected property of an option\r\n// Accessing the parent's selectedIndex property fixes it\r\nif ( !jQuery.support.optSelected ) {\r\n\tjQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {\r\n\t\tget: function( elem ) {\r\n\t\t\tvar parent = elem.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tparent.selectedIndex;\r\n\r\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\r\n\t\t\t\tif ( parent.parentNode ) {\r\n\t\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// IE6/7 call enctype encoding\r\nif ( !jQuery.support.enctype ) {\r\n\tjQuery.propFix.enctype = \"encoding\";\r\n}\r\n\r\n// Radios and checkboxes getter/setter\r\nif ( !jQuery.support.checkOn ) {\r\n\tjQuery.each([ \"radio\", \"checkbox\" ], function() {\r\n\t\tjQuery.valHooks[ this ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// Handle the case where in Webkit \"\" is returned instead of \"on\" if a value isn't specified\r\n\t\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\njQuery.each([ \"radio\", \"checkbox\" ], function() {\r\n\tjQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {\r\n\t\tset: function( elem, value ) {\r\n\t\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n});\r\nvar rformElems = /^(?:input|select|textarea)$/i,\r\n\trkeyEvent = /^key/,\r\n\trmouseEvent = /^(?:mouse|contextmenu)|click/,\r\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\r\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\r\n\r\nfunction returnTrue() {\r\n\treturn true;\r\n}\r\n\r\nfunction returnFalse() {\r\n\treturn false;\r\n}\r\n\r\n/*\r\n * Helper functions for managing events -- not part of the public interface.\r\n * Props to Dean Edwards' addEvent library for many of the ideas.\r\n */\r\njQuery.event = {\r\n\r\n\tglobal: {},\r\n\r\n\tadd: function( elem, types, handler, data, selector ) {\r\n\t\tvar tmp, events, t, handleObjIn,\r\n\t\t\tspecial, eventHandle, handleObj,\r\n\t\t\thandlers, type, namespaces, origType,\r\n\t\t\telemData = jQuery._data( elem );\r\n\r\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\r\n\t\tif ( !elemData ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Caller can pass in an object of custom data in lieu of the handler\r\n\t\tif ( handler.handler ) {\r\n\t\t\thandleObjIn = handler;\r\n\t\t\thandler = handleObjIn.handler;\r\n\t\t\tselector = handleObjIn.selector;\r\n\t\t}\r\n\r\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\r\n\t\tif ( !handler.guid ) {\r\n\t\t\thandler.guid = jQuery.guid++;\r\n\t\t}\r\n\r\n\t\t// Init the element's event structure and main handler, if this is the first\r\n\t\tif ( !(events = elemData.events) ) {\r\n\t\t\tevents = elemData.events = {};\r\n\t\t}\r\n\t\tif ( !(eventHandle = elemData.handle) ) {\r\n\t\t\teventHandle = elemData.handle = function( e ) {\r\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\r\n\t\t\t\t// when an event is called after a page has unloaded\r\n\t\t\t\treturn typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?\r\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t};\r\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\r\n\t\t\teventHandle.elem = elem;\r\n\t\t}\r\n\r\n\t\t// Handle multiple events separated by a space\r\n\t\t// jQuery(...).bind(\"mouseover mouseout\", fn);\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// If event changes its type, use the special event handlers for the changed type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// If selector defined, determine special event api type, otherwise given type\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\r\n\t\t\t// Update special based on newly reset type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// handleObj is passed to all event handlers\r\n\t\t\thandleObj = jQuery.extend({\r\n\t\t\t\ttype: type,\r\n\t\t\t\torigType: origType,\r\n\t\t\t\tdata: data,\r\n\t\t\t\thandler: handler,\r\n\t\t\t\tguid: handler.guid,\r\n\t\t\t\tselector: selector,\r\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\r\n\t\t\t\tnamespace: namespaces.join(\".\")\r\n\t\t\t}, handleObjIn );\r\n\r\n\t\t\t// Init the event handler queue if we're the first\r\n\t\t\tif ( !(handlers = events[ type ]) ) {\r\n\t\t\t\thandlers = events[ type ] = [];\r\n\t\t\t\thandlers.delegateCount = 0;\r\n\r\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\r\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\r\n\t\t\t\t\t// Bind the global event handler to the element\r\n\t\t\t\t\tif ( elem.addEventListener ) {\r\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\r\n\r\n\t\t\t\t\t} else if ( elem.attachEvent ) {\r\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( special.add ) {\r\n\t\t\t\tspecial.add.call( elem, handleObj );\r\n\r\n\t\t\t\tif ( !handleObj.handler.guid ) {\r\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add to the element's handler list, delegates in front\r\n\t\t\tif ( selector ) {\r\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\r\n\t\t\t} else {\r\n\t\t\t\thandlers.push( handleObj );\r\n\t\t\t}\r\n\r\n\t\t\t// Keep track of which events have ever been used, for event optimization\r\n\t\t\tjQuery.event.global[ type ] = true;\r\n\t\t}\r\n\r\n\t\t// Nullify elem to prevent memory leaks in IE\r\n\t\telem = null;\r\n\t},\r\n\r\n\t// Detach an event or set of events from an element\r\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\r\n\t\tvar j, handleObj, tmp,\r\n\t\t\torigCount, t, events,\r\n\t\t\tspecial, handlers, type,\r\n\t\t\tnamespaces, origType,\r\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\r\n\r\n\t\tif ( !elemData || !(events = elemData.events) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Once for each type.namespace in types; type may be omitted\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tfor ( type in events ) {\r\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\t\t\thandlers = events[ type ] || [];\r\n\t\t\ttmp = tmp[2] && new RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" );\r\n\r\n\t\t\t// Remove matching events\r\n\t\t\torigCount = j = handlers.length;\r\n\t\t\twhile ( j-- ) {\r\n\t\t\t\thandleObj = handlers[ j ];\r\n\r\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\r\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\r\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\r\n\t\t\t\t\t( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\r\n\t\t\t\t\thandlers.splice( j, 1 );\r\n\r\n\t\t\t\t\tif ( handleObj.selector ) {\r\n\t\t\t\t\t\thandlers.delegateCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( special.remove ) {\r\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\r\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\r\n\t\t\tif ( origCount && !handlers.length ) {\r\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\r\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelete events[ type ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove the expando if it's no longer used\r\n\t\tif ( jQuery.isEmptyObject( events ) ) {\r\n\t\t\tdelete elemData.handle;\r\n\r\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\r\n\t\t\t// so use it instead of delete\r\n\t\t\tjQuery._removeData( elem, \"events\" );\r\n\t\t}\r\n\t},\r\n\r\n\ttrigger: function( event, data, elem, onlyHandlers ) {\r\n\t\tvar handle, ontype, cur,\r\n\t\t\tbubbleType, special, tmp, i,\r\n\t\t\teventPath = [ elem || document ],\r\n\t\t\ttype = core_hasOwn.call( event, \"type\" ) ? event.type : event,\r\n\t\t\tnamespaces = core_hasOwn.call( event, \"namespace\" ) ? event.namespace.split(\".\") : [];\r\n\r\n\t\tcur = tmp = elem = elem || document;\r\n\r\n\t\t// Don't do events on text and comment nodes\r\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\r\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( type.indexOf(\".\") >= 0 ) {\r\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\r\n\t\t\tnamespaces = type.split(\".\");\r\n\t\t\ttype = namespaces.shift();\r\n\t\t\tnamespaces.sort();\r\n\t\t}\r\n\t\tontype = type.indexOf(\":\") < 0 && \"on\" + type;\r\n\r\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\r\n\t\tevent = event[ jQuery.expando ] ?\r\n\t\t\tevent :\r\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\r\n\r\n\t\tevent.isTrigger = true;\r\n\t\tevent.namespace = namespaces.join(\".\");\r\n\t\tevent.namespace_re = event.namespace ?\r\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" ) :\r\n\t\t\tnull;\r\n\r\n\t\t// Clean up the event in case it is being reused\r\n\t\tevent.result = undefined;\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = elem;\r\n\t\t}\r\n\r\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\r\n\t\tdata = data == null ?\r\n\t\t\t[ event ] :\r\n\t\t\tjQuery.makeArray( data, [ event ] );\r\n\r\n\t\t// Allow special events to draw outside the lines\r\n\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\r\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\r\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\tbubbleType = special.delegateType || type;\r\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\r\n\t\t\t\teventPath.push( cur );\r\n\t\t\t\ttmp = cur;\r\n\t\t\t}\r\n\r\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\r\n\t\t\tif ( tmp === (elem.ownerDocument || document) ) {\r\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fire handlers on the event path\r\n\t\ti = 0;\r\n\t\twhile ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\r\n\r\n\t\t\tevent.type = i > 1 ?\r\n\t\t\t\tbubbleType :\r\n\t\t\t\tspecial.bindType || type;\r\n\r\n\t\t\t// jQuery handler\r\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\r\n\t\t\tif ( handle ) {\r\n\t\t\t\thandle.apply( cur, data );\r\n\t\t\t}\r\n\r\n\t\t\t// Native handler\r\n\t\t\thandle = ontype && cur[ ontype ];\r\n\t\t\tif ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t}\r\n\t\t}\r\n\t\tevent.type = type;\r\n\r\n\t\t// If nobody prevented the default action, do it now\r\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\r\n\r\n\t\t\tif ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&\r\n\t\t\t\t!(type === \"click\" && jQuery.nodeName( elem, \"a\" )) && jQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\r\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\r\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\r\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\r\n\t\t\t\t\ttmp = elem[ ontype ];\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\r\n\t\t\t\t\tjQuery.event.triggered = type;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\telem[ type ]();\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\r\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery.event.triggered = undefined;\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\tdispatch: function( event ) {\r\n\r\n\t\t// Make a writable jQuery.Event from the native event object\r\n\t\tevent = jQuery.event.fix( event );\r\n\r\n\t\tvar i, ret, handleObj, matched, j,\r\n\t\t\thandlerQueue = [],\r\n\t\t\targs = core_slice.call( arguments ),\r\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\r\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\r\n\r\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\r\n\t\targs[0] = event;\r\n\t\tevent.delegateTarget = this;\r\n\r\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\r\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine handlers\r\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\r\n\r\n\t\t// Run delegates first; they may want to stop propagation beneath us\r\n\t\ti = 0;\r\n\t\twhile ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\r\n\t\t\tevent.currentTarget = matched.elem;\r\n\r\n\t\t\tj = 0;\r\n\t\t\twhile ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\r\n\r\n\t\t\t\t// Triggered event must either 1) have no namespace, or\r\n\t\t\t\t// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\r\n\t\t\t\tif ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\r\n\r\n\t\t\t\t\tevent.handleObj = handleObj;\r\n\t\t\t\t\tevent.data = handleObj.data;\r\n\r\n\t\t\t\t\tvar obj = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler );\r\n\t\t\t\t\tif(obj.apply){\r\n\t\t\t\t\t\tret = obj.apply( matched.elem, args );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( ret !== undefined ) {\r\n\t\t\t\t\t\tif ( (event.result = ret) === false ) {\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call the postDispatch hook for the mapped type\r\n\t\tif ( special.postDispatch ) {\r\n\t\t\tspecial.postDispatch.call( this, event );\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\thandlers: function( event, handlers ) {\r\n\t\tvar sel, handleObj, matches, i,\r\n\t\t\thandlerQueue = [],\r\n\t\t\tdelegateCount = handlers.delegateCount,\r\n\t\t\tcur = event.target;\r\n\r\n\t\t// Find delegate handlers\r\n\t\t// Black-hole SVG <use> instance trees (#13180)\r\n\t\t// Avoid non-left-click bubbling in Firefox (#3861)\r\n\t\tif ( delegateCount && cur.nodeType && (!event.button || event.type !== \"click\") ) {\r\n\r\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\r\n\r\n\t\t\t\t// Don't check non-elements (#13208)\r\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\r\n\t\t\t\tif ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== \"click\") ) {\r\n\t\t\t\t\tmatches = [];\r\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\r\n\t\t\t\t\t\thandleObj = handlers[ i ];\r\n\r\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\r\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\r\n\r\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\r\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\r\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) >= 0 :\r\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( matches[ sel ] ) {\r\n\t\t\t\t\t\t\tmatches.push( handleObj );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( matches.length ) {\r\n\t\t\t\t\t\thandlerQueue.push({ elem: cur, handlers: matches });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add the remaining (directly-bound) handlers\r\n\t\tif ( delegateCount < handlers.length ) {\r\n\t\t\thandlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\r\n\t\t}\r\n\r\n\t\treturn handlerQueue;\r\n\t},\r\n\r\n\tfix: function( event ) {\r\n\t\tif ( event[ jQuery.expando ] ) {\r\n\t\t\treturn event;\r\n\t\t}\r\n\r\n\t\t// Create a writable copy of the event object and normalize some properties\r\n\t\tvar i, prop, copy,\r\n\t\t\ttype = event.type,\r\n\t\t\toriginalEvent = event,\r\n\t\t\tfixHook = this.fixHooks[ type ];\r\n\r\n\t\tif ( !fixHook ) {\r\n\t\t\tthis.fixHooks[ type ] = fixHook =\r\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\r\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\r\n\t\t\t\t{};\r\n\t\t}\r\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\r\n\r\n\t\tevent = new jQuery.Event( originalEvent );\r\n\r\n\t\ti = copy.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tprop = copy[ i ];\r\n\t\t\tevent[ prop ] = originalEvent[ prop ];\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Fix target property (#1925)\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = originalEvent.srcElement || document;\r\n\t\t}\r\n\r\n\t\t// Support: Chrome 23+, Safari?\r\n\t\t// Target should not be a text node (#504, #13143)\r\n\t\tif ( event.target.nodeType === 3 ) {\r\n\t\t\tevent.target = event.target.parentNode;\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\r\n\t\tevent.metaKey = !!event.metaKey;\r\n\r\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\r\n\t},\r\n\r\n\t// Includes some event props shared by KeyEvent and MouseEvent\r\n\tprops: \"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\r\n\r\n\tfixHooks: {},\r\n\r\n\tkeyHooks: {\r\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\r\n\t\t\t// Add which for key events\r\n\t\t\tif ( event.which == null ) {\r\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tmouseHooks: {\r\n\t\tprops: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\t\t\tvar body, eventDoc, doc,\r\n\t\t\t\tbutton = original.button,\r\n\t\t\t\tfromElement = original.fromElement;\r\n\r\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\r\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\r\n\t\t\t\teventDoc = event.target.ownerDocument || document;\r\n\t\t\t\tdoc = eventDoc.documentElement;\r\n\t\t\t\tbody = eventDoc.body;\r\n\r\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\r\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );\r\n\t\t\t}\r\n\r\n\t\t\t// Add relatedTarget, if necessary\r\n\t\t\tif ( !event.relatedTarget && fromElement ) {\r\n\t\t\t\tevent.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\r\n\t\t\t}\r\n\r\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\r\n\t\t\t// Note: button is not normalized, so don't use it\r\n\t\t\tif ( !event.which && button !== undefined ) {\r\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tspecial: {\r\n\t\tload: {\r\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\r\n\t\t\tnoBubble: true\r\n\t\t},\r\n\t\tclick: {\r\n\t\t\t// For checkbox, fire native event so checked state will be right\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\r\n\t\t\t\t\tthis.click();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this !== document.activeElement && this.focus ) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tthis.focus();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\r\n\t\t\t\t\t\t// let .trigger() run the handlers\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusin\"\r\n\t\t},\r\n\t\tblur: {\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this === document.activeElement && this.blur ) {\r\n\t\t\t\t\tthis.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusout\"\r\n\t\t},\r\n\r\n\t\tbeforeunload: {\r\n\t\t\tpostDispatch: function( event ) {\r\n\r\n\t\t\t\t// Even when returnValue equals to undefined Firefox will still show alert\r\n\t\t\t\tif ( event.result !== undefined ) {\r\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tsimulate: function( type, elem, event, bubble ) {\r\n\t\t// Piggyback on a donor event to simulate a different one.\r\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\r\n\t\t// simulated event prevents default then we do the same on the donor.\r\n\t\tvar e = jQuery.extend(\r\n\t\t\tnew jQuery.Event(),\r\n\t\t\tevent,\r\n\t\t\t{ type: type,\r\n\t\t\t\tisSimulated: true,\r\n\t\t\t\toriginalEvent: {}\r\n\t\t\t}\r\n\t\t);\r\n\t\tif ( bubble ) {\r\n\t\t\tjQuery.event.trigger( e, null, elem );\r\n\t\t} else {\r\n\t\t\tjQuery.event.dispatch.call( elem, e );\r\n\t\t}\r\n\t\tif ( e.isDefaultPrevented() ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.removeEvent = document.removeEventListener ?\r\n\tfunction( elem, type, handle ) {\r\n\t\tif ( elem.removeEventListener ) {\r\n\t\t\telem.removeEventListener( type, handle, false );\r\n\t\t}\r\n\t} :\r\n\tfunction( elem, type, handle ) {\r\n\t\tvar name = \"on\" + type;\r\n\r\n\t\tif ( elem.detachEvent ) {\r\n\r\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\r\n\t\t\t// detachEvent needed property on element, by name of that event, to properly expose it to GC\r\n\t\t\tif ( typeof elem[ name ] === core_strundefined ) {\r\n\t\t\t\telem[ name ] = null;\r\n\t\t\t}\r\n\r\n\t\t\telem.detachEvent( name, handle );\r\n\t\t}\r\n\t};\r\n\r\njQuery.Event = function( src, props ) {\r\n\t// Allow instantiation without the 'new' keyword\r\n\tif ( !(this instanceof jQuery.Event) ) {\r\n\t\treturn new jQuery.Event( src, props );\r\n\t}\r\n\r\n\t// Event object\r\n\tif ( src && src.type ) {\r\n\t\tthis.originalEvent = src;\r\n\t\tthis.type = src.type;\r\n\r\n\t\t// Events bubbling up the document may have been marked as prevented\r\n\t\t// by a handler lower down the tree; reflect the correct value.\r\n\t\tthis.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\r\n\t\t\tsrc.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\r\n\r\n\t// Event type\r\n\t} else {\r\n\t\tthis.type = src;\r\n\t}\r\n\r\n\t// Put explicitly provided properties onto the event object\r\n\tif ( props ) {\r\n\t\tjQuery.extend( this, props );\r\n\t}\r\n\r\n\t// Create a timestamp if incoming event doesn't have one\r\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\r\n\r\n\t// Mark it as fixed\r\n\tthis[ jQuery.expando ] = true;\r\n};\r\n\r\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\r\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\r\njQuery.Event.prototype = {\r\n\tisDefaultPrevented: returnFalse,\r\n\tisPropagationStopped: returnFalse,\r\n\tisImmediatePropagationStopped: returnFalse,\r\n\r\n\tpreventDefault: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isDefaultPrevented = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If preventDefault exists, run it on the original event\r\n\t\tif ( e.preventDefault ) {\r\n\t\t\te.preventDefault();\r\n\r\n\t\t// Support: IE\r\n\t\t// Otherwise set the returnValue property of the original event to false\r\n\t\t} else {\r\n\t\t\te.returnValue = false;\r\n\t\t}\r\n\t},\r\n\tstopPropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isPropagationStopped = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// If stopPropagation exists, run it on the original event\r\n\t\tif ( e.stopPropagation ) {\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\r\n\t\t// Support: IE\r\n\t\t// Set the cancelBubble property of the original event to true\r\n\t\te.cancelBubble = true;\r\n\t},\r\n\tstopImmediatePropagation: function() {\r\n\t\tthis.isImmediatePropagationStopped = returnTrue;\r\n\t\tthis.stopPropagation();\r\n\t}\r\n};\r\n\r\n// Create mouseenter/leave events using mouseover/out and event-time checks\r\njQuery.each({\r\n\tmouseenter: \"mouseover\",\r\n\tmouseleave: \"mouseout\"\r\n}, function( orig, fix ) {\r\n\tjQuery.event.special[ orig ] = {\r\n\t\tdelegateType: fix,\r\n\t\tbindType: fix,\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar ret,\r\n\t\t\t\ttarget = this,\r\n\t\t\t\trelated = event.relatedTarget,\r\n\t\t\t\thandleObj = event.handleObj;\r\n\r\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\r\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\r\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\r\n\t\t\t\tevent.type = handleObj.origType;\r\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\r\n\t\t\t\tevent.type = fix;\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t};\r\n});\r\n\r\n// IE submit delegation\r\nif ( !jQuery.support.submitBubbles ) {\r\n\r\n\tjQuery.event.special.submit = {\r\n\t\tsetup: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\r\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\r\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\r\n\t\t\t\tvar elem = e.target,\r\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\r\n\t\t\t\tif ( form && !jQuery._data( form, \"submitBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\r\n\t\t\t\t\t\tevent._submit_bubble = true;\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( form, \"submitBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t// return undefined since we don't need an event listener\r\n\t\t},\r\n\r\n\t\tpostDispatch: function( event ) {\r\n\t\t\t// If form was submitted by the user, bubble the event up the tree\r\n\t\t\tif ( event._submit_bubble ) {\r\n\t\t\t\tdelete event._submit_bubble;\r\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\r\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\r\n\t\t\tjQuery.event.remove( this, \"._submit\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE change delegation and checkbox/radio fix\r\nif ( !jQuery.support.changeBubbles ) {\r\n\r\n\tjQuery.event.special.change = {\r\n\r\n\t\tsetup: function() {\r\n\r\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\r\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\r\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\r\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\r\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\r\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\r\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\r\n\t\t\t\t\t\t\tthis._just_changed = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this._just_changed && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tthis._just_changed = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\r\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event, true );\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\r\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\r\n\t\t\t\tvar elem = e.target;\r\n\r\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"changeBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event, true );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( elem, \"changeBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar elem = event.target;\r\n\r\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\r\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\r\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\tjQuery.event.remove( this, \"._change\" );\r\n\r\n\t\t\treturn !rformElems.test( this.nodeName );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Create \"bubbling\" focus and blur events\r\nif ( !jQuery.support.focusinBubbles ) {\r\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\r\n\r\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\r\n\t\tvar attaches = 0,\r\n\t\t\thandler = function( event ) {\r\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\r\n\t\t\t};\r\n\r\n\t\tjQuery.event.special[ fix ] = {\r\n\t\t\tsetup: function() {\r\n\t\t\t\tif ( attaches++ === 0 ) {\r\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tteardown: function() {\r\n\t\t\t\tif ( --attaches === 0 ) {\r\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\njQuery.fn.extend({\r\n\r\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\r\n\t\tvar type, origFn;\r\n\r\n\t\t// Types can be a map of types/handlers\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-Object, selector, data )\r\n\t\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\t\t// ( types-Object, data )\r\n\t\t\t\tdata = data || selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( data == null && fn == null ) {\r\n\t\t\t// ( types, fn )\r\n\t\t\tfn = selector;\r\n\t\t\tdata = selector = undefined;\r\n\t\t} else if ( fn == null ) {\r\n\t\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\t\t// ( types, selector, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = undefined;\r\n\t\t\t} else {\r\n\t\t\t\t// ( types, data, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t} else if ( !fn ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( one === 1 ) {\r\n\t\t\torigFn = fn;\r\n\t\t\tfn = function( event ) {\r\n\t\t\t\t// Can use an empty set, since event contains the info\r\n\t\t\t\tjQuery().off( event );\r\n\t\t\t\treturn origFn.apply( this, arguments );\r\n\t\t\t};\r\n\t\t\t// Use same guid so caller can remove using origFn\r\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\r\n\t\t});\r\n\t},\r\n\tone: function( types, selector, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn, 1 );\r\n\t},\r\n\toff: function( types, selector, fn ) {\r\n\t\tvar handleObj, type;\r\n\t\tif ( types && types.preventDefault && types.handleObj ) {\r\n\t\t\t// ( event ) dispatched jQuery.Event\r\n\t\t\thandleObj = types.handleObj;\r\n\t\t\tjQuery( types.delegateTarget ).off(\r\n\t\t\t\thandleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\r\n\t\t\t\thandleObj.selector,\r\n\t\t\t\thandleObj.handler\r\n\t\t\t);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-object [, selector] )\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.off( type, selector, types[ type ] );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( selector === false || typeof selector === \"function\" ) {\r\n\t\t\t// ( types [, fn] )\r\n\t\t\tfn = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.remove( this, types, fn, selector );\r\n\t\t});\r\n\t},\r\n\r\n\tbind: function( types, data, fn ) {\r\n\t\treturn this.on( types, null, data, fn );\r\n\t},\r\n\tunbind: function( types, fn ) {\r\n\t\treturn this.off( types, null, fn );\r\n\t},\r\n\r\n\tdelegate: function( selector, types, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn );\r\n\t},\r\n\tundelegate: function( selector, types, fn ) {\r\n\t\t// ( namespace ) or ( selector, types [, fn] )\r\n\t\treturn arguments.length === 1 ? this.off( selector, \"**\" ) : this.off( types, selector || \"**\", fn );\r\n\t},\r\n\r\n\ttrigger: function( type, data ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.trigger( type, data, this );\r\n\t\t});\r\n\t},\r\n\ttriggerHandler: function( type, data ) {\r\n\t\tvar elem = this[0];\r\n\t\tif ( elem ) {\r\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\r\n\t\t}\r\n\t}\r\n});\r\n/*!\r\n * Sizzle CSS Selector Engine\r\n * Copyright 2012 jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://sizzlejs.com/\r\n */\r\n(function( window, undefined ) {\r\n\r\nvar i,\r\n\tcachedruns,\r\n\tExpr,\r\n\tgetText,\r\n\tisXML,\r\n\tcompile,\r\n\thasDuplicate,\r\n\toutermostContext,\r\n\r\n\t// Local document vars\r\n\tsetDocument,\r\n\tdocument,\r\n\tdocElem,\r\n\tdocumentIsXML,\r\n\trbuggyQSA,\r\n\trbuggyMatches,\r\n\tmatches,\r\n\tcontains,\r\n\tsortOrder,\r\n\r\n\t// Instance-specific data\r\n\texpando = \"sizzle\" + -(new Date()),\r\n\tpreferredDoc = window.document,\r\n\tsupport = {},\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\r\n\t// General-purpose constants\r\n\tstrundefined = typeof undefined,\r\n\tMAX_NEGATIVE = 1 << 31,\r\n\r\n\t// Array methods\r\n\tarr = [],\r\n\tpop = arr.pop,\r\n\tpush = arr.push,\r\n\tslice = arr.slice,\r\n\t// Use a stripped-down indexOf if we can't use a native one\r\n\tindexOf = arr.indexOf || function( elem ) {\r\n\t\tvar i = 0,\r\n\t\t\tlen = this.length;\r\n\t\tfor ( ; i < len; i++ ) {\r\n\t\t\tif ( this[i] === elem ) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t},\r\n\r\n\r\n\t// Regular expressions\r\n\r\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\r\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\r\n\t// http://www.w3.org/TR/css3-syntax/#characters\r\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\r\n\r\n\t// Loosely modeled on CSS identifier characters\r\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\r\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\r\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\r\n\r\n\t// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\r\n\toperators = \"([*^$|!~]?=)\",\r\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")\" + whitespace +\r\n\t\t\"*(?:\" + operators + whitespace + \"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\" + identifier + \")|)|)\" + whitespace + \"*\\\\]\",\r\n\r\n\t// Prefer arguments quoted,\r\n\t// then not containing pseudos/brackets,\r\n\t// then attribute selectors/non-parenthetical expressions,\r\n\t// then anything else\r\n\t// These preferences are here to reduce the number of selectors\r\n\t// needing tokenize in the PSEUDO preFilter\r\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes.replace( 3, 8 ) + \")*)|.*)\\\\)|)\",\r\n\r\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\r\n\r\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\r\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\" + whitespace + \"*\" ),\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\r\n\r\n\tmatchExpr = {\r\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\r\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\r\n\t\t\"NAME\": new RegExp( \"^\\\\[name=['\\\"]?(\" + characterEncoding + \")['\\\"]?\\\\]\" ),\r\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\r\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\r\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\r\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\r\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\r\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\r\n\t\t// For use in libraries implementing .is()\r\n\t\t// We use this for POS matching in `select`\r\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\r\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\r\n\t},\r\n\r\n\trsibling = /[\\x20\\t\\r\\n\\f]*[+~]/,\r\n\r\n\trnative = /^[^{]+\\{\\s*\\[native code/,\r\n\r\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trinputs = /^(?:input|select|textarea|button)$/i,\r\n\trheader = /^h\\d$/i,\r\n\r\n\trescape = /'|\\\\/g,\r\n\trattributeQuotes = /\\=[\\x20\\t\\r\\n\\f]*([^'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,\r\n\r\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = /\\\\([\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|.)/g,\r\n\tfunescape = function( _, escaped ) {\r\n\t\tvar high = \"0x\" + escaped - 0x10000;\r\n\t\t// NaN means non-codepoint\r\n\t\treturn high !== high ?\r\n\t\t\tescaped :\r\n\t\t\t// BMP codepoint\r\n\t\t\thigh < 0 ?\r\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\r\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t};\r\n\r\n// Use a stripped-down slice if we can't use a native one\r\ntry {\r\n\tslice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType;\r\n} catch ( e ) {\r\n\tslice = function( i ) {\r\n\t\tvar elem,\r\n\t\t\tresults = [];\r\n\t\twhile ( (elem = this[i++]) ) {\r\n\t\t\tresults.push( elem );\r\n\t\t}\r\n\t\treturn results;\r\n\t};\r\n}\r\n\r\n/**\r\n * For feature detection\r\n * @param {Function} fn The function to test for native support\r\n */\r\nfunction isNative( fn ) {\r\n\treturn rnative.test( fn + \"\" );\r\n}\r\n\r\n/**\r\n * Create key-value caches of limited size\r\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\r\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\r\n *\tdeleting the oldest entry\r\n */\r\nfunction createCache() {\r\n\tvar cache,\r\n\t\tkeys = [];\r\n\r\n\treturn (cache = function( key, value ) {\r\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\r\n\t\tif ( keys.push( key += \" \" ) > Expr.cacheLength ) {\r\n\t\t\t// Only keep the most recent entries\r\n\t\t\tdelete cache[ keys.shift() ];\r\n\t\t}\r\n\t\treturn (cache[ key ] = value);\r\n\t});\r\n}\r\n\r\n/**\r\n * Mark a function for special use by Sizzle\r\n * @param {Function} fn The function to mark\r\n */\r\nfunction markFunction( fn ) {\r\n\tfn[ expando ] = true;\r\n\treturn fn;\r\n}\r\n\r\n/**\r\n * Support testing using an element\r\n * @param {Function} fn Passed the created div and expects a boolean result\r\n */\r\nfunction assert( fn ) {\r\n\tvar div = document.createElement(\"div\");\r\n\r\n\ttry {\r\n\t\treturn fn( div );\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t} finally {\r\n\t\t// release memory in IE\r\n\t\tdiv = null;\r\n\t}\r\n}\r\n\r\nfunction Sizzle( selector, context, results, seed ) {\r\n\tvar match, elem, m, nodeType,\r\n\t\t// QSA vars\r\n\t\ti, groups, old, nid, newContext, newSelector;\r\n\r\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\r\n\tcontext = context || document;\r\n\tresults = results || [];\r\n\r\n\tif ( !selector || typeof selector !== \"string\" ) {\r\n\t\treturn results;\r\n\t}\r\n\r\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tif ( !documentIsXML && !seed ) {\r\n\r\n\t\t// Shortcuts\r\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\r\n\t\t\t// Speed-up: Sizzle(\"#ID\")\r\n\t\t\tif ( (m = match[1]) ) {\r\n\t\t\t\tif ( nodeType === 9 ) {\r\n\t\t\t\t\telem = context.getElementById( m );\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id === m ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Context is not a document\r\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\r\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\r\n\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Speed-up: Sizzle(\"TAG\")\r\n\t\t\t} else if ( match[2] ) {\r\n\t\t\t\tpush.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );\r\n\t\t\t\treturn results;\r\n\r\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\r\n\t\t\t} else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {\r\n\t\t\t\tpush.apply( results, slice.call(context.getElementsByClassName( m ), 0) );\r\n\t\t\t\treturn results;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// QSA path\r\n\t\tif ( support.qsa && !rbuggyQSA.test(selector) ) {\r\n\t\t\told = true;\r\n\t\t\tnid = expando;\r\n\t\t\tnewContext = context;\r\n\t\t\tnewSelector = nodeType === 9 && selector;\r\n\r\n\t\t\t// qSA works strangely on Element-rooted queries\r\n\t\t\t// We can work around this by specifying an extra ID on the root\r\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\r\n\t\t\t// IE 8 doesn't work on object elements\r\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\r\n\t\t\t\tgroups = tokenize( selector );\r\n\r\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\r\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\r\n\t\t\t\t}\r\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\r\n\r\n\t\t\t\ti = groups.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\r\n\t\t\t\t}\r\n\t\t\t\tnewContext = rsibling.test( selector ) && context.parentNode || context;\r\n\t\t\t\tnewSelector = groups.join(\",\");\r\n\t\t\t}\r\n\r\n\t\t\tif ( newSelector ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpush.apply( results, slice.call( newContext.querySelectorAll(\r\n\t\t\t\t\t\tnewSelector\r\n\t\t\t\t\t), 0 ) );\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t} catch(qsaError) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif ( !old ) {\r\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// All others\r\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\r\n}\r\n\r\n/**\r\n * Detect xml\r\n * @param {Element|Object} elem An element or a document\r\n */\r\nisXML = Sizzle.isXML = function( elem ) {\r\n\t// documentElement is verified for cases where it doesn't yet exist\r\n\t// (such as loading iframes in IE - #4833)\r\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\r\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\r\n};\r\n\r\n/**\r\n * Sets document-related variables once based on the current document\r\n * @param {Element|Object} [doc] An element or document object to use to set the document\r\n * @returns {Object} Returns the current document\r\n */\r\nsetDocument = Sizzle.setDocument = function( node ) {\r\n\tvar doc = node ? node.ownerDocument || node : preferredDoc;\r\n\r\n\t// If no document and documentElement is available, return\r\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\r\n\t\treturn document;\r\n\t}\r\n\r\n\t// Set our document\r\n\tdocument = doc;\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Support tests\r\n\tdocumentIsXML = isXML( doc );\r\n\r\n\t// Check if getElementsByTagName(\"*\") returns only elements\r\n\tsupport.tagNameNoComments = assert(function( div ) {\r\n\t\tdiv.appendChild( doc.createComment(\"\") );\r\n\t\treturn !div.getElementsByTagName(\"*\").length;\r\n\t});\r\n\r\n\t// Check if attributes should be retrieved by attribute nodes\r\n\tsupport.attributes = assert(function( div ) {\r\n\t\tdiv.innerHTML = \"<select></select>\";\r\n\t\tvar type = typeof div.lastChild.getAttribute(\"multiple\");\r\n\t\t// IE8 returns a string for some attributes even when not present\r\n\t\treturn type !== \"boolean\" && type !== \"string\";\r\n\t});\r\n\r\n\t// Check if getElementsByClassName can be trusted\r\n\tsupport.getByClassName = assert(function( div ) {\r\n\t\t// Opera can't find a second classname (in 9.6)\r\n\t\tdiv.innerHTML = \"<div class='hidden e'></div><div class='hidden'></div>\";\r\n\t\tif ( !div.getElementsByClassName || !div.getElementsByClassName(\"e\").length ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Safari 3.2 caches class attributes and doesn't catch changes\r\n\t\tdiv.lastChild.className = \"e\";\r\n\t\treturn div.getElementsByClassName(\"e\").length === 2;\r\n\t});\r\n\r\n\t// Check if getElementById returns elements by name\r\n\t// Check if getElementsByName privileges form controls or returns elements by ID\r\n\tsupport.getByName = assert(function( div ) {\r\n\t\t// Inject content\r\n\t\tdiv.id = expando + 0;\r\n\t\tdiv.innerHTML = \"<a name='\" + expando + \"'></a><div name='\" + expando + \"'></div>\";\r\n\t\tdocElem.insertBefore( div, docElem.firstChild );\r\n\r\n\t\t// Test\r\n\t\tvar pass = doc.getElementsByName &&\r\n\t\t\t// buggy browsers will return fewer than the correct 2\r\n\t\t\tdoc.getElementsByName( expando ).length === 2 +\r\n\t\t\t// buggy browsers will return more than the correct 0\r\n\t\t\tdoc.getElementsByName( expando + 0 ).length;\r\n\t\tsupport.getIdNotName = !doc.getElementById( expando );\r\n\r\n\t\t// Cleanup\r\n\t\tdocElem.removeChild( div );\r\n\r\n\t\treturn pass;\r\n\t});\r\n\r\n\t// IE6/7 return modified attributes\r\n\tExpr.attrHandle = assert(function( div ) {\r\n\t\tdiv.innerHTML = \"<a href='#'></a>\";\r\n\t\treturn div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&\r\n\t\t\tdiv.firstChild.getAttribute(\"href\") === \"#\";\r\n\t}) ?\r\n\t\t{} :\r\n\t\t{\r\n\t\t\t\"href\": function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( \"href\", 2 );\r\n\t\t\t},\r\n\t\t\t\"type\": function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"type\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t// ID find and filter\r\n\tif ( support.getIdNotName ) {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== strundefined && !documentIsXML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\treturn m && m.parentNode ? [m] : [];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t} else {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== strundefined && !documentIsXML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\r\n\t\t\t\treturn m ?\r\n\t\t\t\t\tm.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode(\"id\").value === id ?\r\n\t\t\t\t\t\t[m] :\r\n\t\t\t\t\t\tundefined :\r\n\t\t\t\t\t[];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(\"id\");\r\n\t\t\t\treturn node && node.value === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t}\r\n\r\n\t// Tag\r\n\tExpr.find[\"TAG\"] = support.tagNameNoComments ?\r\n\t\tfunction( tag, context ) {\r\n\t\t\tif ( typeof context.getElementsByTagName !== strundefined ) {\r\n\t\t\t\treturn context.getElementsByTagName( tag );\r\n\t\t\t}\r\n\t\t} :\r\n\t\tfunction( tag, context ) {\r\n\t\t\tvar elem,\r\n\t\t\t\ttmp = [],\r\n\t\t\t\ti = 0,\r\n\t\t\t\tresults = context.getElementsByTagName( tag );\r\n\r\n\t\t\t// Filter out possible comments\r\n\t\t\tif ( tag === \"*\" ) {\r\n\t\t\t\twhile ( (elem = results[i++]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\ttmp.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t};\r\n\r\n\t// Name\r\n\tExpr.find[\"NAME\"] = support.getByName && function( tag, context ) {\r\n\t\tif ( typeof context.getElementsByName !== strundefined ) {\r\n\t\t\treturn context.getElementsByName( name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Class\r\n\tExpr.find[\"CLASS\"] = support.getByClassName && function( className, context ) {\r\n\t\tif ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {\r\n\t\t\treturn context.getElementsByClassName( className );\r\n\t\t}\r\n\t};\r\n\r\n\t// QSA and matchesSelector support\r\n\r\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\r\n\trbuggyMatches = [];\r\n\r\n\t// qSa(:focus) reports false when true (Chrome 21),\r\n\t// no need to also add to buggyMatches since matches checks buggyQSA\r\n\t// A support test would require too much code (would include document ready)\r\n\trbuggyQSA = [ \":focus\" ];\r\n\r\n\tif ( (support.qsa = isNative(doc.querySelectorAll)) ) {\r\n\t\t// Build QSA regex\r\n\t\t// Regex strategy adopted from Diego Perini\r\n\t\tassert(function( div ) {\r\n\t\t\t// Select is set to empty string on purpose\r\n\t\t\t// This is to test IE's treatment of not explictly\r\n\t\t\t// setting a boolean content attribute,\r\n\t\t\t// since its presence should be enough\r\n\t\t\t// http://bugs.jquery.com/ticket/12359\r\n\t\t\tdiv.innerHTML = \"<select><option selected=''></option></select>\";\r\n\r\n\t\t\t// IE8 - Some boolean attributes are not treated correctly\r\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Webkit/Opera - :checked should return selected option elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\r\n\t\t\t\trbuggyQSA.push(\":checked\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassert(function( div ) {\r\n\r\n\t\t\t// Opera 10-12/IE8 - ^= $= *= and empty values\r\n\t\t\t// Should not select anything\r\n\t\t\tdiv.innerHTML = \"<input type='hidden' i=''/>\";\r\n\t\t\tif ( div.querySelectorAll(\"[i^='']\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:\\\"\\\"|'')\" );\r\n\t\t\t}\r\n\r\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\r\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\r\n\t\t\tdiv.querySelectorAll(\"*,:x\");\r\n\t\t\trbuggyQSA.push(\",.*:\");\r\n\t\t});\r\n\t}\r\n\r\n\tif ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||\r\n\t\tdocElem.mozMatchesSelector ||\r\n\t\tdocElem.webkitMatchesSelector ||\r\n\t\tdocElem.oMatchesSelector ||\r\n\t\tdocElem.msMatchesSelector) )) ) {\r\n\r\n\t\tassert(function( div ) {\r\n\t\t\t// Check to see if it's possible to do matchesSelector\r\n\t\t\t// on a disconnected node (IE 9)\r\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\r\n\r\n\t\t\t// This should fail with an exception\r\n\t\t\t// Gecko does not error, returns false instead\r\n\t\t\tmatches.call( div, \"[s!='']:x\" );\r\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\r\n\t\t});\r\n\t}\r\n\r\n\trbuggyQSA = new RegExp( rbuggyQSA.join(\"|\") );\r\n\trbuggyMatches = new RegExp( rbuggyMatches.join(\"|\") );\r\n\r\n\t// Element contains another\r\n\t// Purposefully does not implement inclusive descendent\r\n\t// As in, an element does not contain itself\r\n\tcontains = isNative(docElem.contains) || docElem.compareDocumentPosition ?\r\n\t\tfunction( a, b ) {\r\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\r\n\t\t\t\tbup = b && b.parentNode;\r\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\r\n\t\t\t\tadown.contains ?\r\n\t\t\t\t\tadown.contains( bup ) :\r\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\r\n\t\t\t));\r\n\t\t} :\r\n\t\tfunction( a, b ) {\r\n\t\t\tif ( b ) {\r\n\t\t\t\twhile ( (b = b.parentNode) ) {\r\n\t\t\t\t\tif ( b === a ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\t// Document order sorting\r\n\tsortOrder = docElem.compareDocumentPosition ?\r\n\tfunction( a, b ) {\r\n\t\tvar compare;\r\n\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {\r\n\t\t\tif ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {\r\n\t\t\t\tif ( a === doc || contains( preferredDoc, a ) ) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( b === doc || contains( preferredDoc, b ) ) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\treturn compare & 4 ? -1 : 1;\r\n\t\t}\r\n\r\n\t\treturn a.compareDocumentPosition ? -1 : 1;\r\n\t} :\r\n\tfunction( a, b ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\taup = a.parentNode,\r\n\t\t\tbup = b.parentNode,\r\n\t\t\tap = [ a ],\r\n\t\t\tbp = [ b ];\r\n\r\n\t\t// Exit early if the nodes are identical\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\r\n\t\t// Parentless nodes are either documents or disconnected\r\n\t\t} else if ( !aup || !bup ) {\r\n\t\t\treturn a === doc ? -1 :\r\n\t\t\t\tb === doc ? 1 :\r\n\t\t\t\taup ? -1 :\r\n\t\t\t\tbup ? 1 :\r\n\t\t\t\t0;\r\n\r\n\t\t// If the nodes are siblings, we can do a quick check\r\n\t\t} else if ( aup === bup ) {\r\n\t\t\treturn siblingCheck( a, b );\r\n\t\t}\r\n\r\n\t\t// Otherwise we need full lists of their ancestors for comparison\r\n\t\tcur = a;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tap.unshift( cur );\r\n\t\t}\r\n\t\tcur = b;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tbp.unshift( cur );\r\n\t\t}\r\n\r\n\t\t// Walk down the tree looking for a discrepancy\r\n\t\twhile ( ap[i] === bp[i] ) {\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn i ?\r\n\t\t\t// Do a sibling check if the nodes have a common ancestor\r\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\r\n\r\n\t\t\t// Otherwise nodes in our document sort first\r\n\t\t\tap[i] === preferredDoc ? -1 :\r\n\t\t\tbp[i] === preferredDoc ? 1 :\r\n\t\t\t0;\r\n\t};\r\n\r\n\t// Always assume the presence of duplicates if sort doesn't\r\n\t// pass them to our comparison function (as in Google Chrome).\r\n\thasDuplicate = false;\r\n\t[0, 0].sort( sortOrder );\r\n\tsupport.detectDuplicates = hasDuplicate;\r\n\r\n\treturn document;\r\n};\r\n\r\nSizzle.matches = function( expr, elements ) {\r\n\treturn Sizzle( expr, null, null, elements );\r\n};\r\n\r\nSizzle.matchesSelector = function( elem, expr ) {\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\t// Make sure that attribute selectors are quoted\r\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\r\n\r\n\t// rbuggyQSA always contains :focus, so no need for an existence check\r\n\tif ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {\r\n\t\ttry {\r\n\t\t\tvar ret = matches.call( elem, expr );\r\n\r\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\r\n\t\t\tif ( ret || support.disconnectedMatch ||\r\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\r\n\t\t\t\t\t// fragment in IE 9\r\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t} catch(e) {}\r\n\t}\r\n\r\n\treturn Sizzle( expr, document, null, [elem] ).length > 0;\r\n};\r\n\r\nSizzle.contains = function( context, elem ) {\r\n\t// Set document vars if needed\r\n\tif ( ( context.ownerDocument || context ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\treturn contains( context, elem );\r\n};\r\n\r\nSizzle.attr = function( elem, name ) {\r\n\tvar val;\r\n\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\tif ( !documentIsXML ) {\r\n\t\tname = name.toLowerCase();\r\n\t}\r\n\tif ( (val = Expr.attrHandle[ name ]) ) {\r\n\t\treturn val( elem );\r\n\t}\r\n\tif ( documentIsXML || support.attributes ) {\r\n\t\treturn elem.getAttribute( name );\r\n\t}\r\n\treturn ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?\r\n\t\tname :\r\n\t\tval && val.specified ? val.value : null;\r\n};\r\n\r\nSizzle.error = function( msg ) {\r\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\r\n};\r\n\r\n// Document sorting and removing duplicates\r\nSizzle.uniqueSort = function( results ) {\r\n\tvar elem,\r\n\t\tduplicates = [],\r\n\t\ti = 1,\r\n\t\tj = 0;\r\n\r\n\t// Unless we *know* we can detect duplicates, assume their presence\r\n\thasDuplicate = !support.detectDuplicates;\r\n\tresults.sort( sortOrder );\r\n\r\n\tif ( hasDuplicate ) {\r\n\t\tfor ( ; (elem = results[i]); i++ ) {\r\n\t\t\tif ( elem === results[ i - 1 ] ) {\r\n\t\t\t\tj = duplicates.push( i );\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile ( j-- ) {\r\n\t\t\tresults.splice( duplicates[ j ], 1 );\r\n\t\t}\r\n\t}\r\n\r\n\treturn results;\r\n};\r\n\r\nfunction siblingCheck( a, b ) {\r\n\tvar cur = b && a,\r\n\t\tdiff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );\r\n\r\n\t// Use IE sourceIndex if available on both nodes\r\n\tif ( diff ) {\r\n\t\treturn diff;\r\n\t}\r\n\r\n\t// Check if b follows a\r\n\tif ( cur ) {\r\n\t\twhile ( (cur = cur.nextSibling) ) {\r\n\t\t\tif ( cur === b ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn a ? 1 : -1;\r\n}\r\n\r\n// Returns a function to use in pseudos for input types\r\nfunction createInputPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn name === \"input\" && elem.type === type;\r\n\t};\r\n}\r\n\r\n// Returns a function to use in pseudos for buttons\r\nfunction createButtonPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\r\n\t};\r\n}\r\n\r\n// Returns a function to use in pseudos for positionals\r\nfunction createPositionalPseudo( fn ) {\r\n\treturn markFunction(function( argument ) {\r\n\t\targument = +argument;\r\n\t\treturn markFunction(function( seed, matches ) {\r\n\t\t\tvar j,\r\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\r\n\t\t\t\ti = matchIndexes.length;\r\n\r\n\t\t\t// Match elements found at the specified indexes\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\r\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Utility function for retrieving the text value of an array of DOM nodes\r\n * @param {Array|Element} elem\r\n */\r\ngetText = Sizzle.getText = function( elem ) {\r\n\tvar node,\r\n\t\tret = \"\",\r\n\t\ti = 0,\r\n\t\tnodeType = elem.nodeType;\r\n\r\n\tif ( !nodeType ) {\r\n\t\t// If no nodeType, this is expected to be an array\r\n\t\tfor ( ; (node = elem[i]); i++ ) {\r\n\t\t\t// Do not traverse comment nodes\r\n\t\t\tret += getText( node );\r\n\t\t}\r\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\r\n\t\t// Use textContent for elements\r\n\t\t// innerText usage removed for consistency of new lines (see #11153)\r\n\t\tif ( typeof elem.textContent === \"string\" ) {\r\n\t\t\treturn elem.textContent;\r\n\t\t} else {\r\n\t\t\t// Traverse its children\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tret += getText( elem );\r\n\t\t\t}\r\n\t\t}\r\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\r\n\t\treturn elem.nodeValue;\r\n\t}\r\n\t// Do not include comment or processing instruction nodes\r\n\r\n\treturn ret;\r\n};\r\n\r\nExpr = Sizzle.selectors = {\r\n\r\n\t// Can be adjusted by the user\r\n\tcacheLength: 50,\r\n\r\n\tcreatePseudo: markFunction,\r\n\r\n\tmatch: matchExpr,\r\n\r\n\tfind: {},\r\n\r\n\trelative: {\r\n\t\t\">\": { dir: \"parentNode\", first: true },\r\n\t\t\" \": { dir: \"parentNode\" },\r\n\t\t\"+\": { dir: \"previousSibling\", first: true },\r\n\t\t\"~\": { dir: \"previousSibling\" }\r\n\t},\r\n\r\n\tpreFilter: {\r\n\t\t\"ATTR\": function( match ) {\r\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\r\n\r\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\r\n\t\t\tmatch[3] = ( match[4] || match[5] || \"\" ).replace( runescape, funescape );\r\n\r\n\t\t\tif ( match[2] === \"~=\" ) {\r\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\r\n\t\t\t}\r\n\r\n\t\t\treturn match.slice( 0, 4 );\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( match ) {\r\n\t\t\t/* matches from matchExpr[\"CHILD\"]\r\n\t\t\t\t1 type (only|nth|...)\r\n\t\t\t\t2 what (child|of-type)\r\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\r\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\r\n\t\t\t\t5 sign of xn-component\r\n\t\t\t\t6 x of xn-component\r\n\t\t\t\t7 sign of y-component\r\n\t\t\t\t8 y of y-component\r\n\t\t\t*/\r\n\t\t\tmatch[1] = match[1].toLowerCase();\r\n\r\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\r\n\t\t\t\t// nth-* requires argument\r\n\t\t\t\tif ( !match[3] ) {\r\n\t\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\r\n\t\t\t\t// remember that false/true cast respectively to 0/1\r\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\r\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\r\n\r\n\t\t\t// other types prohibit arguments\r\n\t\t\t} else if ( match[3] ) {\r\n\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t}\r\n\r\n\t\t\treturn match;\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( match ) {\r\n\t\t\tvar excess,\r\n\t\t\t\tunquoted = !match[5] && match[2];\r\n\r\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t// Accept quoted arguments as-is\r\n\t\t\tif ( match[4] ) {\r\n\t\t\t\tmatch[2] = match[4];\r\n\r\n\t\t\t// Strip excess characters from unquoted arguments\r\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\r\n\t\t\t\t// Get excess from tokenize (recursively)\r\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\r\n\t\t\t\t// advance to the next closing parenthesis\r\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\r\n\r\n\t\t\t\t// excess is a negative index\r\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\r\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\r\n\t\t\t}\r\n\r\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\r\n\t\t\treturn match.slice( 0, 3 );\r\n\t\t}\r\n\t},\r\n\r\n\tfilter: {\r\n\r\n\t\t\"TAG\": function( nodeName ) {\r\n\t\t\tif ( nodeName === \"*\" ) {\r\n\t\t\t\treturn function() { return true; };\r\n\t\t\t}\r\n\r\n\t\t\tnodeName = nodeName.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CLASS\": function( className ) {\r\n\t\t\tvar pattern = classCache[ className + \" \" ];\r\n\r\n\t\t\treturn pattern ||\r\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\r\n\t\t\t\tclassCache( className, function( elem ) {\r\n\t\t\t\t\treturn pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute(\"class\")) || \"\" );\r\n\t\t\t\t});\r\n\t\t},\r\n\r\n\t\t\"ATTR\": function( name, operator, check ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar result = Sizzle.attr( elem, name );\r\n\r\n\t\t\t\tif ( result == null ) {\r\n\t\t\t\t\treturn operator === \"!=\";\r\n\t\t\t\t}\r\n\t\t\t\tif ( !operator ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult += \"\";\r\n\r\n\t\t\t\treturn operator === \"=\" ? result === check :\r\n\t\t\t\t\toperator === \"!=\" ? result !== check :\r\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\r\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\r\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result + \" \" ).indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\r\n\t\t\t\t\tfalse;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\r\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\r\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\r\n\t\t\t\tofType = what === \"of-type\";\r\n\r\n\t\t\treturn first === 1 && last === 0 ?\r\n\r\n\t\t\t\t// Shortcut for :nth-*(n)\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn !!elem.parentNode;\r\n\t\t\t\t} :\r\n\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\r\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\r\n\t\t\t\t\t\tparent = elem.parentNode,\r\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\r\n\t\t\t\t\t\tuseCache = !xml && !ofType;\r\n\r\n\t\t\t\t\tif ( parent ) {\r\n\r\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\r\n\t\t\t\t\t\tif ( simple ) {\r\n\t\t\t\t\t\t\twhile ( dir ) {\r\n\t\t\t\t\t\t\t\tnode = elem;\r\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\r\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\r\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\r\n\r\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\r\n\t\t\t\t\t\tif ( forward && useCache ) {\r\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\r\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\r\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\r\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\r\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\r\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\r\n\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\r\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\r\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\r\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Use previously-cached element index if available\r\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\r\n\t\t\t\t\t\t\tdiff = cache[1];\r\n\r\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\r\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\r\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\r\n\t\t\t\t\t\tdiff -= last;\r\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( pseudo, argument ) {\r\n\t\t\t// pseudo-class names are case-insensitive\r\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\r\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\r\n\t\t\t// Remember that setFilters inherits from pseudos\r\n\t\t\tvar args,\r\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\r\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\r\n\r\n\t\t\t// The user may use createPseudo to indicate that\r\n\t\t\t// arguments are needed to create the filter function\r\n\t\t\t// just as Sizzle does\r\n\t\t\tif ( fn[ expando ] ) {\r\n\t\t\t\treturn fn( argument );\r\n\t\t\t}\r\n\r\n\t\t\t// But maintain support for old signatures\r\n\t\t\tif ( fn.length > 1 ) {\r\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\r\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\r\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\r\n\t\t\t\t\t\tvar idx,\r\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\r\n\t\t\t\t\t\t\ti = matched.length;\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[i] );\r\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\t\treturn fn( elem, 0, args );\r\n\t\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t},\r\n\r\n\tpseudos: {\r\n\t\t// Potentially complex pseudos\r\n\t\t\"not\": markFunction(function( selector ) {\r\n\t\t\t// Trim the selector passed to compile\r\n\t\t\t// to avoid treating leading and trailing\r\n\t\t\t// spaces as combinators\r\n\t\t\tvar input = [],\r\n\t\t\t\tresults = [],\r\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\r\n\r\n\t\t\treturn matcher[ expando ] ?\r\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\r\n\t\t\t\t\tvar elem,\r\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\r\n\t\t\t\t\t\ti = seed.length;\r\n\r\n\t\t\t\t\t// Match elements unmatched by `matcher`\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}) :\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tinput[0] = elem;\r\n\t\t\t\t\tmatcher( input, null, xml, results );\r\n\t\t\t\t\treturn !results.pop();\r\n\t\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"has\": markFunction(function( selector ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"contains\": markFunction(function( text ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// \"Whether an element is represented by a :lang() selector\r\n\t\t// is based solely on the element's language value\r\n\t\t// being equal to the identifier C,\r\n\t\t// or beginning with the identifier C immediately followed by \"-\".\r\n\t\t// The matching of C against the element's language value is performed case-insensitively.\r\n\t\t// The identifier C does not have to be a valid language name.\"\r\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\r\n\t\t\"lang\": markFunction( function( lang ) {\r\n\t\t\t// lang value must be a valid identifider\r\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\r\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\r\n\t\t\t}\r\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar elemLang;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif ( (elemLang = documentIsXML ?\r\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\") :\r\n\t\t\t\t\t\telem.lang) ) {\r\n\r\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\r\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// Miscellaneous\r\n\t\t\"target\": function( elem ) {\r\n\t\t\tvar hash = window.location && window.location.hash;\r\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\r\n\t\t},\r\n\r\n\t\t\"root\": function( elem ) {\r\n\t\t\treturn elem === docElem;\r\n\t\t},\r\n\r\n\t\t\"focus\": function( elem ) {\r\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\r\n\t\t},\r\n\r\n\t\t// Boolean properties\r\n\t\t\"enabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === false;\r\n\t\t},\r\n\r\n\t\t\"disabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === true;\r\n\t\t},\r\n\r\n\t\t\"checked\": function( elem ) {\r\n\t\t\t// In CSS3, :checked should return both checked and selected elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\r\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\r\n\t\t},\r\n\r\n\t\t\"selected\": function( elem ) {\r\n\t\t\t// Accessing this property makes selected-by-default\r\n\t\t\t// options in Safari work properly\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\telem.parentNode.selectedIndex;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.selected === true;\r\n\t\t},\r\n\r\n\t\t// Contents\r\n\t\t\"empty\": function( elem ) {\r\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\r\n\t\t\t// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\r\n\t\t\t// not comment, processing instructions, or others\r\n\t\t\t// Thanks to Diego Perini for the nodeName shortcut\r\n\t\t\t// Greater than \"@\" means alpha characters (specifically not starting with \"#\" or \"?\")\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tif ( elem.nodeName > \"@\" || elem.nodeType === 3 || elem.nodeType === 4 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\t\"parent\": function( elem ) {\r\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\r\n\t\t},\r\n\r\n\t\t// Element/input types\r\n\t\t\"header\": function( elem ) {\r\n\t\t\treturn rheader.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"input\": function( elem ) {\r\n\t\t\treturn rinputs.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"button\": function( elem ) {\r\n\t\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\r\n\t\t},\r\n\r\n\t\t\"text\": function( elem ) {\r\n\t\t\tvar attr;\r\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\r\n\t\t\t// use getAttribute instead to test this case\r\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\r\n\t\t\t\telem.type === \"text\" &&\r\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === elem.type );\r\n\t\t},\r\n\r\n\t\t// Position-in-collection\r\n\t\t\"first\": createPositionalPseudo(function() {\r\n\t\t\treturn [ 0 ];\r\n\t\t}),\r\n\r\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\treturn [ length - 1 ];\r\n\t\t}),\r\n\r\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\r\n\t\t}),\r\n\r\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 1;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; --i >= 0; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; ++i < length; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t})\r\n\t}\r\n};\r\n\r\n// Add button/input type pseudos\r\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\r\n\tExpr.pseudos[ i ] = createInputPseudo( i );\r\n}\r\nfor ( i in { submit: true, reset: true } ) {\r\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\r\n}\r\n\r\nfunction tokenize( selector, parseOnly ) {\r\n\tvar matched, match, tokens, type,\r\n\t\tsoFar, groups, preFilters,\r\n\t\tcached = tokenCache[ selector + \" \" ];\r\n\r\n\tif ( cached ) {\r\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\r\n\t}\r\n\r\n\tsoFar = selector;\r\n\tgroups = [];\r\n\tpreFilters = Expr.preFilter;\r\n\r\n\twhile ( soFar ) {\r\n\r\n\t\t// Comma and first run\r\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\r\n\t\t\tif ( match ) {\r\n\t\t\t\t// Don't consume trailing commas as valid\r\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\r\n\t\t\t}\r\n\t\t\tgroups.push( tokens = [] );\r\n\t\t}\r\n\r\n\t\tmatched = false;\r\n\r\n\t\t// Combinators\r\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\r\n\t\t\tmatched = match.shift();\r\n\t\t\ttokens.push( {\r\n\t\t\t\tvalue: matched,\r\n\t\t\t\t// Cast descendant combinators to space\r\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\r\n\t\t\t} );\r\n\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t}\r\n\r\n\t\t// Filters\r\n\t\tfor ( type in Expr.filter ) {\r\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\r\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\r\n\t\t\t\tmatched = match.shift();\r\n\t\t\t\ttokens.push( {\r\n\t\t\t\t\tvalue: matched,\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tmatches: match\r\n\t\t\t\t} );\r\n\t\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( !matched ) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the length of the invalid excess\r\n\t// if we're just parsing\r\n\t// Otherwise, throw an error or return tokens\r\n\treturn parseOnly ?\r\n\t\tsoFar.length :\r\n\t\tsoFar ?\r\n\t\t\tSizzle.error( selector ) :\r\n\t\t\t// Cache the tokens\r\n\t\t\ttokenCache( selector, groups ).slice( 0 );\r\n}\r\n\r\nfunction toSelector( tokens ) {\r\n\tvar i = 0,\r\n\t\tlen = tokens.length,\r\n\t\tselector = \"\";\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tselector += tokens[i].value;\r\n\t}\r\n\treturn selector;\r\n}\r\n\r\nfunction addCombinator( matcher, combinator, base ) {\r\n\tvar dir = combinator.dir,\r\n\t\tcheckNonElements = base && dir === \"parentNode\",\r\n\t\tdoneName = done++;\r\n\r\n\treturn combinator.first ?\r\n\t\t// Check against closest ancestor/preceding element\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\treturn matcher( elem, context, xml );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} :\r\n\r\n\t\t// Check against all ancestor/preceding elements\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar data, cache, outerCache,\r\n\t\t\t\tdirkey = dirruns + \" \" + doneName;\r\n\r\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\r\n\t\t\tif ( xml ) {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\r\n\t\t\t\t\t\tif ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {\r\n\t\t\t\t\t\t\tif ( (data = cache[1]) === true || data === cachedruns ) {\r\n\t\t\t\t\t\t\t\treturn data === true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcache = outerCache[ dir ] = [ dirkey ];\r\n\t\t\t\t\t\t\tcache[1] = matcher( elem, context, xml ) || cachedruns;\r\n\t\t\t\t\t\t\tif ( cache[1] === true ) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n}\r\n\r\nfunction elementMatcher( matchers ) {\r\n\treturn matchers.length > 1 ?\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar i = matchers.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} :\r\n\t\tmatchers[0];\r\n}\r\n\r\nfunction condense( unmatched, map, filter, context, xml ) {\r\n\tvar elem,\r\n\t\tnewUnmatched = [],\r\n\t\ti = 0,\r\n\t\tlen = unmatched.length,\r\n\t\tmapped = map != null;\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\r\n\t\t\t\tnewUnmatched.push( elem );\r\n\t\t\t\tif ( mapped ) {\r\n\t\t\t\t\tmap.push( i );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn newUnmatched;\r\n}\r\n\r\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\r\n\tif ( postFilter && !postFilter[ expando ] ) {\r\n\t\tpostFilter = setMatcher( postFilter );\r\n\t}\r\n\tif ( postFinder && !postFinder[ expando ] ) {\r\n\t\tpostFinder = setMatcher( postFinder, postSelector );\r\n\t}\r\n\treturn markFunction(function( seed, results, context, xml ) {\r\n\t\tvar temp, i, elem,\r\n\t\t\tpreMap = [],\r\n\t\t\tpostMap = [],\r\n\t\t\tpreexisting = results.length,\r\n\r\n\t\t\t// Get initial elements from seed or context\r\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\r\n\r\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\r\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\r\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\r\n\t\t\t\telems,\r\n\r\n\t\t\tmatcherOut = matcher ?\r\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\r\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\r\n\r\n\t\t\t\t\t// ...intermediate processing is necessary\r\n\t\t\t\t\t[] :\r\n\r\n\t\t\t\t\t// ...otherwise use results directly\r\n\t\t\t\t\tresults :\r\n\t\t\t\tmatcherIn;\r\n\r\n\t\t// Find primary matches\r\n\t\tif ( matcher ) {\r\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\r\n\t\t}\r\n\r\n\t\t// Apply postFilter\r\n\t\tif ( postFilter ) {\r\n\t\t\ttemp = condense( matcherOut, postMap );\r\n\t\t\tpostFilter( temp, [], context, xml );\r\n\r\n\t\t\t// Un-match failing elements by moving them back to matcherIn\r\n\t\t\ti = temp.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( (elem = temp[i]) ) {\r\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( seed ) {\r\n\t\t\tif ( postFinder || preFilter ) {\r\n\t\t\t\tif ( postFinder ) {\r\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\r\n\t\t\t\t\ttemp = [];\r\n\t\t\t\t\ti = matcherOut.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\r\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\r\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\r\n\t\t\t\ti = matcherOut.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\r\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\r\n\r\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Add elements to results, through postFinder if defined\r\n\t\t} else {\r\n\t\t\tmatcherOut = condense(\r\n\t\t\t\tmatcherOut === results ?\r\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\r\n\t\t\t\t\tmatcherOut\r\n\t\t\t);\r\n\t\t\tif ( postFinder ) {\r\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\r\n\t\t\t} else {\r\n\t\t\t\tpush.apply( results, matcherOut );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction matcherFromTokens( tokens ) {\r\n\tvar checkContext, matcher, j,\r\n\t\tlen = tokens.length,\r\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\r\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\r\n\t\ti = leadingRelative ? 1 : 0,\r\n\r\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\r\n\t\tmatchContext = addCombinator( function( elem ) {\r\n\t\t\treturn elem === checkContext;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchAnyContext = addCombinator( function( elem ) {\r\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchers = [ function( elem, context, xml ) {\r\n\t\t\treturn ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\r\n\t\t\t\t(checkContext = context).nodeType ?\r\n\t\t\t\t\tmatchContext( elem, context, xml ) :\r\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\r\n\t\t} ];\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\r\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\r\n\t\t} else {\r\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\r\n\r\n\t\t\t// Return special upon seeing a positional matcher\r\n\t\t\tif ( matcher[ expando ] ) {\r\n\t\t\t\t// Find the next relative operator (if any) for proper handling\r\n\t\t\t\tj = ++i;\r\n\t\t\t\tfor ( ; j < len; j++ ) {\r\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn setMatcher(\r\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\r\n\t\t\t\t\ti > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, \"$1\" ),\r\n\t\t\t\t\tmatcher,\r\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\r\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\r\n\t\t\t\t\tj < len && toSelector( tokens )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tmatchers.push( matcher );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elementMatcher( matchers );\r\n}\r\n\r\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\r\n\t// A counter to specify which element is currently being matched\r\n\tvar matcherCachedRuns = 0,\r\n\t\tbySet = setMatchers.length > 0,\r\n\t\tbyElement = elementMatchers.length > 0,\r\n\t\tsuperMatcher = function( seed, context, xml, results, expandContext ) {\r\n\t\t\tvar elem, j, matcher,\r\n\t\t\t\tsetMatched = [],\r\n\t\t\t\tmatchedCount = 0,\r\n\t\t\t\ti = \"0\",\r\n\t\t\t\tunmatched = seed && [],\r\n\t\t\t\toutermost = expandContext != null,\r\n\t\t\t\tcontextBackup = outermostContext,\r\n\t\t\t\t// We must always have either seed elements or context\r\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", expandContext && context.parentNode || context ),\r\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\r\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);\r\n\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\toutermostContext = context !== document && context;\r\n\t\t\t\tcachedruns = matcherCachedRuns;\r\n\t\t\t}\r\n\r\n\t\t\t// Add elements passing elementMatchers directly to results\r\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\r\n\t\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\t\t\tif ( byElement && elem ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( outermost ) {\r\n\t\t\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\t\t\tcachedruns = ++matcherCachedRuns;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Track unmatched elements for set filters\r\n\t\t\t\tif ( bySet ) {\r\n\t\t\t\t\t// They will have gone through all possible matchers\r\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\r\n\t\t\t\t\t\tmatchedCount--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Lengthen the array for every element, matched or not\r\n\t\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t\tunmatched.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Apply set filters to unmatched elements\r\n\t\t\tmatchedCount += i;\r\n\t\t\tif ( bySet && i !== matchedCount ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\r\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\r\n\t\t\t\t\tif ( matchedCount > 0 ) {\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\r\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\r\n\t\t\t\t\tsetMatched = condense( setMatched );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add matches to results\r\n\t\t\t\tpush.apply( results, setMatched );\r\n\r\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\r\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\r\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\r\n\r\n\t\t\t\t\tSizzle.uniqueSort( results );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Override manipulation of globals by nested matchers\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\toutermostContext = contextBackup;\r\n\t\t\t}\r\n\r\n\t\t\treturn unmatched;\r\n\t\t};\r\n\r\n\treturn bySet ?\r\n\t\tmarkFunction( superMatcher ) :\r\n\t\tsuperMatcher;\r\n}\r\n\r\ncompile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {\r\n\tvar i,\r\n\t\tsetMatchers = [],\r\n\t\telementMatchers = [],\r\n\t\tcached = compilerCache[ selector + \" \" ];\r\n\r\n\tif ( !cached ) {\r\n\t\t// Generate a function of recursive functions that can be used to check each element\r\n\t\tif ( !group ) {\r\n\t\t\tgroup = tokenize( selector );\r\n\t\t}\r\n\t\ti = group.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tcached = matcherFromTokens( group[i] );\r\n\t\t\tif ( cached[ expando ] ) {\r\n\t\t\t\tsetMatchers.push( cached );\r\n\t\t\t} else {\r\n\t\t\t\telementMatchers.push( cached );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Cache the compiled function\r\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\r\n\t}\r\n\treturn cached;\r\n};\r\n\r\nfunction multipleContexts( selector, contexts, results ) {\r\n\tvar i = 0,\r\n\t\tlen = contexts.length;\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tSizzle( selector, contexts[i], results );\r\n\t}\r\n\treturn results;\r\n}\r\n\r\nfunction select( selector, context, results, seed ) {\r\n\tvar i, tokens, token, type, find,\r\n\t\tmatch = tokenize( selector );\r\n\r\n\tif ( !seed ) {\r\n\t\t// Try to minimize operations if there is only one group\r\n\t\tif ( match.length === 1 ) {\r\n\r\n\t\t\t// Take a shortcut and set the context if the root selector is an ID\r\n\t\t\ttokens = match[0] = match[0].slice( 0 );\r\n\t\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\r\n\t\t\t\t\tcontext.nodeType === 9 && !documentIsXML &&\r\n\t\t\t\t\tExpr.relative[ tokens[1].type ] ) {\r\n\r\n\t\t\t\tcontext = Expr.find[\"ID\"]( token.matches[0].replace( runescape, funescape ), context )[0];\r\n\t\t\t\tif ( !context ) {\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tselector = selector.slice( tokens.shift().value.length );\r\n\t\t\t}\r\n\r\n\t\t\t// Fetch a seed set for right-to-left matching\r\n\t\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\ttoken = tokens[i];\r\n\r\n\t\t\t\t// Abort if we hit a combinator\r\n\t\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif ( (find = Expr.find[ type ]) ) {\r\n\t\t\t\t\t// Search, expanding context for leading sibling combinators\r\n\t\t\t\t\tif ( (seed = find(\r\n\t\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\r\n\t\t\t\t\t\trsibling.test( tokens[0].type ) && context.parentNode || context\r\n\t\t\t\t\t)) ) {\r\n\r\n\t\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\r\n\t\t\t\t\t\ttokens.splice( i, 1 );\r\n\t\t\t\t\t\tselector = seed.length && toSelector( tokens );\r\n\t\t\t\t\t\tif ( !selector ) {\r\n\t\t\t\t\t\t\tpush.apply( results, slice.call( seed, 0 ) );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Compile and execute a filtering function\r\n\t// Provide `match` to avoid retokenization if we modified the selector above\r\n\tcompile( selector, match )(\r\n\t\tseed,\r\n\t\tcontext,\r\n\t\tdocumentIsXML,\r\n\t\tresults,\r\n\t\trsibling.test( selector )\r\n\t);\r\n\treturn results;\r\n}\r\n\r\n// Deprecated\r\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\r\n\r\n// Easy API for creating new setFilters\r\nfunction setFilters() {}\r\nExpr.filters = setFilters.prototype = Expr.pseudos;\r\nExpr.setFilters = new setFilters();\r\n\r\n// Initialize with the default document\r\nsetDocument();\r\n\r\n// Override sizzle attribute retrieval\r\nSizzle.attr = jQuery.attr;\r\njQuery.find = Sizzle;\r\njQuery.expr = Sizzle.selectors;\r\njQuery.expr[\":\"] = jQuery.expr.pseudos;\r\njQuery.unique = Sizzle.uniqueSort;\r\njQuery.text = Sizzle.getText;\r\njQuery.isXMLDoc = Sizzle.isXML;\r\njQuery.contains = Sizzle.contains;\r\n\r\n\r\n})( window );\r\nvar runtil = /Until$/,\r\n\trparentsprev = /^(?:parents|prev(?:Until|All))/,\r\n\tisSimple = /^.[^:#\\[\\.,]*$/,\r\n\trneedsContext = jQuery.expr.match.needsContext,\r\n\t// methods guaranteed to produce a unique set when starting from a unique set\r\n\tguaranteedUnique = {\r\n\t\tchildren: true,\r\n\t\tcontents: true,\r\n\t\tnext: true,\r\n\t\tprev: true\r\n\t};\r\n\r\njQuery.fn.extend({\r\n\tfind: function( selector ) {\r\n\t\tvar i, ret, self,\r\n\t\t\tlen = this.length;\r\n\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\tself = this;\r\n\t\t\treturn this.pushStack( jQuery( selector ).filter(function() {\r\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}) );\r\n\t\t}\r\n\r\n\t\tret = [];\r\n\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\tjQuery.find( selector, this[ i ], ret );\r\n\t\t}\r\n\r\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\r\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\r\n\t\tret.selector = ( this.selector ? this.selector + \" \" : \"\" ) + selector;\r\n\t\treturn ret;\r\n\t},\r\n\r\n\thas: function( target ) {\r\n\t\tvar i,\r\n\t\t\ttargets = jQuery( target, this ),\r\n\t\t\tlen = targets.length;\r\n\r\n\t\treturn this.filter(function() {\r\n\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tnot: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector, false) );\r\n\t},\r\n\r\n\tfilter: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector, true) );\r\n\t},\r\n\r\n\tis: function( selector ) {\r\n\t\treturn !!selector && (\r\n\t\t\ttypeof selector === \"string\" ?\r\n\t\t\t\t// If this is a positional/relative selector, check membership in the returned set\r\n\t\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\r\n\t\t\t\trneedsContext.test( selector ) ?\r\n\t\t\t\t\tjQuery( selector, this.context ).index( this[0] ) >= 0 :\r\n\t\t\t\t\tjQuery.filter( selector, this ).length > 0 :\r\n\t\t\t\tthis.filter( selector ).length > 0 );\r\n\t},\r\n\r\n\tclosest: function( selectors, context ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tret = [],\r\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\r\n\t\t\t\tjQuery( selectors, context || this.context ) :\r\n\t\t\t\t0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tcur = this[i];\r\n\r\n\t\t\twhile ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {\r\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {\r\n\t\t\t\t\tret.push( cur );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );\r\n\t},\r\n\r\n\t// Determine the position of an element within\r\n\t// the matched set of elements\r\n\tindex: function( elem ) {\r\n\r\n\t\t// No argument, return index in parent\r\n\t\tif ( !elem ) {\r\n\t\t\treturn ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;\r\n\t\t}\r\n\r\n\t\t// index in selector\r\n\t\tif ( typeof elem === \"string\" ) {\r\n\t\t\treturn jQuery.inArray( this[0], jQuery( elem ) );\r\n\t\t}\r\n\r\n\t\t// Locate the position of the desired element\r\n\t\treturn jQuery.inArray(\r\n\t\t\t// If it receives a jQuery object, the first element is used\r\n\t\t\telem.jquery ? elem[0] : elem, this );\r\n\t},\r\n\r\n\tadd: function( selector, context ) {\r\n\t\tvar set = typeof selector === \"string\" ?\r\n\t\t\t\tjQuery( selector, context ) :\r\n\t\t\t\tjQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\r\n\t\t\tall = jQuery.merge( this.get(), set );\r\n\r\n\t\treturn this.pushStack( jQuery.unique(all) );\r\n\t},\r\n\r\n\taddBack: function( selector ) {\r\n\t\treturn this.add( selector == null ?\r\n\t\t\tthis.prevObject : this.prevObject.filter(selector)\r\n\t\t);\r\n\t}\r\n});\r\n\r\njQuery.fn.andSelf = jQuery.fn.addBack;\r\n\r\nfunction sibling( cur, dir ) {\r\n\tdo {\r\n\t\tcur = cur[ dir ];\r\n\t} while ( cur && cur.nodeType !== 1 );\r\n\r\n\treturn cur;\r\n}\r\n\r\njQuery.each({\r\n\tparent: function( elem ) {\r\n\t\tvar parent = elem.parentNode;\r\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\r\n\t},\r\n\tparents: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\" );\r\n\t},\r\n\tparentsUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\r\n\t},\r\n\tnext: function( elem ) {\r\n\t\treturn sibling( elem, \"nextSibling\" );\r\n\t},\r\n\tprev: function( elem ) {\r\n\t\treturn sibling( elem, \"previousSibling\" );\r\n\t},\r\n\tnextAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\r\n\t},\r\n\tprevAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\r\n\t},\r\n\tnextUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\r\n\t},\r\n\tprevUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\r\n\t},\r\n\tsiblings: function( elem ) {\r\n\t\treturn jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\r\n\t},\r\n\tchildren: function( elem ) {\r\n\t\treturn jQuery.sibling( elem.firstChild );\r\n\t},\r\n\tcontents: function( elem ) {\r\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\r\n\t\t\telem.contentDocument || elem.contentWindow.document :\r\n\t\t\tjQuery.merge( [], elem.childNodes );\r\n\t}\r\n}, function( name, fn ) {\r\n\tjQuery.fn[ name ] = function( until, selector ) {\r\n\t\tvar ret = jQuery.map( this, fn, until );\r\n\r\n\t\tif ( !runtil.test( name ) ) {\r\n\t\t\tselector = until;\r\n\t\t}\r\n\r\n\t\tif ( selector && typeof selector === \"string\" ) {\r\n\t\t\tret = jQuery.filter( selector, ret );\r\n\t\t}\r\n\r\n\t\tret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;\r\n\r\n\t\tif ( this.length > 1 && rparentsprev.test( name ) ) {\r\n\t\t\tret = ret.reverse();\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\tfilter: function( expr, elems, not ) {\r\n\t\tif ( not ) {\r\n\t\t\texpr = \":not(\" + expr + \")\";\r\n\t\t}\r\n\r\n\t\treturn elems.length === 1 ?\r\n\t\t\tjQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :\r\n\t\t\tjQuery.find.matches(expr, elems);\r\n\t},\r\n\r\n\tdir: function( elem, dir, until ) {\r\n\t\tvar matched = [],\r\n\t\t\tcur = elem[ dir ];\r\n\r\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\r\n\t\t\tif ( cur.nodeType === 1 ) {\r\n\t\t\t\tmatched.push( cur );\r\n\t\t\t}\r\n\t\t\tcur = cur[dir];\r\n\t\t}\r\n\t\treturn matched;\r\n\t},\r\n\r\n\tsibling: function( n, elem ) {\r\n\t\tvar r = [];\r\n\r\n\t\tfor ( ; n; n = n.nextSibling ) {\r\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\r\n\t\t\t\tr.push( n );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn r;\r\n\t}\r\n});\r\n\r\n// Implement the identical functionality for filter and not\r\nfunction winnow( elements, qualifier, keep ) {\r\n\r\n\t// Can't pass null or undefined to indexOf in Firefox 4\r\n\t// Set to 0 to skip string check\r\n\tqualifier = qualifier || 0;\r\n\r\n\tif ( jQuery.isFunction( qualifier ) ) {\r\n\t\treturn jQuery.grep(elements, function( elem, i ) {\r\n\t\t\tvar retVal = !!qualifier.call( elem, i, elem );\r\n\t\t\treturn retVal === keep;\r\n\t\t});\r\n\r\n\t} else if ( qualifier.nodeType ) {\r\n\t\treturn jQuery.grep(elements, function( elem ) {\r\n\t\t\treturn ( elem === qualifier ) === keep;\r\n\t\t});\r\n\r\n\t} else if ( typeof qualifier === \"string\" ) {\r\n\t\tvar filtered = jQuery.grep(elements, function( elem ) {\r\n\t\t\treturn elem.nodeType === 1;\r\n\t\t});\r\n\r\n\t\tif ( isSimple.test( qualifier ) ) {\r\n\t\t\treturn jQuery.filter(qualifier, filtered, !keep);\r\n\t\t} else {\r\n\t\t\tqualifier = jQuery.filter( qualifier, filtered );\r\n\t\t}\r\n\t}\r\n\r\n\treturn jQuery.grep(elements, function( elem ) {\r\n\t\treturn ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;\r\n\t});\r\n}\r\nfunction createSafeFragment( document ) {\r\n\tvar list = nodeNames.split( \"|\" ),\r\n\t\tsafeFrag = document.createDocumentFragment();\r\n\r\n\tif ( safeFrag.createElement ) {\r\n\t\twhile ( list.length ) {\r\n\t\t\tsafeFrag.createElement(\r\n\t\t\t\tlist.pop()\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\treturn safeFrag;\r\n}\r\n\r\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|\" +\r\n\t\t\"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\r\n\trinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\r\n\trnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\r\n\trleadingWhitespace = /^\\s+/,\r\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\r\n\trtagName = /<([\\w:]+)/,\r\n\trtbody = /<tbody/i,\r\n\trhtml = /<|&#?\\w+;/,\r\n\trnoInnerhtml = /<(?:script|style|link)/i,\r\n\tmanipulation_rcheckableType = /^(?:checkbox|radio)$/i,\r\n\t// checked=\"checked\" or checked\r\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\r\n\trscriptType = /^$|\\/(?:java|ecma)script/i,\r\n\trscriptTypeMasked = /^true\\/(.*)/,\r\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\r\n\r\n\t// We have to close these tags to support XHTML (#13200)\r\n\twrapMap = {\r\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\r\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\r\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\r\n\t\tparam: [ 1, \"<object>\", \"</object>\" ],\r\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\r\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\r\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\r\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\r\n\r\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\r\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\r\n\t\t_default: jQuery.support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\" ]\r\n\t},\r\n\tsafeFragment = createSafeFragment( document ),\r\n\tfragmentDiv = safeFragment.appendChild( document.createElement(\"div\") );\r\n\r\nwrapMap.optgroup = wrapMap.option;\r\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\r\nwrapMap.th = wrapMap.td;\r\n\r\njQuery.fn.extend({\r\n\ttext: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\treturn value === undefined ?\r\n\t\t\t\tjQuery.text( this ) :\r\n\t\t\t\tthis.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\twrapAll: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( this[0] ) {\r\n\t\t\t// The elements to wrap the target around\r\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\r\n\r\n\t\t\tif ( this[0].parentNode ) {\r\n\t\t\t\twrap.insertBefore( this[0] );\r\n\t\t\t}\r\n\r\n\t\t\twrap.map(function() {\r\n\t\t\t\tvar elem = this;\r\n\r\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\r\n\t\t\t\t\telem = elem.firstChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn elem;\r\n\t\t\t}).append( this );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\twrapInner: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar self = jQuery( this ),\r\n\t\t\t\tcontents = self.contents();\r\n\r\n\t\t\tif ( contents.length ) {\r\n\t\t\t\tcontents.wrapAll( html );\r\n\r\n\t\t\t} else {\r\n\t\t\t\tself.append( html );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\twrap: function( html ) {\r\n\t\tvar isFunction = jQuery.isFunction( html );\r\n\r\n\t\treturn this.each(function(i) {\r\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\r\n\t\t});\r\n\t},\r\n\r\n\tunwrap: function() {\r\n\t\treturn this.parent().each(function() {\r\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\r\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\r\n\t\t\t}\r\n\t\t}).end();\r\n\t},\r\n\r\n\tappend: function() {\r\n\t\treturn this.domManip(arguments, true, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tthis.appendChild( elem );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tprepend: function() {\r\n\t\treturn this.domManip(arguments, true, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tbefore: function() {\r\n\t\treturn this.domManip( arguments, false, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tafter: function() {\r\n\t\treturn this.domManip( arguments, false, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t// keepData is for internal use only--do not document\r\n\tremove: function( selector, keepData ) {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\r\n\t\t\tif ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {\r\n\t\t\t\tif ( !keepData && elem.nodeType === 1 ) {\r\n\t\t\t\t\tjQuery.cleanData( getAll( elem ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\t\tif ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\t\t\tsetGlobalEval( getAll( elem, \"script\" ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.parentNode.removeChild( elem );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tempty: function() {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\r\n\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Remove any remaining nodes\r\n\t\t\twhile ( elem.firstChild ) {\r\n\t\t\t\telem.removeChild( elem.firstChild );\r\n\t\t\t}\r\n\r\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\r\n\t\t\t// Support: IE<9\r\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\r\n\t\t\t\telem.options.length = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\r\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\r\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\r\n\r\n\t\treturn this.map( function () {\r\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\r\n\t\t});\r\n\t},\r\n\r\n\thtml: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\tvar elem = this[0] || {},\r\n\t\t\t\ti = 0,\r\n\t\t\t\tl = this.length;\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\treturn elem.nodeType === 1 ?\r\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\r\n\t\t\t// See if we can take a shortcut and just use innerHTML\r\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\r\n\t\t\t\t( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&\r\n\t\t\t\t( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\r\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [\"\", \"\"] )[1].toLowerCase() ] ) {\r\n\r\n\t\t\t\tvalue = value.replace( rxhtmlTag, \"<$1></$2>\" );\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (; i < l; i++ ) {\r\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\t\t\t\telem = this[i] || {};\r\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t\t\t\t\telem.innerHTML = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem = 0;\r\n\r\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t\tif ( elem ) {\r\n\t\t\t\tthis.empty().append( value );\r\n\t\t\t}\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\treplaceWith: function( value ) {\r\n\t\tvar isFunc = jQuery.isFunction( value );\r\n\r\n\t\t// Make sure that the elements are removed from the DOM before they are inserted\r\n\t\t// this can help fix replacing a parent with child elements\r\n\t\tif ( !isFunc && typeof value !== \"string\" ) {\r\n\t\t\tvalue = jQuery( value ).not( this ).detach();\r\n\t\t}\r\n\r\n\t\treturn this.domManip( [ value ], true, function( elem ) {\r\n\t\t\tvar next = this.nextSibling,\r\n\t\t\t\tparent = this.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tjQuery( this ).remove();\r\n\t\t\t\tparent.insertBefore( elem, next );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tdetach: function( selector ) {\r\n\t\treturn this.remove( selector, true );\r\n\t},\r\n\r\n\tdomManip: function( args, table, callback ) {\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\targs = core_concat.apply( [], args );\r\n\r\n\t\tvar first, node, hasScripts,\r\n\t\t\tscripts, doc, fragment,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tset = this,\r\n\t\t\tiNoClone = l - 1,\r\n\t\t\tvalue = args[0],\r\n\t\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\r\n\t\tif ( isFunction || !( l <= 1 || typeof value !== \"string\" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {\r\n\t\t\treturn this.each(function( index ) {\r\n\t\t\t\tvar self = set.eq( index );\r\n\t\t\t\tif ( isFunction ) {\r\n\t\t\t\t\targs[0] = value.call( this, index, table ? self.html() : undefined );\r\n\t\t\t\t}\r\n\t\t\t\tself.domManip( args, table, callback );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( l ) {\r\n\t\t\tfragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );\r\n\t\t\tfirst = fragment.firstChild;\r\n\r\n\t\t\tif ( fragment.childNodes.length === 1 ) {\r\n\t\t\t\tfragment = first;\r\n\t\t\t}\r\n\r\n\t\t\tif ( first ) {\r\n\t\t\t\ttable = table && jQuery.nodeName( first, \"tr\" );\r\n\t\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\r\n\t\t\t\thasScripts = scripts.length;\r\n\r\n\t\t\t\t// Use the original fragment for the last item instead of the first because it can end up\r\n\t\t\t\t// being emptied incorrectly in certain situations (#8070).\r\n\t\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\t\tnode = fragment;\r\n\r\n\t\t\t\t\tif ( i !== iNoClone ) {\r\n\t\t\t\t\t\tnode = jQuery.clone( node, true, true );\r\n\r\n\t\t\t\t\t\t// Keep references to cloned scripts for later restoration\r\n\t\t\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcallback.call(\r\n\t\t\t\t\t\ttable && jQuery.nodeName( this[i], \"table\" ) ?\r\n\t\t\t\t\t\t\tfindOrAppend( this[i], \"tbody\" ) :\r\n\t\t\t\t\t\t\tthis[i],\r\n\t\t\t\t\t\tnode,\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\r\n\r\n\t\t\t\t\t// Reenable scripts\r\n\t\t\t\t\tjQuery.map( scripts, restoreScript );\r\n\r\n\t\t\t\t\t// Evaluate executable scripts on first document insertion\r\n\t\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\r\n\t\t\t\t\t\tnode = scripts[ i ];\r\n\t\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\r\n\t\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) && jQuery.contains( doc, node ) ) {\r\n\r\n\t\t\t\t\t\t\tif ( node.src ) {\r\n\t\t\t\t\t\t\t\t// Hope ajax is available...\r\n\t\t\t\t\t\t\t\tjQuery.ajax({\r\n\t\t\t\t\t\t\t\t\turl: node.src,\r\n\t\t\t\t\t\t\t\t\ttype: \"GET\",\r\n\t\t\t\t\t\t\t\t\tdataType: \"script\",\r\n\t\t\t\t\t\t\t\t\tasync: false,\r\n\t\t\t\t\t\t\t\t\tglobal: false,\r\n\t\t\t\t\t\t\t\t\t\"throws\": true\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.globalEval( ( node.text || node.textContent || node.innerHTML || \"\" ).replace( rcleanScript, \"\" ) );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fix #11809: Avoid leaking memory\r\n\t\t\t\tfragment = first = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\nfunction findOrAppend( elem, tag ) {\r\n\treturn elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );\r\n}\r\n\r\n// Replace/restore the type attribute of script elements for safe DOM manipulation\r\nfunction disableScript( elem ) {\r\n\tvar attr = elem.getAttributeNode(\"type\");\r\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}\r\nfunction restoreScript( elem ) {\r\n\tvar match = rscriptTypeMasked.exec( elem.type );\r\n\tif ( match ) {\r\n\t\telem.type = match[1];\r\n\t} else {\r\n\t\telem.removeAttribute(\"type\");\r\n\t}\r\n\treturn elem;\r\n}\r\n\r\n// Mark scripts as having already been evaluated\r\nfunction setGlobalEval( elems, refElements ) {\r\n\tvar elem,\r\n\t\ti = 0;\r\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\r\n\t}\r\n}\r\n\r\nfunction cloneCopyEvent( src, dest ) {\r\n\r\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar type, i, l,\r\n\t\toldData = jQuery._data( src ),\r\n\t\tcurData = jQuery._data( dest, oldData ),\r\n\t\tevents = oldData.events;\r\n\r\n\tif ( events ) {\r\n\t\tdelete curData.handle;\r\n\t\tcurData.events = {};\r\n\r\n\t\tfor ( type in events ) {\r\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\r\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// make the cloned public data object a copy from the original\r\n\tif ( curData.data ) {\r\n\t\tcurData.data = jQuery.extend( {}, curData.data );\r\n\t}\r\n}\r\n\r\nfunction fixCloneNodeIssues( src, dest ) {\r\n\tvar nodeName, e, data;\r\n\r\n\t// We do not need to do anything for non-Elements\r\n\tif ( dest.nodeType !== 1 ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tnodeName = dest.nodeName.toLowerCase();\r\n\r\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\r\n\tif ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {\r\n\t\tdata = jQuery._data( dest );\r\n\r\n\t\tfor ( e in data.events ) {\r\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\r\n\t\t}\r\n\r\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\r\n\t\tdest.removeAttribute( jQuery.expando );\r\n\t}\r\n\r\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\r\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\r\n\t\tdisableScript( dest ).text = src.text;\r\n\t\trestoreScript( dest );\r\n\r\n\t// IE6-10 improperly clones children of object elements using classid.\r\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\r\n\t} else if ( nodeName === \"object\" ) {\r\n\t\tif ( dest.parentNode ) {\r\n\t\t\tdest.outerHTML = src.outerHTML;\r\n\t\t}\r\n\r\n\t\t// This path appears unavoidable for IE9. When cloning an object\r\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\r\n\t\t// If the src has innerHTML and the destination does not,\r\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\r\n\t\tif ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {\r\n\t\t\tdest.innerHTML = src.innerHTML;\r\n\t\t}\r\n\r\n\t} else if ( nodeName === \"input\" && manipulation_rcheckableType.test( src.type ) ) {\r\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\r\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\r\n\t\t// a checked appearance if the defaultChecked value isn't also set\r\n\r\n\t\tdest.defaultChecked = dest.checked = src.checked;\r\n\r\n\t\t// IE6-7 get confused and end up setting the value of a cloned\r\n\t\t// checkbox/radio button to an empty string instead of \"on\"\r\n\t\tif ( dest.value !== src.value ) {\r\n\t\t\tdest.value = src.value;\r\n\t\t}\r\n\r\n\t// IE6-8 fails to return the selected option to the default selected\r\n\t// state when cloning options\r\n\t} else if ( nodeName === \"option\" ) {\r\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\r\n\r\n\t// IE6-8 fails to set the defaultValue to the correct value when\r\n\t// cloning other types of input fields\r\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\r\n\t\tdest.defaultValue = src.defaultValue;\r\n\t}\r\n}\r\n\r\njQuery.each({\r\n\tappendTo: \"append\",\r\n\tprependTo: \"prepend\",\r\n\tinsertBefore: \"before\",\r\n\tinsertAfter: \"after\",\r\n\treplaceAll: \"replaceWith\"\r\n}, function( name, original ) {\r\n\tjQuery.fn[ name ] = function( selector ) {\r\n\t\tvar elems,\r\n\t\t\ti = 0,\r\n\t\t\tret = [],\r\n\t\t\tinsert = jQuery( selector ),\r\n\t\t\tlast = insert.length - 1;\r\n\r\n\t\tfor ( ; i <= last; i++ ) {\r\n\t\t\telems = i === last ? this : this.clone(true);\r\n\t\t\tjQuery( insert[i] )[ original ]( elems );\r\n\r\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\r\n\t\t\tcore_push.apply( ret, elems.get() );\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\nfunction getAll( context, tag ) {\r\n\tvar elems, elem,\r\n\t\ti = 0,\r\n\t\tfound = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || \"*\" ) :\r\n\t\t\ttypeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || \"*\" ) :\r\n\t\t\tundefined;\r\n\r\n\tif ( !found ) {\r\n\t\tfor ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {\r\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\r\n\t\t\t\tfound.push( elem );\r\n\t\t\t} else {\r\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\r\n\t\tjQuery.merge( [ context ], found ) :\r\n\t\tfound;\r\n}\r\n\r\n// Used in buildFragment, fixes the defaultChecked property\r\nfunction fixDefaultChecked( elem ) {\r\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\r\n\t\telem.defaultChecked = elem.checked;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\r\n\t\tvar destElements, node, clone, i, srcElements,\r\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\tif ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\r\n\t\t\tclone = elem.cloneNode( true );\r\n\r\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\r\n\t\t} else {\r\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\r\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\r\n\t\t}\r\n\r\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\r\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\r\n\r\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\r\n\t\t\tdestElements = getAll( clone );\r\n\t\t\tsrcElements = getAll( elem );\r\n\r\n\t\t\t// Fix all IE cloning issues\r\n\t\t\tfor ( i = 0; (node = srcElements[i]) != null; ++i ) {\r\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\r\n\t\t\t\tif ( destElements[i] ) {\r\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy the events from the original to the clone\r\n\t\tif ( dataAndEvents ) {\r\n\t\t\tif ( deepDataAndEvents ) {\r\n\t\t\t\tsrcElements = srcElements || getAll( elem );\r\n\t\t\t\tdestElements = destElements || getAll( clone );\r\n\r\n\t\t\t\tfor ( i = 0; (node = srcElements[i]) != null; i++ ) {\r\n\t\t\t\t\tcloneCopyEvent( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcloneCopyEvent( elem, clone );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tdestElements = getAll( clone, \"script\" );\r\n\t\tif ( destElements.length > 0 ) {\r\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\r\n\t\t}\r\n\r\n\t\tdestElements = srcElements = node = null;\r\n\r\n\t\t// Return the cloned set\r\n\t\treturn clone;\r\n\t},\r\n\r\n\tbuildFragment: function( elems, context, scripts, selection ) {\r\n\t\tvar j, elem, contains,\r\n\t\t\ttmp, tag, tbody, wrap,\r\n\t\t\tl = elems.length,\r\n\r\n\t\t\t// Ensure a safe fragment\r\n\t\t\tsafe = createSafeFragment( context ),\r\n\r\n\t\t\tnodes = [],\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\telem = elems[ i ];\r\n\r\n\t\t\tif ( elem || elem === 0 ) {\r\n\r\n\t\t\t\t// Add nodes directly\r\n\t\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\r\n\t\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\r\n\r\n\t\t\t\t// Convert non-html into a text node\r\n\t\t\t\t} else if ( !rhtml.test( elem ) ) {\r\n\t\t\t\t\tnodes.push( context.createTextNode( elem ) );\r\n\r\n\t\t\t\t// Convert html into DOM nodes\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttmp = tmp || safe.appendChild( context.createElement(\"div\") );\r\n\r\n\t\t\t\t\t// Deserialize a standard representation\r\n\t\t\t\t\ttag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase();\r\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\r\n\r\n\t\t\t\t\ttmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, \"<$1></$2>\" ) + wrap[2];\r\n\r\n\t\t\t\t\t// Descend through wrappers to the right content\r\n\t\t\t\t\tj = wrap[0];\r\n\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\ttmp = tmp.lastChild;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Manually add leading whitespace removed by IE\r\n\t\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\r\n\t\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\r\n\t\t\t\t\tif ( !jQuery.support.tbody ) {\r\n\r\n\t\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\r\n\t\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\ttmp.firstChild :\r\n\r\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\r\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\t\ttmp :\r\n\t\t\t\t\t\t\t\t0;\r\n\r\n\t\t\t\t\t\tj = elem && elem.childNodes.length;\r\n\t\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\t\tif ( jQuery.nodeName( (tbody = elem.childNodes[j]), \"tbody\" ) && !tbody.childNodes.length ) {\r\n\t\t\t\t\t\t\t\telem.removeChild( tbody );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\r\n\r\n\t\t\t\t\t// Fix #12392 for WebKit and IE > 9\r\n\t\t\t\t\ttmp.textContent = \"\";\r\n\r\n\t\t\t\t\t// Fix #12392 for oldIE\r\n\t\t\t\t\twhile ( tmp.firstChild ) {\r\n\t\t\t\t\t\ttmp.removeChild( tmp.firstChild );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remember the top-level container for proper cleanup\r\n\t\t\t\t\ttmp = safe.lastChild;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fix #11356: Clear elements from fragment\r\n\t\tif ( tmp ) {\r\n\t\t\tsafe.removeChild( tmp );\r\n\t\t}\r\n\r\n\t\t// Reset defaultChecked for any radios and checkboxes\r\n\t\t// about to be appended to the DOM in IE 6/7 (#8060)\r\n\t\tif ( !jQuery.support.appendChecked ) {\r\n\t\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\r\n\t\t}\r\n\r\n\t\ti = 0;\r\n\t\twhile ( (elem = nodes[ i++ ]) ) {\r\n\r\n\t\t\t// #4087 - If origin and destination elements are the same, and this is\r\n\t\t\t// that element, do not do anything\r\n\t\t\tif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\t\t// Append to fragment\r\n\t\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\r\n\r\n\t\t\t// Preserve script evaluation history\r\n\t\t\tif ( contains ) {\r\n\t\t\t\tsetGlobalEval( tmp );\r\n\t\t\t}\r\n\r\n\t\t\t// Capture executables\r\n\t\t\tif ( scripts ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (elem = tmp[ j++ ]) ) {\r\n\t\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\r\n\t\t\t\t\t\tscripts.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttmp = null;\r\n\r\n\t\treturn safe;\r\n\t},\r\n\r\n\tcleanData: function( elems, /* internal */ acceptData ) {\r\n\t\tvar elem, type, id, data,\r\n\t\t\ti = 0,\r\n\t\t\tinternalKey = jQuery.expando,\r\n\t\t\tcache = jQuery.cache,\r\n\t\t\tdeleteExpando = jQuery.support.deleteExpando,\r\n\t\t\tspecial = jQuery.event.special;\r\n\r\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\r\n\t\t\tif ( acceptData || jQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\tid = elem[ internalKey ];\r\n\t\t\t\tdata = id && cache[ id ];\r\n\r\n\t\t\t\tif ( data ) {\r\n\t\t\t\t\tif ( data.events ) {\r\n\t\t\t\t\t\tfor ( type in data.events ) {\r\n\t\t\t\t\t\t\tif ( special[ type ] ) {\r\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\r\n\r\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\r\n\t\t\t\t\tif ( cache[ id ] ) {\r\n\r\n\t\t\t\t\t\tdelete cache[ id ];\r\n\r\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes,\r\n\t\t\t\t\t\t// nor does it have a removeAttribute function on Document nodes;\r\n\t\t\t\t\t\t// we must handle all of these cases\r\n\t\t\t\t\t\tif ( deleteExpando ) {\r\n\t\t\t\t\t\t\tdelete elem[ internalKey ];\r\n\r\n\t\t\t\t\t\t} else if ( typeof elem.removeAttribute !== core_strundefined ) {\r\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\telem[ internalKey ] = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcore_deletedIds.push( id );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\nvar iframe, getStyles, curCSS,\r\n\tralpha = /alpha\\([^)]*\\)/i,\r\n\tropacity = /opacity\\s*=\\s*([^)]*)/,\r\n\trposition = /^(top|right|bottom|left)$/,\r\n\t// swappable if display is none or starts with table except \"table\", \"table-cell\", or \"table-caption\"\r\n\t// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\r\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\r\n\trmargin = /^margin/,\r\n\trnumsplit = new RegExp( \"^(\" + core_pnum + \")(.*)$\", \"i\" ),\r\n\trnumnonpx = new RegExp( \"^(\" + core_pnum + \")(?!px)[a-z%]+$\", \"i\" ),\r\n\trrelNum = new RegExp( \"^([+-])=(\" + core_pnum + \")\", \"i\" ),\r\n\telemdisplay = { BODY: \"block\" },\r\n\r\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\r\n\tcssNormalTransform = {\r\n\t\tletterSpacing: 0,\r\n\t\tfontWeight: 400\r\n\t},\r\n\r\n\tcssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ],\r\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ];\r\n\r\n// return a css property mapped to a potentially vendor prefixed property\r\nfunction vendorPropName( style, name ) {\r\n\r\n\t// shortcut for names that are not vendor prefixed\r\n\tif ( name in style ) {\r\n\t\treturn name;\r\n\t}\r\n\r\n\t// check for vendor prefixed names\r\n\tvar capName = name.charAt(0).toUpperCase() + name.slice(1),\r\n\t\torigName = name,\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in style ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n\r\n\treturn origName;\r\n}\r\n\r\nfunction isHidden( elem, el ) {\r\n\t// isHidden might be called from jQuery#filter function;\r\n\t// in that case, element will be second argument\r\n\telem = el || elem;\r\n\treturn jQuery.css( elem, \"display\" ) === \"none\" || !jQuery.contains( elem.ownerDocument, elem );\r\n}\r\n\r\nfunction showHide( elements, show ) {\r\n\tvar display, elem, hidden,\r\n\t\tvalues = [],\r\n\t\tindex = 0,\r\n\t\tlength = elements.length;\r\n\r\n\tfor ( ; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\r\n\t\tdisplay = elem.style.display;\r\n\t\tif ( show ) {\r\n\t\t\t// Reset the inline display of this element to learn if it is\r\n\t\t\t// being hidden by cascaded rules or not\r\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\r\n\t\t\t\telem.style.display = \"\";\r\n\t\t\t}\r\n\r\n\t\t\t// Set elements which have been overridden with display: none\r\n\t\t\t// in a stylesheet to whatever the default browser style is\r\n\t\t\t// for such an element\r\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\r\n\t\t\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\", css_defaultDisplay(elem.nodeName) );\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif ( !values[ index ] ) {\r\n\t\t\t\thidden = isHidden( elem );\r\n\r\n\t\t\t\tif ( display && display !== \"none\" || !hidden ) {\r\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", hidden ? display : jQuery.css( elem, \"display\" ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Set the display of most of the elements in a second loop\r\n\t// to avoid the constant reflow\r\n\tfor ( index = 0; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\r\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\r\n\t\t}\r\n\t}\r\n\r\n\treturn elements;\r\n}\r\n\r\njQuery.fn.extend({\r\n\tcss: function( name, value ) {\r\n\t\treturn jQuery.access( this, function( elem, name, value ) {\r\n\t\t\tvar len, styles,\r\n\t\t\t\tmap = {},\r\n\t\t\t\ti = 0;\r\n\r\n\t\t\tif ( jQuery.isArray( name ) ) {\r\n\t\t\t\tstyles = getStyles( elem );\r\n\t\t\t\tlen = name.length;\r\n\r\n\t\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn map;\r\n\t\t\t}\r\n\r\n\t\t\treturn value !== undefined ?\r\n\t\t\t\tjQuery.style( elem, name, value ) :\r\n\t\t\t\tjQuery.css( elem, name );\r\n\t\t}, name, value, arguments.length > 1 );\r\n\t},\r\n\tshow: function() {\r\n\t\treturn showHide( this, true );\r\n\t},\r\n\thide: function() {\r\n\t\treturn showHide( this );\r\n\t},\r\n\ttoggle: function( state ) {\r\n\t\tvar bool = typeof state === \"boolean\";\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( bool ? state : isHidden( this ) ) {\r\n\t\t\t\tjQuery( this ).show();\r\n\t\t\t} else {\r\n\t\t\t\tjQuery( this ).hide();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\t// Add in style property hooks for overriding the default\r\n\t// behavior of getting and setting a style property\r\n\tcssHooks: {\r\n\t\topacity: {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// We should always get a number back from opacity\r\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\r\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Exclude the following css properties to add px\r\n\tcssNumber: {\r\n\t\t\"columnCount\": true,\r\n\t\t\"fillOpacity\": true,\r\n\t\t\"fontWeight\": true,\r\n\t\t\"lineHeight\": true,\r\n\t\t\"opacity\": true,\r\n\t\t\"orphans\": true,\r\n\t\t\"widows\": true,\r\n\t\t\"zIndex\": true,\r\n\t\t\"zoom\": true\r\n\t},\r\n\r\n\t// Add in properties whose names you wish to fix before\r\n\t// setting or getting the value\r\n\tcssProps: {\r\n\t\t// normalize float css property\r\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\r\n\t},\r\n\r\n\t// Get and set the style property on a DOM Node\r\n\tstyle: function( elem, name, value, extra ) {\r\n\t\t// Don't set styles on text and comment nodes\r\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tvar ret, type, hooks,\r\n\t\t\torigName = jQuery.camelCase( name ),\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// Check if we're setting a value\r\n\t\tif ( value !== undefined ) {\r\n\t\t\ttype = typeof value;\r\n\r\n\t\t\t// convert relative number strings (+= or -=) to relative numbers. #7345\r\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\r\n\t\t\t\tvalue = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );\r\n\t\t\t\t// Fixes bug #9237\r\n\t\t\t\ttype = \"number\";\r\n\t\t\t}\r\n\r\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\r\n\t\t\tif ( value == null || type === \"number\" && isNaN( value ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\r\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\r\n\t\t\t\tvalue += \"px\";\r\n\t\t\t}\r\n\r\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\r\n\t\t\t// but it would mean to define eight (for every problematic property) identical functions\r\n\t\t\tif ( !jQuery.support.clearCloneStyle && value === \"\" && name.indexOf(\"background\") === 0 ) {\r\n\t\t\t\tstyle[ name ] = \"inherit\";\r\n\t\t\t}\r\n\r\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {\r\n\r\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\r\n\t\t\t\t// Fixes bug #5509\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstyle[ name ] = value;\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// If a hook was provided get the non-computed value from there\r\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise just get the value from the style object\r\n\t\t\treturn style[ name ];\r\n\t\t}\r\n\t},\r\n\r\n\tcss: function( elem, name, extra, styles ) {\r\n\t\tvar num, val, hooks,\r\n\t\t\torigName = jQuery.camelCase( name );\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// If a hook was provided get the computed value from there\r\n\t\tif ( hooks && \"get\" in hooks ) {\r\n\t\t\tval = hooks.get( elem, true, extra );\r\n\t\t}\r\n\r\n\t\t// Otherwise, if a way to get the computed value exists, use that\r\n\t\tif ( val === undefined ) {\r\n\t\t\tval = curCSS( elem, name, styles );\r\n\t\t}\r\n\r\n\t\t//convert \"normal\" to computed value\r\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\r\n\t\t\tval = cssNormalTransform[ name ];\r\n\t\t}\r\n\r\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\r\n\t\tif ( extra === \"\" || extra ) {\r\n\t\t\tnum = parseFloat( val );\r\n\t\t\treturn extra === true || jQuery.isNumeric( num ) ? num || 0 : val;\r\n\t\t}\r\n\t\treturn val;\r\n\t},\r\n\r\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\r\n\tswap: function( elem, options, callback, args ) {\r\n\t\tvar ret, name,\r\n\t\t\told = {};\r\n\r\n\t\t// Remember the old values, and insert the new ones\r\n\t\tfor ( name in options ) {\r\n\t\t\told[ name ] = elem.style[ name ];\r\n\t\t\telem.style[ name ] = options[ name ];\r\n\t\t}\r\n\r\n\t\tret = callback.apply( elem, args || [] );\r\n\r\n\t\t// Revert the old values\r\n\t\tfor ( name in options ) {\r\n\t\t\telem.style[ name ] = old[ name ];\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}\r\n});\r\n\r\n// NOTE: we've included the \"window\" in window.getComputedStyle\r\n// because jsdom on node.js will break without it.\r\nif ( window.getComputedStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn window.getComputedStyle( elem, null );\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar width, minWidth, maxWidth,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\r\n\t\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\r\n\t\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tif ( computed ) {\r\n\r\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\tret = jQuery.style( elem, name );\r\n\t\t\t}\r\n\r\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\r\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\" instead of \"used value\" for margin-right\r\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels\r\n\t\t\t// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\r\n\t\t\tif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {\r\n\r\n\t\t\t\t// Remember the original values\r\n\t\t\t\twidth = style.width;\r\n\t\t\t\tminWidth = style.minWidth;\r\n\t\t\t\tmaxWidth = style.maxWidth;\r\n\r\n\t\t\t\t// Put in the new values to get a computed value out\r\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\r\n\t\t\t\tret = computed.width;\r\n\r\n\t\t\t\t// Revert the changed values\r\n\t\t\t\tstyle.width = width;\r\n\t\t\t\tstyle.minWidth = minWidth;\r\n\t\t\t\tstyle.maxWidth = maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t};\r\n} else if ( document.documentElement.currentStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn elem.currentStyle;\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar left, rs, rsLeft,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\t\t\tret = computed ? computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\t// Avoid setting ret to empty string here\r\n\t\t// so we don't default to auto\r\n\t\tif ( ret == null && style && style[ name ] ) {\r\n\t\t\tret = style[ name ];\r\n\t\t}\r\n\r\n\t\t// From the awesome hack by Dean Edwards\r\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\r\n\r\n\t\t// If we're not dealing with a regular pixel number\r\n\t\t// but a number that has a weird ending, we need to convert it to pixels\r\n\t\t// but not position css attributes, as those are proportional to the parent element instead\r\n\t\t// and we can't measure the parent instead because it might trigger a \"stacking dolls\" problem\r\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\r\n\r\n\t\t\t// Remember the original values\r\n\t\t\tleft = style.left;\r\n\t\t\trs = elem.runtimeStyle;\r\n\t\t\trsLeft = rs && rs.left;\r\n\r\n\t\t\t// Put in the new values to get a computed value out\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = elem.currentStyle.left;\r\n\t\t\t}\r\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\r\n\t\t\tret = style.pixelLeft + \"px\";\r\n\r\n\t\t\t// Revert the changed values\r\n\t\t\tstyle.left = left;\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = rsLeft;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret === \"\" ? \"auto\" : ret;\r\n\t};\r\n}\r\n\r\nfunction setPositiveNumber( elem, value, subtract ) {\r\n\tvar matches = rnumsplit.exec( value );\r\n\treturn matches ?\r\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\r\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\r\n\t\tvalue;\r\n}\r\n\r\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\r\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\r\n\t\t// If we already have the right measurement, avoid augmentation\r\n\t\t4 :\r\n\t\t// Otherwise initialize for horizontal or vertical properties\r\n\t\tname === \"width\" ? 1 : 0,\r\n\r\n\t\tval = 0;\r\n\r\n\tfor ( ; i < 4; i += 2 ) {\r\n\t\t// both box models exclude margin, so add it if we want it\r\n\t\tif ( extra === \"margin\" ) {\r\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\r\n\t\t}\r\n\r\n\t\tif ( isBorderBox ) {\r\n\t\t\t// border-box includes padding, so remove it if we want content\r\n\t\t\tif ( extra === \"content\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\t\t\t}\r\n\r\n\t\t\t// at this point, extra isn't border nor margin, so remove border\r\n\t\t\tif ( extra !== \"margin\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// at this point, extra isn't content, so add padding\r\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\r\n\t\t\t// at this point, extra isn't content nor padding, so add border\r\n\t\t\tif ( extra !== \"padding\" ) {\r\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn val;\r\n}\r\n\r\nfunction getWidthOrHeight( elem, name, extra ) {\r\n\r\n\t// Start with offset property, which is equivalent to the border-box value\r\n\tvar valueIsBorderBox = true,\r\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\r\n\t\tstyles = getStyles( elem ),\r\n\t\tisBorderBox = jQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\r\n\r\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\r\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\r\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\r\n\tif ( val <= 0 || val == null ) {\r\n\t\t// Fall back to computed then uncomputed css if necessary\r\n\t\tval = curCSS( elem, name, styles );\r\n\t\tif ( val < 0 || val == null ) {\r\n\t\t\tval = elem.style[ name ];\r\n\t\t}\r\n\r\n\t\t// Computed unit is not pixels. Stop here and return.\r\n\t\tif ( rnumnonpx.test(val) ) {\r\n\t\t\treturn val;\r\n\t\t}\r\n\r\n\t\t// we need the check for style in case a browser which returns unreliable values\r\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\r\n\t\tvalueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );\r\n\r\n\t\t// Normalize \"\", auto, and prepare for extra\r\n\t\tval = parseFloat( val ) || 0;\r\n\t}\r\n\r\n\t// use the active box-sizing model to add/subtract irrelevant styles\r\n\treturn ( val +\r\n\t\taugmentWidthOrHeight(\r\n\t\t\telem,\r\n\t\t\tname,\r\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\r\n\t\t\tvalueIsBorderBox,\r\n\t\t\tstyles\r\n\t\t)\r\n\t) + \"px\";\r\n}\r\n\r\n// Try to determine the default display value of an element\r\nfunction css_defaultDisplay( nodeName ) {\r\n\tvar doc = document,\r\n\t\tdisplay = elemdisplay[ nodeName ];\r\n\r\n\tif ( !display ) {\r\n\t\tdisplay = actualDisplay( nodeName, doc );\r\n\r\n\t\t// If the simple way fails, read from inside an iframe\r\n\t\tif ( display === \"none\" || !display ) {\r\n\t\t\t// Use the already-created iframe if possible\r\n\t\t\tiframe = ( iframe ||\r\n\t\t\t\tjQuery(\"<iframe frameborder='0' width='0' height='0'/>\")\r\n\t\t\t\t.css( \"cssText\", \"display:block !important\" )\r\n\t\t\t).appendTo( doc.documentElement );\r\n\r\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\r\n\t\t\tdoc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;\r\n\t\t\tdoc.write(\"<!doctype html><html><body>\");\r\n\t\t\tdoc.close();\r\n\r\n\t\t\tdisplay = actualDisplay( nodeName, doc );\r\n\t\t\tiframe.detach();\r\n\t\t}\r\n\r\n\t\t// Store the correct default display\r\n\t\telemdisplay[ nodeName ] = display;\r\n\t}\r\n\r\n\treturn display;\r\n}\r\n\r\n// Called ONLY from within css_defaultDisplay\r\nfunction actualDisplay( name, doc ) {\r\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\r\n\t\tdisplay = jQuery.css( elem[0], \"display\" );\r\n\telem.remove();\r\n\treturn display;\r\n}\r\n\r\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\r\n\tjQuery.cssHooks[ name ] = {\r\n\t\tget: function( elem, computed, extra ) {\r\n\t\t\tif ( computed ) {\r\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\r\n\t\t\t\t// however, it must have a current display style that would benefit from this\r\n\t\t\t\treturn elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, \"display\" ) ) ?\r\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\r\n\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tset: function( elem, value, extra ) {\r\n\t\t\tvar styles = extra && getStyles( elem );\r\n\t\t\treturn setPositiveNumber( elem, value, extra ?\r\n\t\t\t\taugmentWidthOrHeight(\r\n\t\t\t\t\telem,\r\n\t\t\t\t\tname,\r\n\t\t\t\t\textra,\r\n\t\t\t\t\tjQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\t\t\t\tstyles\r\n\t\t\t\t) : 0\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n});\r\n\r\nif ( !jQuery.support.opacity ) {\r\n\tjQuery.cssHooks.opacity = {\r\n\t\tget: function( elem, computed ) {\r\n\t\t\t// IE uses filters for opacity\r\n\t\t\treturn ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\r\n\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\r\n\t\t\t\tcomputed ? \"1\" : \"\";\r\n\t\t},\r\n\r\n\t\tset: function( elem, value ) {\r\n\t\t\tvar style = elem.style,\r\n\t\t\t\tcurrentStyle = elem.currentStyle,\r\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\r\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\r\n\r\n\t\t\t// IE has trouble with opacity if it does not have layout\r\n\t\t\t// Force it by setting the zoom level\r\n\t\t\tstyle.zoom = 1;\r\n\r\n\t\t\t// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\r\n\t\t\t// if value === \"\", then remove inline opacity #12685\r\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\r\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\r\n\t\t\t\t\tstyle.removeAttribute ) {\r\n\r\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\r\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\r\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\r\n\t\t\t\tstyle.removeAttribute( \"filter\" );\r\n\r\n\t\t\t\t// if there is no filter style applied in a css rule or unset inline opacity, we are done\r\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// otherwise, set new filter values\r\n\t\t\tstyle.filter = ralpha.test( filter ) ?\r\n\t\t\t\tfilter.replace( ralpha, opacity ) :\r\n\t\t\t\tfilter + \" \" + opacity;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// These hooks cannot be added until DOM ready because the support test\r\n// for it is not run until after DOM ready\r\njQuery(function() {\r\n\tif ( !jQuery.support.reliableMarginRight ) {\r\n\t\tjQuery.cssHooks.marginRight = {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\t\t\t// Work around by temporarily setting element display to inline-block\r\n\t\t\t\t\treturn jQuery.swap( elem, { \"display\": \"inline-block\" },\r\n\t\t\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\r\n\t// getComputedStyle returns percent when specified for top/left/bottom/right\r\n\t// rather than make the css module depend on the offset module, we just check for it here\r\n\tif ( !jQuery.support.pixelPosition && jQuery.fn.position ) {\r\n\t\tjQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\r\n\t\t\tjQuery.cssHooks[ prop ] = {\r\n\t\t\t\tget: function( elem, computed ) {\r\n\t\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t\tcomputed = curCSS( elem, prop );\r\n\t\t\t\t\t\t// if curCSS returns percentage, fallback to offset\r\n\t\t\t\t\t\treturn rnumnonpx.test( computed ) ?\r\n\t\t\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\r\n\t\t\t\t\t\t\tcomputed;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t}\r\n\r\n});\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.hidden = function( elem ) {\r\n\t\t// Support: Opera <= 12.12\r\n\t\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\r\n\t\treturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||\r\n\t\t\t(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\r\n\t};\r\n\r\n\tjQuery.expr.filters.visible = function( elem ) {\r\n\t\treturn !jQuery.expr.filters.hidden( elem );\r\n\t};\r\n}\r\n\r\n// These hooks are used by animate to expand properties\r\njQuery.each({\r\n\tmargin: \"\",\r\n\tpadding: \"\",\r\n\tborder: \"Width\"\r\n}, function( prefix, suffix ) {\r\n\tjQuery.cssHooks[ prefix + suffix ] = {\r\n\t\texpand: function( value ) {\r\n\t\t\tvar i = 0,\r\n\t\t\t\texpanded = {},\r\n\r\n\t\t\t\t// assumes a single number if not a string\r\n\t\t\t\tparts = typeof value === \"string\" ? value.split(\" \") : [ value ];\r\n\r\n\t\t\tfor ( ; i < 4; i++ ) {\r\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\r\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\r\n\t\t\t}\r\n\r\n\t\t\treturn expanded;\r\n\t\t}\r\n\t};\r\n\r\n\tif ( !rmargin.test( prefix ) ) {\r\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\r\n\t}\r\n});\r\nvar r20 = /%20/g,\r\n\trbracket = /\\[\\]$/,\r\n\trCRLF = /\\r?\\n/g,\r\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\r\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\r\n\r\njQuery.fn.extend({\r\n\tserialize: function() {\r\n\t\treturn jQuery.param( this.serializeArray() );\r\n\t},\r\n\tserializeArray: function() {\r\n\t\treturn this.map(function(){\r\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\r\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\r\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\r\n\t\t})\r\n\t\t.filter(function(){\r\n\t\t\tvar type = this.type;\r\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\r\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\r\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\r\n\t\t\t\t( this.checked || !manipulation_rcheckableType.test( type ) );\r\n\t\t})\r\n\t\t.map(function( i, elem ){\r\n\t\t\tvar val = jQuery( this ).val();\r\n\r\n\t\t\treturn val == null ?\r\n\t\t\t\tnull :\r\n\t\t\t\tjQuery.isArray( val ) ?\r\n\t\t\t\t\tjQuery.map( val, function( val ){\r\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t}).get();\r\n\t}\r\n});\r\n\r\n//Serialize an array of form elements or a set of\r\n//key/values into a query string\r\njQuery.param = function( a, traditional ) {\r\n\tvar prefix,\r\n\t\ts = [],\r\n\t\tadd = function( key, value ) {\r\n\t\t\t// If value is a function, invoke it and return its value\r\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\r\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\r\n\t\t};\r\n\r\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\r\n\tif ( traditional === undefined ) {\r\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\r\n\t}\r\n\r\n\t// If an array was passed in, assume that it is an array of form elements.\r\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\r\n\t\t// Serialize the form elements\r\n\t\tjQuery.each( a, function() {\r\n\t\t\tadd( this.name, this.value );\r\n\t\t});\r\n\r\n\t} else {\r\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\r\n\t\t// did it), otherwise encode params recursively.\r\n\t\tfor ( prefix in a ) {\r\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the resulting serialization\r\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\r\n};\r\n\r\nfunction buildParams( prefix, obj, traditional, add ) {\r\n\tvar name;\r\n\r\n\tif ( jQuery.isArray( obj ) ) {\r\n\t\t// Serialize array item.\r\n\t\tjQuery.each( obj, function( i, v ) {\r\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\r\n\t\t\t\t// Treat each array item as a scalar.\r\n\t\t\t\tadd( prefix, v );\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\r\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\r\n\t\t// Serialize object item.\r\n\t\tfor ( name in obj ) {\r\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t// Serialize scalar item.\r\n\t\tadd( prefix, obj );\r\n\t}\r\n}\r\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\r\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\r\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\r\n\r\n\t// Handle event binding\r\n\tjQuery.fn[ name ] = function( data, fn ) {\r\n\t\treturn arguments.length > 0 ?\r\n\t\t\tthis.on( name, null, data, fn ) :\r\n\t\t\tthis.trigger( name );\r\n\t};\r\n});\r\n\r\njQuery.fn.hover = function( fnOver, fnOut ) {\r\n\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\r\n};\r\nvar\r\n\t// Document location\r\n\tajaxLocParts,\r\n\tajaxLocation,\r\n\tajax_nonce = jQuery.now(),\r\n\r\n\tajax_rquery = /\\?/,\r\n\trhash = /#.*$/,\r\n\trts = /([?&])_=[^&]*/,\r\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\r\n\t// #7653, #8125, #8152: local protocol detection\r\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\r\n\trnoContent = /^(?:GET|HEAD)$/,\r\n\trprotocol = /^\\/\\//,\r\n\trurl = /^([\\w.+-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,\r\n\r\n\t// Keep a copy of the old load method\r\n\t_load = jQuery.fn.load,\r\n\r\n\t/* Prefilters\r\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\r\n\t * 2) These are called:\r\n\t * - BEFORE asking for a transport\r\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\r\n\t * 3) key is the dataType\r\n\t * 4) the catchall symbol \"*\" can be used\r\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\r\n\t */\r\n\tprefilters = {},\r\n\r\n\t/* Transports bindings\r\n\t * 1) key is the dataType\r\n\t * 2) the catchall symbol \"*\" can be used\r\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\r\n\t */\r\n\ttransports = {},\r\n\r\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\r\n\tallTypes = \"*/\".concat(\"*\");\r\n\r\n// #8138, IE may throw an exception when accessing\r\n// a field from window.location if document.domain has been set\r\ntry {\r\n\tajaxLocation = location.href;\r\n} catch( e ) {\r\n\t// Use the href attribute of an A element\r\n\t// since IE will modify it given document.location\r\n\tajaxLocation = document.createElement( \"a\" );\r\n\tajaxLocation.href = \"\";\r\n\tajaxLocation = ajaxLocation.href;\r\n}\r\n\r\n// Segment location into parts\r\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\r\n\r\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\r\nfunction addToPrefiltersOrTransports( structure ) {\r\n\r\n\t// dataTypeExpression is optional and defaults to \"*\"\r\n\treturn function( dataTypeExpression, func ) {\r\n\r\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\r\n\t\t\tfunc = dataTypeExpression;\r\n\t\t\tdataTypeExpression = \"*\";\r\n\t\t}\r\n\r\n\t\tvar dataType,\r\n\t\t\ti = 0,\r\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];\r\n\r\n\t\tif ( jQuery.isFunction( func ) ) {\r\n\t\t\t// For each dataType in the dataTypeExpression\r\n\t\t\twhile ( (dataType = dataTypes[i++]) ) {\r\n\t\t\t\t// Prepend if requested\r\n\t\t\t\tif ( dataType[0] === \"+\" ) {\r\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).unshift( func );\r\n\r\n\t\t\t\t// Otherwise append\r\n\t\t\t\t} else {\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).push( func );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Base inspection function for prefilters and transports\r\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}\r\n\r\n// A special extend for ajax options\r\n// that takes \"flat\" options (not to be deep extended)\r\n// Fixes #9887\r\nfunction ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}\r\n\r\njQuery.fn.load = function( url, params, callback ) {\r\n\tif ( typeof url !== \"string\" && _load ) {\r\n\t\treturn _load.apply( this, arguments );\r\n\t}\r\n\r\n\tvar selector, response, type,\r\n\t\tself = this,\r\n\t\toff = url.indexOf(\" \");\r\n\r\n\tif ( off >= 0 ) {\r\n\t\tselector = url.slice( off, url.length );\r\n\t\turl = url.slice( 0, off );\r\n\t}\r\n\r\n\t// If it's a function\r\n\tif ( jQuery.isFunction( params ) ) {\r\n\r\n\t\t// We assume that it's the callback\r\n\t\tcallback = params;\r\n\t\tparams = undefined;\r\n\r\n\t// Otherwise, build a param string\r\n\t} else if ( params && typeof params === \"object\" ) {\r\n\t\ttype = \"POST\";\r\n\t}\r\n\r\n\t// If we have elements to modify, make the request\r\n\tif ( self.length > 0 ) {\r\n\t\tjQuery.ajax({\r\n\t\t\turl: url,\r\n\r\n\t\t\t// if \"type\" variable is undefined, then \"GET\" method will be used\r\n\t\t\ttype: type,\r\n\t\t\tdataType: \"html\",\r\n\t\t\tdata: params\r\n\t\t}).done(function( responseText ) {\r\n\r\n\t\t\t// Save response for use in complete callback\r\n\t\t\tresponse = arguments;\r\n\r\n\t\t\tself.html( selector ?\r\n\r\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\r\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\r\n\t\t\t\tjQuery(\"<div>\").append( jQuery.parseHTML( responseText ) ).find( selector ) :\r\n\r\n\t\t\t\t// Otherwise use the full result\r\n\t\t\t\tresponseText );\r\n\r\n\t\t}).complete( callback && function( jqXHR, status ) {\r\n\t\t\tself.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );\r\n\t\t});\r\n\t}\r\n\r\n\treturn this;\r\n};\r\n\r\n// Attach a bunch of functions for handling common AJAX events\r\njQuery.each( [ \"ajaxStart\", \"ajaxStop\", \"ajaxComplete\", \"ajaxError\", \"ajaxSuccess\", \"ajaxSend\" ], function( i, type ){\r\n\tjQuery.fn[ type ] = function( fn ){\r\n\t\treturn this.on( type, fn );\r\n\t};\r\n});\r\n\r\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\r\n\tjQuery[ method ] = function( url, data, callback, type ) {\r\n\t\t// shift arguments if data argument was omitted\r\n\t\tif ( jQuery.isFunction( data ) ) {\r\n\t\t\ttype = type || callback;\r\n\t\t\tcallback = data;\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\r\n\t\treturn jQuery.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype: method,\r\n\t\t\tdataType: type,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: callback\r\n\t\t});\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\r\n\t// Counter for holding the number of active queries\r\n\tactive: 0,\r\n\r\n\t// Last-Modified header cache for next request\r\n\tlastModified: {},\r\n\tetag: {},\r\n\r\n\tajaxSettings: {\r\n\t\turl: ajaxLocation,\r\n\t\ttype: \"GET\",\r\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\r\n\t\tglobal: true,\r\n\t\tprocessData: true,\r\n\t\tasync: true,\r\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n\t\t/*\r\n\t\ttimeout: 0,\r\n\t\tdata: null,\r\n\t\tdataType: null,\r\n\t\tusername: null,\r\n\t\tpassword: null,\r\n\t\tcache: null,\r\n\t\tthrows: false,\r\n\t\ttraditional: false,\r\n\t\theaders: {},\r\n\t\t*/\r\n\r\n\t\taccepts: {\r\n\t\t\t\"*\": allTypes,\r\n\t\t\ttext: \"text/plain\",\r\n\t\t\thtml: \"text/html\",\r\n\t\t\txml: \"application/xml, text/xml\",\r\n\t\t\tjson: \"application/json, text/javascript\"\r\n\t\t},\r\n\r\n\t\tcontents: {\r\n\t\t\txml: /xml/,\r\n\t\t\thtml: /html/,\r\n\t\t\tjson: /json/\r\n\t\t},\r\n\r\n\t\tresponseFields: {\r\n\t\t\txml: \"responseXML\",\r\n\t\t\ttext: \"responseText\"\r\n\t\t},\r\n\r\n\t\t// Data converters\r\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\r\n\t\tconverters: {\r\n\r\n\t\t\t// Convert anything to text\r\n\t\t\t\"* text\": window.String,\r\n\r\n\t\t\t// Text to html (true = no transformation)\r\n\t\t\t\"text html\": true,\r\n\r\n\t\t\t// Evaluate text as a json expression\r\n\t\t\t\"text json\": jQuery.parseJSON,\r\n\r\n\t\t\t// Parse text as xml\r\n\t\t\t\"text xml\": jQuery.parseXML\r\n\t\t},\r\n\r\n\t\t// For options that shouldn't be deep extended:\r\n\t\t// you can add your own custom options here if\r\n\t\t// and when you create one that shouldn't be\r\n\t\t// deep extended (see ajaxExtend)\r\n\t\tflatOptions: {\r\n\t\t\turl: true,\r\n\t\t\tcontext: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Creates a full fledged settings object into target\r\n\t// with both ajaxSettings and settings fields.\r\n\t// If target is omitted, writes into ajaxSettings.\r\n\tajaxSetup: function( target, settings ) {\r\n\t\treturn settings ?\r\n\r\n\t\t\t// Building a settings object\r\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\r\n\r\n\t\t\t// Extending ajaxSettings\r\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\r\n\t},\r\n\r\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\r\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\r\n\r\n\t// Main method\r\n\tajax: function( url, options ) {\r\n\r\n\t\t// If url is an object, simulate pre-1.5 signature\r\n\t\tif ( typeof url === \"object\" ) {\r\n\t\t\toptions = url;\r\n\t\t\turl = undefined;\r\n\t\t}\r\n\r\n\t\t// Force options to be an object\r\n\t\toptions = options || {};\r\n\r\n\t\tvar // Cross-domain detection vars\r\n\t\t\tparts,\r\n\t\t\t// Loop variable\r\n\t\t\ti,\r\n\t\t\t// URL without anti-cache param\r\n\t\t\tcacheURL,\r\n\t\t\t// Response headers as string\r\n\t\t\tresponseHeadersString,\r\n\t\t\t// timeout handle\r\n\t\t\ttimeoutTimer,\r\n\r\n\t\t\t// To know if global events are to be dispatched\r\n\t\t\tfireGlobals,\r\n\r\n\t\t\ttransport,\r\n\t\t\t// Response headers\r\n\t\t\tresponseHeaders,\r\n\t\t\t// Create the final options object\r\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\r\n\t\t\t// Callbacks context\r\n\t\t\tcallbackContext = s.context || s,\r\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\r\n\t\t\tglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?\r\n\t\t\t\tjQuery( callbackContext ) :\r\n\t\t\t\tjQuery.event,\r\n\t\t\t// Deferreds\r\n\t\t\tdeferred = jQuery.Deferred(),\r\n\t\t\tcompleteDeferred = jQuery.Callbacks(\"once memory\"),\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tstatusCode = s.statusCode || {},\r\n\t\t\t// Headers (they are sent all at once)\r\n\t\t\trequestHeaders = {},\r\n\t\t\trequestHeadersNames = {},\r\n\t\t\t// The jqXHR state\r\n\t\t\tstate = 0,\r\n\t\t\t// Default abort message\r\n\t\t\tstrAbort = \"canceled\",\r\n\t\t\t// Fake xhr\r\n\t\t\tjqXHR = {\r\n\t\t\t\treadyState: 0,\r\n\r\n\t\t\t\t// Builds headers hashtable if needed\r\n\t\t\t\tgetResponseHeader: function( key ) {\r\n\t\t\t\t\tvar match;\r\n\t\t\t\t\tif ( state === 2 ) {\r\n\t\t\t\t\t\tif ( !responseHeaders ) {\r\n\t\t\t\t\t\t\tresponseHeaders = {};\r\n\t\t\t\t\t\t\twhile ( (match = rheaders.exec( responseHeadersString )) ) {\r\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn match == null ? null : match;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Raw string\r\n\t\t\t\tgetAllResponseHeaders: function() {\r\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Caches the header\r\n\t\t\t\tsetRequestHeader: function( name, value ) {\r\n\t\t\t\t\tvar lname = name.toLowerCase();\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\r\n\t\t\t\t\t\trequestHeaders[ name ] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Overrides response content-type header\r\n\t\t\t\toverrideMimeType: function( type ) {\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\ts.mimeType = type;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Status-dependent callbacks\r\n\t\t\t\tstatusCode: function( map ) {\r\n\t\t\t\t\tvar code;\r\n\t\t\t\t\tif ( map ) {\r\n\t\t\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\t\t\tfor ( code in map ) {\r\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\r\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\r\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Cancel the request\r\n\t\t\t\tabort: function( statusText ) {\r\n\t\t\t\t\tvar finalText = statusText || strAbort;\r\n\t\t\t\t\tif ( transport ) {\r\n\t\t\t\t\t\ttransport.abort( finalText );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdone( 0, finalText );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t// Attach deferreds\r\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\r\n\t\tjqXHR.success = jqXHR.done;\r\n\t\tjqXHR.error = jqXHR.fail;\r\n\r\n\t\t// Remove hash character (#7531: and string promotion)\r\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\r\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\r\n\t\t// We also use the url parameter if available\r\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\r\n\r\n\t\t// Alias method option to type as per ticket #12004\r\n\t\ts.type = options.method || options.type || s.method || s.type;\r\n\r\n\t\t// Extract dataTypes list\r\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( core_rnotwhite ) || [\"\"];\r\n\r\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\r\n\t\tif ( s.crossDomain == null ) {\r\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\r\n\t\t\ts.crossDomain = !!( parts &&\r\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\r\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? 80 : 443 ) ) !=\r\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? 80 : 443 ) ) )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Convert data if not already a string\r\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\r\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\r\n\t\t}\r\n\r\n\t\t// Apply prefilters\r\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\r\n\r\n\t\t// If request was aborted inside a prefilter, stop there\r\n\t\tif ( state === 2 ) {\r\n\t\t\treturn jqXHR;\r\n\t\t}\r\n\r\n\t\t// We can fire global events as of now if asked to\r\n\t\tfireGlobals = s.global;\r\n\r\n\t\t// Watch for a new set of requests\r\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\r\n\t\t\tjQuery.event.trigger(\"ajaxStart\");\r\n\t\t}\r\n\r\n\t\t// Uppercase the type\r\n\t\ts.type = s.type.toUpperCase();\r\n\r\n\t\t// Determine if request has content\r\n\t\ts.hasContent = !rnoContent.test( s.type );\r\n\r\n\t\t// Save the URL in case we're toying with the If-Modified-Since\r\n\t\t// and/or If-None-Match header later on\r\n\t\tcacheURL = s.url;\r\n\r\n\t\t// More options handling for requests with no content\r\n\t\tif ( !s.hasContent ) {\r\n\r\n\t\t\t// If data is available, append data to url\r\n\t\t\tif ( s.data ) {\r\n\t\t\t\tcacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\r\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\r\n\t\t\t\tdelete s.data;\r\n\t\t\t}\r\n\r\n\t\t\t// Add anti-cache in url if needed\r\n\t\t\tif ( s.cache === false ) {\r\n\t\t\t\ts.url = rts.test( cacheURL ) ?\r\n\r\n\t\t\t\t\t// If there is already a '_' parameter, set its value\r\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + ajax_nonce++ ) :\r\n\r\n\t\t\t\t\t// Otherwise add one to the end\r\n\t\t\t\t\tcacheURL + ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ajax_nonce++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\tif ( s.ifModified ) {\r\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\r\n\t\t\t}\r\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the correct header, if data is being sent\r\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\r\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\r\n\t\t}\r\n\r\n\t\t// Set the Accepts header for the server, depending on the dataType\r\n\t\tjqXHR.setRequestHeader(\r\n\t\t\t\"Accept\",\r\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\r\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\r\n\t\t\t\ts.accepts[ \"*\" ]\r\n\t\t);\r\n\r\n\t\t// Check for headers option\r\n\t\tfor ( i in s.headers ) {\r\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\r\n\t\t}\r\n\r\n\t\t// Allow custom headers/mimetypes and early abort\r\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\r\n\t\t\t// Abort if not done already and return\r\n\t\t\treturn jqXHR.abort();\r\n\t\t}\r\n\r\n\t\t// aborting is no longer a cancellation\r\n\t\tstrAbort = \"abort\";\r\n\r\n\t\t// Install callbacks on deferreds\r\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\r\n\t\t\tjqXHR[ i ]( s[ i ] );\r\n\t\t}\r\n\r\n\t\t// Get transport\r\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\r\n\r\n\t\t// If no transport, we auto-abort\r\n\t\tif ( !transport ) {\r\n\t\t\tdone( -1, \"No Transport\" );\r\n\t\t} else {\r\n\t\t\tjqXHR.readyState = 1;\r\n\r\n\t\t\t// Send global event\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\r\n\t\t\t}\r\n\t\t\t// Timeout\r\n\t\t\tif ( s.async && s.timeout > 0 ) {\r\n\t\t\t\ttimeoutTimer = setTimeout(function() {\r\n\t\t\t\t\tjqXHR.abort(\"timeout\");\r\n\t\t\t\t}, s.timeout );\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstate = 1;\r\n\t\t\t\ttransport.send( requestHeaders, done );\r\n\t\t\t} catch ( e ) {\r\n\t\t\t\t// Propagate exception as error if not done\r\n\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\tdone( -1, e );\r\n\t\t\t\t// Simply rethrow otherwise\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Callback for when everything is done\r\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\r\n\t\t\tvar isSuccess, success, error, response, modified,\r\n\t\t\t\tstatusText = nativeStatusText;\r\n\r\n\t\t\t// Called once\r\n\t\t\tif ( state === 2 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// State is \"done\" now\r\n\t\t\tstate = 2;\r\n\r\n\t\t\t// Clear timeout if it exists\r\n\t\t\tif ( timeoutTimer ) {\r\n\t\t\t\tclearTimeout( timeoutTimer );\r\n\t\t\t}\r\n\r\n\t\t\t// Dereference transport for early garbage collection\r\n\t\t\t// (no matter how long the jqXHR object will be used)\r\n\t\t\ttransport = undefined;\r\n\r\n\t\t\t// Cache response headers\r\n\t\t\tresponseHeadersString = headers || \"\";\r\n\r\n\t\t\t// Set readyState\r\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\r\n\r\n\t\t\t// Get response data\r\n\t\t\tif ( responses ) {\r\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\r\n\t\t\t}\r\n\r\n\t\t\t// If successful, handle type chaining\r\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\r\n\r\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\t\t\tif ( s.ifModified ) {\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"Last-Modified\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"etag\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if no content\r\n\t\t\t\tif ( status === 204 ) {\r\n\t\t\t\t\tisSuccess = true;\r\n\t\t\t\t\tstatusText = \"nocontent\";\r\n\r\n\t\t\t\t// if not modified\r\n\t\t\t\t} else if ( status === 304 ) {\r\n\t\t\t\t\tisSuccess = true;\r\n\t\t\t\t\tstatusText = \"notmodified\";\r\n\r\n\t\t\t\t// If we have data, let's convert it\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisSuccess = ajaxConvert( s, response );\r\n\t\t\t\t\tstatusText = isSuccess.state;\r\n\t\t\t\t\tsuccess = isSuccess.data;\r\n\t\t\t\t\terror = isSuccess.error;\r\n\t\t\t\t\tisSuccess = !error;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// We extract error from statusText\r\n\t\t\t\t// then normalize statusText and status for non-aborts\r\n\t\t\t\terror = statusText;\r\n\t\t\t\tif ( status || !statusText ) {\r\n\t\t\t\t\tstatusText = \"error\";\r\n\t\t\t\t\tif ( status < 0 ) {\r\n\t\t\t\t\t\tstatus = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set data for the fake xhr object\r\n\t\t\tjqXHR.status = status;\r\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\r\n\r\n\t\t\t// Success/Error\r\n\t\t\tif ( isSuccess ) {\r\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tjqXHR.statusCode( statusCode );\r\n\t\t\tstatusCode = undefined;\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\r\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Complete\r\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\r\n\t\t\t\t// Handle the global AJAX counter\r\n\t\t\t\tif ( !( --jQuery.active ) ) {\r\n\t\t\t\t\tjQuery.event.trigger(\"ajaxStop\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn jqXHR;\r\n\t},\r\n\r\n\tgetScript: function( url, callback ) {\r\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\r\n\t},\r\n\r\n\tgetJSON: function( url, data, callback ) {\r\n\t\treturn jQuery.get( url, data, callback, \"json\" );\r\n\t}\r\n});\r\n\r\n/* Handles responses to an ajax request:\r\n * - sets all responseXXX fields accordingly\r\n * - finds the right dataType (mediates between content-type and expected dataType)\r\n * - returns the corresponding response\r\n */\r\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes,\r\n\t\tresponseFields = s.responseFields;\r\n\r\n\t// Fill responseXXX fields\r\n\tfor ( type in responseFields ) {\r\n\t\tif ( type in responses ) {\r\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}\r\n\r\n// Chain conversions given the request and the original response\r\nfunction ajaxConvert( s, response ) {\r\n\tvar conv2, current, conv, tmp,\r\n\t\tconverters = {},\r\n\t\ti = 0,\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice(),\r\n\t\tprev = dataTypes[ 0 ];\r\n\r\n\t// Apply the dataFilter if provided\r\n\tif ( s.dataFilter ) {\r\n\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t}\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Convert to each sequential dataType, tolerating list modification\r\n\tfor ( ; (current = dataTypes[++i]); ) {\r\n\r\n\t\t// There's only work to do if current dataType is non-auto\r\n\t\tif ( current !== \"*\" ) {\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\tif ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split(\" \");\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.splice( i--, 0, current );\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s[\"throws\"] ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Update prev for next iteration\r\n\t\t\tprev = current;\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}\r\n// Install script dataType\r\njQuery.ajaxSetup({\r\n\taccepts: {\r\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\r\n\t},\r\n\tcontents: {\r\n\t\tscript: /(?:java|ecma)script/\r\n\t},\r\n\tconverters: {\r\n\t\t\"text script\": function( text ) {\r\n\t\t\tjQuery.globalEval( text );\r\n\t\t\treturn text;\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Handle cache's special case and global\r\njQuery.ajaxPrefilter( \"script\", function( s ) {\r\n\tif ( s.cache === undefined ) {\r\n\t\ts.cache = false;\r\n\t}\r\n\tif ( s.crossDomain ) {\r\n\t\ts.type = \"GET\";\r\n\t\ts.global = false;\r\n\t}\r\n});\r\n\r\n// Bind script tag hack transport\r\njQuery.ajaxTransport( \"script\", function(s) {\r\n\r\n\t// This transport only deals with cross domain requests\r\n\tif ( s.crossDomain ) {\r\n\r\n\t\tvar script,\r\n\t\t\thead = document.head || jQuery(\"head\")[0] || document.documentElement;\r\n\r\n\t\treturn {\r\n\r\n\t\t\tsend: function( _, callback ) {\r\n\r\n\t\t\t\tscript = document.createElement(\"script\");\r\n\r\n\t\t\t\tscript.async = true;\r\n\r\n\t\t\t\tif ( s.scriptCharset ) {\r\n\t\t\t\t\tscript.charset = s.scriptCharset;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscript.src = s.url;\r\n\r\n\t\t\t\t// Attach handlers for all browsers\r\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\r\n\r\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\r\n\r\n\t\t\t\t\t\t// Handle memory leak in IE\r\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\r\n\r\n\t\t\t\t\t\t// Remove the script\r\n\t\t\t\t\t\tif ( script.parentNode ) {\r\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Dereference the script\r\n\t\t\t\t\t\tscript = null;\r\n\r\n\t\t\t\t\t\t// Callback if not abort\r\n\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\r\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\r\n\t\t\t\thead.insertBefore( script, head.firstChild );\r\n\t\t\t},\r\n\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( script ) {\r\n\t\t\t\t\tscript.onload( undefined, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n});\r\nvar oldCallbacks = [],\r\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\r\n\r\n// Default jsonp settings\r\njQuery.ajaxSetup({\r\n\tjsonp: \"callback\",\r\n\tjsonpCallback: function() {\r\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( ajax_nonce++ ) );\r\n\t\tthis[ callback ] = true;\r\n\t\treturn callback;\r\n\t}\r\n});\r\n\r\n// Detect, normalize options and install callbacks for jsonp requests\r\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\r\n\r\n\tvar callbackName, overwritten, responseContainer,\r\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\r\n\t\t\t\"url\" :\r\n\t\t\ttypeof s.data === \"string\" && !( s.contentType || \"\" ).indexOf(\"application/x-www-form-urlencoded\") && rjsonp.test( s.data ) && \"data\"\r\n\t\t);\r\n\r\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\r\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\r\n\r\n\t\t// Get callback name, remembering preexisting value associated with it\r\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\r\n\t\t\ts.jsonpCallback() :\r\n\t\t\ts.jsonpCallback;\r\n\r\n\t\t// Insert callback into url or form data\r\n\t\tif ( jsonProp ) {\r\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\r\n\t\t} else if ( s.jsonp !== false ) {\r\n\t\t\ts.url += ( ajax_rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\r\n\t\t}\r\n\r\n\t\t// Use data converter to retrieve json after script execution\r\n\t\ts.converters[\"script json\"] = function() {\r\n\t\t\tif ( !responseContainer ) {\r\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\r\n\t\t\t}\r\n\t\t\treturn responseContainer[ 0 ];\r\n\t\t};\r\n\r\n\t\t// force json dataType\r\n\t\ts.dataTypes[ 0 ] = \"json\";\r\n\r\n\t\t// Install callback\r\n\t\toverwritten = window[ callbackName ];\r\n\t\twindow[ callbackName ] = function() {\r\n\t\t\tresponseContainer = arguments;\r\n\t\t};\r\n\r\n\t\t// Clean-up function (fires after converters)\r\n\t\tjqXHR.always(function() {\r\n\t\t\t// Restore preexisting value\r\n\t\t\twindow[ callbackName ] = overwritten;\r\n\r\n\t\t\t// Save back as free\r\n\t\t\tif ( s[ callbackName ] ) {\r\n\t\t\t\t// make sure that re-using the options doesn't screw things around\r\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\r\n\r\n\t\t\t\t// save the callback name for future use\r\n\t\t\t\toldCallbacks.push( callbackName );\r\n\t\t\t}\r\n\r\n\t\t\t// Call if it was a function and we have a response\r\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\r\n\t\t\t\toverwritten( responseContainer[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\tresponseContainer = overwritten = undefined;\r\n\t\t});\r\n\r\n\t\t// Delegate to script\r\n\t\treturn \"script\";\r\n\t}\r\n});\r\nvar xhrCallbacks, xhrSupported,\r\n\txhrId = 0,\r\n\t// #5280: Internet Explorer will keep connections alive if we don't abort on unload\r\n\txhrOnUnloadAbort = window.ActiveXObject && function() {\r\n\t\t// Abort all pending requests\r\n\t\tvar key;\r\n\t\tfor ( key in xhrCallbacks ) {\r\n\t\t\txhrCallbacks[ key ]( undefined, true );\r\n\t\t}\r\n\t};\r\n\r\n// Functions to create xhrs\r\nfunction createStandardXHR() {\r\n\ttry {\r\n\t\treturn new window.XMLHttpRequest();\r\n\t} catch( e ) {}\r\n}\r\n\r\nfunction createActiveXHR() {\r\n\ttry {\r\n\t\treturn new window.ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t} catch( e ) {}\r\n}\r\n\r\n// Create the request object\r\n// (This is still attached to ajaxSettings for backward compatibility)\r\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\r\n\t/* Microsoft failed to properly\r\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\r\n\t * so we use the ActiveXObject when it is available\r\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\r\n\t * we need a fallback.\r\n\t */\r\n\tfunction() {\r\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\r\n\t} :\r\n\t// For all other browsers, use the standard XMLHttpRequest object\r\n\tcreateStandardXHR;\r\n\r\n// Determine support properties\r\nxhrSupported = jQuery.ajaxSettings.xhr();\r\njQuery.support.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\r\nxhrSupported = jQuery.support.ajax = !!xhrSupported;\r\n\r\n// Create transport if the browser can provide an xhr\r\nif ( xhrSupported ) {\r\n\r\n\tjQuery.ajaxTransport(function( s ) {\r\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\r\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\r\n\r\n\t\t\tvar callback;\r\n\r\n\t\t\treturn {\r\n\t\t\t\tsend: function( headers, complete ) {\r\n\r\n\t\t\t\t\t// Get a new xhr\r\n\t\t\t\t\tvar handle, i,\r\n\t\t\t\t\t\txhr = s.xhr();\r\n\r\n\t\t\t\t\t// Open the socket\r\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\r\n\t\t\t\t\tif ( s.username ) {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Apply custom fields if provided\r\n\t\t\t\t\tif ( s.xhrFields ) {\r\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\r\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Override mime type if needed\r\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\r\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// X-Requested-With header\r\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\r\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\r\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\r\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\r\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\r\n\t\t\t\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfor ( i in headers ) {\r\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch( err ) {}\r\n\r\n\t\t\t\t\t// Do send the request\r\n\t\t\t\t\t// This may raise an exception which is actually\r\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\r\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\r\n\r\n\t\t\t\t\t// Listener\r\n\t\t\t\t\tcallback = function( _, isAbort ) {\r\n\t\t\t\t\t\tvar status, responseHeaders, statusText, responses;\r\n\r\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\r\n\t\t\t\t\t\t// of an xhr when a network error occurred\r\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\r\n\t\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\r\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\r\n\r\n\t\t\t\t\t\t\t\t// Only called once\r\n\t\t\t\t\t\t\t\tcallback = undefined;\r\n\r\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\r\n\t\t\t\t\t\t\t\tif ( handle ) {\r\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\r\n\t\t\t\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// If it's an abort\r\n\t\t\t\t\t\t\t\tif ( isAbort ) {\r\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\r\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\r\n\t\t\t\t\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tresponses = {};\r\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\r\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\r\n\r\n\t\t\t\t\t\t\t\t\t// When requesting binary data, IE6-9 will throw an exception\r\n\t\t\t\t\t\t\t\t\t// on any attempt to access responseText (#11426)\r\n\t\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\r\n\t\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\r\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\r\n\t\t\t\t\t\t\t\t\t} catch( e ) {\r\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\r\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\r\n\r\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\r\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\r\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\r\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\r\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\r\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\r\n\t\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Call complete if needed\r\n\t\t\t\t\t\tif ( responses ) {\r\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif ( !s.async ) {\r\n\t\t\t\t\t\t// if we're in sync mode we fire the callback\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\r\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\r\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\r\n\t\t\t\t\t\tsetTimeout( callback );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thandle = ++xhrId;\r\n\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\r\n\t\t\t\t\t\t\t// and attach the unload handler\r\n\t\t\t\t\t\t\tif ( !xhrCallbacks ) {\r\n\t\t\t\t\t\t\t\txhrCallbacks = {};\r\n\t\t\t\t\t\t\t\tjQuery( window ).unload( xhrOnUnloadAbort );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Add to list of active xhrs callbacks\r\n\t\t\t\t\t\t\txhrCallbacks[ handle ] = callback;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\txhr.onreadystatechange = callback;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tabort: function() {\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tcallback( undefined, true );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t});\r\n}\r\nvar fxNow, timerId,\r\n\trfxtypes = /^(?:toggle|show|hide)$/,\r\n\trfxnum = new RegExp( \"^(?:([+-])=|)(\" + core_pnum + \")([a-z%]*)$\", \"i\" ),\r\n\trrun = /queueHooks$/,\r\n\tanimationPrefilters = [ defaultPrefilter ],\r\n\ttweeners = {\r\n\t\t\"*\": [function( prop, value ) {\r\n\t\t\tvar end, unit,\r\n\t\t\t\ttween = this.createTween( prop, value ),\r\n\t\t\t\tparts = rfxnum.exec( value ),\r\n\t\t\t\ttarget = tween.cur(),\r\n\t\t\t\tstart = +target || 0,\r\n\t\t\t\tscale = 1,\r\n\t\t\t\tmaxIterations = 20;\r\n\r\n\t\t\tif ( parts ) {\r\n\t\t\t\tend = +parts[2];\r\n\t\t\t\tunit = parts[3] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\r\n\t\t\t\t// We need to compute starting value\r\n\t\t\t\tif ( unit !== \"px\" && start ) {\r\n\t\t\t\t\t// Iteratively approximate from a nonzero starting point\r\n\t\t\t\t\t// Prefer the current property, because this process will be trivial if it uses the same units\r\n\t\t\t\t\t// Fallback to end or a simple constant\r\n\t\t\t\t\tstart = jQuery.css( tween.elem, prop, true ) || end || 1;\r\n\r\n\t\t\t\t\tdo {\r\n\t\t\t\t\t\t// If previous iteration zeroed out, double until we get *something*\r\n\t\t\t\t\t\t// Use a string for doubling factor so we don't accidentally see scale as unchanged below\r\n\t\t\t\t\t\tscale = scale || \".5\";\r\n\r\n\t\t\t\t\t\t// Adjust and apply\r\n\t\t\t\t\t\tstart = start / scale;\r\n\t\t\t\t\t\tjQuery.style( tween.elem, prop, start + unit );\r\n\r\n\t\t\t\t\t// Update scale, tolerating zero or NaN from tween.cur()\r\n\t\t\t\t\t// And breaking the loop if scale is unchanged or perfect, or if we've just had enough\r\n\t\t\t\t\t} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttween.unit = unit;\r\n\t\t\t\ttween.start = start;\r\n\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\r\n\t\t\t\ttween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;\r\n\t\t\t}\r\n\t\t\treturn tween;\r\n\t\t}]\r\n\t};\r\n\r\n// Animations created synchronously will run synchronously\r\nfunction createFxNow() {\r\n\tsetTimeout(function() {\r\n\t\tfxNow = undefined;\r\n\t});\r\n\treturn ( fxNow = jQuery.now() );\r\n}\r\n\r\nfunction createTweens( animation, props ) {\r\n\tjQuery.each( props, function( prop, value ) {\r\n\t\tvar collection = ( tweeners[ prop ] || [] ).concat( tweeners[ \"*\" ] ),\r\n\t\t\tindex = 0,\r\n\t\t\tlength = collection.length;\r\n\t\tfor ( ; index < length; index++ ) {\r\n\t\t\tif ( collection[ index ].call( animation, prop, value ) ) {\r\n\r\n\t\t\t\t// we're done with this property\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction Animation( elem, properties, options ) {\r\n\tvar result,\r\n\t\tstopped,\r\n\t\tindex = 0,\r\n\t\tlength = animationPrefilters.length,\r\n\t\tdeferred = jQuery.Deferred().always( function() {\r\n\t\t\t// don't match elem in the :animated selector\r\n\t\t\tdelete tick.elem;\r\n\t\t}),\r\n\t\ttick = function() {\r\n\t\t\tif ( stopped ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar currentTime = fxNow || createFxNow(),\r\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\r\n\t\t\t\t// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)\r\n\t\t\t\ttemp = remaining / animation.duration || 0,\r\n\t\t\t\tpercent = 1 - temp,\r\n\t\t\t\tindex = 0,\r\n\t\t\t\tlength = animation.tweens.length;\r\n\r\n\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\tanimation.tweens[ index ].run( percent );\r\n\t\t\t}\r\n\r\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ]);\r\n\r\n\t\t\tif ( percent < 1 && length ) {\r\n\t\t\t\treturn remaining;\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\tanimation = deferred.promise({\r\n\t\t\telem: elem,\r\n\t\t\tprops: jQuery.extend( {}, properties ),\r\n\t\t\topts: jQuery.extend( true, { specialEasing: {} }, options ),\r\n\t\t\toriginalProperties: properties,\r\n\t\t\toriginalOptions: options,\r\n\t\t\tstartTime: fxNow || createFxNow(),\r\n\t\t\tduration: options.duration,\r\n\t\t\ttweens: [],\r\n\t\t\tcreateTween: function( prop, end ) {\r\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\r\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\r\n\t\t\t\tanimation.tweens.push( tween );\r\n\t\t\t\treturn tween;\r\n\t\t\t},\r\n\t\t\tstop: function( gotoEnd ) {\r\n\t\t\t\tvar index = 0,\r\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\r\n\t\t\t\t\t// otherwise we skip this part\r\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\r\n\t\t\t\tif ( stopped ) {\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t\tstopped = true;\r\n\t\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// resolve when we played the last frame\r\n\t\t\t\t// otherwise, reject\r\n\t\t\t\tif ( gotoEnd ) {\r\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}),\r\n\t\tprops = animation.props;\r\n\r\n\tpropFilter( props, animation.opts.specialEasing );\r\n\r\n\tfor ( ; index < length ; index++ ) {\r\n\t\tresult = animationPrefilters[ index ].call( animation, elem, props, animation.opts );\r\n\t\tif ( result ) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\tcreateTweens( animation, props );\r\n\r\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\r\n\t\tanimation.opts.start.call( elem, animation );\r\n\t}\r\n\r\n\tjQuery.fx.timer(\r\n\t\tjQuery.extend( tick, {\r\n\t\t\telem: elem,\r\n\t\t\tanim: animation,\r\n\t\t\tqueue: animation.opts.queue\r\n\t\t})\r\n\t);\r\n\r\n\t// attach callbacks from options\r\n\treturn animation.progress( animation.opts.progress )\r\n\t\t.done( animation.opts.done, animation.opts.complete )\r\n\t\t.fail( animation.opts.fail )\r\n\t\t.always( animation.opts.always );\r\n}\r\n\r\nfunction propFilter( props, specialEasing ) {\r\n\tvar value, name, index, easing, hooks;\r\n\r\n\t// camelCase, specialEasing and expand cssHook pass\r\n\tfor ( index in props ) {\r\n\t\tname = jQuery.camelCase( index );\r\n\t\teasing = specialEasing[ name ];\r\n\t\tvalue = props[ index ];\r\n\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\teasing = value[ 1 ];\r\n\t\t\tvalue = props[ index ] = value[ 0 ];\r\n\t\t}\r\n\r\n\t\tif ( index !== name ) {\r\n\t\t\tprops[ name ] = value;\r\n\t\t\tdelete props[ index ];\r\n\t\t}\r\n\r\n\t\thooks = jQuery.cssHooks[ name ];\r\n\t\tif ( hooks && \"expand\" in hooks ) {\r\n\t\t\tvalue = hooks.expand( value );\r\n\t\t\tdelete props[ name ];\r\n\r\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\r\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\r\n\t\t\tfor ( index in value ) {\r\n\t\t\t\tif ( !( index in props ) ) {\r\n\t\t\t\t\tprops[ index ] = value[ index ];\r\n\t\t\t\t\tspecialEasing[ index ] = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tspecialEasing[ name ] = easing;\r\n\t\t}\r\n\t}\r\n}\r\n\r\njQuery.Animation = jQuery.extend( Animation, {\r\n\r\n\ttweener: function( props, callback ) {\r\n\t\tif ( jQuery.isFunction( props ) ) {\r\n\t\t\tcallback = props;\r\n\t\t\tprops = [ \"*\" ];\r\n\t\t} else {\r\n\t\t\tprops = props.split(\" \");\r\n\t\t}\r\n\r\n\t\tvar prop,\r\n\t\t\tindex = 0,\r\n\t\t\tlength = props.length;\r\n\r\n\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\tprop = props[ index ];\r\n\t\t\ttweeners[ prop ] = tweeners[ prop ] || [];\r\n\t\t\ttweeners[ prop ].unshift( callback );\r\n\t\t}\r\n\t},\r\n\r\n\tprefilter: function( callback, prepend ) {\r\n\t\tif ( prepend ) {\r\n\t\t\tanimationPrefilters.unshift( callback );\r\n\t\t} else {\r\n\t\t\tanimationPrefilters.push( callback );\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction defaultPrefilter( elem, props, opts ) {\r\n\t/*jshint validthis:true */\r\n\tvar prop, index, length,\r\n\t\tvalue, dataShow, toggle,\r\n\t\ttween, hooks, oldfire,\r\n\t\tanim = this,\r\n\t\tstyle = elem.style,\r\n\t\torig = {},\r\n\t\thandled = [],\r\n\t\thidden = elem.nodeType && isHidden( elem );\r\n\r\n\t// handle queue: false promises\r\n\tif ( !opts.queue ) {\r\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\r\n\t\tif ( hooks.unqueued == null ) {\r\n\t\t\thooks.unqueued = 0;\r\n\t\t\toldfire = hooks.empty.fire;\r\n\t\t\thooks.empty.fire = function() {\r\n\t\t\t\tif ( !hooks.unqueued ) {\r\n\t\t\t\t\toldfire();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\thooks.unqueued++;\r\n\r\n\t\tanim.always(function() {\r\n\t\t\t// doing this makes sure that the complete handler will be called\r\n\t\t\t// before this completes\r\n\t\t\tanim.always(function() {\r\n\t\t\t\thooks.unqueued--;\r\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\r\n\t\t\t\t\thooks.empty.fire();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t// height/width overflow pass\r\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\r\n\t\t// Make sure that nothing sneaks out\r\n\t\t// Record all 3 overflow attributes because IE does not\r\n\t\t// change the overflow attribute when overflowX and\r\n\t\t// overflowY are set to the same value\r\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\r\n\r\n\t\t// Set display property to inline-block for height/width\r\n\t\t// animations on inline elements that are having width/height animated\r\n\t\tif ( jQuery.css( elem, \"display\" ) === \"inline\" &&\r\n\t\t\t\tjQuery.css( elem, \"float\" ) === \"none\" ) {\r\n\r\n\t\t\t// inline-level elements accept inline-block;\r\n\t\t\t// block-level elements need to be inline with layout\r\n\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === \"inline\" ) {\r\n\t\t\t\tstyle.display = \"inline-block\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tstyle.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ( opts.overflow ) {\r\n\t\tstyle.overflow = \"hidden\";\r\n\t\tif ( !jQuery.support.shrinkWrapBlocks ) {\r\n\t\t\tanim.always(function() {\r\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\r\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\r\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// show/hide pass\r\n\tfor ( index in props ) {\r\n\t\tvalue = props[ index ];\r\n\t\tif ( rfxtypes.exec( value ) ) {\r\n\t\t\tdelete props[ index ];\r\n\t\t\ttoggle = toggle || value === \"toggle\";\r\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\thandled.push( index );\r\n\t\t}\r\n\t}\r\n\r\n\tlength = handled.length;\r\n\tif ( length ) {\r\n\t\tdataShow = jQuery._data( elem, \"fxshow\" ) || jQuery._data( elem, \"fxshow\", {} );\r\n\t\tif ( \"hidden\" in dataShow ) {\r\n\t\t\thidden = dataShow.hidden;\r\n\t\t}\r\n\r\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\r\n\t\tif ( toggle ) {\r\n\t\t\tdataShow.hidden = !hidden;\r\n\t\t}\r\n\t\tif ( hidden ) {\r\n\t\t\tjQuery( elem ).show();\r\n\t\t} else {\r\n\t\t\tanim.done(function() {\r\n\t\t\t\tjQuery( elem ).hide();\r\n\t\t\t});\r\n\t\t}\r\n\t\tanim.done(function() {\r\n\t\t\tvar prop;\r\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\r\n\t\t\tfor ( prop in orig ) {\r\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\r\n\t\t\t}\r\n\t\t});\r\n\t\tfor ( index = 0 ; index < length ; index++ ) {\r\n\t\t\tprop = handled[ index ];\r\n\t\t\ttween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );\r\n\t\t\torig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );\r\n\r\n\t\t\tif ( !( prop in dataShow ) ) {\r\n\t\t\t\tdataShow[ prop ] = tween.start;\r\n\t\t\t\tif ( hidden ) {\r\n\t\t\t\t\ttween.end = tween.start;\r\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction Tween( elem, options, prop, end, easing ) {\r\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\r\n}\r\njQuery.Tween = Tween;\r\n\r\nTween.prototype = {\r\n\tconstructor: Tween,\r\n\tinit: function( elem, options, prop, end, easing, unit ) {\r\n\t\tthis.elem = elem;\r\n\t\tthis.prop = prop;\r\n\t\tthis.easing = easing || \"swing\";\r\n\t\tthis.options = options;\r\n\t\tthis.start = this.now = this.cur();\r\n\t\tthis.end = end;\r\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\t},\r\n\tcur: function() {\r\n\t\tvar hooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\treturn hooks && hooks.get ?\r\n\t\t\thooks.get( this ) :\r\n\t\t\tTween.propHooks._default.get( this );\r\n\t},\r\n\trun: function( percent ) {\r\n\t\tvar eased,\r\n\t\t\thooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\tif ( this.options.duration ) {\r\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\r\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.pos = eased = percent;\r\n\t\t}\r\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\r\n\r\n\t\tif ( this.options.step ) {\r\n\t\t\tthis.options.step.call( this.elem, this.now, this );\r\n\t\t}\r\n\r\n\t\tif ( hooks && hooks.set ) {\r\n\t\t\thooks.set( this );\r\n\t\t} else {\r\n\t\t\tTween.propHooks._default.set( this );\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n};\r\n\r\nTween.prototype.init.prototype = Tween.prototype;\r\n\r\nTween.propHooks = {\r\n\t_default: {\r\n\t\tget: function( tween ) {\r\n\t\t\tvar result;\r\n\r\n\t\t\tif ( tween.elem[ tween.prop ] != null &&\r\n\t\t\t\t(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {\r\n\t\t\t\treturn tween.elem[ tween.prop ];\r\n\t\t\t}\r\n\r\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\r\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\r\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\r\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\r\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\r\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\r\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\r\n\t\t},\r\n\t\tset: function( tween ) {\r\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\r\n\t\t\t// available and use plain properties where available\r\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\r\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\r\n\t\t\t} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {\r\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\r\n\t\t\t} else {\r\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// Remove in 2.0 - this supports IE8's panic based approach\r\n// to setting things on disconnected nodes\r\n\r\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\r\n\tset: function( tween ) {\r\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\r\n\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.each([ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\r\n\tvar cssFn = jQuery.fn[ name ];\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn speed == null || typeof speed === \"boolean\" ?\r\n\t\t\tcssFn.apply( this, arguments ) :\r\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.fn.extend({\r\n\tfadeTo: function( speed, to, easing, callback ) {\r\n\r\n\t\t// show any hidden elements after setting opacity to 0\r\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\r\n\r\n\t\t\t// animate to the value specified\r\n\t\t\t.end().animate({ opacity: to }, speed, easing, callback );\r\n\t},\r\n\tanimate: function( prop, speed, easing, callback ) {\r\n\t\tvar empty = jQuery.isEmptyObject( prop ),\r\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\r\n\t\t\tdoAnimation = function() {\r\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\r\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\r\n\t\t\t\tdoAnimation.finish = function() {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t};\r\n\t\t\t\t// Empty animations, or finishing resolves immediately\r\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tdoAnimation.finish = doAnimation;\r\n\r\n\t\treturn empty || optall.queue === false ?\r\n\t\t\tthis.each( doAnimation ) :\r\n\t\t\tthis.queue( optall.queue, doAnimation );\r\n\t},\r\n\tstop: function( type, clearQueue, gotoEnd ) {\r\n\t\tvar stopQueue = function( hooks ) {\r\n\t\t\tvar stop = hooks.stop;\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tstop( gotoEnd );\r\n\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tgotoEnd = clearQueue;\r\n\t\t\tclearQueue = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\tif ( clearQueue && type !== false ) {\r\n\t\t\tthis.queue( type || \"fx\", [] );\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar dequeue = true,\r\n\t\t\t\tindex = type != null && type + \"queueHooks\",\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tdata = jQuery._data( this );\r\n\r\n\t\t\tif ( index ) {\r\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\r\n\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( index in data ) {\r\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\r\n\t\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\r\n\t\t\t\t\tdequeue = false;\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// start the next in the queue if the last step wasn't forced\r\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\r\n\t\t\t// but only if they were gotoEnd\r\n\t\t\tif ( dequeue || !gotoEnd ) {\r\n\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tfinish: function( type ) {\r\n\t\tif ( type !== false ) {\r\n\t\t\ttype = type || \"fx\";\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tvar index,\r\n\t\t\t\tdata = jQuery._data( this ),\r\n\t\t\t\tqueue = data[ type + \"queue\" ],\r\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tlength = queue ? queue.length : 0;\r\n\r\n\t\t\t// enable finishing flag on private data\r\n\t\t\tdata.finish = true;\r\n\r\n\t\t\t// empty the queue first\r\n\t\t\tjQuery.queue( this, type, [] );\r\n\r\n\t\t\tif ( hooks && hooks.cur && hooks.cur.finish ) {\r\n\t\t\t\thooks.cur.finish.call( this );\r\n\t\t\t}\r\n\r\n\t\t\t// look for any active animations, and finish them\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( true );\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// look for any animations in the old queue and finish them\r\n\t\t\tfor ( index = 0; index < length; index++ ) {\r\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\r\n\t\t\t\t\tqueue[ index ].finish.call( this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// turn off finishing flag\r\n\t\t\tdelete data.finish;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// Generate parameters to create a standard animation\r\nfunction genFx( type, includeWidth ) {\r\n\tvar which,\r\n\t\tattrs = { height: type },\r\n\t\ti = 0;\r\n\r\n\t// if we include width, step value is 1 to do all cssExpand values,\r\n\t// if we don't include width, step value is 2 to skip over Left and Right\r\n\tincludeWidth = includeWidth? 1 : 0;\r\n\tfor( ; i < 4 ; i += 2 - includeWidth ) {\r\n\t\twhich = cssExpand[ i ];\r\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\r\n\t}\r\n\r\n\tif ( includeWidth ) {\r\n\t\tattrs.opacity = attrs.width = type;\r\n\t}\r\n\r\n\treturn attrs;\r\n}\r\n\r\n// Generate shortcuts for custom animations\r\njQuery.each({\r\n\tslideDown: genFx(\"show\"),\r\n\tslideUp: genFx(\"hide\"),\r\n\tslideToggle: genFx(\"toggle\"),\r\n\tfadeIn: { opacity: \"show\" },\r\n\tfadeOut: { opacity: \"hide\" },\r\n\tfadeToggle: { opacity: \"toggle\" }\r\n}, function( name, props ) {\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn this.animate( props, speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.speed = function( speed, easing, fn ) {\r\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\r\n\t\tcomplete: fn || !fn && easing ||\r\n\t\t\tjQuery.isFunction( speed ) && speed,\r\n\t\tduration: speed,\r\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\r\n\t};\r\n\r\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\r\n\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\r\n\r\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\r\n\tif ( opt.queue == null || opt.queue === true ) {\r\n\t\topt.queue = \"fx\";\r\n\t}\r\n\r\n\t// Queueing\r\n\topt.old = opt.complete;\r\n\r\n\topt.complete = function() {\r\n\t\tif ( jQuery.isFunction( opt.old ) ) {\r\n\t\t\topt.old.call( this );\r\n\t\t}\r\n\r\n\t\tif ( opt.queue ) {\r\n\t\t\tjQuery.dequeue( this, opt.queue );\r\n\t\t}\r\n\t};\r\n\r\n\treturn opt;\r\n};\r\n\r\njQuery.easing = {\r\n\tlinear: function( p ) {\r\n\t\treturn p;\r\n\t},\r\n\tswing: function( p ) {\r\n\t\treturn 0.5 - Math.cos( p*Math.PI ) / 2;\r\n\t}\r\n};\r\n\r\njQuery.timers = [];\r\njQuery.fx = Tween.prototype.init;\r\njQuery.fx.tick = function() {\r\n\tvar timer,\r\n\t\ttimers = jQuery.timers,\r\n\t\ti = 0;\r\n\r\n\tfxNow = jQuery.now();\r\n\r\n\tfor ( ; i < timers.length; i++ ) {\r\n\t\ttimer = timers[ i ];\r\n\t\t// Checks the timer has not already been removed\r\n\t\tif ( !timer() && timers[ i ] === timer ) {\r\n\t\t\ttimers.splice( i--, 1 );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !timers.length ) {\r\n\t\tjQuery.fx.stop();\r\n\t}\r\n\tfxNow = undefined;\r\n};\r\n\r\njQuery.fx.timer = function( timer ) {\r\n\tif ( timer() && jQuery.timers.push( timer ) ) {\r\n\t\tjQuery.fx.start();\r\n\t}\r\n};\r\n\r\njQuery.fx.interval = 13;\r\n\r\njQuery.fx.start = function() {\r\n\tif ( !timerId ) {\r\n\t\ttimerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );\r\n\t}\r\n};\r\n\r\njQuery.fx.stop = function() {\r\n\tclearInterval( timerId );\r\n\ttimerId = null;\r\n};\r\n\r\njQuery.fx.speeds = {\r\n\tslow: 600,\r\n\tfast: 200,\r\n\t// Default speed\r\n\t_default: 400\r\n};\r\n\r\n// Back Compat <1.8 extension point\r\njQuery.fx.step = {};\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.animated = function( elem ) {\r\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\r\n\t\t\treturn elem === fn.elem;\r\n\t\t}).length;\r\n\t};\r\n}\r\njQuery.fn.offset = function( options ) {\r\n\tif ( arguments.length ) {\r\n\t\treturn options === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function( i ) {\r\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\r\n\t\t\t});\r\n\t}\r\n\r\n\tvar docElem, win,\r\n\t\tbox = { top: 0, left: 0 },\r\n\t\telem = this[ 0 ],\r\n\t\tdoc = elem && elem.ownerDocument;\r\n\r\n\tif ( !doc ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Make sure it's not a disconnected DOM node\r\n\tif ( !jQuery.contains( docElem, elem ) ) {\r\n\t\treturn box;\r\n\t}\r\n\r\n\t// If we don't have gBCR, just use 0,0 rather than error\r\n\t// BlackBerry 5, iOS 3 (original iPhone)\r\n\tif ( typeof elem.getBoundingClientRect !== core_strundefined ) {\r\n\t\tbox = elem.getBoundingClientRect();\r\n\t}\r\n\t// 解决transform下的offset问题(先恢复)\r\n\t// var el = elem,\r\n\t// offsetLeft = 0,\r\n\t// offsetTop = 0;\r\n\r\n\t// do{\r\n\t// \toffsetLeft += el.offsetLeft;\r\n\t// \toffsetTop += el.offsetTop;\r\n\t// \tel = el.offsetParent;\r\n\t// } while( el );\r\n\r\n\t// var elm = elem;\r\n\t// do{\r\n\t// \toffsetLeft -= elm.scrollLeft || 0;\r\n\t// \toffsetTop -= elm.scrollTop || 0;\r\n\t// \telm = elm.parentNode;\r\n\t// } while( elm );\r\n\twin = getWindow( doc );\r\n\treturn {\r\n\t\ttop: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),\r\n\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\r\n\t};\r\n};\r\n\r\njQuery.offset = {\r\n\r\n\tsetOffset: function( elem, options, i ) {\r\n\t\tvar position = jQuery.css( elem, \"position\" );\r\n\r\n\t\t// set position first, in-case top/left are set even on static elem\r\n\t\tif ( position === \"static\" ) {\r\n\t\t\telem.style.position = \"relative\";\r\n\t\t}\r\n\r\n\t\tvar curElem = jQuery( elem ),\r\n\t\t\tcurOffset = curElem.offset(),\r\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\r\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\r\n\t\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\r\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\r\n\r\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\r\n\t\tif ( calculatePosition ) {\r\n\t\t\tcurPosition = curElem.position();\r\n\t\t\tcurTop = curPosition.top;\r\n\t\t\tcurLeft = curPosition.left;\r\n\t\t} else {\r\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\r\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( options ) ) {\r\n\t\t\toptions = options.call( elem, i, curOffset );\r\n\t\t}\r\n\r\n\t\tif ( options.top != null ) {\r\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\r\n\t\t}\r\n\t\tif ( options.left != null ) {\r\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\r\n\t\t}\r\n\r\n\t\tif ( \"using\" in options ) {\r\n\t\t\toptions.using.call( elem, props );\r\n\t\t} else {\r\n\t\t\tcurElem.css( props );\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\njQuery.fn.extend({\r\n\r\n\tposition: function() {\r\n\t\tif ( !this[ 0 ] ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar offsetParent, offset,\r\n\t\t\tparentOffset = { top: 0, left: 0 },\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\t// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\r\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\r\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\r\n\t\t\toffset = elem.getBoundingClientRect();\r\n\t\t} else {\r\n\t\t\t// Get *real* offsetParent\r\n\t\t\toffsetParent = this.offsetParent();\r\n\r\n\t\t\t// Get correct offsets\r\n\t\t\toffset = this.offset();\r\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\r\n\t\t\t\tparentOffset = offsetParent.offset();\r\n\t\t\t}\r\n\r\n\t\t\t// Add offsetParent borders\r\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\r\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\r\n\t\t}\r\n\r\n\t\t// Subtract parent offsets and element margins\r\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\r\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\r\n\t\treturn {\r\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\r\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true)\r\n\t\t};\r\n\t},\r\n\r\n\toffsetParent: function() {\r\n\t\treturn this.map(function() {\r\n\t\t\tvar offsetParent = this.offsetParent || document.documentElement;\r\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) && jQuery.css( offsetParent, \"position\") === \"static\" ) ) {\r\n\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t}\r\n\t\t\treturn offsetParent || document.documentElement;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// Create scrollLeft and scrollTop methods\r\njQuery.each( {scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\"}, function( method, prop ) {\r\n\tvar top = /Y/.test( prop );\r\n\r\n\tjQuery.fn[ method ] = function( val ) {\r\n\t\treturn jQuery.access( this, function( elem, method, val ) {\r\n\t\t\tvar win = getWindow( elem );\r\n\r\n\t\t\tif ( val === undefined ) {\r\n\t\t\t\treturn win ? (prop in win) ? win[ prop ] :\r\n\t\t\t\t\twin.document.documentElement[ method ] :\r\n\t\t\t\t\telem[ method ];\r\n\t\t\t}\r\n\r\n\t\t\tif ( win ) {\r\n\t\t\t\twin.scrollTo(\r\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\r\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\r\n\t\t\t\t);\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem[ method ] = val;\r\n\t\t\t}\r\n\t\t}, method, val, arguments.length, null );\r\n\t};\r\n});\r\n\r\nfunction getWindow( elem ) {\r\n\treturn jQuery.isWindow( elem ) ?\r\n\t\telem :\r\n\t\telem.nodeType === 9 ?\r\n\t\t\telem.defaultView || elem.parentWindow :\r\n\t\t\tfalse;\r\n}\r\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\r\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\r\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name }, function( defaultExtra, funcName ) {\r\n\t\t// margin is only for outerHeight, outerWidth\r\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\r\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\r\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\r\n\r\n\t\t\treturn jQuery.access( this, function( elem, type, value ) {\r\n\t\t\t\tvar doc;\r\n\r\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\r\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\r\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\r\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\r\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get document width or height\r\n\t\t\t\tif ( elem.nodeType === 9 ) {\r\n\t\t\t\t\tdoc = elem.documentElement;\r\n\r\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest\r\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.\r\n\t\t\t\t\treturn Math.max(\r\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\r\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\r\n\t\t\t\t\t\tdoc[ \"client\" + name ]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value === undefined ?\r\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\r\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\r\n\r\n\t\t\t\t\t// Set width or height on the element\r\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\r\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\r\n\t\t};\r\n\t});\r\n});\r\n// Limit scope pollution from any deprecated API\r\n// (function() {\r\n\r\n// })();\r\n// Expose jQuery to the global object\r\nBI.jQuery = BI.$ = jQuery;\r\nwindow.$ = window.$ || jQuery;\r\nwindow.jQuery = window.jQuery || jQuery;\r\n\r\n// Expose jQuery as an AMD module, but only for AMD loaders that\r\n// understand the issues with loading multiple versions of jQuery\r\n// in a page that all might call define(). The loader will indicate\r\n// they have special allowances for multiple jQuery versions by\r\n// specifying define.amd.jQuery = true. Register as a named module,\r\n// since jQuery can be concatenated with other files that may use define,\r\n// but not use a proper concatenation script that understands anonymous\r\n// AMD modules. A named AMD is safest and most robust way to register.\r\n// Lowercase jquery is used because AMD module names are derived from\r\n// file names, and jQuery is normally delivered in a lowercase file name.\r\n// Do this after creating the global so that if an AMD module wants to call\r\n// noConflict to hide this version of jQuery, it will work.\r\nif ( typeof define === \"function\" && define.amd && define.amd.jQuery ) {\r\n\tdefine( \"jquery\", [], function () { return jQuery; } );\r\n}\r\n\r\n})( window );/*\r\n * 给jQuery.Event对象添加的工具方法\r\n */\r\nBI.$.extend(BI.$.Event.prototype, {\r\n // event.stopEvent\r\n stopEvent: function () {\r\n this.stopPropagation();\r\n this.preventDefault();\r\n }\r\n});if (BI.jQuery) {\r\n (function ($) {\r\n // richer:容器在其各个边缘留出的空间\r\n if (!$.fn.insets) {\r\n $.fn.insets = function () {\r\n var p = this.padding(),\r\n b = this.border();\r\n return {\r\n top: p.top,\r\n bottom: p.bottom + b.bottom + b.top,\r\n left: p.left,\r\n right: p.right + b.right + b.left\r\n };\r\n };\r\n }\r\n\r\n // richer:获取 && 设置jQuery元素的边界\r\n if (!$.fn.bounds) {\r\n $.fn.bounds = function (value) {\r\n var tmp = {hasIgnoredBounds: true};\r\n\r\n if (value) {\r\n if (!isNaN(value.x)) {\r\n tmp.left = value.x;\r\n }\r\n if (!isNaN(value.y)) {\r\n tmp.top = value.y;\r\n }\r\n if (value.width != null) {\r\n tmp.width = (value.width - (this.outerWidth(true) - this.width()));\r\n tmp.width = (tmp.width >= 0) ? tmp.width : value.width;\r\n // fix chrome\r\n // tmp.width = (tmp.width >= 0) ? tmp.width : 0;\r\n }\r\n if (value.height != null) {\r\n tmp.height = value.height - (this.outerHeight(true) - this.height());\r\n tmp.height = (tmp.height >= 0) ? tmp.height : value.height;\r\n // fix chrome\r\n // tmp.height = (tmp.height >= 0) ? tmp.height : value.0;\r\n }\r\n this.css(tmp);\r\n return this;\r\n }\r\n\r\n // richer:注意此方法只对可见元素有效\r\n tmp = this.position();\r\n return {\r\n x: tmp.left,\r\n y: tmp.top,\r\n // richer:这里计算外部宽度和高度的时候,都不包括边框\r\n width: this.outerWidth(),\r\n height: this.outerHeight()\r\n };\r\n\r\n };\r\n }\r\n })(BI.jQuery);\r\n\r\n BI.extend(BI.jQuery.fn, {\r\n\r\n destroy: function () {\r\n this.remove();\r\n if (BI.isIE() === true) {\r\n this[0].outerHTML = \"\";\r\n }\r\n },\r\n /**\r\n * 高亮显示\r\n * @param text 必需\r\n * @param keyword\r\n * @param py\r\n * @returns {*}\r\n * @private\r\n * 原理:\r\n * 1、得到text的拼音py, 分别看是否匹配关键字keyword, 得到匹配索引tidx和pidx\r\n * 2、比较tidx和pidx, 取大于-1且较小的索引,标红[索引,索引 + keyword.length - 1]的文本\r\n * 3、text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为\"\"\r\n */\r\n __textKeywordMarked__: function (text, keyword, py) {\r\n if (!BI.isKey(keyword) || (text + \"\").length > 100) {\r\n return this.html(BI.htmlEncode(text));\r\n }\r\n keyword = keyword + \"\";\r\n keyword = BI.toUpperCase(keyword);\r\n var textLeft = (text || \"\") + \"\";\r\n py = (py || BI.makeFirstPY(text, {\r\n splitChar: \"\\u200b\"\r\n })) + \"\";\r\n py = BI.toUpperCase(py);\r\n this.empty();\r\n // BI-48487 性能: makeFirstPY出来的py中包含多音字是必要的,但虽然此方法中做了限制。但是对于一个长度为60,包含14个多音字的字符串\r\n // 获取的的py长度将达到1966080, 远超过text的长度,到后面都是在做\"\".substring的无用功,所以此循环应保证py和textLeft长度不为0\r\n while (py.length > 0 && textLeft.length > 0) {\r\n var tidx = BI.toUpperCase(textLeft).indexOf(keyword);\r\n var pidx = py.indexOf(keyword);\r\n if (pidx >= 0) {\r\n pidx = (pidx - Math.floor(pidx / (textLeft.length + 1))) % textLeft.length;\r\n }\r\n\r\n // BI-56945 场景: 对'啊a'标红, a为keyword, 此时tidx为1, pidx为0, 此时使用tidx显然'啊'就无法标红了\r\n if (tidx >= 0 && (pidx > tidx || pidx === -1)) {\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft.substr(0, tidx)));\r\n this.append(BI.$(\"<span>\").addClass(\"bi-keyword-red-mark\")\r\n .html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));\r\n\r\n textLeft = textLeft.substr(tidx + keyword.length);\r\n if (BI.isNotEmptyString(py)) {\r\n // 每一组拼音都应该前进,而不是只是当前的\r\n py = BI.map(py.split(\"\\u200b\"), function (idx, ps) {\r\n return ps.slice(tidx + keyword.length);\r\n }).join(\"\\u200b\");\r\n }\r\n } else if (pidx >= 0) {\r\n // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft.substr(0, pidx)));\r\n this.append(BI.$(\"<span>\").addClass(\"bi-keyword-red-mark\")\r\n .html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));\r\n if (BI.isNotEmptyString(py)) {\r\n // 每一组拼音都应该前进,而不是只是当前的\r\n py = BI.map(py.split(\"\\u200b\"), function (idx, ps) {\r\n return ps.slice(pidx + keyword.length);\r\n }).join(\"\\u200b\");\r\n }\r\n textLeft = textLeft.substr(pidx + keyword.length);\r\n } else {\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft));\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n getDomHeight: function (parent) {\r\n var clone = BI.$(this).clone();\r\n clone.appendTo(BI.$(parent || \"body\"));\r\n var height = clone.height();\r\n clone.remove();\r\n return height;\r\n },\r\n\r\n // 是否有竖直滚动条\r\n hasVerticalScroll: function () {\r\n return this.height() > 0 && this[0].clientWidth < this[0].offsetWidth;\r\n },\r\n\r\n // 是否有水平滚动条\r\n hasHorizonScroll: function () {\r\n return this.width() > 0 && this[0].clientHeight < this[0].offsetHeight;\r\n },\r\n\r\n // 获取计算后的样式\r\n getStyle: function (name) {\r\n var node = this[0];\r\n var computedStyle = void 0;\r\n\r\n // W3C Standard\r\n if (_global.getComputedStyle) {\r\n // In certain cases such as within an iframe in FF3, this returns null.\r\n computedStyle = _global.getComputedStyle(node, null);\r\n if (computedStyle) {\r\n return computedStyle.getPropertyValue(BI.hyphenate(name));\r\n }\r\n }\r\n // Safari\r\n if (document.defaultView && document.defaultView.getComputedStyle) {\r\n computedStyle = document.defaultView.getComputedStyle(node, null);\r\n // A Safari bug causes this to return null for `display: none` elements.\r\n if (computedStyle) {\r\n return computedStyle.getPropertyValue(BI.hyphenate(name));\r\n }\r\n if (name === \"display\") {\r\n return \"none\";\r\n }\r\n }\r\n // Internet Explorer\r\n if (node.currentStyle) {\r\n if (name === \"float\") {\r\n return node.currentStyle.cssFloat || node.currentStyle.styleFloat;\r\n }\r\n return node.currentStyle[BI.camelize(name)];\r\n }\r\n return node.style && node.style[BI.camelize(name)];\r\n },\r\n\r\n __isMouseInBounds__: function (e) {\r\n var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset();\r\n var width = offset2Body.width || this.outerWidth();\r\n var height = offset2Body.height || this.outerHeight();\r\n // offset2Body.left的值可能会有小数,导致某点出现false\r\n return !(e.pageX < Math.floor(offset2Body.left) || e.pageX > offset2Body.left + width\r\n || e.pageY < Math.floor(offset2Body.top) || e.pageY > offset2Body.top + height);\r\n },\r\n\r\n __hasZIndexMask__: function (zindex) {\r\n return zindex && this.zIndexMask[zindex] != null;\r\n },\r\n\r\n __buildZIndexMask__: function (zindex, domArray) {\r\n this.zIndexMask = this.zIndexMask || {};// 存储z-index的mask\r\n this.indexMask = this.indexMask || [];// 存储mask\r\n var mask = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-z-index-mask\",\r\n items: domArray\r\n });\r\n\r\n mask.element.css({\"z-index\": zindex});\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: mask,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.indexMask.push(mask);\r\n zindex && (this.zIndexMask[zindex] = mask);\r\n return mask.element;\r\n },\r\n\r\n __releaseZIndexMask__: function (zindex) {\r\n if (zindex && this.zIndexMask[zindex]) {\r\n BI.remove(this.indexMask, this.zIndexMask[zindex]);\r\n this.zIndexMask[zindex].destroy();\r\n return;\r\n }\r\n this.indexMask = this.indexMask || [];\r\n var indexMask = this.indexMask.pop();\r\n indexMask && indexMask.destroy();\r\n }\r\n });\r\n}\r\n_.extend(BI, {\r\n $import: function () {\r\n var _LOADED = {}; // alex:保存加载过的\r\n function loadReady (src, must) {\r\n var $scripts = BI.$(\"head script, body script\");\r\n BI.$.each($scripts, function (i, item) {\r\n if (item.src.indexOf(src) != -1) {\r\n _LOADED[src] = true;\r\n }\r\n });\r\n var $links = BI.$(\"head link\");\r\n BI.$.each($links, function (i, item) {\r\n if (item.href.indexOf(src) != -1 && must) {\r\n _LOADED[src] = false;\r\n BI.$(item).remove();\r\n }\r\n });\r\n }\r\n\r\n // must=true 强行加载\r\n return function (src, ext, must) {\r\n loadReady(src, must);\r\n // alex:如果已经加载过了的,直接return\r\n if (_LOADED[src] === true) {\r\n return;\r\n }\r\n if (ext === \"css\") {\r\n var link = document.createElement(\"link\");\r\n link.rel = \"stylesheet\";\r\n link.type = \"text/css\";\r\n link.href = src;\r\n var head = document.getElementsByTagName(\"head\")[0];\r\n head.appendChild(link);\r\n _LOADED[src] = true;\r\n } else {\r\n // alex:这里用同步调用的方式,必须等待ajax完成\r\n BI.$.ajax({\r\n url: src,\r\n dataType: \"script\", // alex:指定dataType为script,jquery会帮忙做globalEval的事情\r\n async: false,\r\n cache: true,\r\n complete: function (res, status) {\r\n /*\r\n * alex:发现jquery会很智能地判断一下返回的数据类型是不是script,然后做一个globalEval\r\n * 所以当status为success时就不需要再把其中的内容加到script里面去了\r\n */\r\n if (status == \"success\") {\r\n _LOADED[src] = true;\r\n }\r\n }\r\n });\r\n }\r\n };\r\n }()\r\n});if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== \"0.000\" ||\r\n (0.9).toFixed(0) === \"0\" || (1.255).toFixed(2) !== \"1.25\" ||\r\n (1000000000000000128).toFixed(0) !== \"1000000000000000128\") {\r\n (function () {\r\n var base, size, data, i;\r\n base = 1e7;\r\n size = 6;\r\n data = [0, 0, 0, 0, 0, 0];\r\n function multiply (n, c) {\r\n var i = -1;\r\n while (++i < size) {\r\n c += n * data[i];\r\n data[i] = c % base;\r\n c = Math.floor(c / base);\r\n }\r\n }\r\n\r\n function divide (n) {\r\n var i = size, c = 0;\r\n while (--i >= 0) {\r\n c += data[i];\r\n data[i] = Math.floor(c / n);\r\n c = (c % n) * base;\r\n }\r\n }\r\n\r\n function toString () {\r\n var i = size;\r\n var s = \"\";\r\n while (--i >= 0) {\r\n if (s !== \"\" || i === 0 || data[i] !== 0) {\r\n var t = String(data[i]);\r\n if (s === \"\") {\r\n s = t;\r\n } else {\r\n s += \"0000000\".slice(0, 7 - t.length) + t;\r\n }\r\n }\r\n }\r\n return s;\r\n }\r\n\r\n function pow (x, n, acc) {\r\n return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x)\r\n : pow(x * x, n / 2, acc)));\r\n }\r\n\r\n function log (x) {\r\n var n = 0;\r\n while (x >= 4096) {\r\n n += 12;\r\n x /= 4096;\r\n }\r\n while (x >= 2) {\r\n n += 1;\r\n x /= 2;\r\n }\r\n return n;\r\n }\r\n\r\n Number.prototype.toFixed = function (fractionDigits) {\r\n var f, x, s, m, e, z, j, k;\r\n f = Number(fractionDigits);\r\n f = f !== f ? 0 : Math.floor(f);\r\n\r\n if (f < 0 || f > 20) {\r\n throw new RangeError(\"Number.toFixed called with invalid number of decimals\");\r\n }\r\n\r\n x = Number(this);\r\n\r\n if (x !== x) {\r\n return \"NaN\";\r\n }\r\n\r\n if (x <= -1e21 || x > 1e21) {\r\n return String(x);\r\n }\r\n\r\n s = \"\";\r\n\r\n if (x < 0) {\r\n s = \"-\";\r\n x = -x;\r\n }\r\n\r\n m = \"0\";\r\n\r\n if (x > 1e-21) {\r\n // 1e-21<x<1e21\r\n // -70<log2(x)<70\r\n e = log(x * pow(2, 69, 1)) - 69;\r\n z = (e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1));\r\n z *= 0x10000000000000;// Math.pow(2,52);\r\n e = 52 - e;\r\n\r\n // -18<e<122\r\n // x=z/2^e\r\n if (e > 0) {\r\n multiply(0, z);\r\n j = f;\r\n\r\n while (j >= 7) {\r\n multiply(1e7, 0);\r\n j -= 7;\r\n }\r\n\r\n multiply(pow(10, j, 1), 0);\r\n j = e - 1;\r\n\r\n while (j >= 23) {\r\n divide(1 << 23);\r\n j -= 23;\r\n }\r\n divide(1 << j);\r\n multiply(1, 1);\r\n divide(2);\r\n m = toString();\r\n } else {\r\n multiply(0, z);\r\n multiply(1 << (-e), 0);\r\n m = toString() + \"0.00000000000000000000\".slice(2, 2 + f);\r\n }\r\n }\r\n\r\n if (f > 0) {\r\n k = m.length;\r\n\r\n if (k <= f) {\r\n m = s + \"0.0000000000000000000\".slice(0, f - k + 2) + m;\r\n } else {\r\n m = s + m.slice(0, k - f) + \".\" + m.slice(k - f);\r\n }\r\n } else {\r\n m = s + m;\r\n }\r\n\r\n return m;\r\n };\r\n\r\n })();\r\n}/**\r\n * 常量\r\n */\r\n\r\n_.extend(BI, {\r\n MAX: 0xfffffffffffffff,\r\n MIN: -0xfffffffffffffff,\r\n EVENT_RESPONSE_TIME: 200,\r\n zIndex_layer: 1e5,\r\n zIndex_popover: 1e6,\r\n zIndex_popup: 1e7,\r\n zIndex_masker: 1e8,\r\n zIndex_tip: 1e9,\r\n emptyStr: \"\",\r\n emptyFn: function () {\r\n },\r\n empty: null,\r\n Key: {\r\n 48: \"0\",\r\n 49: \"1\",\r\n 50: \"2\",\r\n 51: \"3\",\r\n 52: \"4\",\r\n 53: \"5\",\r\n 54: \"6\",\r\n 55: \"7\",\r\n 56: \"8\",\r\n 57: \"9\",\r\n 65: \"a\",\r\n 66: \"b\",\r\n 67: \"c\",\r\n 68: \"d\",\r\n 69: \"e\",\r\n 70: \"f\",\r\n 71: \"g\",\r\n 72: \"h\",\r\n 73: \"i\",\r\n 74: \"j\",\r\n 75: \"k\",\r\n 76: \"l\",\r\n 77: \"m\",\r\n 78: \"n\",\r\n 79: \"o\",\r\n 80: \"p\",\r\n 81: \"q\",\r\n 82: \"r\",\r\n 83: \"s\",\r\n 84: \"t\",\r\n 85: \"u\",\r\n 86: \"v\",\r\n 87: \"w\",\r\n 88: \"x\",\r\n 89: \"y\",\r\n 90: \"z\",\r\n 96: \"0\",\r\n 97: \"1\",\r\n 98: \"2\",\r\n 99: \"3\",\r\n 100: \"4\",\r\n 101: \"5\",\r\n 102: \"6\",\r\n 103: \"7\",\r\n 104: \"8\",\r\n 105: \"9\",\r\n 106: \"*\",\r\n 107: \"+\",\r\n 109: \"-\",\r\n 110: \".\",\r\n 111: \"/\"\r\n },\r\n KeyCode: {\r\n BACKSPACE: 8,\r\n COMMA: 188,\r\n DELETE: 46,\r\n DOWN: 40,\r\n END: 35,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n HOME: 36,\r\n LEFT: 37,\r\n NUMPAD_ADD: 107,\r\n NUMPAD_DECIMAL: 110,\r\n NUMPAD_DIVIDE: 111,\r\n NUMPAD_ENTER: 108,\r\n NUMPAD_MULTIPLY: 106,\r\n NUMPAD_SUBTRACT: 109,\r\n PAGE_DOWN: 34,\r\n PAGE_UP: 33,\r\n PERIOD: 190,\r\n RIGHT: 39,\r\n SPACE: 32,\r\n TAB: 9,\r\n UP: 38\r\n },\r\n Status: {\r\n SUCCESS: 1,\r\n WRONG: 2,\r\n START: 3,\r\n END: 4,\r\n WAITING: 5,\r\n READY: 6,\r\n RUNNING: 7,\r\n OUTOFBOUNDS: 8,\r\n NULL: -1\r\n },\r\n Direction: {\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Left: \"left\",\r\n Right: \"right\",\r\n Custom: \"custom\"\r\n },\r\n Axis: {\r\n Vertical: \"vertical\",\r\n Horizontal: \"horizontal\"\r\n },\r\n Selection: {\r\n Default: -2,\r\n None: -1,\r\n Single: 0,\r\n Multi: 1,\r\n All: 2\r\n },\r\n HorizontalAlign: {\r\n Left: \"left\",\r\n Right: \"right\",\r\n Center: \"center\",\r\n Stretch: \"stretch\"\r\n },\r\n VerticalAlign: {\r\n Middle: \"middle\",\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Stretch: \"stretch\"\r\n },\r\n StartOfWeek: 1\r\n});BI.version = \"2.0\";/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-center-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteCenterLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),\r\n right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),\r\n top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),\r\n bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),\r\n margin: \"auto\"\r\n });\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_center_adapt\", BI.AbsoluteCenterLayout);/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-horizontal-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteHorizontalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),\r\n right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),\r\n margin: \"auto\"\r\n });\r\n if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {\r\n w.element.css(\"top\", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));\r\n }\r\n if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {\r\n w.element.css(\"bottom\", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_horizontal_adapt\", BI.AbsoluteHorizontalLayout);/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-vertical-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteVerticalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteVerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: item.lgap,\r\n right: item.rgap,\r\n top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),\r\n bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),\r\n margin: \"auto\"\r\n });\r\n if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {\r\n w.element.css(\"left\", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));\r\n }\r\n if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {\r\n w.element.css(\"right\", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_vertical_adapt\", BI.AbsoluteVerticalLayout);/**\r\n * 自适应水平和垂直方向都居中容器\r\n * @class BI.CenterAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.CenterAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-center-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.CenterAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.center_adapt\", BI.CenterAdaptLayout);/**\r\n * 水平方向居中容器\r\n * @class BI.HorizontalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-adapt-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n items: o.items,\r\n scrollx: o.scrollx,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_adapt\", BI.HorizontalAdaptLayout);/**\r\n * 左右分离,垂直方向居中容器\r\n * items:{\r\n left: [{el:{type:\"bi.button\"}}],\r\n right:[{el:{type:\"bi.button\"}}]\r\n }\r\n * @class BI.LeftRightVerticalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-left-right-vertical-adapt-layout\",\r\n items: {},\r\n llgap: 0,\r\n lrgap: 0,\r\n lhgap: 0,\r\n rlgap: 0,\r\n rrgap: 0,\r\n rhgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n var layoutArray = [];\r\n if (\"left\" in o.items) {\r\n layoutArray.push({\r\n type: \"bi.left\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items.left,\r\n hgap: o.lhgap,\r\n lgap: o.llgap,\r\n rgap: o.lrgap\r\n }\r\n }]\r\n });\r\n }\r\n if (\"right\" in o.items) {\r\n layoutArray.push({\r\n type: \"bi.right\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items.right,\r\n textAlign: \"right\",\r\n hgap: o.rhgap,\r\n lgap: o.rlgap,\r\n rgap: o.rrgap\r\n }\r\n }]\r\n });\r\n }\r\n return layoutArray;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"left_right_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.left_right_vertical_adapt\", BI.LeftRightVerticalAdaptLayout);\r\n\r\n\r\nBI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-left-vertical-adapt-layout\",\r\n items: [],\r\n lgap: 0,\r\n rgap: 0,\r\n hgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.LeftVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.left\",\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items,\r\n lgap: o.lgap,\r\n hgap: o.hgap,\r\n rgap: o.rgap\r\n }\r\n }]\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"left_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.left_vertical_adapt\", BI.LeftVerticalAdaptLayout);\r\n\r\nBI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-right-vertical-adapt-layout\",\r\n items: [],\r\n lgap: 0,\r\n rgap: 0,\r\n hgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.RightVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.right\",\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n textAlign: \"right\",\r\n items: o.items,\r\n lgap: o.lgap,\r\n hgap: o.hgap,\r\n rgap: o.rgap\r\n }\r\n }]\r\n };\r\n },\r\n\r\n resize: function () {\r\n\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.right_vertical_adapt\", BI.RightVerticalAdaptLayout);/**\r\n * 使用display:table和display:table-cell实现的horizontal布局\r\n * @class BI.TableAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TableAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-table-center-adapt-layout\",\r\n columnSize: [],\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options;\r\n BI.TableAdaptLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<div>\").css({\r\n position: \"relative\",\r\n display: \"table\",\r\n height: o.verticalAlign === BI.VerticalAlign.Middle ? \"100%\" : \"auto\",\r\n width: o.horizontalAlign === BI.HorizontalAlign.Center ? \"100%\" : \"auto\",\r\n \"white-space\": \"nowrap\"\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n\r\n var o = this.options;\r\n var td;\r\n var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i];\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n var w = BI.createWidget(item);\r\n w.element.css({position: \"relative\", top: \"0\", left: \"0\", margin: \"0px auto\"});\r\n td = BI.createWidget({\r\n type: \"bi.default\",\r\n width: width,\r\n items: [w]\r\n });\r\n this.addWidget(this._getChildName(i), td);\r\n } else {\r\n td = this.getWidgetByName(this._getChildName(i));\r\n td.element.width(width);\r\n }\r\n // 对于表现为td的元素设置最大宽度,有几点需要注意\r\n // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现\r\n // 2、不能给多个td设置最大宽度,这样只会平分宽度\r\n // 3、多百分比宽度就算了\r\n td.element.css({\"max-width\": o.columnSize[i] <= 1 ? width : width + \"px\"});\r\n if (i === 0) {\r\n td.element.addClass(\"first-element\");\r\n }\r\n td.element.css({\r\n position: \"relative\",\r\n display: \"table-cell\",\r\n \"vertical-align\": o.verticalAlign,\r\n margin: \"0\",\r\n padding: \"0\",\r\n height: \"100%\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return td;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$table.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.TableAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.table_adapt\", BI.TableAdaptLayout);/**\r\n * 垂直方向居中容器\r\n * @class BI.VerticalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: {\r\n baseCls: \"bi-vertical-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n items: o.items,\r\n scrollx: o.scrollx,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"vertical_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical_adapt\", BI.VerticalAdaptLayout);/**\r\n * 水平方向居中自适应容器\r\n * @class BI.HorizontalAutoLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalAutoLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizon-auto-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.HorizontalAutoLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.HorizontalAutoLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n margin: \"0px auto\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalAutoLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_auto\", BI.HorizontalAutoLayout);/**\r\n * 浮动的水平居中布局\r\n */\r\nBI.FloatHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-horizontal-adapt-layout\",\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatHorizontalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"float_horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n mounted: function () {\r\n var self = this;\r\n var width = this.left.element.width(),\r\n height = this.left.element.height();\r\n this.left.element.width(width).height(height).css(\"float\", \"none\");\r\n BI.remove(this._children, function (i, wi) {\r\n if (wi === self.container) {\r\n delete self._children[i];\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [this.left]\r\n });\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var self = this, o = this.options;\r\n this.left = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [item],\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap\r\n });\r\n\r\n this.container = BI.createWidget({\r\n type: \"bi.left\",\r\n element: this,\r\n items: [this.left]\r\n });\r\n\r\n return this.left;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalAutoLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_float\", BI.FloatHorizontalLayout);/**\r\n * 内联布局\r\n * @class BI.InlineCenterAdaptLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-center-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineCenterAdaptLayout.superclass.render.apply(this, arguments);\r\n this.element.css({\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"center\"\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item, length) {\r\n var o = this.options;\r\n var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\"\r\n });\r\n w.element.addClass(\"inline-center-adapt-item\");\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n throw new Error(\"不能添加元素\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n self._addElement(i, item, items.length);\r\n }\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineCenterAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline_center_adapt\", BI.InlineCenterAdaptLayout);/**\r\n * 内联布局\r\n * @class BI.InlineVerticalAdaptLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-vertical-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n textAlign: \"left\"\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n whiteSpace: \"nowrap\",\r\n textAlign: o.textAlign\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\"\r\n });\r\n w.element.addClass(\"inline-vertical-adapt-item\");\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineVerticalAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline_vertical_adapt\", BI.InlineVerticalAdaptLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-center-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexCenterLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\",\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + \"px\",\r\n \"margin-right\": o.hgap + \"px\",\r\n \"margin-top\": o.vgap + \"px\",\r\n \"margin-bottom\": o.vgap + \"px\"\r\n });\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_center_adapt\", BI.FlexCenterLayout);/**\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexHorizontalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexHorizontalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-horizontal-center-adapt-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrolly: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_vertical\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n verticalAlign: o.verticalAlign,\r\n rowSize: o.rowSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical_center_adapt布局不需要resize\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_horizontal_adapt\", BI.FlexHorizontalCenter);\r\nBI.shortcut(\"bi.flex_horizontal_center_adapt\", BI.FlexHorizontalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-horizontal-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,// 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch\r\n columnSize: [],\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexHorizontalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.addClass(\"v-\" + o.verticalAlign).addClass(\"h-\" + o.horizontalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.columnSize[i] > 0) {\r\n w.element.width(o.columnSize[i]);\r\n }\r\n if (o.columnSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_horizontal布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_horizontal\", BI.FlexHorizontalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexVerticalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-vertical-center-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_horizontal\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n hgap: o.hgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical_center_adapt布局不需要resize\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_vertical_adapt\", BI.FlexVerticalCenter);\r\nBI.shortcut(\"bi.flex_vertical_center_adapt\", BI.FlexVerticalCenter);/**\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-vertical-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrolly: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexVerticalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.addClass(\"h-\" + o.horizontalAlign).addClass(\"v-\" + o.verticalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);\r\n var o = this.options;\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.rowSize[i] > 0) {\r\n w.element.height(o.rowSize[i]);\r\n }\r\n if (o.rowSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_vertical\", BI.FlexVerticalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexWrapperCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-center-adapt-layout clearfix\",\r\n scrollable: true\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperCenterLayout.superclass.render.apply(this, arguments);\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-center-adapt-layout-wrapper\");\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + \"px\",\r\n \"margin-right\": o.hgap + \"px\",\r\n \"margin-top\": o.vgap + \"px\",\r\n \"margin-bottom\": o.vgap + \"px\"\r\n });\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_center_adapt\", BI.FlexWrapperCenterLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-center-adapt-layout clearfix\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrollable: true,\r\n scrolly: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_scrollable_vertical\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n verticalAlign: o.verticalAlign,\r\n rowSize: o.rowSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_horizontal_adapt\", BI.FlexWrapperHorizontalCenter);\r\nBI.shortcut(\"bi.flex_scrollable_horizontal_center_adapt\", BI.FlexWrapperHorizontalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-horizontal-layout clearfix\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollable: null,\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperHorizontalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-horizontal-layout-wrapper v-\" + o.verticalAlign).addClass(\"h-\" + o.horizontalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.columnSize[i] > 0) {\r\n w.element.width(o.columnSize[i]);\r\n }\r\n if (o.columnSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_wrapper_horizontal布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_horizontal\", BI.FlexWrapperHorizontalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-center-adapt-layout clearfix\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n scrollable: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_scrollable_horizontal\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_vertical_adapt\", BI.FlexWrapperVerticalCenter);\r\nBI.shortcut(\"bi.flex_scrollable_vertical_center_adapt\", BI.FlexWrapperVerticalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexWrapperVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-layout clearfix\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrollable: null,\r\n scrolly: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperVerticalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-vertical-layout-wrapper h-\" + o.horizontalAlign).addClass(\"v-\" + o.verticalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.rowSize[i] > 0) {\r\n w.element.height(o.rowSize[i]);\r\n }\r\n if (o.rowSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_wrapper_vertical布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_vertical\", BI.FlexWrapperVerticalLayout);/**\r\n * 固定子组件上下左右的布局容器\r\n * @class BI.AbsoluteLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-layout\",\r\n hgap: null,\r\n vgap: null,\r\n lgap: null,\r\n rgap: null,\r\n tgap: null,\r\n bgap: null\r\n });\r\n },\r\n render: function () {\r\n BI.AbsoluteLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteLayout.superclass._addElement.apply(this, arguments);\r\n var left = 0, right = 0, top = 0, bottom = 0;\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n left += item.left;\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n right += item.right;\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n top += item.top;\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n bottom += item.bottom;\r\n }\r\n\r\n if (BI.isNotNull(o.hgap)) {\r\n left += o.hgap;\r\n w.element.css({left: left});\r\n right += o.hgap;\r\n w.element.css({right: right});\r\n }\r\n if (BI.isNotNull(o.vgap)) {\r\n top += o.vgap;\r\n w.element.css({top: top});\r\n bottom += o.vgap;\r\n w.element.css({bottom: bottom});\r\n }\r\n\r\n if (BI.isNotNull(o.lgap)) {\r\n left += o.lgap;\r\n w.element.css({left: left});\r\n }\r\n if (BI.isNotNull(o.rgap)) {\r\n right += o.rgap;\r\n w.element.css({right: right});\r\n }\r\n if (BI.isNotNull(o.tgap)) {\r\n top += o.tgap;\r\n w.element.css({top: top});\r\n }\r\n if (BI.isNotNull(o.bgap)) {\r\n bottom += o.bgap;\r\n w.element.css({bottom: bottom});\r\n }\r\n\r\n\r\n if (BI.isNotNull(item.width)) {\r\n w.element.css({width: item.width});\r\n }\r\n if (BI.isNotNull(item.height)) {\r\n w.element.css({height: item.height});\r\n }\r\n w.element.css({position: \"absolute\"});\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n stroke: function (items) {\r\n this.options.items = items || [];\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n if (!BI.isWidget(item) && !item.el) {\r\n throw new Error(\"el must be exist\");\r\n }\r\n self._addElement(i, item);\r\n }\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute\", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-adaptive-layout\",\r\n hgap: null,\r\n vgap: null,\r\n lgap: null,\r\n rgap: null,\r\n tgap: null,\r\n bgap: null\r\n });\r\n },\r\n render: function () {\r\n BI.AdaptiveLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AdaptiveLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\"});\r\n var left = 0, right = 0, top = 0, bottom = 0;\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({\r\n left: item.left\r\n });\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({\r\n right: item.right\r\n });\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({\r\n top: item.top\r\n });\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({\r\n bottom: item.bottom\r\n });\r\n }\r\n\r\n if (BI.isNotNull(o.hgap)) {\r\n left += o.hgap;\r\n w.element.css({\"margin-left\": left});\r\n right += o.hgap;\r\n w.element.css({\"margin-right\": right});\r\n }\r\n if (BI.isNotNull(o.vgap)) {\r\n top += o.vgap;\r\n w.element.css({\"margin-top\": top});\r\n bottom += o.vgap;\r\n w.element.css({\"margin-bottom\": bottom});\r\n }\r\n\r\n if (BI.isNotNull(o.lgap)) {\r\n left += o.lgap;\r\n w.element.css({\"margin-left\": left});\r\n }\r\n if (BI.isNotNull(o.rgap)) {\r\n right += o.rgap;\r\n w.element.css({\"margin-right\": right});\r\n }\r\n if (BI.isNotNull(o.tgap)) {\r\n top += o.tgap;\r\n w.element.css({\"margin-top\": top});\r\n }\r\n if (BI.isNotNull(o.bgap)) {\r\n bottom += o.bgap;\r\n w.element.css({\"margin-bottom\": bottom});\r\n }\r\n\r\n if (BI.isNotNull(item.width)) {\r\n w.element.css({width: item.width});\r\n }\r\n if (BI.isNotNull(item.height)) {\r\n w.element.css({height: item.height});\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.adaptive\", BI.AdaptiveLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.BorderLayout\r\n * @extends BI.Layout\r\n */\r\nBI.BorderLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-border-layout\",\r\n items: {}\r\n });\r\n },\r\n render: function () {\r\n BI.BorderLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (regions) {\r\n var item;\r\n var top = 0;\r\n var bottom = 0;\r\n var left = 0;\r\n var right = 0;\r\n if (\"north\" in regions) {\r\n item = regions[\"north\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"north\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"north\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"north\").element.height(item.height)\r\n .css({\r\n position: \"absolute\",\r\n top: (item.top || 0),\r\n left: (item.left || 0),\r\n right: (item.right || 0),\r\n bottom: \"initial\"\r\n });\r\n }\r\n top = (item.height || 0) + (item.top || 0) + (item.bottom || 0);\r\n }\r\n }\r\n if (\"south\" in regions) {\r\n item = regions[\"south\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"south\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"south\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"south\").element.height(item.height)\r\n .css({\r\n position: \"absolute\",\r\n bottom: (item.bottom || 0),\r\n left: (item.left || 0),\r\n right: (item.right || 0),\r\n top: \"initial\"\r\n });\r\n }\r\n bottom = (item.height || 0) + (item.top || 0) + (item.bottom || 0);\r\n }\r\n }\r\n if (\"west\" in regions) {\r\n item = regions[\"west\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"west\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"west\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"west\").element.width(item.width)\r\n .css({\r\n position: \"absolute\",\r\n left: (item.left || 0),\r\n top: top,\r\n bottom: bottom,\r\n right: \"initial\"\r\n });\r\n }\r\n left = (item.width || 0) + (item.left || 0) + (item.right || 0);\r\n }\r\n }\r\n if (\"east\" in regions) {\r\n item = regions[\"east\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"east\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"east\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"east\").element.width(item.width)\r\n .css({\r\n position: \"absolute\",\r\n right: (item.right || 0),\r\n top: top,\r\n bottom: bottom,\r\n left: \"initial\"\r\n });\r\n }\r\n right = (item.width || 0) + (item.left || 0) + (item.right || 0);\r\n }\r\n }\r\n if (\"center\" in regions) {\r\n item = regions[\"center\"];\r\n if (item != null) {\r\n if (!this.hasWidget(this.getName() + \"center\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"center\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"center\").element\r\n .css({position: \"absolute\", top: top, bottom: bottom, left: left, right: right});\r\n }\r\n }\r\n },\r\n\r\n update: function (opt) {\r\n },\r\n\r\n populate: function (items) {\r\n BI.BorderLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.border\", BI.BorderLayout);/**\r\n * 卡片布局,可以做到当前只显示一个组件,其他的都隐藏\r\n * @class BI.CardLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {String} options.defaultShowName 默认展示的子组件名\r\n */\r\nBI.CardLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CardLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-card-layout\",\r\n items: []\r\n });\r\n },\r\n render: function () {\r\n BI.CardLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"default布局不需要resize\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n this.showIndex = void 0;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n if (!self.hasWidget(item.cardName)) {\r\n var w = BI.createWidget(item);\r\n w.on(BI.Events.DESTROY, function () {\r\n var index = BI.findIndex(o.items, function (i, tItem) {\r\n return tItem.cardName == item.cardName;\r\n });\r\n if (index > -1) {\r\n o.items.splice(index, 1);\r\n }\r\n });\r\n self.addWidget(item.cardName, w);\r\n } else {\r\n var w = self.getWidgetByName(item.cardName);\r\n }\r\n w.element.css({position: \"absolute\", top: \"0\", right: \"0\", bottom: \"0\", left: \"0\"});\r\n w.setVisible(false);\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n empty: function () {\r\n BI.CardLayout.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n populate: function (items) {\r\n BI.CardLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n this.options.defaultShowName && this.showCardByName(this.options.defaultShowName);\r\n },\r\n\r\n isCardExisted: function (cardName) {\r\n return BI.some(this.options.items, function (i, item) {\r\n return item.cardName == cardName && item.el;\r\n });\r\n },\r\n\r\n getCardByName: function (cardName) {\r\n if (!this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is not exist\");\r\n }\r\n return this._children[cardName];\r\n },\r\n\r\n _deleteCardByName: function (cardName) {\r\n delete this._children[cardName];\r\n var index = BI.findIndex(this.options.items, function (i, item) {\r\n return item.cardName == cardName;\r\n });\r\n if (index > -1) {\r\n this.options.items.splice(index, 1);\r\n }\r\n },\r\n\r\n deleteCardByName: function (cardName) {\r\n if (!this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is not exist\");\r\n }\r\n\r\n var child = this._children[cardName];\r\n this._deleteCardByName(cardName);\r\n child && child._destroy();\r\n },\r\n\r\n addCardByName: function (cardName, cardItem) {\r\n if (this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is already exist\");\r\n }\r\n var widget = BI.createWidget(cardItem, this);\r\n widget.element.css({\r\n position: \"relative\",\r\n top: \"0\",\r\n left: \"0\",\r\n width: \"100%\",\r\n height: \"100%\"\r\n }).appendTo(this.element);\r\n widget.invisible();\r\n this.addWidget(cardName, widget);\r\n this.options.items.push({el: cardItem, cardName: cardName});\r\n return widget;\r\n },\r\n\r\n showCardByName: function (name, action, callback) {\r\n var self = this;\r\n // name不存在的时候全部隐藏\r\n var exist = this.isCardExisted(name);\r\n if (this.showIndex != null) {\r\n this.lastShowIndex = this.showIndex;\r\n }\r\n this.showIndex = name;\r\n var flag = false;\r\n BI.each(this.options.items, function (i, item) {\r\n var el = self._children[item.cardName];\r\n if (el) {\r\n if (name != item.cardName) {\r\n // 动画效果只有在全部都隐藏的时候才有意义,且只要执行一次动画操作就够了\r\n !flag && !exist && (BI.Action && action instanceof BI.Action) ? (action.actionBack(el), flag = true) : el.invisible();\r\n } else {\r\n (BI.Action && action instanceof BI.Action) ? action.actionPerformed(void 0, el, callback) : (el.visible(), callback && callback());\r\n }\r\n }\r\n });\r\n },\r\n\r\n showLastCard: function () {\r\n var self = this;\r\n this.showIndex = this.lastShowIndex;\r\n BI.each(this.options.items, function (i, item) {\r\n self._children[item.cardName].setVisible(self.showIndex == i);\r\n });\r\n },\r\n\r\n setDefaultShowName: function (name) {\r\n this.options.defaultShowName = name;\r\n return this;\r\n },\r\n\r\n getDefaultShowName: function () {\r\n return this.options.defaultShowName;\r\n },\r\n\r\n getAllCardNames: function () {\r\n return BI.map(this.options.items, function (i, item) {\r\n return item.cardName;\r\n });\r\n },\r\n\r\n getShowingCard: function () {\r\n if (!BI.isKey(this.showIndex)) {\r\n return void 0;\r\n }\r\n return this.getWidgetByName(this.showIndex);\r\n },\r\n\r\n deleteAllCard: function () {\r\n var self = this;\r\n BI.each(this.getAllCardNames(), function (i, name) {\r\n self.deleteCardByName(name);\r\n });\r\n },\r\n\r\n hideAllCard: function () {\r\n var self = this;\r\n BI.each(this.options.items, function (i, item) {\r\n self._children[item.cardName].invisible();\r\n });\r\n },\r\n\r\n isAllCardHide: function () {\r\n var self = this;\r\n var flag = true;\r\n BI.some(this.options.items, function (i, item) {\r\n if (self._children[item.cardName].isVisible()) {\r\n flag = false;\r\n return false;\r\n }\r\n });\r\n return flag;\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var removeName;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.each(this._children, function (name, child) {\r\n if (child === nameOrWidget) {\r\n removeName = name;\r\n }\r\n });\r\n } else {\r\n removeName = nameOrWidget;\r\n }\r\n if (removeName) {\r\n this._deleteCardByName(removeName);\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.card\", BI.CardLayout);/**\r\n * 默认的布局方式\r\n *\r\n * @class BI.DefaultLayout\r\n * @extends BI.Layout\r\n */\r\nBI.DefaultLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.DefaultLayout.superclass.props.apply(this, arguments), {\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: []\r\n });\r\n },\r\n render: function () {\r\n BI.DefaultLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.DefaultLayout.superclass._addElement.apply(this, arguments);\r\n if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"default布局不需要resize\")\r\n },\r\n\r\n populate: function (items) {\r\n BI.DefaultLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.default\", BI.DefaultLayout);/**\r\n * 分隔容器的控件,按照宽度和高度所占比平分整个容器\r\n *\r\n * @class BI.DivisionLayout\r\n * @extends BI.Layout\r\n */\r\nBI.DivisionLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.DivisionLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-division-layout\",\r\n columns: null,\r\n rows: null,\r\n items: []\r\n // [\r\n // {\r\n // column: 0,\r\n // row: 0,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button1'}\r\n // },\r\n // {\r\n // column: 1,\r\n // row: 1,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button2'}\r\n // },\r\n // {\r\n // column: 3,\r\n // row: 2,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button3'}\r\n // }\r\n // ]\r\n });\r\n },\r\n render: function () {\r\n BI.DivisionLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.opitons.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var o = this.options;\r\n var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);\r\n var map = BI.makeArray(rows), widths = {}, heights = {};\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n BI.each(map, function (i) {\r\n map[i] = BI.makeArray(columns);\r\n });\r\n BI.each(items, function (i, item) {\r\n if (BI.isArray(item)) {\r\n BI.each(item, function (j, el) {\r\n widths[i] = (widths[i] || 0) + item.width;\r\n heights[j] = (heights[j] || 0) + item.height;\r\n map[i][j] = el;\r\n });\r\n return;\r\n }\r\n widths[item.row] = (widths[item.row] || 0) + item.width;\r\n heights[item.column] = (heights[item.column] || 0) + item.height;\r\n map[item.row][item.column] = item;\r\n });\r\n for (var i = 0; i < rows; i++) {\r\n var totalW = 0;\r\n for (var j = 0; j < columns; j++) {\r\n if (!map[i][j]) {\r\n throw new Error(\"item be required\");\r\n }\r\n if (!this.hasWidget(this.getName() + i + \"_\" + j)) {\r\n var w = BI.createWidget(map[i][j]);\r\n this.addWidget(this.getName() + i + \"_\" + j, w);\r\n } else {\r\n w = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n }\r\n var left = totalW * 100 / widths[i];\r\n w.element.css({position: \"absolute\", left: left + \"%\"});\r\n if (j > 0) {\r\n var lastW = this.getWidgetByName(this.getName() + i + \"_\" + (j - 1));\r\n lastW.element.css({right: (100 - left) + \"%\"});\r\n }\r\n if (j == o.columns - 1) {\r\n w.element.css({right: \"0%\"});\r\n }\r\n first(w, i, j);\r\n totalW += map[i][j].width;\r\n }\r\n }\r\n for (var j = 0; j < o.columns; j++) {\r\n var totalH = 0;\r\n for (var i = 0; i < o.rows; i++) {\r\n var w = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n var top = totalH * 100 / heights[j];\r\n w.element.css({top: top + \"%\"});\r\n if (i > 0) {\r\n var lastW = this.getWidgetByName(this.getName() + (i - 1) + \"_\" + j);\r\n lastW.element.css({bottom: (100 - top) + \"%\"});\r\n }\r\n if (i == o.rows - 1) {\r\n w.element.css({bottom: \"0%\"});\r\n }\r\n totalH += map[i][j].height;\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.DivisionLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.division\", BI.DivisionLayout);/**\r\n * 靠左对齐的自由浮动布局\r\n * @class BI.FloatLeftLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.FloatLeftLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-left-layout clearfix\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatLeftLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FloatLeftLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", float: \"left\"});\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.FloatLeftLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.left\", BI.FloatLeftLayout);\r\n\r\n/**\r\n * 靠右对齐的自由浮动布局\r\n * @class BI.FloatRightLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.FloatRightLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-right-layout clearfix\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatRightLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FloatRightLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", float: \"right\"});\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.FloatRightLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.right\", BI.FloatRightLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.BorderLayout\r\n * @extends BI.Layout\r\n */\r\nBI.GridLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.GridLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-grid-layout\",\r\n columns: null,\r\n rows: null,\r\n items: []\r\n /* [\r\n {\r\n column: 0,\r\n row: 0,\r\n el: {type: 'bi.button', text: 'button1'}\r\n },\r\n {\r\n column: 1,\r\n row: 1,\r\n el: {type: 'bi.button', text: 'button2'}\r\n },\r\n {\r\n column: 3,\r\n row: 2,\r\n el: {type: 'bi.button', text: 'button3'}\r\n }\r\n ]*/\r\n });\r\n },\r\n render: function () {\r\n BI.GridLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"grid布局不需要resize\")\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);\r\n var width = 100 / columns, height = 100 / rows;\r\n var els = [];\r\n for (var i = 0; i < rows; i++) {\r\n els[i] = [];\r\n }\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n BI.each(items, function (i, item) {\r\n if (BI.isArray(item)) {\r\n BI.each(item, function (j, el) {\r\n els[i][j] = BI.createWidget(el);\r\n });\r\n return;\r\n }\r\n els[item.row][item.column] = BI.createWidget(item);\r\n });\r\n for (var i = 0; i < rows; i++) {\r\n for (var j = 0; j < columns; j++) {\r\n if (!els[i][j]) {\r\n els[i][j] = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n }\r\n first(els[i][j], i, j);\r\n els[i][j].element.css({\r\n position: \"absolute\",\r\n top: height * i + \"%\",\r\n left: width * j + \"%\",\r\n right: (100 - (width * (j + 1))) + \"%\",\r\n bottom: (100 - (height * (i + 1))) + \"%\"\r\n });\r\n this.addWidget(els[i][j]);\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.GridLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.grid\", BI.GridLayout);/**\r\n * 水平布局\r\n * @class BI.HorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options;\r\n BI.HorizontalLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<table>\").attr({cellspacing: 0, cellpadding: 0}).css({\r\n position: \"relative\",\r\n \"white-space\": \"nowrap\",\r\n height: o.verticalAlign === BI.VerticalAlign.Middle ? \"100%\" : \"auto\",\r\n width: (o.horizontalAlign === BI.HorizontalAlign.Center || o.horizontalAlign === BI.HorizontalAlign.Stretch) ? \"100%\" : \"auto\",\r\n \"border-spacing\": \"0px\",\r\n border: \"none\",\r\n \"border-collapse\": \"separate\"\r\n });\r\n this.$tr = BI.Widget._renderEngine.createElement(\"<tr>\");\r\n this.$tr.appendTo(this.$table);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var td;\r\n var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i];\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n var w = BI.createWidget(item);\r\n w.element.css({position: \"relative\", margin: \"0px auto\"});\r\n td = BI.createWidget({\r\n type: \"bi.default\",\r\n tagName: \"td\",\r\n attributes: {\r\n width: width\r\n },\r\n items: [w]\r\n });\r\n this.addWidget(this._getChildName(i), td);\r\n } else {\r\n td = this.getWidgetByName(this._getChildName(i));\r\n td.element.attr(\"width\", width);\r\n }\r\n // 对于表现为td的元素设置最大宽度,有几点需要注意\r\n // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现\r\n // 2、不能给多个td设置最大宽度,这样只会平分宽度\r\n // 3、多百分比宽度就算了\r\n td.element.css({\"max-width\": o.columnSize[i] <= 1 ? width : width + \"px\"});\r\n if (i === 0) {\r\n td.element.addClass(\"first-element\");\r\n }\r\n td.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": o.verticalAlign,\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"none\"\r\n });\r\n\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return td;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$tr.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal layout do not need to resize\");\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$tr;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal\", BI.HorizontalLayout);\r\n\r\n/**\r\n * 水平布局\r\n * @class BI.HorizontalCellLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalCellLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-cell-layout\",\r\n scrollable: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.HorizontalCellLayout.superclass.render.apply(this, arguments);\r\n this.element.css({display: \"table\", \"vertical-align\": \"top\"});\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.HorizontalCellLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", display: \"table-cell\", \"vertical-align\": \"middle\"});\r\n if (o.hgap + o.lgap > 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal do not need to resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalCellLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_cell\", BI.HorizontalCellLayout);/**\r\n * 内联布局\r\n * @class BI.InlineLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\"position\": \"relative\", display: \"inline-block\", \"*display\": \"inline\", \"*zoom\": 1});\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline\", BI.InlineLayout);/**\r\n * 靠左对齐的自由浮动布局\r\n * @class BI.LatticeLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.LatticeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LatticeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-lattice-layout clearfix\"\r\n // columnSize: [0.2, 0.2, 0.6],\r\n });\r\n },\r\n render: function () {\r\n BI.LatticeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.LatticeLayout.superclass._addElement.apply(this, arguments);\r\n if (o.columnSize && o.columnSize[i]) {\r\n var width = o.columnSize[i] / BI.sum(o.columnSize) * 100 + \"%\";\r\n } else {\r\n var width = 1 / this.options.items.length * 100 + \"%\";\r\n }\r\n w.element.css({position: \"relative\", float: \"left\", width: width});\r\n return w;\r\n },\r\n\r\n addItem: function (item) {\r\n var w = BI.LatticeLayout.superclass.addItem.apply(this, arguments);\r\n this.resize();\r\n return w;\r\n },\r\n\r\n addItemAt: function (item) {\r\n var w = BI.LatticeLayout.superclass.addItemAt.apply(this, arguments);\r\n this.resize();\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.LatticeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.lattice\", BI.LatticeLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.TableLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TableLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TableLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-table-layout\",\r\n scrolly: true,\r\n columnSize: [200, 200, \"fill\"],\r\n rowSize: 30, // or [30,30,30]\r\n hgap: 0,\r\n vgap: 0,\r\n items: [[\r\n {\r\n el: {text: \"label1\"}\r\n },\r\n {\r\n el: {text: \"label2\"}\r\n },\r\n {\r\n el: {text: \"label3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.TableLayout.superclass.render.apply(this, arguments);\r\n this.rows = 0;\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (idx, arr) {\r\n var o = this.options;\r\n var abs = [], left = 0, right = 0, i, j;\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n for (i = 0; i < arr.length; i++) {\r\n if (BI.isNumber(o.columnSize[i])) {\r\n first(arr[i], this.rows, i);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n left: o.columnSize[i] <= 1 ? left * 100 + \"%\" : left,\r\n width: o.columnSize[i] <= 1 ? o.columnSize[i] * 100 + \"%\" : o.columnSize[i]\r\n }, arr[i]));\r\n left += o.columnSize[i] + (o.columnSize[i] < 1 ? 0 : o.hgap);\r\n } else {\r\n break;\r\n }\r\n }\r\n for (j = arr.length - 1; j > i; j--) {\r\n if (BI.isNumber(o.columnSize[j])) {\r\n first(arr[j], this.rows, j);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n right: o.columnSize[j] <= 1 ? right * 100 + \"%\" : right,\r\n width: o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j]\r\n }, arr[j]));\r\n right += o.columnSize[j] + (o.columnSize[j] < 1 ? 0 : o.hgap);\r\n } else {\r\n throw new Error(\"item with fill can only be one\");\r\n }\r\n }\r\n if (i >= 0 && i < arr.length) {\r\n first(arr[i], this.rows, i);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n left: left <= 1 ? left * 100 + \"%\" : left,\r\n right: right <= 1 ? right * 100 + \"%\" : right\r\n }, arr[i]));\r\n }\r\n var w = BI.createWidget({\r\n type: \"bi.absolute\",\r\n height: BI.isArray(o.rowSize) ? o.rowSize[this.rows] : o.rowSize,\r\n items: abs\r\n });\r\n if (this.rows > 0) {\r\n this.getWidgetByName(this.getName() + (this.rows - 1)).element.css({\r\n \"margin-bottom\": o.vgap\r\n });\r\n }\r\n w.element.css({\r\n position: \"relative\"\r\n });\r\n this.addWidget(this.getName() + (this.rows++), w);\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"table布局不需要resize\");\r\n },\r\n\r\n addItem: function (arr) {\r\n if (!BI.isArray(arr)) {\r\n throw new Error(\"item must be array\");\r\n }\r\n return BI.TableLayout.superclass.addItem.apply(this, arguments);\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.TableLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.table\", BI.TableLayout);/**\r\n * 水平tape布局\r\n * @class BI.HTapeLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HTapeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HTapeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-h-tape-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: [\r\n {\r\n width: 100,\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n width: \"fill\",\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n width: 200,\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]\r\n });\r\n },\r\n render: function () {\r\n BI.HTapeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n items = BI.compact(items);\r\n BI.each(items, function (i, item) {\r\n if (!self.hasWidget(self.getName() + i + \"\")) {\r\n var w = BI.createWidget(item);\r\n self.addWidget(self.getName() + i + \"\", w);\r\n } else {\r\n w = self.getWidgetByName(self.getName() + i + \"\");\r\n }\r\n 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\"});\r\n });\r\n\r\n var left = {}, right = {};\r\n left[0] = 0;\r\n right[items.length - 1] = 0;\r\n\r\n BI.any(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(left[i])) {\r\n 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;\r\n }\r\n if (item.width < 1 && item.width >= 0) {\r\n w.element.css({left: left[i] * 100 + \"%\", width: item.width * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + \"px\",\r\n width: BI.isNumber(item.width) ? item.width : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.width)) {\r\n return true;\r\n }\r\n });\r\n BI.backAny(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(right[i])) {\r\n 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;\r\n }\r\n if (item.width < 1 && item.width >= 0) {\r\n w.element.css({right: right[i] * 100 + \"%\", width: item.width * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + \"px\",\r\n width: BI.isNumber(item.width) ? item.width : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.width)) {\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n var updated;\r\n BI.each(this._children, function (i, child) {\r\n updated = child.update() || updated;\r\n });\r\n return updated;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HTapeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.htape\", BI.HTapeLayout);\r\n\r\n/**\r\n * 垂直tape布局\r\n * @class BI.VTapeLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VTapeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VTapeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-v-tape-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: [\r\n {\r\n height: 100,\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n height: \"fill\",\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n height: 200,\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]\r\n });\r\n },\r\n render: function () {\r\n BI.VTapeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n items = BI.compact(items);\r\n BI.each(items, function (i, item) {\r\n if (!self.hasWidget(self.getName() + i + \"\")) {\r\n var w = BI.createWidget(item);\r\n self.addWidget(self.getName() + i + \"\", w);\r\n } else {\r\n w = self.getWidgetByName(self.getName() + i + \"\");\r\n }\r\n w.element.css({position: \"absolute\", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + \"px\", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + \"px\"});\r\n });\r\n\r\n var top = {}, bottom = {};\r\n top[0] = 0;\r\n bottom[items.length - 1] = 0;\r\n\r\n BI.any(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(top[i])) {\r\n top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;\r\n }\r\n if (item.height < 1 && item.height >= 0) {\r\n w.element.css({top: top[i] * 100 + \"%\", height: item.height * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + \"px\",\r\n height: BI.isNumber(item.height) ? item.height : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.height)) {\r\n return true;\r\n }\r\n });\r\n BI.backAny(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(bottom[i])) {\r\n bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;\r\n }\r\n if (item.height < 1 && item.height >= 0) {\r\n w.element.css({bottom: bottom[i] * 100 + \"%\", height: item.height * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + \"px\",\r\n height: BI.isNumber(item.height) ? item.height : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.height)) {\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.VTapeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.vtape\", BI.VTapeLayout);/**\r\n * td布局\r\n * @class BI.TdLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TdLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-td-layout\",\r\n columnSize: [200, 200, 200],\r\n hgap: 0,\r\n vgap: 0,\r\n items: [[\r\n {\r\n el: {text: \"label1\"}\r\n },\r\n {\r\n el: {text: \"label2\"}\r\n },\r\n {\r\n el: {text: \"label3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.TdLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<table>\").attr({cellspacing: 0, cellpadding: 0}).css({\r\n position: \"relative\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n \"border-spacing\": \"0px\",\r\n border: \"none\",\r\n \"border-collapse\": \"separate\"\r\n });\r\n this.rows = 0;\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (idx, arr) {\r\n var o = this.options;\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n var tr = BI.createWidget({\r\n type: \"bi.default\",\r\n tagName: \"tr\"\r\n });\r\n\r\n for (var i = 0; i < arr.length; i++) {\r\n var w = BI.createWidget(arr[i]);\r\n w.element.css({position: \"relative\", top: \"0\", left: \"0\", margin: \"0px auto\"});\r\n if (arr[i].lgap) {\r\n w.element.css({\"margin-left\": arr[i].lgap + \"px\"});\r\n }\r\n if (arr[i].rgap) {\r\n w.element.css({\"margin-right\": arr[i].rgap + \"px\"});\r\n }\r\n if (arr[i].tgap) {\r\n w.element.css({\"margin-top\": arr[i].tgap + \"px\"});\r\n }\r\n if (arr[i].bgap) {\r\n w.element.css({\"margin-bottom\": arr[i].bgap + \"px\"});\r\n }\r\n first(w, this.rows++, i);\r\n var td = BI.createWidget({\r\n type: \"bi.default\",\r\n attributes: {\r\n width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i]\r\n },\r\n tagName: \"td\",\r\n items: [w]\r\n });\r\n td.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\",\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"none\"\r\n });\r\n tr.addItem(td);\r\n }\r\n this.addWidget(this.getName() + idx, tr);\r\n return tr;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$table.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"td布局不需要resize\");\r\n },\r\n\r\n addItem: function (arr) {\r\n if (!BI.isArray(arr)) {\r\n throw new Error(\"item must be array\");\r\n }\r\n return BI.TdLayout.superclass.addItem.apply(this, arguments);\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.TdLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.td\", BI.TdLayout);/**\r\n * 垂直布局\r\n * @class BI.VerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-vertical-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n scrolly: true\r\n });\r\n },\r\n render: function () {\r\n BI.VerticalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.VerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.VerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical\", BI.VerticalLayout);/**\r\n *\r\n * @class BI.WindowLayout\r\n * @extends BI.Layout\r\n */\r\nBI.WindowLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.WindowLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-window-layout\",\r\n columns: 3,\r\n rows: 2,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n columnSize: [100, \"fill\", 200],\r\n rowSize: [100, \"fill\"],\r\n items: [[\r\n {\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.WindowLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var o = this.options;\r\n if (BI.isNumber(o.rowSize)) {\r\n o.rowSize = BI.makeArray(o.items.length, 1 / o.items.length);\r\n }\r\n if (BI.isNumber(o.columnSize)) {\r\n o.columnSize = BI.makeArray(o.items[0].length, 1 / o.items[0].length);\r\n }\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n for (var i = 0; i < o.rows; i++) {\r\n for (var j = 0; j < o.columns; j++) {\r\n if (!o.items[i][j]) {\r\n throw new Error(\"item be required\");\r\n }\r\n if (!this.hasWidget(this.getName() + i + \"_\" + j)) {\r\n var w = BI.createWidget(o.items[i][j]);\r\n w.element.css({position: \"absolute\"});\r\n this.addWidget(this.getName() + i + \"_\" + j, w);\r\n }\r\n }\r\n }\r\n var left = {}, right = {}, top = {}, bottom = {};\r\n left[0] = 0;\r\n top[0] = 0;\r\n right[o.columns - 1] = 0;\r\n bottom[o.rows - 1] = 0;\r\n // 从上到下\r\n for (var i = 0; i < o.rows; i++) {\r\n for (var j = 0; j < o.columns; j++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(top[i])) {\r\n top[i] = top[i - 1] + (o.rowSize[i - 1] < 1 ? o.rowSize[i - 1] : o.rowSize[i - 1] + o.vgap + o.bgap);\r\n }\r\n var t = top[i] <= 1 ? top[i] * 100 + \"%\" : top[i] + o.vgap + o.tgap + \"px\", h = \"\";\r\n if (BI.isNumber(o.rowSize[i])) {\r\n h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + \"%\" : o.rowSize[i] + \"px\";\r\n }\r\n wi.element.css({top: t, height: h});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.rowSize[i])) {\r\n break;\r\n }\r\n }\r\n // 从下到上\r\n for (var i = o.rows - 1; i >= 0; i--) {\r\n for (var j = 0; j < o.columns; j++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(bottom[i])) {\r\n bottom[i] = bottom[i + 1] + (o.rowSize[i + 1] < 1 ? o.rowSize[i + 1] : o.rowSize[i + 1] + o.vgap + o.tgap);\r\n }\r\n var b = bottom[i] <= 1 ? bottom[i] * 100 + \"%\" : bottom[i] + o.vgap + o.bgap + \"px\", h = \"\";\r\n if (BI.isNumber(o.rowSize[i])) {\r\n h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + \"%\" : o.rowSize[i] + \"px\";\r\n }\r\n wi.element.css({bottom: b, height: h});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.rowSize[i])) {\r\n break;\r\n }\r\n }\r\n // 从左到右\r\n for (var j = 0; j < o.columns; j++) {\r\n for (var i = 0; i < o.rows; i++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(left[j])) {\r\n left[j] = left[j - 1] + (o.columnSize[j - 1] < 1 ? o.columnSize[j - 1] : o.columnSize[j - 1] + o.hgap + o.rgap);\r\n }\r\n var l = left[j] <= 1 ? left[j] * 100 + \"%\" : left[j] + o.hgap + o.lgap + \"px\", w = \"\";\r\n if (BI.isNumber(o.columnSize[j])) {\r\n w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j] + \"px\";\r\n }\r\n wi.element.css({left: l, width: w});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.columnSize[j])) {\r\n break;\r\n }\r\n }\r\n // 从右到左\r\n for (var j = o.columns - 1; j >= 0; j--) {\r\n for (var i = 0; i < o.rows; i++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(right[j])) {\r\n right[j] = right[j + 1] + (o.columnSize[j + 1] < 1 ? o.columnSize[j + 1] : o.columnSize[j + 1] + o.hgap + o.lgap);\r\n }\r\n var r = right[j] <= 1 ? right[j] * 100 + \"%\" : right[j] + o.hgap + o.rgap + \"px\", w = \"\";\r\n if (BI.isNumber(o.columnSize[j])) {\r\n w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j] + \"px\";\r\n }\r\n wi.element.css({right: r, width: w});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.columnSize[j])) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.WindowLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.window\", BI.WindowLayout);/**\r\n * 水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\r\n * @class BI.CenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.CenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.CenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var list = [], items = o.items;\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: i,\r\n row: 0,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\",\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: list.length,\r\n rows: 1,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.center\", BI.CenterLayout);/**\r\n * 浮动布局实现的居中容器\r\n * @class BI.FloatCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FloatCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [], width = 100 / items.length;\r\n BI.each(items, function (i) {\r\n var widget = BI.createWidget({\r\n type: \"bi.default\"\r\n });\r\n widget.element.addClass(\"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")).css({\r\n width: width + \"%\",\r\n height: \"100%\"\r\n });\r\n list.push({\r\n el: widget\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\",\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.left\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"floatcenter布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.float_center\", BI.FloatCenterLayout);/**\r\n * 水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\r\n * @class BI.HorizontalCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [];\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: i,\r\n row: 0,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: list.length,\r\n rows: 1,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_center\", BI.HorizontalCenterLayout);/**\r\n * 垂直方向都居中容器, 非自适应,用于高度不固定的面板\r\n * @class BI.VerticalCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-vertical-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.VerticalCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [];\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: 0,\r\n row: i,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: 1,\r\n rows: list.length,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"vertical_center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical_center\", BI.VerticalCenterLayout);/**\r\n * 缓冲池\r\n * @type {{Buffer: {}}}\r\n */\r\n\r\n(function () {\r\n var Buffer = {};\r\n var MODE = false;// 设置缓存模式为关闭\r\n\r\n BI.BufferPool = {\r\n put: function (name, cache) {\r\n if (BI.isNotNull(Buffer[name])) {\r\n throw new Error(\"Buffer Pool has the key already!\");\r\n }\r\n Buffer[name] = cache;\r\n },\r\n\r\n get: function (name) {\r\n return Buffer[name];\r\n }\r\n };\r\n})();/**\r\n * 共享池\r\n * @type {{Shared: {}}}\r\n */\r\n\r\n(function () {\r\n var _Shared = {};\r\n BI.SharingPool = {\r\n _Shared: _Shared,\r\n put: function (name, shared) {\r\n _Shared[name] = shared;\r\n },\r\n\r\n cat: function () {\r\n var args = Array.prototype.slice.call(arguments, 0),\r\n copy = _Shared;\r\n for (var i = 0; i < args.length; i++) {\r\n copy = copy && copy[args[i]];\r\n }\r\n return copy;\r\n },\r\n\r\n get: function () {\r\n return BI.deepClone(this.cat.apply(this, arguments));\r\n },\r\n\r\n remove: function (key) {\r\n delete _Shared[key];\r\n }\r\n };\r\n})();BI.Req = {\r\n\r\n};\r\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\r\n\r\n(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('underscore')) : typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'underscore'], factory) : factory(global.Fix = global.Fix || {}, global._, global._);\r\n})(this, function (exports, lodash, _$1) {\r\n 'use strict';\r\n\r\n _$1 = 'default' in _$1 ? _$1['default'] : _$1;\r\n\r\n var falsy = void 0;\r\n var $$skipArray = {\r\n $accessors: falsy,\r\n $vbthis: falsy,\r\n $vbsetter: falsy,\r\n $vm: falsy\r\n };\r\n\r\n var $$skips = ['$accessors', '$vbthis', '$vbsetter', '$vm'];\r\n\r\n var originalMethods = [];\r\n _$1.each(['slice', 'splice'], function (method) {\r\n originalMethods[method] = Array.prototype[method];\r\n });\r\n\r\n // Array.prototype.slice = function (...args) {\r\n // let array = originalMethods[\"slice\"].apply(this, args);\r\n // // let result = [];\r\n // // for (let i = 0; i < array.length; i++) {\r\n // // if (Object.prototype.toString.call(array[i]) === \"[object Array]\") result[i] = [...array[i]];\r\n // // if (Object.prototype.toString.call(array[i]) === \"[object Object]\") result[i] = _.extend({}, array[i]);\r\n // // result[i] = array[i];\r\n // // }\r\n // this.__ref__ = makeHashCode();\r\n // return array;\r\n // }\r\n\r\n Array.prototype.splice = function () {\r\n // for (let i = 0; i < this.length; i++) {\r\n // if (Object.prototype.toString.call(this[i]) === \"[object Array]\") this[i] = [...this[i]];\r\n // if (Object.prototype.toString.call(this[i]) === \"[object Object]\") this[i] = _.extend({}, this[i]);\r\n // }\r\n this.__ref__ = makeHashCode();\r\n\r\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\r\n args[_key] = arguments[_key];\r\n }\r\n\r\n return originalMethods[\"splice\"].apply(this, args);\r\n };\r\n\r\n function noop(a, b, c) {}\r\n\r\n function isNative(Ctor) {\r\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\r\n }\r\n\r\n var rhashcode = /\\d\\.\\d{4}/;\r\n\r\n // 生成UUID http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript\r\n function makeHashCode() {\r\n var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bi';\r\n\r\n /* istanbul ignore next*/\r\n return String(Math.random() + Math.random()).replace(rhashcode, prefix);\r\n }\r\n\r\n function isIE() {\r\n if (typeof navigator === 'undefined') {\r\n return false;\r\n }\r\n\r\n return (/(msie|trident)/i.test(navigator.userAgent.toLowerCase())\r\n );\r\n }\r\n\r\n function getIEVersion() {\r\n var version = 0;\r\n if (typeof navigator === 'undefined') {\r\n return false;\r\n }\r\n var agent = navigator.userAgent.toLowerCase();\r\n var v1 = agent.match(/(?:msie\\s([\\w.]+))/);\r\n var v2 = agent.match(/(?:trident.*rv:([\\w.]+))/);\r\n if (v1 && v2 && v1[1] && v2[1]) {\r\n version = Math.max(v1[1] * 1, v2[1] * 1);\r\n } else if (v1 && v1[1]) {\r\n version = v1[1] * 1;\r\n } else if (v2 && v2[1]) {\r\n version = v2[1] * 1;\r\n } else {\r\n version = 0;\r\n }\r\n\r\n return version;\r\n }\r\n var isIE9Below = isIE() && getIEVersion() < 9;\r\n\r\n var _toString = Object.prototype.toString;\r\n\r\n function isPlainObject(obj) {\r\n return _toString.call(obj) === '[object Object]';\r\n }\r\n\r\n var bailRE = /[^\\w.$]/;\r\n\r\n /* eslint no-param-reassign: ['off'] */\r\n function parsePath(path) {\r\n if (bailRE.test(path)) {\r\n return;\r\n }\r\n var segments = path.split('.');\r\n\r\n return function (obj) {\r\n for (var i = 0; i < segments.length; i++) {\r\n if (!obj) return;\r\n obj = obj[segments[i]];\r\n }\r\n\r\n return obj;\r\n };\r\n }\r\n\r\n function toJSON(model) {\r\n var result = void 0;\r\n if (_$1.isArray(model)) {\r\n result = [];\r\n for (var i = 0, len = model.length; i < len; i++) {\r\n result[i] = toJSON(model[i]);\r\n }\r\n } else if (model && isPlainObject(model)) {\r\n result = {};\r\n for (var key in model) {\r\n if ($$skips.indexOf(key) === -1) {\r\n result[key] = toJSON(model[key]);\r\n }\r\n }\r\n } else {\r\n result = model;\r\n }\r\n return result;\r\n }\r\n\r\n function cloneShadow(obj) {\r\n if (obj === null) return null;\r\n\r\n if (Array.isArray(obj)) {\r\n var result = [].concat(obj);\r\n if (obj.__ref__ !== undefined) result.__ref__ = obj.__ref__;\r\n return result;\r\n }\r\n\r\n return toJSON(obj);\r\n }\r\n\r\n var nextTick = function () {\r\n var callbacks = [];\r\n var pending = false;\r\n var timerFunc = void 0;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks.length = 0;\r\n for (var i = 0; i < copies.length; i++) {\r\n copies[i]();\r\n }\r\n }\r\n\r\n // An asynchronous deferring mechanism.\r\n // In pre 2.4, we used to use microtasks (Promise/MutationObserver)\r\n // but microtasks actually has too high a priority and fires in between\r\n // supposedly sequential events (e.g. #4521, #6690) or even between\r\n // bubbling of the same event (#6566). Technically setImmediate should be\r\n // the ideal choice, but it's not available everywhere; and the only polyfill\r\n // that consistently queues the callback after all DOM events triggered in the\r\n // same loop is by using MessageChannel.\r\n /* istanbul ignore if */\r\n if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\r\n timerFunc = function timerFunc() {\r\n setImmediate(nextTickHandler);\r\n };\r\n } else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||\r\n // PhantomJS\r\n MessageChannel.toString() === '[object MessageChannelConstructor]')) {\r\n var channel = new MessageChannel();\r\n var port = channel.port2;\r\n channel.port1.onmessage = nextTickHandler;\r\n timerFunc = function timerFunc() {\r\n port.postMessage(1);\r\n };\r\n /* istanbul ignore next */\r\n } else if (typeof Promise !== 'undefined' && isNative(Promise)) {\r\n // use microtask in non-DOM environments, e.g. Weex\r\n var p = Promise.resolve();\r\n timerFunc = function timerFunc() {\r\n p.then(nextTickHandler);\r\n };\r\n } else {\r\n // fallback to setTimeout\r\n timerFunc = function timerFunc() {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n\r\n return function queueNextTick(cb, ctx) {\r\n var _resolve = void 0;\r\n callbacks.push(function () {\r\n if (cb) {\r\n try {\r\n cb.call(ctx);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else if (_resolve) {\r\n _resolve(ctx);\r\n }\r\n });\r\n if (!pending) {\r\n pending = true;\r\n timerFunc();\r\n }\r\n // $flow-disable-line\r\n if (!cb && typeof Promise !== 'undefined') {\r\n return new Promise(function (resolve, reject) {\r\n _resolve = resolve;\r\n });\r\n }\r\n };\r\n }();\r\n\r\n function inherit(sb, sp, overrides) {\r\n if (typeof sp === \"object\") {\r\n overrides = sp;\r\n sp = sb;\r\n sb = function temp() {\r\n return sp.apply(this, arguments);\r\n };\r\n }\r\n var F = function F() {},\r\n spp = sp.prototype;\r\n F.prototype = spp;\r\n sb.prototype = new F();\r\n sb.superclass = spp;\r\n _$1.extend(sb.prototype, overrides, {\r\n superclass: sp\r\n });\r\n return sb;\r\n }\r\n\r\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\r\n var ObjProto = Object.prototype;\r\n var toString = ObjProto.toString;\r\n\r\n // Internal recursive comparison function for `isEqual`.\r\n /* eslint no-param-reassign: ['off'] */\r\n /* eslint no-use-before-define: [\"off\"] */\r\n var deepEq = function deepEq(a, b, aStack, bStack) {\r\n // Unwrap any wrapped objects.\r\n if (a instanceof _$1) a = a._wrapped;\r\n if (b instanceof _$1) b = b._wrapped;\r\n // Compare `[[Class]]` names.\r\n var className = toString.call(a);\r\n if (className !== toString.call(b)) return false;\r\n switch (className) {\r\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\r\n case '[object RegExp]':\r\n case '[object String]':\r\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\r\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\r\n // equivalent to `new String(\"5\")`.\r\n return '' + a === '' + b;\r\n case '[object Number]':\r\n // `NaN`s are equivalent, but non-reflexive.\r\n // Object(NaN) is equivalent to NaN.\r\n if (+a !== +a) return +b !== +b;\r\n // An `egal` comparison is performed for other numeric values.\r\n\r\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\r\n case '[object Date]':\r\n case '[object Boolean]':\r\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\r\n // millisecond representations. Note that invalid dates with millisecond representations\r\n // of `NaN` are not equivalent.\r\n return +a === +b;\r\n case '[object Symbol]':\r\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\r\n default:\r\n }\r\n\r\n var areArrays = className === '[object Array]';\r\n\r\n if (!areArrays) {\r\n if (typeof a != 'object' || typeof b != 'object') return false;\r\n\r\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\r\n // from different frames are.\r\n var aCtor = a.constructor,\r\n bCtor = b.constructor;\r\n if (aCtor !== bCtor && !(_$1.isFunction(aCtor) && aCtor instanceof aCtor && _$1.isFunction(bCtor) && bCtor instanceof bCtor) && 'constructor' in a && 'constructor' in b) {\r\n return false;\r\n }\r\n }\r\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\r\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\r\n\r\n // Initializing stack of traversed objects.\r\n // It's done here since we only need them for objects and arrays comparison.\r\n aStack = aStack || [];\r\n bStack = bStack || [];\r\n var length = aStack.length;\r\n while (length--) {\r\n // Linear search. Performance is inversely proportional to the number of\r\n // unique nested structures.\r\n if (aStack[length] === a) return bStack[length] === b;\r\n }\r\n\r\n // Add the first object to the stack of traversed objects.\r\n aStack.push(a);\r\n bStack.push(b);\r\n\r\n // Recursively compare objects and arrays.\r\n if (areArrays) {\r\n // Compare array lengths to determine if a deep comparison is necessary.\r\n length = a.length;\r\n if (length !== b.length) return false;\r\n // Deep compare the contents, ignoring non-numeric properties.\r\n while (length--) {\r\n if (!eq(a[length], b[length], aStack, bStack)) return false;\r\n }\r\n } else {\r\n // Deep compare objects.\r\n var keys = _$1.keys(a);var key = void 0;\r\n length = keys.length;\r\n // Ensure that both objects contain the same number of properties before comparing deep equality.\r\n if (_$1.keys(b).length !== length) return false;\r\n while (length--) {\r\n // Deep compare each member\r\n key = keys[length];\r\n if ($$skips.indexOf(key) !== -1) {\r\n return true;\r\n }\r\n\r\n if (!(Object.keys(b).indexOf(key) !== -1 && eq(a[key], b[key], aStack, bStack))) return false;\r\n }\r\n }\r\n // Remove the first object from the stack of traversed objects.\r\n aStack.pop();\r\n bStack.pop();\r\n\r\n return true;\r\n };\r\n\r\n var eq = function eq(a, b, aStack, bStack) {\r\n // Identical objects are equal. `0 === -0`, but they aren't identical.\r\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\r\n if (a === b) return a !== 0 || 1 / a === 1 / b;\r\n // `null` or `undefined` only equal to itself (strict comparison).\r\n if (a == null || b == null) return false;\r\n // `NaN`s are equivalent, but non-reflexive.\r\n if (a !== a) return b !== b;\r\n // Exhaust primitive checks\r\n var type = typeof a;\r\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\r\n\r\n // skip function\r\n if (type === 'function') return true;\r\n\r\n return deepEq(a, b, aStack, bStack);\r\n };\r\n\r\n // export function isShadowEqual(a, b) {\r\n // return shadowEq(a, b);\r\n // }\r\n\r\n function isShadowEqual(a, b) {\r\n if (a === b) return true;\r\n\r\n if (a && b && typeof a == 'object' && typeof b == 'object') {\r\n if (a.constructor !== b.constructor) return false;\r\n\r\n var length = void 0,\r\n i = void 0,\r\n key = void 0,\r\n keys = void 0;\r\n if (Array.isArray(a)) {\r\n length = a.length;\r\n if (length !== b.length) return false;\r\n for (i = length; i-- !== 0;) {\r\n if (!isShadowEqual(a[i], b[i])) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n if (a.constructor === RegExp) return true;\r\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\r\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\r\n\r\n keys = Object.keys(a);\r\n length = keys.length;\r\n if (length !== Object.keys(b).length) return false;\r\n\r\n for (i = length; i-- !== 0;) {\r\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\r\n }\r\n\r\n for (i = length; i-- !== 0;) {\r\n key = keys[i];\r\n if ($$skips.indexOf(key) !== -1) continue;\r\n if (!isShadowEqual(a[key], b[key])) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // skip function\r\n if (typeof a === 'function') return true;\r\n\r\n // true if both NaN, false otherwise\r\n return a !== a && b !== b;\r\n }\r\n\r\n var mixinInjection = {};\r\n\r\n function getMixins(type) {\r\n return mixinInjection[type];\r\n }\r\n\r\n function mixin(xtype, cls) {\r\n mixinInjection[xtype] = _.cloneDeep(cls);\r\n }\r\n\r\n var falsy$1 = void 0;\r\n var operators = {\r\n '||': falsy$1,\r\n '&&': falsy$1,\r\n '(': falsy$1,\r\n ')': falsy$1\r\n };\r\n\r\n function runBinaryFunction(binarys) {\r\n var expr = '';\r\n for (var i = 0, len = binarys.length; i < len; i++) {\r\n if (_$1.isBoolean(binarys[i]) || _$1.has(operators, binarys[i])) {\r\n expr += binarys[i];\r\n } else {\r\n expr += 'false';\r\n }\r\n }\r\n\r\n return new Function('return ' + expr)();\r\n }\r\n\r\n function watch(vm, expOrFn, cb) {\r\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\r\n\r\n var model = vm;\r\n if (!model.$watch && model.$vm) {\r\n model = model.$vm;\r\n }\r\n if (isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === 'string') {\r\n cb = model[cb];\r\n }\r\n options = options || {};\r\n options.user = true;\r\n var exps = void 0;\r\n if (_$1.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\\*/.test(expOrFn)) {\r\n model.$watch(expOrFn, cb, options);\r\n\r\n return [];\r\n }\r\n var watchers = [];\r\n var fns = exps.slice();\r\n var complete = false,\r\n running = false;\r\n var callback = function callback(index, newValue, oldValue, attrs) {\r\n if (complete === true) {\r\n return;\r\n }\r\n fns[index] = true;\r\n if (runBinaryFunction(fns)) {\r\n complete = true;\r\n cb.call(vm, newValue, oldValue, attrs);\r\n }\r\n if (options && options.sync) {\r\n complete = false;\r\n running = false;\r\n fns = exps.slice();\r\n } else {\r\n if (!running) {\r\n running = true;\r\n nextTick(function () {\r\n complete = false;\r\n running = false;\r\n fns = exps.slice();\r\n });\r\n }\r\n }\r\n };\r\n _$1.each(exps, function (exp, i) {\r\n if (_$1.has(operators, exp)) {\r\n return;\r\n }\r\n // a.**或a.*形式\r\n if (/^[1-9a-zA-Z.]+(\\*\\*$|\\*$)/.test(exp) || exp === '**') {\r\n var isGlobal = /\\*\\*$/.test(exp);\r\n if (isGlobal) {\r\n // a.**的形式\r\n exp = exp.replace('.**', '');\r\n } else {\r\n // a.*的形式\r\n exp = exp.replace('.*', '');\r\n }\r\n var getter = isGlobal ? exp : function () {\r\n var result = {};\r\n _$1.each(model.model, function (v, key) {\r\n if (key in $$skipArray) return;\r\n result[key] = v;\r\n });\r\n\r\n return result;\r\n };\r\n model.$watch(getter, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, _$1.extend(options, {\r\n deep: isGlobal\r\n }));\r\n\r\n return;\r\n }\r\n if (/\\*\\*$|\\*$/.test(exp)) {\r\n throw new Error('not support');\r\n }\r\n // 其他含有*的情况,如*.a,*.*.a,a.*.a\r\n if (/\\*/.test(exp)) {\r\n // 先获取到能获取到的对象\r\n var paths = exp.split('.');\r\n var _getter = function _getter() {\r\n var currentModels = {\r\n root: model.model\r\n };\r\n\r\n var _loop = function _loop(len, _i) {\r\n var models = {};\r\n if (paths[_i] === '*') {\r\n _$1.each(currentModels, function (model, key) {\r\n _$1.each(model, function (v, k) {\r\n if (key + k in $$skipArray) return;\r\n models[key + k] = v;\r\n });\r\n });\r\n } else {\r\n _$1.each(currentModels, function (model, key) {\r\n if (key + paths[_i] in $$skipArray) return;\r\n models[key + paths[_i]] = model[paths[_i]];\r\n });\r\n }\r\n currentModels = models;\r\n };\r\n\r\n for (var _i = 0, len = paths.length; _i < len; _i++) {\r\n _loop(len, _i);\r\n }\r\n\r\n return currentModels;\r\n };\r\n model.$watch(_getter, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, options);\r\n\r\n return;\r\n }\r\n model.$watch(exp, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, options);\r\n });\r\n\r\n return watchers;\r\n }\r\n\r\n var allModelInstances = {};\r\n var allDefineModelInstances = {};\r\n var emptyFn = function emptyFn() {};\r\n var TTL = 10;\r\n\r\n var Watcher = function () {\r\n function Watcher(_ref) {\r\n var get = _ref.get,\r\n last = _ref.last,\r\n listener = _ref.listener,\r\n sync = _ref.sync,\r\n deep = _ref.deep,\r\n id = _ref.id;\r\n\r\n _classCallCheck(this, Watcher);\r\n\r\n this.id = id;\r\n this.get = get;\r\n this.last = cloneShadow(last);\r\n this.listener = listener || emptyFn;\r\n this.sync = sync || false;\r\n\r\n return {\r\n id: this.id,\r\n get: this.get,\r\n last: this.last,\r\n listener: this.listener\r\n };\r\n }\r\n\r\n // 不要去掉,为了兼容IE8,IE8下instance of Constructor如果不绑定函数会出错\r\n\r\n\r\n Watcher.prototype.getInstance = function getInstance() {\r\n return this;\r\n };\r\n\r\n return Watcher;\r\n }();\r\n\r\n function initState(vm, state) {\r\n var watchers = vm._stateWatchers = {};\r\n for (var key in state) {\r\n vm.model[key] = state[key];\r\n }\r\n // state暂不支持func和context\r\n\r\n var _loop2 = function _loop2(_key2) {\r\n var userDef = state[_key2];\r\n\r\n watchers[_key2] = new Watcher({\r\n id: vm._modelHashId + '-' + _key2,\r\n get: function get() {\r\n return vm.model[_key2];\r\n },\r\n last: userDef,\r\n listener: vm.options.defaultCallback || emptyFn\r\n });\r\n };\r\n\r\n for (var _key2 in state) {\r\n _loop2(_key2);\r\n }\r\n }\r\n\r\n function initComputed(vm, computed) {\r\n var watchers = vm._computedWatchers = {};\r\n var order = vm._computedOrder = [];\r\n\r\n for (var key in computed) {\r\n var userDef = computed[key],\r\n context = vm;\r\n\r\n order.push(key);\r\n\r\n watchers[key] = new Watcher({\r\n id: vm._modelHashId + '-' + key,\r\n get: _$1.bind(userDef, context),\r\n last: undefined,\r\n listener: emptyFn\r\n });\r\n }\r\n }\r\n\r\n function initWatch(vm, watchObj) {\r\n vm._watchers || (vm._watchers = []);\r\n for (var expOrFn in watchObj) {\r\n var handler = watchObj[expOrFn];\r\n if (_$1.isArray(handler)) {\r\n for (var i = 0; i < handler.length; i++) {\r\n watch(vm, expOrFn, handler[i]);\r\n }\r\n } else {\r\n watch(vm, expOrFn, handler);\r\n }\r\n }\r\n }\r\n\r\n /* eslint no-param-reassign: ['off'] */\r\n function createWatcher(vm, expOrFn, cb) {\r\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\r\n\r\n if (isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === 'string') {\r\n cb = vm[cb];\r\n }\r\n var getter = _$1.isFunction(expOrFn) ? _$1.bind(expOrFn, vm) : _$1.bind(function () {\r\n return parsePath('model.' + expOrFn)(vm);\r\n }, vm);\r\n\r\n return new Watcher({\r\n get: getter,\r\n listener: _$1.bind(cb, vm),\r\n last: getter(),\r\n sync: options.sync,\r\n deep: options.deep,\r\n id: options.id\r\n });\r\n }\r\n\r\n function injectMethod(method, vm) {\r\n return function () {\r\n var result = method.apply(vm, [].concat(Array.prototype.slice.call(arguments)));\r\n // 有回调的函数不作处理,拦截ajax请求\r\n vm.$digest();\r\n\r\n return result;\r\n };\r\n }\r\n\r\n function initMethods(vm, methods) {\r\n for (var key in methods) {\r\n vm[key] = methods[key] == null ? noop : injectMethod(methods[key], vm);\r\n }\r\n }\r\n\r\n function initMixins(vm) {\r\n var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\r\n\r\n _$1.each(mixins.reverse(), function (mixinType) {\r\n var mixin$$1 = getMixins(mixinType);\r\n\r\n for (var key in mixin$$1) {\r\n if (typeof mixin$$1[key] !== 'function') continue;\r\n\r\n if (_$1.has(vm, key)) continue;\r\n\r\n vm[key] = injectMethod(mixin$$1[key], vm);\r\n }\r\n });\r\n }\r\n\r\n function defineContext(vm, keys) {\r\n var watchers = vm._contextWatchers = {};\r\n\r\n // 相关context挂上别的model中的修改监听\r\n function getSingleContext(key) {\r\n var p = vm._parent;\r\n while (p) {\r\n if (p.childContext && p.childContext.indexOf(key) > -1) {\r\n p.$watch(key, function (cur, last, p) {\r\n if (!vm._contextWatchers[key]) return;\r\n vm.model[key] = cur;\r\n vm._contextWatchers[key].last = cloneShadow(cur); // 避免重复调用(可以改成给watch添加一个参数保证下次比较一定相同)\r\n vm.$digest();\r\n }, {\r\n id: vm._modelHashId + '-' + key\r\n });\r\n\r\n return {\r\n p: p,\r\n value: p.model[key]\r\n };\r\n }\r\n p = p._parent;\r\n }\r\n }\r\n\r\n _$1.each(keys, function (key) {\r\n var context = getSingleContext(key);\r\n if (!context) return;\r\n vm.model[key] = context.p ? context.p.model[key] : undefined;\r\n watchers[key] = new Watcher({\r\n id: context.p._modelHashId + '-' + key,\r\n get: function get() {\r\n return vm.model[key];\r\n },\r\n last: vm.model[key],\r\n listener: _$1.bind(function (c) {\r\n context.p.model[key] = c;\r\n // context.p.model[key] = vm.model[key];\r\n context.p.$digest();\r\n }, context.p)\r\n });\r\n });\r\n }\r\n\r\n function digestState(vm) {\r\n var dirty = false;\r\n _$1.each(vm._stateWatchers, function (watcher, key) {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n // addToListenerQueue(vm, watcher, cur, last);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n watcher.last = cloneShadow(cur);\r\n }\r\n });\r\n\r\n return dirty;\r\n }\r\n\r\n function digestComputed(vm) {\r\n var dirty = false;\r\n var dirtyQueue = [],\r\n cleanQueue = [];\r\n\r\n _$1.each(vm._computedOrder, function (key) {\r\n var watcher = vm._computedWatchers[key];\r\n\r\n try {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n // addToListenerQueue(vm, watcher, cur, last);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n dirtyQueue.push(key);\r\n watcher.last = cloneShadow(cur);\r\n } else {\r\n cleanQueue.push(key);\r\n }\r\n } catch (err) {\r\n dirty = true;\r\n dirtyQueue.push(key);\r\n }\r\n });\r\n\r\n vm._computedOrder = [].concat(cleanQueue, dirtyQueue);\r\n\r\n return dirty;\r\n }\r\n\r\n function digestContext(vm) {\r\n var dirty = false;\r\n _$1.each(vm._contextWatchers, function (watcher, key) {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n var listener = {\r\n id: watcher.id,\r\n cb: _$1.bind(watcher.listener, vm, cur, last, vm)\r\n };\r\n vm.contextListeners.push(listener);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n watcher.last = cloneShadow(cur);\r\n }\r\n });\r\n\r\n return dirty;\r\n }\r\n\r\n function digest(vm) {\r\n var stateDirty = true,\r\n contextDirty = true,\r\n computedDirty = true;\r\n for (var ttl = TTL; stateDirty && ttl > 0; ttl--) {\r\n stateDirty = digestState(vm);\r\n }\r\n for (var _ttl = TTL; contextDirty && _ttl > 0; _ttl--) {\r\n contextDirty = digestContext(vm);\r\n }\r\n for (var _ttl2 = TTL; computedDirty && _ttl2 > 0; _ttl2--) {\r\n computedDirty = digestComputed(vm);\r\n }\r\n }\r\n\r\n var nextListener = function () {\r\n var callbackMap = {};\r\n\r\n return function queueNextListener(listener, ctx) {\r\n var id = listener.id;\r\n var cb = listener.cb;\r\n if (id && callbackMap[id]) {\r\n return;\r\n }\r\n nextTick(function () {\r\n cb();\r\n callbackMap[id] = false;\r\n }, ctx);\r\n callbackMap[id] = true;\r\n };\r\n }();\r\n\r\n function executeWatchListeners(vm) {\r\n var syncListeners = [].concat(vm.syncListeners || []);\r\n var asyncListeners = [].concat(vm.asyncListeners || []);\r\n var contextListeners = [].concat(vm.contextListeners || []);\r\n\r\n vm.asyncListeners = [];\r\n vm.syncListeners = [];\r\n\r\n var watchers = [].concat(vm._watchers);\r\n\r\n _$1.each(watchers, function (watcher) {\r\n if (!watcher) return;\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n\r\n if (isShadowEqual(cur, last)) return;\r\n\r\n var listner = {\r\n id: watcher.id,\r\n cb: _$1.bind(watcher.listener, vm, cur, last, vm)\r\n };\r\n\r\n watcher.sync === true ? syncListeners.push(listner) : asyncListeners.push(listner);\r\n\r\n watcher.last = cloneShadow(cur);\r\n });\r\n\r\n _$1.each(syncListeners, function (listener) {\r\n listener.cb();\r\n });\r\n if (contextListeners.length !== 0 || asyncListeners.length !== 0) {\r\n nextTick(function () {\r\n _$1.each(BI.uniqBy(contextListeners.reverse(), \"id\").reverse(), function (listener) {\r\n listener.cb();\r\n });\r\n _$1.each(asyncListeners, function (listener) {\r\n listener.cb();\r\n });\r\n });\r\n }\r\n }\r\n\r\n function refreshAllDefineModel() {\r\n _$1.each(allDefineModelInstances, function (insta) {\r\n insta && insta.$digest && insta.$digest();\r\n });\r\n }\r\n\r\n var Model = function () {\r\n function Model() {\r\n _classCallCheck(this, Model);\r\n }\r\n\r\n Model.prototype._constructor = function _constructor(model) {\r\n this.alive = true;\r\n this.options = model || {};\r\n this.model = {\r\n $vm: this\r\n };\r\n this._modelHashId = makeHashCode('model');\r\n this.syncListeners = [];\r\n this.asyncListeners = [];\r\n this.contextListeners = [];\r\n\r\n this._parent = Model.target;\r\n var state = _$1.isFunction(this.state) ? this.state() : this.state;\r\n var computed = this.computed;\r\n // Todo\r\n var context = this.context;\r\n var childContext = this.childContext;\r\n var watch$$1 = this.watch;\r\n var actions = this.actions;\r\n var mixins = this.mixins;\r\n\r\n context && defineContext(this, context);\r\n\r\n initMixins(this, mixins);\r\n this.init();\r\n initState(this, state);\r\n initComputed(this, computed);\r\n digest(this);\r\n initWatch(this, watch$$1);\r\n initMethods(this, actions);\r\n this.created && this.created();\r\n allModelInstances[this._modelHashId] = this;\r\n };\r\n\r\n Model.prototype._init = function _init() {};\r\n\r\n Model.prototype.init = function init() {\r\n this._init();\r\n };\r\n\r\n Model.prototype.destroy = function destroy() {\r\n this.alive = false;\r\n allModelInstances[this._modelHashId] = null;\r\n this._watchers && (this._watchers = []);\r\n this._computedWatchers && (this._computedWatchers = []);\r\n this._stateWatchers && (this._stateWatchers = []);\r\n this._contextWatchers && (this._contextWatchers = []);\r\n this.destroyed && this.destroyed();\r\n };\r\n\r\n Model.prototype.$watch = function $watch(expOrFn, cb, options) {\r\n var watcher = createWatcher(this, expOrFn, cb, options);\r\n this._watchers.push(watcher);\r\n };\r\n\r\n Model.prototype.$digest = function $digest() {\r\n digest(this);\r\n\r\n executeWatchListeners(this);\r\n\r\n // 非define创建的model$digest触发所有define定义的model的$digest(未来需要平台去除这些写法))\r\n if (!this.options.define) {\r\n refreshAllDefineModel();\r\n }\r\n };\r\n\r\n Model.prototype.getModelID = function getModelID() {\r\n return this._modelHashId;\r\n };\r\n\r\n return Model;\r\n }();\r\n\r\n function getAllModelInstances() {\r\n return allModelInstances;\r\n }\r\n\r\n function refreshAll() {\r\n _$1.each(getAllModelInstances(), function (insta) {\r\n insta && insta.$digest && insta.$digest();\r\n });\r\n }\r\n\r\n function define(model) {\r\n var OB = inherit(Model, {\r\n state: function state() {\r\n return model;\r\n }\r\n });\r\n var ob = new OB();\r\n ob._constructor({\r\n define: true\r\n });\r\n allDefineModelInstances[ob.getModelID()] = ob;\r\n\r\n return ob.model;\r\n }\r\n\r\n var version = '2.0';\r\n\r\n exports.version = version;\r\n exports.$$skipArray = $$skipArray;\r\n exports.mixin = mixin;\r\n exports.toJSON = toJSON;\r\n exports.nextListener = nextListener;\r\n exports.Model = Model;\r\n exports.getAllModelInstances = getAllModelInstances;\r\n exports.refreshAll = refreshAll;\r\n exports.define = define;\r\n exports.inherit = inherit;\r\n exports.watch = watch;\r\n\r\n exports.__esModule = true;\r\n});/* !\r\n * jQuery Mousewheel 3.1.13\r\n *\r\n * Copyright jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n */\r\n\r\n(function (factory) {\r\n if ( typeof define === \"function\" && define.amd ) {\r\n // AMD. Register as an anonymous module.\r\n define([\"../core/jquery\"], factory);\r\n } else if (typeof exports === \"object\") {\r\n // Node/CommonJS style for Browserify\r\n module.exports = factory;\r\n } else {\r\n // Browser globals\r\n factory(BI.jQuery);\r\n }\r\n}(function ($) {\r\n\r\n var toFix = [\"wheel\", \"mousewheel\", \"DOMMouseScroll\", \"MozMousePixelScroll\"],\r\n toBind = ( \"onwheel\" in document || document.documentMode >= 9 ) ?\r\n [\"wheel\"] : [\"mousewheel\", \"DomMouseScroll\", \"MozMousePixelScroll\"],\r\n slice = Array.prototype.slice,\r\n nullLowestDeltaTimeout, lowestDelta;\r\n\r\n if ( $.event.fixHooks ) {\r\n for ( var i = toFix.length; i; ) {\r\n $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;\r\n }\r\n }\r\n\r\n var special = $.event.special.mousewheel = {\r\n version: \"3.1.12\",\r\n\r\n setup: function () {\r\n if ( this.addEventListener ) {\r\n for ( var i = toBind.length; i; ) {\r\n this.addEventListener( toBind[--i], handler, false );\r\n }\r\n } else {\r\n this.onmousewheel = handler;\r\n }\r\n },\r\n\r\n teardown: function () {\r\n if ( this.removeEventListener ) {\r\n for ( var i = toBind.length; i; ) {\r\n this.removeEventListener( toBind[--i], handler, false );\r\n }\r\n } else {\r\n this.onmousewheel = null;\r\n }\r\n },\r\n\r\n settings: {\r\n adjustOldDeltas: true, // see shouldAdjustOldDeltas() below\r\n normalizeOffset: true // calls getBoundingClientRect for each event\r\n }\r\n };\r\n\r\n $.fn.extend({\r\n mousewheel: function (fn) {\r\n return fn ? this.bind(\"mousewheel\", fn) : this.trigger(\"mousewheel\");\r\n },\r\n\r\n unmousewheel: function (fn) {\r\n return this.unbind(\"mousewheel\", fn);\r\n }\r\n });\r\n\r\n\r\n function handler (event) {\r\n var orgEvent = event || _global.event,\r\n args = slice.call(arguments, 1),\r\n delta = 0,\r\n deltaX = 0,\r\n deltaY = 0,\r\n absDelta = 0,\r\n offsetX = 0,\r\n offsetY = 0;\r\n event = $.event.fix(orgEvent);\r\n event.type = \"mousewheel\";\r\n\r\n // Old school scrollwheel delta\r\n if ( \"detail\" in orgEvent ) { deltaY = orgEvent.detail * -1; }\r\n if ( \"wheelDelta\" in orgEvent ) { deltaY = orgEvent.wheelDelta; }\r\n if ( \"wheelDeltaY\" in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }\r\n if ( \"wheelDeltaX\" in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }\r\n\r\n // Firefox < 17 horizontal scrolling related to DOMMouseScroll event\r\n if ( \"axis\" in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\r\n deltaX = deltaY * -1;\r\n deltaY = 0;\r\n }\r\n\r\n // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy\r\n delta = deltaY === 0 ? deltaX : deltaY;\r\n\r\n // New school wheel delta (wheel event)\r\n if ( \"deltaY\" in orgEvent ) {\r\n deltaY = orgEvent.deltaY * -1;\r\n delta = deltaY;\r\n }\r\n if ( \"deltaX\" in orgEvent ) {\r\n deltaX = orgEvent.deltaX;\r\n if ( deltaY === 0 ) { delta = deltaX * -1; }\r\n }\r\n\r\n // No change actually happened, no reason to go any further\r\n if ( deltaY === 0 && deltaX === 0 ) { return; }\r\n\r\n // Need to convert lines and pages to pixels if we aren't already in pixels\r\n // There are three delta modes:\r\n // * deltaMode 0 is by pixels, nothing to do\r\n // * deltaMode 1 is by lines\r\n // * deltaMode 2 is by pages\r\n if ( orgEvent.deltaMode === 1 ) {\r\n var lineHeight = 40;\r\n delta *= lineHeight;\r\n deltaY *= lineHeight;\r\n deltaX *= lineHeight;\r\n } else if ( orgEvent.deltaMode === 2 ) {\r\n var pageHeight = 800;\r\n delta *= pageHeight;\r\n deltaY *= pageHeight;\r\n deltaX *= pageHeight;\r\n }\r\n\r\n // Store lowest absolute delta to normalize the delta values\r\n absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );\r\n\r\n if ( !lowestDelta || absDelta < lowestDelta ) {\r\n lowestDelta = absDelta;\r\n\r\n // Adjust older deltas if necessary\r\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\r\n lowestDelta /= 40;\r\n }\r\n }\r\n\r\n // Adjust older deltas if necessary\r\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\r\n // Divide all the things by 40!\r\n delta /= 40;\r\n deltaX /= 40;\r\n deltaY /= 40;\r\n }\r\n\r\n // Get a whole, normalized value for the deltas\r\n delta = Math[ delta >= 1 ? \"floor\" : \"ceil\" ](delta / lowestDelta);\r\n deltaX = Math[ deltaX >= 1 ? \"floor\" : \"ceil\" ](deltaX / lowestDelta);\r\n deltaY = Math[ deltaY >= 1 ? \"floor\" : \"ceil\" ](deltaY / lowestDelta);\r\n\r\n // Normalise offsetX and offsetY properties\r\n if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {\r\n var boundingRect = this.getBoundingClientRect();\r\n offsetX = event.clientX - boundingRect.left;\r\n offsetY = event.clientY - boundingRect.top;\r\n }\r\n\r\n // Add information to the event object\r\n event.deltaX = deltaX;\r\n event.deltaY = deltaY;\r\n event.deltaFactor = lowestDelta;\r\n event.offsetX = offsetX;\r\n event.offsetY = offsetY;\r\n // Go ahead and set deltaMode to 0 since we converted to pixels\r\n // Although this is a little odd since we overwrite the deltaX/Y\r\n // properties with normalized deltas.\r\n event.deltaMode = 0;\r\n\r\n // Add event and delta to the front of the arguments\r\n args.unshift(event, delta, deltaX, deltaY);\r\n\r\n // Clearout lowestDelta after sometime to better\r\n // handle multiple device types that give different\r\n // a different lowestDelta\r\n // Ex: trackpad = 3 and mouse wheel = 120\r\n if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }\r\n nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);\r\n\r\n return ($.event.dispatch || $.event.handle).apply(this, args);\r\n }\r\n\r\n function nullLowestDelta () {\r\n lowestDelta = null;\r\n }\r\n\r\n function shouldAdjustOldDeltas (orgEvent, absDelta) {\r\n // If this is an older event and the delta is divisable by 120,\r\n // then we are assuming that the browser is treating this as an\r\n // older mouse wheel event and that we should divide the deltas\r\n // by 40 to try and get a more usable deltaFactor.\r\n // Side note, this actually impacts the reported scroll distance\r\n // in older browsers and can cause scrolling to be slower than native.\r\n // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.\r\n return special.settings.adjustOldDeltas && orgEvent.type === \"mousewheel\" && absDelta % 120 === 0;\r\n }\r\n\r\n}));/**\r\n * 当没有元素时有提示信息的view\r\n *\r\n * Created by GUY on 2015/9/8.\r\n * @class BI.Pane\r\n * @extends BI.Widget\r\n * @abstract\r\n */\r\nBI.Pane = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-pane\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n overlap: true,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _assertTip: function () {\r\n var o = this.options;\r\n if (!this._tipText) {\r\n this._tipText = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bi-tips\",\r\n text: o.tipText,\r\n height: 25\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n element: this,\r\n items: [this._tipText]\r\n });\r\n }\r\n },\r\n\r\n loading: function () {\r\n var self = this, o = this.options;\r\n var isIE = BI.isIE();\r\n var loadingAnimation = BI.createWidget({\r\n type: \"bi.horizontal\",\r\n cls: \"bi-loading-widget\" + (isIE ? \" wave-loading hack\" : \"\"),\r\n height: 30,\r\n width: 30,\r\n hgap: 5,\r\n vgap: 2.5,\r\n items: isIE ? [] : [{\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect1\",\r\n height: 25,\r\n width: 3\r\n }, {\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect2\",\r\n height: 25,\r\n width: 3\r\n }, {\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect3\",\r\n height: 25,\r\n width: 3\r\n }]\r\n });\r\n // pane在同步方式下由items决定tipText的显示与否\r\n // loading的异步情况下由loaded后对面板的populate的时机决定\r\n this.setTipVisible(false);\r\n if (o.overlap === true) {\r\n if (!BI.Layers.has(this.getName())) {\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n cls: \"loading-container\",\r\n items: [{\r\n el: loadingAnimation\r\n }],\r\n element: BI.Layers.make(this.getName(), this)\r\n });\r\n }\r\n BI.Layers.show(self.getName());\r\n } else if (BI.isNull(this._loading)) {\r\n this._loading = loadingAnimation;\r\n this._loading.element.css(\"zIndex\", 1);\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n element: this,\r\n cls: \"loading-container\",\r\n items: [{\r\n el: this._loading,\r\n left: 0,\r\n right: 0,\r\n top: 0\r\n }]\r\n });\r\n }\r\n this.element.addClass(\"loading-status\");\r\n },\r\n\r\n loaded: function () {\r\n var self = this, o = this.options;\r\n BI.Layers.remove(self.getName());\r\n this._loading && this._loading.destroy();\r\n this._loading && (this._loading = null);\r\n o.onLoaded();\r\n self.fireEvent(BI.Pane.EVENT_LOADED);\r\n this.element.removeClass(\"loading-status\");\r\n },\r\n\r\n check: function () {\r\n this.setTipVisible(BI.isEmpty(this.options.items));\r\n },\r\n\r\n setTipVisible: function (b) {\r\n if (b === true) {\r\n this._assertTip();\r\n this._tipText.setVisible(true);\r\n } else {\r\n this._tipText && this._tipText.setVisible(false);\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items || [];\r\n this.check();\r\n },\r\n\r\n empty: function () {\r\n\r\n }\r\n});\r\nBI.Pane.EVENT_LOADED = \"EVENT_LOADED\";/**\r\n * guy\r\n * 这仅仅只是一个超类, 所有简单控件的基类\r\n * 1、类的控制,\r\n * 2、title的控制\r\n * 3、文字超过边界显示3个点\r\n * 4、cursor默认pointor\r\n * @class BI.Single\r\n * @extends BI.Widget\r\n * @abstract\r\n */\r\nBI.Single = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Single.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-single\",\r\n readonly: false,\r\n title: null,\r\n warningTitle: null,\r\n tipType: null, // success或warning\r\n value: null,\r\n belowMouse: false // title是否跟随鼠标\r\n });\r\n },\r\n\r\n _showToolTip: function (e, opt) {\r\n opt || (opt = {});\r\n var self = this, o = this.options;\r\n var type = this.getTipType() || (this.isEnabled() ? \"success\" : \"warning\");\r\n var title = type === \"success\" ? this.getTitle() : (this.getWarningTitle() || this.getTitle());\r\n if (BI.isKey(title)) {\r\n BI.Tooltips.show(e, this.getName(), title, type, this, opt);\r\n if (o.action) {\r\n BI.Actions.runAction(o.action, \"hover\", o, this);\r\n }\r\n BI.Actions.runGlobalAction(\"hover\", o, this);\r\n }\r\n },\r\n\r\n _hideTooltip: function () {\r\n var self = this;\r\n var tooltip = BI.Tooltips.get(this.getName());\r\n if (BI.isNotNull(tooltip)) {\r\n tooltip.element.fadeOut(200, function () {\r\n BI.Tooltips.remove(self.getName());\r\n });\r\n }\r\n },\r\n\r\n _init: function () {\r\n BI.Single.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isKey(o.title) || BI.isKey(o.warningTitle)\r\n || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {\r\n this.enableHover({\r\n belowMouse: o.belowMouse,\r\n container: o.container\r\n });\r\n }\r\n },\r\n\r\n _clearTimeOut: function () {\r\n if (BI.isNotNull(this.showTimeout)) {\r\n clearTimeout(this.showTimeout);\r\n this.showTimeout = null;\r\n }\r\n if (BI.isNotNull(this.hideTimeout)) {\r\n clearTimeout(this.hideTimeout);\r\n this.hideTimeout = null;\r\n }\r\n },\r\n\r\n enableHover: function (opt) {\r\n opt || (opt = {});\r\n var self = this;\r\n if (!this._hoverBinded) {\r\n this.element.on(\"mouseenter.title\" + this.getName(), function (e) {\r\n self._e = e;\r\n if (self.getTipType() === \"warning\" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) {\r\n self.showTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.showTimeout)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }, 200);\r\n } else if (self.getTipType() === \"success\" || self.isEnabled()) {\r\n self.showTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.showTimeout)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }, 500);\r\n }\r\n });\r\n this.element.on(\"mousemove.title\" + this.getName(), function (e) {\r\n self._e = e;\r\n if (BI.isNotNull(self.showTimeout)) {\r\n clearTimeout(self.showTimeout);\r\n self.showTimeout = null;\r\n }\r\n if(BI.isNull(self.hideTimeout)) {\r\n self.hideTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.hideTimeout)) {\r\n self._hideTooltip();\r\n }\r\n }, 500);\r\n }\r\n\r\n self.showTimeout = BI.delay(function () {\r\n // DEC-5321 IE下如果回调已经进入事件队列,clearTimeout将不会起作用\r\n if (BI.isNotNull(self.showTimeout)) {\r\n if (BI.isNotNull(self.hideTimeout)) {\r\n clearTimeout(self.hideTimeout);\r\n self.hideTimeout = null;\r\n }\r\n // CHART-10611 在拖拽的情况下, 鼠标拖拽着元素离开了拖拽元素的容器,但是子元素在dom结构上仍然属于容器\r\n // 这样会认为鼠标仍然在容器中, 500ms内放开的话,会在容器之外显示鼠标停留处显示容器的title\r\n if (self.element.__isMouseInBounds__(self._e || e)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }\r\n }, 500);\r\n\r\n });\r\n this.element.on(\"mouseleave.title\" + this.getName(), function (e) {\r\n self._e = null;\r\n self._clearTimeOut();\r\n self._hideTooltip();\r\n });\r\n this._hoverBinded = true;\r\n }\r\n },\r\n\r\n disabledHover: function () {\r\n // 取消hover事件\r\n this._clearTimeOut();\r\n this._hideTooltip();\r\n this.element.unbind(\"mouseenter.title\" + this.getName())\r\n .unbind(\"mousemove.title\" + this.getName())\r\n .unbind(\"mouseleave.title\" + this.getName());\r\n this._hoverBinded = false;\r\n },\r\n\r\n populate: function (items) {\r\n this.items = items || [];\r\n },\r\n\r\n // opt: {container: '', belowMouse: false}\r\n setTitle: function (title, opt) {\r\n this.options.title = title;\r\n if (BI.isKey(title) || BI.isFunction(title)) {\r\n this.enableHover(opt);\r\n } else {\r\n this.disabledHover();\r\n }\r\n },\r\n\r\n setWarningTitle: function (title, opt) {\r\n this.options.warningTitle = title;\r\n if (BI.isKey(title) || BI.isFunction(title)) {\r\n this.enableHover(opt);\r\n } else {\r\n this.disabledHover();\r\n }\r\n },\r\n\r\n getTipType: function () {\r\n return this.options.tipType;\r\n },\r\n\r\n isReadOnly: function () {\r\n return !!this.options.readonly;\r\n },\r\n\r\n getTitle: function () {\r\n var title = this.options.title;\r\n if(BI.isFunction(title)) {\r\n return title();\r\n }\r\n return title;\r\n },\r\n\r\n getWarningTitle: function () {\r\n var title = this.options.warningTitle;\r\n if(BI.isFunction(title)) {\r\n return title();\r\n }\r\n return title;\r\n },\r\n\r\n setValue: function (val) {\r\n if (!this.options.readonly) {\r\n this.options.value = val;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n },\r\n\r\n _unMount: function () {\r\n BI.Single.superclass._unMount.apply(this, arguments);\r\n if(BI.isNotNull(this.showTimeout)) {\r\n clearTimeout(this.showTimeout);\r\n this.showTimeout = null;\r\n }\r\n BI.Tooltips.remove(this.getName());\r\n }\r\n});/**\r\n * guy 表示一行数据,通过position来定位位置的数据\r\n * @class BI.Text\r\n * @extends BI.Single\r\n */\r\nBI.Text = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n lineHeight: null,\r\n handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n py: \"\",\r\n highLight: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (o.hgap + o.lgap > 0) {\r\n this.element.css({\r\n \"padding-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n this.element.css({\r\n \"padding-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n this.element.css({\r\n \"padding-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n this.element.css({\r\n \"padding-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n }\r\n if (BI.isNumber(o.lineHeight)) {\r\n this.element.css({lineHeight: o.lineHeight + \"px\"});\r\n }\r\n if (BI.isWidthOrHeight(o.maxWidth)) {\r\n this.element.css({maxWidth: o.maxWidth});\r\n }\r\n this.element.css({\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textOverflow: o.whiteSpace === \"nowrap\" ? \"ellipsis\" : \"\",\r\n overflow: o.whiteSpace === \"nowrap\" ? \"\" : (BI.isWidthOrHeight(o.height) ? \"auto\" : \"\")\r\n });\r\n if (o.handler) {\r\n this.text = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"span\"\r\n });\r\n this.text.element.click(function () {\r\n o.handler(self.getValue());\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n } else {\r\n this.text = this;\r\n }\r\n\r\n var text = this._getShowText();\r\n if (BI.isKey(text)) {\r\n this.setText(text);\r\n } else if (BI.isKey(o.value)) {\r\n this.setText(o.value);\r\n }\r\n if (BI.isKey(o.keyword)) {\r\n this.doRedMark(o.keyword);\r\n }\r\n if (o.highLight) {\r\n this.doHighLight();\r\n }\r\n },\r\n\r\n _getShowText: function () {\r\n var o = this.options;\r\n return BI.isFunction(o.text) ? o.text() : o.text;\r\n },\r\n\r\n\r\n doRedMark: function (keyword) {\r\n var o = this.options;\r\n // render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword\r\n o.keyword = keyword;\r\n this.text.element.__textKeywordMarked__(this._getShowText() || o.value, keyword, o.py);\r\n },\r\n\r\n unRedMark: function () {\r\n var o = this.options;\r\n o.keyword = \"\";\r\n this.text.element.__textKeywordMarked__(this._getShowText() || o.value, \"\", o.py);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.element.addClass(\"bi-high-light\");\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.element.removeClass(\"bi-high-light\");\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Text.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.setText(text);\r\n }\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.element.css(css);\r\n },\r\n\r\n setText: function (text) {\r\n BI.Text.superclass.setText.apply(this, arguments);\r\n // 为textContext赋值为undefined时在ie和edge下会真的显示undefined\r\n this.options.text = BI.isNotNull(text) ? text : \"\";\r\n if (BI.isIE9Below()) {\r\n this.text.element.html(BI.htmlEncode(this._getShowText()));\r\n return;\r\n }\r\n if (/\\s/.test(text)) {\r\n this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());\r\n } else {\r\n // textContent性能更好,并且原生防xss\r\n this.text.element[0].textContent = this._getShowText();\r\n }\r\n BI.isKey(this.options.keyword) && this.doRedMark(this.options.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.text\", BI.Text);\r\n/**\r\n * guy\r\n * @class BI.BasicButton\r\n * @extends BI.Single\r\n *\r\n * 一般的button父级\r\n */\r\nBI.BasicButton = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-basic-button\" + (conf.invalid ? \"\" : \" cursor-pointer\") + ((BI.isIE() && BI.getIEVersion() < 10) ? \" hack\" : \"\"),\r\n value: \"\",\r\n text: \"\",\r\n stopEvent: false,\r\n stopPropagation: false,\r\n selected: false,\r\n once: false, // 点击一次选中有效,再点无效\r\n forceSelected: false, // 点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发\r\n forceNotSelected: false, // 无论怎么点击都不会被选中\r\n disableSelected: false, // 使能选中\r\n\r\n shadow: false,\r\n isShadowShowingOnSelected: false, // 选中状态下是否显示阴影\r\n trigger: null,\r\n handler: BI.emptyFn,\r\n bubble: null\r\n });\r\n },\r\n _init: function () {\r\n BI.BasicButton.superclass._init.apply(this, arguments);\r\n var opts = this.options;\r\n if (opts.selected === true) {\r\n BI.nextTick(BI.bind(function () {\r\n this.setSelected(opts.selected);\r\n }, this));\r\n }\r\n BI.nextTick(BI.bind(this.bindEvent, this));\r\n\r\n if (opts.shadow) {\r\n this._createShadow();\r\n }\r\n if (opts.level) {\r\n this.element.addClass(\"button-\" + opts.level);\r\n }\r\n },\r\n\r\n _createShadow: function () {\r\n var self = this, o = this.options;\r\n\r\n var assertMask = function () {\r\n if (!self.$mask) {\r\n self.$mask = BI.createWidget(BI.isObject(o.shadow) ? o.shadow : {}, {\r\n type: \"bi.layout\",\r\n cls: \"bi-button-mask\"\r\n });\r\n self.$mask.invisible();\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: self,\r\n items: [{\r\n el: self.$mask,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n }\r\n };\r\n\r\n this.element.mouseup(function () {\r\n if (!self._hover && !o.isShadowShowingOnSelected) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n });\r\n this.element.on(\"mouseenter.\" + this.getName(), function (e) {\r\n if (self.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) {\r\n assertMask();\r\n self.$mask.visible();\r\n }\r\n }\r\n });\r\n this.element.on(\"mousemove.\" + this.getName(), function (e) {\r\n if (!self.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && !self._hover) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n }\r\n });\r\n this.element.on(\"mouseleave.\" + this.getName(), function () {\r\n if (self.isEnabled() && !self._hover) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n });\r\n },\r\n\r\n bindEvent: function () {\r\n var self = this;\r\n var o = this.options, hand = this.handle();\r\n if (!hand) {\r\n return;\r\n }\r\n hand = hand.element;\r\n var triggerArr = (o.trigger || \"\").split(\",\");\r\n BI.each(triggerArr, function (idx, trigger) {\r\n switch (trigger) {\r\n case \"mouseup\":\r\n var mouseDown = false;\r\n hand.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n hand.mouseup(function (e) {\r\n if (mouseDown === true) {\r\n clk(e);\r\n }\r\n mouseDown = false;\r\n ev(e);\r\n });\r\n break;\r\n case \"mousedown\":\r\n var mouseDown = false;\r\n var selected = false;\r\n hand.mousedown(function (e) {\r\n // if (e.button === 0) {\r\n BI.Widget._renderEngine.createElement(document).bind(\"mouseup.\" + self.getName(), function (e) {\r\n // if (e.button === 0) {\r\n if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {\r\n // self.setSelected(!self.isSelected());\r\n self._trigger();\r\n }\r\n mouseDown = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n // }\r\n });\r\n if (mouseDown === true) {\r\n return;\r\n }\r\n if (self.isSelected()) {\r\n selected = true;\r\n } else {\r\n clk(e);\r\n }\r\n mouseDown = true;\r\n ev(e);\r\n // }\r\n });\r\n hand.mouseup(function (e) {\r\n // if (e.button === 0) {\r\n if (BI.DOM.isExist(self) && mouseDown === true && selected === true) {\r\n clk(e);\r\n }\r\n mouseDown = false;\r\n selected = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n // }\r\n });\r\n break;\r\n case \"dblclick\":\r\n hand.dblclick(clk);\r\n break;\r\n case \"lclick\":\r\n var mouseDown = false;\r\n var interval;\r\n hand.mousedown(function (e) {\r\n BI.Widget._renderEngine.createElement(document).bind(\"mouseup.\" + self.getName(), function (e) {\r\n interval && clearInterval(interval);\r\n interval = null;\r\n mouseDown = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n });\r\n if (mouseDown === true) {\r\n return;\r\n }\r\n if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {\r\n return;\r\n }\r\n interval = setInterval(function () {\r\n if (self.isEnabled()) {\r\n self.doClick();\r\n }\r\n }, 180);\r\n mouseDown = true;\r\n ev(e);\r\n });\r\n break;\r\n default:\r\n if (o.stopEvent || o.stopPropagation) {\r\n hand.mousedown(function (e) {\r\n ev(e);\r\n });\r\n }\r\n hand.click(clk);\r\n break;\r\n }\r\n });\r\n\r\n // 之后的300ms点击无效\r\n var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n\r\n function ev (e) {\r\n if (o.stopEvent) {\r\n e.stopEvent();\r\n }\r\n if (o.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n function clk (e) {\r\n ev(e);\r\n if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {\r\n return;\r\n }\r\n if (BI.isKey(o.bubble) || BI.isFunction(o.bubble)) {\r\n if (BI.isNull(self.combo)) {\r\n var popup;\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: self,\r\n items: [{\r\n el: {\r\n type: \"bi.bubble_combo\",\r\n trigger: \"\",\r\n // bubble的提示不需要一直存在在界面上\r\n destroyWhenHide: true,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n el: {\r\n type: \"bi.layout\",\r\n height: \"100%\"\r\n },\r\n popup: {\r\n type: \"bi.text_bubble_bar_popup_view\",\r\n text: getBubble(),\r\n ref: function () {\r\n popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,\r\n action: function (v) {\r\n self.combo.hideView();\r\n if (v) {\r\n onClick.apply(self, arguments);\r\n }\r\n }\r\n }]\r\n },\r\n listeners: [{\r\n eventName: BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n popup.populate(getBubble());\r\n }\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n });\r\n }\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n return;\r\n }\r\n onClick.apply(self, arguments);\r\n }\r\n\r\n function getBubble () {\r\n var bubble = self.options.bubble;\r\n if (BI.isFunction(bubble)) {\r\n return bubble();\r\n }\r\n return bubble;\r\n }\r\n },\r\n\r\n _trigger: function (e) {\r\n var o = this.options;\r\n if (!this.isEnabled()) {\r\n return;\r\n }\r\n if (!this.isDisableSelected()) {\r\n this.isForceSelected() ? this.setSelected(true) :\r\n (this.isForceNotSelected() ? this.setSelected(false) :\r\n this.setSelected(!this.isSelected()));\r\n }\r\n if (this.isValid()) {\r\n o.handler.call(this, this.getValue(), this, e);\r\n var v = this.getValue();\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);\r\n this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);\r\n if (o.action) {\r\n BI.Actions.runAction(o.action, \"click\", o, this);\r\n }\r\n BI.Actions.runGlobalAction(\"click\", o, this);\r\n }\r\n },\r\n\r\n _doClick: function (e) {\r\n if (this.isValid()) {\r\n this.beforeClick(e);\r\n }\r\n this._trigger(e);\r\n if (this.isValid()) {\r\n this.doClick(e);\r\n }\r\n },\r\n\r\n beforeClick: function () {\r\n\r\n },\r\n\r\n doClick: function () {\r\n\r\n },\r\n\r\n handle: function () {\r\n return this;\r\n },\r\n\r\n hover: function () {\r\n this._hover = true;\r\n this.handle().element.addClass(\"hover\");\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(true);\r\n }\r\n },\r\n\r\n dishover: function () {\r\n this._hover = false;\r\n this.handle().element.removeClass(\"hover\");\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n var o = this.options;\r\n o.selected = b;\r\n if (b) {\r\n this.handle().element.addClass(\"active\");\r\n } else {\r\n this.handle().element.removeClass(\"active\");\r\n }\r\n if (o.shadow && !o.isShadowShowingOnSelected) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n },\r\n\r\n isSelected: function () {\r\n return this.options.selected;\r\n },\r\n\r\n isOnce: function () {\r\n return this.options.once;\r\n },\r\n\r\n isForceSelected: function () {\r\n return this.options.forceSelected;\r\n },\r\n\r\n isForceNotSelected: function () {\r\n return this.options.forceNotSelected;\r\n },\r\n\r\n isDisableSelected: function () {\r\n return this.options.disableSelected;\r\n },\r\n\r\n setText: function (text) {\r\n this.options.text = text;\r\n },\r\n\r\n getText: function () {\r\n return this.options.text;\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.BasicButton.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n if (!enable) {\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n }\r\n },\r\n\r\n empty: function () {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + this.getName());\r\n BI.BasicButton.superclass.empty.apply(this, arguments);\r\n },\r\n\r\n destroy: function () {\r\n BI.BasicButton.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.BasicButton.EVENT_CHANGE = \"BasicButton.EVENT_CHANGE\";/**\r\n * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.NodeButton\r\n * @extends BI.BasicButton\r\n * @abstract\r\n */\r\nBI.NodeButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend( conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-node\",\r\n open: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.NodeButton.superclass._init.apply(this, arguments);\r\n var self = this;\r\n BI.nextTick(function () {\r\n self.setOpened(self.isOpened());\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.setOpened(!this.isOpened());\r\n },\r\n\r\n isOnce: function () {\r\n return false;\r\n },\r\n\r\n isOpened: function () {\r\n return !!this.options.open;\r\n },\r\n\r\n setOpened: function (b) {\r\n this.options.open = !!b;\r\n },\r\n\r\n triggerCollapse: function () {\r\n if(this.isOpened()) {\r\n this.setOpened(false);\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this);\r\n }\r\n },\r\n\r\n triggerExpand: function () {\r\n if(!this.isOpened()) {\r\n this.setOpened(true);\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this);\r\n }\r\n }\r\n});/**\r\n * guy\r\n * tip提示\r\n * zIndex在10亿级别\r\n * @class BI.Tip\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Tip = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Tip.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-tip\",\r\n zIndex: BI.zIndex_tip\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Tip.superclass._init.apply(this, arguments);\r\n this.element.css({zIndex: this.options.zIndex});\r\n }\r\n});/**\r\n * Created by GUY on 2015/6/26.\r\n * @class BI.ButtonGroup\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.ButtonGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-button-group\",\r\n behaviors: {},\r\n items: [],\r\n value: \"\",\r\n chooseType: BI.Selection.Single,\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ButtonGroup.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n var behaviors = {};\r\n BI.each(o.behaviors, function (key, rule) {\r\n behaviors[key] = BI.BehaviorFactory.createBehavior(key, {\r\n rule: rule\r\n });\r\n });\r\n this.behaviors = behaviors;\r\n this.populate(o.items);\r\n if(BI.isKey(o.value) || BI.isNotEmptyArray(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _createBtns: function (items) {\r\n var o = this.options;\r\n return BI.createWidgets(BI.createItems(items, {\r\n type: \"bi.text_button\"\r\n }));\r\n },\r\n\r\n _btnsCreator: function (items) {\r\n var self = this, args = Array.prototype.slice.call(arguments), o = this.options;\r\n var buttons = this._createBtns(items);\r\n args[0] = buttons;\r\n\r\n BI.each(this.behaviors, function (i, behavior) {\r\n behavior.doBehavior.apply(behavior, args);\r\n });\r\n BI.each(buttons, function (i, btn) {\r\n btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n switch (o.chooseType) {\r\n case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:\r\n self.setValue(btn.getValue());\r\n break;\r\n case BI.ButtonGroup.CHOOSE_TYPE_NONE:\r\n self.setValue([]);\r\n break;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n btn.on(BI.Events.DESTROY, function () {\r\n BI.remove(self.buttons, btn);\r\n });\r\n });\r\n\r\n return buttons;\r\n },\r\n\r\n _packageBtns: function (btns) {\r\n var o = this.options;\r\n for (var i = o.layouts.length - 1; i > 0; i--) {\r\n btns = BI.map(btns, function (k, it) {\r\n return BI.extend({}, o.layouts[i], {\r\n items: [\r\n BI.extend({}, o.layouts[i].el, {\r\n el: it\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return btns;\r\n },\r\n\r\n _packageSimpleItems: function (btns) {\r\n var o = this.options;\r\n return BI.map(o.items, function (i, item) {\r\n if (BI.stripEL(item) === item) {\r\n return btns[i];\r\n }\r\n return BI.extend({}, item, {\r\n el: btns[i]\r\n });\r\n });\r\n },\r\n\r\n _packageItems: function (items, packBtns) {\r\n return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns));\r\n },\r\n\r\n _packageLayout: function (items) {\r\n var o = this.options, layout = BI.deepClone(o.layouts[0]);\r\n\r\n var lay = BI.formatEL(layout).el;\r\n while (lay && lay.items && !BI.isEmpty(lay.items)) {\r\n lay = BI.formatEL(lay.items[0]).el;\r\n }\r\n lay.items = items;\r\n return layout;\r\n },\r\n\r\n // 如果是一个简单的layout\r\n _isSimpleLayout: function () {\r\n var o = this.options;\r\n return o.layouts.length === 1 && !BI.isArray(o.items[0]);\r\n },\r\n\r\n doBehavior: function () {\r\n var args = Array.prototype.slice.call(arguments);\r\n args.unshift(this.buttons);\r\n BI.each(this.behaviors, function (i, behavior) {\r\n behavior.doBehavior.apply(behavior, args);\r\n });\r\n },\r\n\r\n prependItems: function (items) {\r\n var o = this.options;\r\n var btns = this._btnsCreator.apply(this, arguments);\r\n this.buttons = BI.concat(btns, this.buttons);\r\n\r\n if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) {\r\n this.layouts.prependItems(btns);\r\n return;\r\n }\r\n\r\n items = this._packageItems(items, this._packageBtns(btns));\r\n this.layouts.prependItems(this._packageLayout(items).items);\r\n },\r\n\r\n addItems: function (items) {\r\n var o = this.options;\r\n var btns = this._btnsCreator.apply(this, arguments);\r\n this.buttons = BI.concat(this.buttons, btns);\r\n\r\n // 如果是一个简单的layout\r\n if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) {\r\n this.layouts.addItems(btns);\r\n return;\r\n }\r\n\r\n items = this._packageItems(items, this._packageBtns(btns));\r\n this.layouts.addItems(this._packageLayout(items).items);\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n BI.removeAt(this.buttons, indexes);\r\n this.layouts.removeItemAt(indexes);\r\n },\r\n\r\n removeItems: function (values) {\r\n values = BI.isArray(values) ? values : [values];\r\n var deleted = [];\r\n BI.each(this.buttons, function (i, button) {\r\n if (BI.deepContains(values, button.getValue())) {\r\n deleted.push(i);\r\n }\r\n });\r\n BI.removeAt(this.buttons, deleted);\r\n this.layouts.removeItemAt(deleted);\r\n },\r\n\r\n populate: function (items) {\r\n items = items || [];\r\n this.empty();\r\n this.options.items = items;\r\n\r\n this.buttons = this._btnsCreator.apply(this, arguments);\r\n if (this._isSimpleLayout()) {\r\n items = this._packageSimpleItems(this.buttons);\r\n } else {\r\n items = this._packageItems(items, this._packageBtns(this.buttons));\r\n }\r\n\r\n this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));\r\n },\r\n\r\n setNotSelectedValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected && item.setSelected(false);\r\n } else {\r\n item.setSelected && item.setSelected(true);\r\n }\r\n });\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setEnable(true);\r\n } else {\r\n item.setEnable(false);\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected && item.setSelected(true);\r\n } else {\r\n item.setSelected && item.setSelected(false);\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !(item.isSelected && item.isSelected())) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.buttons;\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.buttons;\r\n },\r\n\r\n getSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isSelected && item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isSelected && !item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n var index = -1;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.getValue() === value) {\r\n index = i;\r\n return true;\r\n }\r\n });\r\n return index;\r\n },\r\n\r\n getNodeById: function (id) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.options.id === id) {\r\n node = item;\r\n return true;\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.getValue() === value) {\r\n node = item;\r\n return true;\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n empty: function () {\r\n BI.ButtonGroup.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n destroy: function () {\r\n BI.ButtonGroup.superclass.destroy.apply(this, arguments);\r\n this.options.items = [];\r\n }\r\n});\r\nBI.extend(BI.ButtonGroup, {\r\n CHOOSE_TYPE_SINGLE: BI.Selection.Single,\r\n CHOOSE_TYPE_MULTI: BI.Selection.Multi,\r\n CHOOSE_TYPE_ALL: BI.Selection.All,\r\n CHOOSE_TYPE_NONE: BI.Selection.None,\r\n CHOOSE_TYPE_DEFAULT: BI.Selection.Default\r\n});\r\nBI.ButtonGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.button_group\", BI.ButtonGroup);/**\r\n * Created by GUY on 2015/8/10.\r\n * @class BI.ButtonTree\r\n * @extends BI.ButtonGroup\r\n */\r\n\r\nBI.ButtonTree = BI.inherit(BI.ButtonGroup, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-button-tree\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ButtonTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setNotSelectedValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (!BI.isFunction(item.setSelected)) {\r\n item.setNotSelectedValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected(false);\r\n } else {\r\n item.setSelected(true);\r\n }\r\n });\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.isFunction(item.setEnabledValue)) {\r\n item.setEnabledValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setEnable(true);\r\n } else {\r\n item.setEnable(false);\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (!BI.isFunction(item.setSelected)) {\r\n item.setValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected(true);\r\n } else {\r\n item.setSelected(false);\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n v = BI.concat(v, item.getNotSelectedValue());\r\n return;\r\n }\r\n if (item.isEnabled() && item.isSelected && !item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n v = BI.concat(v, item.getValue());\r\n return;\r\n }\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n btns = btns.concat(item.getSelectedButtons());\r\n return;\r\n }\r\n if (item.isSelected && item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n btns = btns.concat(item.getNotSelectedButtons());\r\n return;\r\n }\r\n if (item.isSelected && !item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n // 获取所有的叶子节点\r\n getAllLeaves: function () {\r\n var leaves = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n leaves = leaves.concat(item.getAllLeaves());\r\n return;\r\n }\r\n if (item.isEnabled()) {\r\n leaves.push(item);\r\n }\r\n });\r\n return leaves;\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n var index = -1;\r\n BI.any(this.buttons, function (i, item) {\r\n var vs = item.getValue();\r\n if (item.isEnabled() && (vs === value || BI.contains(vs, value))) {\r\n index = i;\r\n return true;\r\n }\r\n });\r\n return index;\r\n },\r\n\r\n getNodeById: function (id) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled()) {\r\n if (item.attr(\"id\") === id) {\r\n node = item;\r\n return true;\r\n } else if (BI.isFunction(item.getNodeById)) {\r\n if (node = item.getNodeById(id)) {\r\n return true;\r\n }\r\n }\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled()) {\r\n if (BI.isFunction(item.getNodeByValue)) {\r\n if (node = item.getNodeByValue(value)) {\r\n return true;\r\n }\r\n } else if (item.attr(\"value\") === value) {\r\n node = item;\r\n return true;\r\n }\r\n }\r\n });\r\n return node;\r\n }\r\n});\r\nBI.ButtonTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.button_tree\", BI.ButtonTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.TreeView\r\n * @extends BI.Pane\r\n */\r\nBI.TreeView = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-tree\",\r\n paras: {\r\n selectedValues: {}\r\n },\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.TreeView.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this._stop = false;\r\n\r\n this._createTree();\r\n this.tip = BI.createWidget({\r\n type: \"bi.loading_bar\",\r\n invisible: true,\r\n handler: BI.bind(this._loadMore, this)\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrollable: true,\r\n scrolly: false,\r\n element: this,\r\n items: [this.tip]\r\n });\r\n if(BI.isNotNull(o.value)) {\r\n this.setSelectedValue(o.value);\r\n }\r\n if (BI.isIE9Below && BI.isIE9Below()) {\r\n this.element.addClass(\"hack\");\r\n }\r\n },\r\n\r\n _createTree: function () {\r\n this.id = \"bi-tree\" + BI.UUID();\r\n if (this.nodes) {\r\n this.nodes.destroy();\r\n }\r\n if (this.tree) {\r\n this.tree.destroy();\r\n }\r\n this.tree = BI.createWidget({\r\n type: \"bi.layout\",\r\n element: \"<ul id='\" + this.id + \"' class='ztree'></ul>\"\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this.element,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n // 选择节点触发方法\r\n _selectTreeNode: function (treeId, treeNode) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, treeNode, this);\r\n this.fireEvent(BI.TreeView.EVENT_CHANGE, treeNode, this);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: true,\r\n url: getUrl,\r\n autoParam: [\"id\", \"name\"], // 节点展开异步请求自动提交id和name\r\n otherParam: BI.cjkEncodeDO(paras) // 静态参数\r\n },\r\n check: {\r\n enable: true\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\" // 节点的name属性替换成text\r\n },\r\n simpleData: {\r\n enable: true // 可以穿id,pid属性的对象数组\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true, // 节点可以用html标签代替\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n beforeExpand: beforeExpand,\r\n onAsyncSuccess: onAsyncSuccess,\r\n onAsyncError: onAsyncError,\r\n beforeCheck: beforeCheck,\r\n onCheck: onCheck,\r\n onExpand: onExpand,\r\n onCollapse: onCollapse,\r\n onClick: onClick\r\n }\r\n };\r\n var className = \"dark\", perTime = 100;\r\n\r\n function onClick (event, treeId, treeNode) {\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n var checked = treeNode.checked;\r\n var status = treeNode.getCheckStatus();\r\n if(status.half === true && status.checked === true) {\r\n checked = false;\r\n }\r\n // 更新此node的check状态, 影响父子关联,并调用beforeCheck和onCheck回调\r\n self.nodes.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function getUrl (treeId, treeNode) {\r\n var parentNode = self._getParentValues(treeNode);\r\n treeNode.times = treeNode.times || 1;\r\n var param = \"id=\" + treeNode.id\r\n + \"&times=\" + (treeNode.times++)\r\n + \"&parentValues= \" + _global.encodeURIComponent(BI.jsonEncode(parentNode))\r\n + \"&checkState=\" + _global.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus()));\r\n\r\n return \"&\" + param;\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n if (!treeNode.isAjaxing) {\r\n if (!treeNode.children) {\r\n treeNode.times = 1;\r\n ajaxGetNodes(treeNode, \"refresh\");\r\n }\r\n return true;\r\n }\r\n BI.Msg.toast(\"Please Wait。\", \"warning\"); // 不展开节点,也不触发onExpand事件\r\n return false;\r\n\r\n }\r\n\r\n function onAsyncSuccess (event, treeId, treeNode, msg) {\r\n treeNode.halfCheck = false;\r\n if (!msg || msg.length === 0 || /^<html>[\\s,\\S]*<\\/html>$/gi.test(msg) || self._stop) {\r\n return;\r\n }\r\n var zTree = self.nodes;\r\n var totalCount = treeNode.count || 0;\r\n\r\n // 尝试去获取下一组节点,若获取值为空数组,表示获取完成\r\n // TODO by GUY\r\n if (treeNode.children.length > totalCount) {\r\n treeNode.count = treeNode.children.length;\r\n BI.delay(function () {\r\n ajaxGetNodes(treeNode);\r\n }, perTime);\r\n } else {\r\n // treeNode.icon = \"\";\r\n zTree.updateNode(treeNode);\r\n zTree.selectNode(treeNode.children[0]);\r\n // className = (className === \"dark\" ? \"\":\"dark\");\r\n }\r\n }\r\n\r\n function onAsyncError (event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {\r\n var zTree = self.nodes;\r\n BI.Msg.toast(\"Error!\", \"warning\");\r\n // treeNode.icon = \"\";\r\n // zTree.updateNode(treeNode);\r\n }\r\n\r\n function ajaxGetNodes (treeNode, reloadType) {\r\n var zTree = self.nodes;\r\n if (reloadType == \"refresh\") {\r\n zTree.updateNode(treeNode); // 刷新一下当前节点,如果treeNode.xxx被改了的话\r\n }\r\n zTree.reAsyncChildNodes(treeNode, reloadType, true); // 强制加载子节点,reloadType === refresh为先清空再加载,否则为追加到现有子节点之后\r\n }\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n if (treeNode.checked === true) {\r\n // 将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy\r\n // 所有的半选状态都需要取消halfCheck=true的情况\r\n function track (children) {\r\n BI.each(children, function (i, ch) {\r\n if (ch.halfCheck === true) {\r\n ch.halfCheck = false;\r\n track(ch.children);\r\n }\r\n });\r\n }\r\n\r\n track(treeNode.children);\r\n var treeObj = self.nodes;\r\n var nodes = treeObj.getSelectedNodes();\r\n BI.$.each(nodes, function (index, node) {\r\n node.halfCheck = false;\r\n });\r\n }\r\n var status = treeNode.getCheckStatus();\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n if(status.half === true && status.checked === true) {\r\n treeNode.checked = false;\r\n }\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n function onExpand (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n function onCollapse (event, treeId, treeNode) {\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _getParentValues: function (treeNode) {\r\n if (!treeNode.getParentNode()) {\r\n return [];\r\n }\r\n var parentNode = treeNode.getParentNode();\r\n var result = this._getParentValues(parentNode);\r\n result = result.concat([this._getNodeValue(parentNode)]);\r\n return result;\r\n },\r\n\r\n _getNodeValue: function (node) {\r\n // 去除标红\r\n return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, \"\"), \"&nbsp;\", \" \") : node.value;\r\n },\r\n\r\n // 获取半选框值\r\n _getHalfSelectedValues: function (map, node) {\r\n var self = this;\r\n var checkState = node.getCheckStatus();\r\n // 将未选的去掉\r\n if (checkState.checked === false && checkState.half === false) {\r\n return;\r\n }\r\n // 如果节点已展开,并且是半选\r\n if (BI.isNotEmptyArray(node.children) && checkState.half === true) {\r\n var children = node.children;\r\n BI.each(children, function (i, ch) {\r\n self._getHalfSelectedValues(map, ch);\r\n });\r\n return;\r\n }\r\n var parent = node.parentValues || self._getParentValues(node);\r\n var path = parent.concat(this._getNodeValue(node));\r\n // 当前节点是全选的,因为上面的判断已经排除了不选和半选\r\n if (BI.isNotEmptyArray(node.children) || checkState.half === false) {\r\n this._buildTree(map, path);\r\n return;\r\n }\r\n // 剩下的就是半选不展开的节点,因为不知道里面是什么情况,所以借助selectedValues(这个是完整的选中情况)\r\n var storeValues = BI.deepClone(this.options.paras.selectedValues);\r\n var treeNode = this._getTree(storeValues, path);\r\n this._addTreeNode(map, parent, this._getNodeValue(node), treeNode);\r\n },\r\n\r\n // 获取的是以values最后一个节点为根的子树\r\n _getTree: function (map, values) {\r\n var cur = map;\r\n BI.any(values, function (i, value) {\r\n if (cur[value] == null) {\r\n return true;\r\n }\r\n cur = cur[value];\r\n });\r\n return cur;\r\n },\r\n\r\n // 以values为path一路向里补充map, 并在末尾节点添加key: value节点\r\n _addTreeNode: function (map, values, key, value) {\r\n var cur = map;\r\n BI.each(values, function (i, value) {\r\n if (cur[value] == null) {\r\n cur[value] = {};\r\n }\r\n cur = cur[value];\r\n });\r\n cur[key] = value;\r\n },\r\n\r\n // 构造树节点\r\n _buildTree: function (map, values) {\r\n var cur = map;\r\n BI.each(values, function (i, value) {\r\n if (cur[value] == null) {\r\n cur[value] = {};\r\n }\r\n cur = cur[value];\r\n });\r\n },\r\n\r\n // 获取选中的值\r\n _getSelectedValues: function () {\r\n var self = this;\r\n var hashMap = {};\r\n var rootNoots = this.nodes.getNodes();\r\n track(rootNoots); // 可以看到这个方法没有递归调用,所以在_getHalfSelectedValues中需要关心全选的节点\r\n function track (nodes) {\r\n BI.each(nodes, function (i, node) {\r\n var checkState = node.getCheckStatus();\r\n if (checkState.checked === true || checkState.half === true) {\r\n if (checkState.half === true) {\r\n self._getHalfSelectedValues(hashMap, node);\r\n } else {\r\n var parentValues = node.parentValues || self._getParentValues(node);\r\n var values = parentValues.concat([self._getNodeValue(node)]);\r\n self._buildTree(hashMap, values);\r\n }\r\n }\r\n });\r\n }\r\n\r\n return hashMap;\r\n },\r\n\r\n // 处理节点\r\n _dealWidthNodes: function (nodes) {\r\n var self = this, o = this.options;\r\n var ns = BI.Tree.arrayFormat(nodes);\r\n BI.each(ns, function (i, n) {\r\n n.title = n.title || n.text || n.value;\r\n n.isParent = n.isParent || n.parent;\r\n // 处理标红\r\n if (BI.isKey(o.paras.keyword)) {\r\n n.text = BI.$(\"<div>\").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();\r\n } else {\r\n n.text = BI.htmlEncode(n.text + \"\");\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n this.tip.setLoading();\r\n var op = BI.extend({}, o.paras, {\r\n times: ++this.times\r\n });\r\n o.itemsCreator(op, function (res) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n var hasNext = !!res.hasNext, nodes = res.items || [];\r\n\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n // 生成树内部方法\r\n _initTree: function (setting) {\r\n var self = this, o = this.options;\r\n self.fireEvent(BI.Events.INIT);\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n this.loading();\r\n this.tip.setVisible(false);\r\n var callback = function (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n };\r\n var op = BI.extend({}, o.paras, {\r\n times: 1\r\n });\r\n\r\n o.itemsCreator(op, function (res) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n var hasNext = !!res.hasNext, nodes = res.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes));\r\n }\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n op.times === 1 && self.fireEvent(BI.Events.AFTERINIT);\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes, setting) {\r\n var setting = setting || {\r\n async: {\r\n enable: false\r\n },\r\n check: {\r\n enable: false\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true\r\n },\r\n callback: {}\r\n };\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n start: function () {\r\n this._stop = false;\r\n },\r\n\r\n stop: function () {\r\n this._stop = true;\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._createTree();\r\n this.start();\r\n this._initTree(setting);\r\n },\r\n\r\n populate: function () {\r\n this.stroke.apply(this, arguments);\r\n },\r\n\r\n hasChecked: function () {\r\n var treeObj = this.nodes;\r\n return treeObj.getCheckedNodes(true).length > 0;\r\n },\r\n\r\n checkAll: function (checked) {\r\n function setNode (children) {\r\n BI.each(children, function (i, child) {\r\n child.halfCheck = false;\r\n setNode(child.children);\r\n });\r\n }\r\n\r\n if (!this.nodes) {\r\n return;\r\n }\r\n\r\n BI.each(this.nodes.getNodes(), function (i, node) {\r\n node.halfCheck = false;\r\n setNode(node.children);\r\n });\r\n this.nodes.checkAllNodes(checked);\r\n },\r\n\r\n expandAll: function (flag) {\r\n this.nodes && this.nodes.expandAll(flag);\r\n },\r\n\r\n // 设置树节点的状态\r\n setValue: function (value, param) {\r\n this.checkAll(false);\r\n this.updateValue(value, param);\r\n this.refresh();\r\n },\r\n\r\n setSelectedValue: function (value) {\r\n this.options.paras.selectedValues = BI.deepClone(value || {});\r\n },\r\n\r\n updateValue: function (values, param) {\r\n if (!this.nodes) {\r\n return;\r\n }\r\n param || (param = \"value\");\r\n var treeObj = this.nodes;\r\n BI.each(values, function (v, op) {\r\n var nodes = treeObj.getNodesByParam(param, v, null);\r\n BI.each(nodes, function (j, node) {\r\n BI.extend(node, {checked: true}, op);\r\n treeObj.updateNode(node);\r\n });\r\n });\r\n },\r\n\r\n refresh: function () {\r\n this.nodes && this.nodes.refresh();\r\n },\r\n\r\n getValue: function () {\r\n if (!this.nodes) {\r\n return null;\r\n }\r\n return this._getSelectedValues();\r\n },\r\n\r\n destroyed: function () {\r\n this.stop();\r\n this.nodes && this.nodes.destroy();\r\n }\r\n});\r\nBI.extend(BI.TreeView, {\r\n REQ_TYPE_INIT_DATA: 1,\r\n REQ_TYPE_ADJUST_DATA: 2,\r\n REQ_TYPE_SELECT_DATA: 3,\r\n REQ_TYPE_GET_SELECTED_DATA: 4\r\n});\r\n\r\nBI.TreeView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TreeView.EVENT_INIT = BI.Events.INIT;\r\nBI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT;\r\n\r\nBI.shortcut(\"bi.tree_view\", BI.TreeView);/**\r\n * guy\r\n * 同步树\r\n * @class BI.AsyncTree\r\n * @extends BI.TreeView\r\n */\r\nBI.AsyncTree = BI.inherit(BI.TreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n _init: function () {\r\n BI.AsyncTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false, // 很明显这棵树把异步请求关掉了,所有的异步请求都是手动控制的\r\n otherParam: BI.cjkEncodeDO(paras)\r\n },\r\n check: {\r\n enable: true\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n beforeCheck: beforeCheck,\r\n onCheck: onCheck,\r\n beforeExpand: beforeExpand,\r\n onExpand: onExpand,\r\n onCollapse: onCollapse,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n var checked = treeNode.checked;\r\n var status = treeNode.getCheckStatus();\r\n if (status.half === true && status.checked === true) {\r\n checked = false;\r\n }\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n if (treeNode.checked === true) {\r\n // 将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy\r\n // 所有的半选状态都需要取消halfCheck=true的情况\r\n function track (children) {\r\n BI.each(children, function (i, ch) {\r\n if (ch.halfCheck === true) {\r\n ch.halfCheck = false;\r\n track(ch.children);\r\n }\r\n });\r\n }\r\n\r\n track(treeNode.children);\r\n\r\n var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var nodes = treeObj.getSelectedNodes();\r\n BI.each(nodes, function (index, node) {\r\n node.halfCheck = false;\r\n });\r\n }\r\n var status = treeNode.getCheckStatus();\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n if (status.half === true && status.checked === true) {\r\n treeNode.checked = false;\r\n }\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n self._beforeExpandNode(treeId, treeNode);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n function onExpand (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n function onCollapse (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n // 用来更新this.options.paras.selectedValues, 和ztree内部无关\r\n _selectTreeNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode));\r\n var name = this._getNodeValue(treeNode);\r\n // var values = parentValues.concat([name]);\r\n if (treeNode.checked === true) {\r\n this._addTreeNode(this.options.paras.selectedValues, parentValues, name, {});\r\n } else {\r\n var tNode = treeNode;\r\n var pNode = this._getTree(this.options.paras.selectedValues, parentValues);\r\n if (BI.isNotNull(pNode[name])) {\r\n delete pNode[name];\r\n }\r\n while (tNode != null && BI.isEmpty(pNode)) {\r\n parentValues = parentValues.slice(0, parentValues.length - 1);\r\n tNode = tNode.getParentNode();\r\n if (tNode != null) {\r\n pNode = this._getTree(this.options.paras.selectedValues, parentValues);\r\n name = this._getNodeValue(tNode);\r\n delete pNode[name];\r\n }\r\n }\r\n }\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n },\r\n\r\n // 展开节点\r\n _beforeExpandNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = treeNode.parentValues || self._getParentValues(treeNode);\r\n var op = BI.extend({}, o.paras, {\r\n id: treeNode.id,\r\n times: 1,\r\n parentValues: parentValues.concat(this._getNodeValue(treeNode)),\r\n checkState: treeNode.getCheckStatus()\r\n });\r\n var complete = function (d) {\r\n var nodes = d.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes), !!d.hasNext);\r\n }\r\n };\r\n var times = 1;\r\n\r\n function callback (nodes, hasNext) {\r\n self.nodes.addNodes(treeNode, nodes);\r\n // 展开节点是没有分页的\r\n if (hasNext === true) {\r\n BI.delay(function () {\r\n times++;\r\n op.times = times;\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n }\r\n }\r\n\r\n if (!treeNode.children) {\r\n setTimeout(function () {\r\n o.itemsCreator(op, complete);\r\n }, 17);\r\n }\r\n },\r\n\r\n // a,b 两棵树\r\n // a->b b->a 做两次校验, 构造一个校验后的map\r\n // e.g. 以a为基准,如果b没有此节点,则在map中添加。 如b有,且是全选的, 则在map中构造全选(为什么不添加a的值呢? 因为这次是取并集), 如果b中也有和a一样的存值,就递归\r\n _join: function (valueA, valueB) {\r\n var self = this;\r\n var map = {};\r\n track([], valueA, valueB);\r\n track([], valueB, valueA);\r\n\r\n function track (parent, node, compare) {\r\n BI.each(node, function (n, item) {\r\n if (BI.isNull(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else if (BI.isEmpty(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else {\r\n track(parent.concat([n]), node[n], compare[n]);\r\n }\r\n });\r\n }\r\n\r\n return map;\r\n },\r\n\r\n hasChecked: function () {\r\n return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments);\r\n },\r\n\r\n _getJoinValue: function () {\r\n if (!this.nodes) {\r\n return {};\r\n }\r\n var checkedValues = this._getSelectedValues();\r\n if (BI.isEmpty(checkedValues)) {\r\n return BI.deepClone(this.options.paras.selectedValues);\r\n }\r\n if (BI.isEmpty(this.options.paras.selectedValues)) {\r\n return checkedValues;\r\n }\r\n return this._join(checkedValues, this.options.paras.selectedValues);\r\n },\r\n\r\n getValue: function () {\r\n return this._getJoinValue();\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._initTree(setting);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.async_tree\", BI.AsyncTree);/**\r\n * guy\r\n * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点\r\n * @class BI.PartTree\r\n * @extends BI.AsyncTree\r\n */\r\nBI.PartTree = BI.inherit(BI.AsyncTree, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.PartTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: ++this.times\r\n });\r\n this.tip.setLoading();\r\n o.itemsCreator(op, function (d) {\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n if (self._stop === true) {\r\n return;\r\n }\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n _selectTreeNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode));\r\n var name = this._getNodeValue(treeNode);\r\n if (treeNode.checked === true) {\r\n this.options.paras.selectedValues = this._getJoinValue();\r\n // this._buildTree(self.options.paras.selectedValues, BI.concat(parentValues, name));\r\n o.itemsCreator(BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_ADJUST_DATA,\r\n curSelectedValue: name,\r\n parentValues: parentValues\r\n }), function (res) {\r\n self.options.paras.selectedValues = res;\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n });\r\n } else {\r\n // 如果选中的值中不存在该值不处理\r\n // 因为反正是不选中,没必要管\r\n var t = this.options.paras.selectedValues;\r\n var p = parentValues.concat(name);\r\n for (var i = 0, len = p.length; i < len; i++) {\r\n t = t[p[i]];\r\n if (t == null) {\r\n return;\r\n }\r\n // 选中中国-江苏, 搜索南京,取消勾选\r\n if (BI.isEmpty(t)) {\r\n break;\r\n }\r\n }\r\n o.itemsCreator(BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_SELECT_DATA,\r\n notSelectedValue: name,\r\n parentValues: parentValues\r\n }), function (new_values) {\r\n self.options.paras.selectedValues = new_values;\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n });\r\n }\r\n },\r\n\r\n _getSelectedValues: function () {\r\n var self = this;\r\n var hashMap = {};\r\n var rootNoots = this.nodes.getNodes();\r\n track(rootNoots);\r\n\r\n function track (nodes) {\r\n BI.each(nodes, function (i, node) {\r\n var checkState = node.getCheckStatus();\r\n if (checkState.checked === false) {\r\n return true;\r\n }\r\n var parentValues = node.parentValues || self._getParentValues(node);\r\n // 把文字中的html去掉,其实就是把文字颜色去掉\r\n var values = parentValues.concat([self._getNodeValue(node)]);\r\n self._buildTree(hashMap, values);\r\n // if(checkState.checked === true && checkState.half === false && nodes[i].flag === true){\r\n // continue;\r\n // }\r\n if (BI.isNotEmptyArray(node.children)) {\r\n track(node.children);\r\n return true;\r\n }\r\n if (checkState.half === true) {\r\n self._getHalfSelectedValues(hashMap, node);\r\n }\r\n });\r\n }\r\n\r\n return hashMap;\r\n },\r\n\r\n _initTree: function (setting, keyword) {\r\n var self = this, o = this.options;\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n self.tip.setVisible(false);\r\n this.loading();\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: this.times\r\n });\r\n var complete = function (d) {\r\n if (self._stop === true || keyword != o.paras.keyword) {\r\n return;\r\n }\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n // 没有请求到数据也要初始化空树, 如果不初始化, 树就是上一次构造的树, 节点信息都是过期的\r\n callback(nodes.length > 0 ? self._dealWidthNodes(nodes) : []);\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n };\r\n\r\n function callback (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n }\r\n\r\n BI.delay(function () {\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.options.paras.selectedValues || {});\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n var o = this.options;\r\n delete o.paras.keyword;\r\n BI.extend(o.paras, config);\r\n delete o.paras.lastSearchValue;\r\n var setting = this._configSetting();\r\n this._initTree(setting, o.paras.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.part_tree\", BI.PartTree);/**\r\n * author: windy\r\n * 继承自treeView, 此树的父子节点的勾选状态互不影响, 此树不会有半选节点\r\n * 返回value格式为[[\"A\"], [\"A\", \"a\"]]表示勾选了A且勾选了a\r\n * @class BI.ListTreeView\r\n * @extends BI.TreeView\r\n */\r\nBI.ListTreeView = BI.inherit(BI.TreeView, {\r\n\r\n _constants: {\r\n SPLIT: \"<|>\"\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n _init: function () {\r\n BI.ListTreeView.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.storeValue = o.value || {};\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false\r\n },\r\n check: {\r\n enable: true,\r\n chkboxType: {Y: \"\", N: \"\"}\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n onCheck: onCheck,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var checked = treeNode.checked;\r\n self._checkValue(treeNode, !checked);\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _selectTreeNode: function (treeId, treeNode) {\r\n this._checkValue(treeNode, treeNode.checked);\r\n BI.ListTreeView.superclass._selectTreeNode.apply(this, arguments);\r\n },\r\n\r\n _transArrayToMap: function (treeArrays) {\r\n var self = this;\r\n var map = {};\r\n BI.each(treeArrays, function (idx, array) {\r\n var key = array.join(self._constants.SPLIT);\r\n map[key] = true;\r\n });\r\n return map;\r\n },\r\n\r\n _transMapToArray: function (treeMap) {\r\n var self = this;\r\n var array = [];\r\n BI.each(treeMap, function (key) {\r\n var item = key.split(self._constants.SPLIT);\r\n array.push(item);\r\n });\r\n return array;\r\n },\r\n\r\n _checkValue: function (treeNode, checked) {\r\n var key = BI.concat(this._getParentValues(treeNode), this._getNodeValue(treeNode)).join(this._constants.SPLIT);\r\n if(checked) {\r\n this.storeValue[key] = true;\r\n } else {\r\n delete this.storeValue[key];\r\n }\r\n },\r\n\r\n setSelectedValue: function (value) {\r\n this.options.paras.selectedValues = value || [];\r\n this.storeValue = this._transArrayToMap(value);\r\n },\r\n\r\n getValue: function () {\r\n return this._transMapToArray(this.storeValue);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_tree_view\", BI.ListTreeView);/**\r\n * author: windy\r\n * 继承自treeView, 此树的父子节点的勾选状态互不影响, 此树不会有半选节点\r\n * 返回value格式为[\"A\", [\"A\", \"a\"]]表示勾选了A且勾选了a\r\n * @class BI.ListListAsyncTree\r\n * @extends BI.TreeView\r\n */\r\nBI.ListAsyncTree = BI.inherit(BI.ListTreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListAsyncTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n _init: function () {\r\n BI.ListAsyncTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false, // 很明显这棵树把异步请求关掉了,所有的异步请求都是手动控制的\r\n otherParam: BI.cjkEncodeDO(paras)\r\n },\r\n check: {\r\n enable: true,\r\n chkboxType: {Y: \"\", N: \"\"}\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n onCheck: onCheck,\r\n beforeExpand: beforeExpand,\r\n beforeCheck: beforeCheck,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.half = false;\r\n }\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var checked = treeNode.checked;\r\n self._checkValue(treeNode, !checked);\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n self._beforeExpandNode(treeId, treeNode);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n // 展开节点\r\n _beforeExpandNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = treeNode.parentValues || self._getParentValues(treeNode);\r\n var op = BI.extend({}, o.paras, {\r\n id: treeNode.id,\r\n times: 1,\r\n parentValues: parentValues.concat(this._getNodeValue(treeNode))\r\n });\r\n var complete = function (d) {\r\n var nodes = d.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes), !!d.hasNext);\r\n }\r\n };\r\n var times = 1;\r\n\r\n function callback (nodes, hasNext) {\r\n self.nodes.addNodes(treeNode, nodes);\r\n // 展开节点是没有分页的\r\n if (hasNext === true) {\r\n BI.delay(function () {\r\n times++;\r\n op.times = times;\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n }\r\n }\r\n\r\n if (!treeNode.children) {\r\n setTimeout(function () {\r\n o.itemsCreator(op, complete);\r\n }, 17);\r\n }\r\n },\r\n\r\n hasChecked: function () {\r\n return !BI.isEmpty(this.options.paras.selectedValues) || BI.ListAsyncTree.superclass.hasChecked.apply(this, arguments);\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._initTree(setting);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_async_tree\", BI.ListAsyncTree);/**\r\n * guy\r\n * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点\r\n * @class BI.ListPartTree\r\n * @extends BI.AsyncTree\r\n */\r\nBI.ListPartTree = BI.inherit(BI.ListAsyncTree, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListPartTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ListPartTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: ++this.times\r\n });\r\n this.tip.setLoading();\r\n o.itemsCreator(op, function (d) {\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n if (self._stop === true) {\r\n return;\r\n }\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n _initTree: function (setting, keyword) {\r\n var self = this, o = this.options;\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n self.tip.setVisible(false);\r\n this.loading();\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: this.times\r\n });\r\n var complete = function (d) {\r\n if (self._stop === true || keyword != o.paras.keyword) {\r\n return;\r\n }\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n // 没有请求到数据也要初始化空树, 如果不初始化, 树就是上一次构造的树, 节点信息都是过期的\r\n callback(nodes.length > 0 ? self._dealWidthNodes(nodes) : []);\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n };\r\n\r\n function callback (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n }\r\n\r\n BI.delay(function () {\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n var o = this.options;\r\n delete o.paras.keyword;\r\n BI.extend(o.paras, config);\r\n delete o.paras.lastSearchValue;\r\n var setting = this._configSetting();\r\n this._initTree(setting, o.paras.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_part_tree\", BI.ListPartTree);BI.prepares.push(function () {\r\n BI.Resizers = new BI.ResizeController();\r\n BI.Layers = new BI.LayerController();\r\n BI.Maskers = new BI.MaskersController();\r\n BI.Bubbles = new BI.BubblesController();\r\n BI.Tooltips = new BI.TooltipsController();\r\n BI.Popovers = new BI.PopoverController();\r\n BI.Broadcasts = new BI.BroadcastController();\r\n BI.StyleLoaders = new BI.StyleLoaderManager();\r\n});\r\n/**\r\n * CollectionView\r\n *\r\n * Created by GUY on 2016/1/15.\r\n * @class BI.CollectionView\r\n * @extends BI.Widget\r\n */\r\nBI.CollectionView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-collection\",\r\n // width: 400, //必设\r\n // height: 300, //必设\r\n overflowX: true,\r\n overflowY: true,\r\n cellSizeAndPositionGetter: BI.emptyFn,\r\n horizontalOverscanSize: 0,\r\n verticalOverscanSize: 0,\r\n scrollLeft: 0,\r\n scrollTop: 0,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CollectionView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n this._debounceRelease = BI.debounce(function () {\r\n self._scrollLock = false;\r\n }, 1000 / 60);\r\n this.container = BI.createWidget({\r\n type: \"bi.absolute\"\r\n });\r\n this.element.scroll(function () {\r\n if (self._scrollLock === true) {\r\n return;\r\n }\r\n o.scrollLeft = self.element.scrollLeft();\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateChildrenToRender();\r\n self.fireEvent(BI.CollectionView.EVENT_SCROLL, {\r\n scrollLeft: o.scrollLeft,\r\n scrollTop: o.scrollTop\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n scrollable: o.overflowX === true && o.overflowY === true,\r\n scrolly: o.overflowX === false && o.overflowY === true,\r\n scrollx: o.overflowX === true && o.overflowY === false,\r\n items: [this.container]\r\n });\r\n if (o.items.length > 0) {\r\n this._calculateSizeAndPositionData();\r\n this._populate();\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.scrollLeft !== 0 || o.scrollTop !== 0) {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n }\r\n },\r\n\r\n _calculateSizeAndPositionData: function () {\r\n var o = this.options;\r\n var cellMetadata = [];\r\n var sectionManager = new BI.SectionManager();\r\n var height = 0;\r\n var width = 0;\r\n\r\n for (var index = 0, len = o.items.length; index < len; index++) {\r\n var cellMetadatum = o.cellSizeAndPositionGetter(index);\r\n\r\n if (cellMetadatum.height == null || isNaN(cellMetadatum.height) ||\r\n cellMetadatum.width == null || isNaN(cellMetadatum.width) ||\r\n cellMetadatum.x == null || isNaN(cellMetadatum.x) ||\r\n cellMetadatum.y == null || isNaN(cellMetadatum.y)) {\r\n throw Error();\r\n }\r\n\r\n height = Math.max(height, cellMetadatum.y + cellMetadatum.height);\r\n width = Math.max(width, cellMetadatum.x + cellMetadatum.width);\r\n\r\n cellMetadatum.index = index;\r\n cellMetadata[index] = cellMetadatum;\r\n sectionManager.registerCell(cellMetadatum, index);\r\n }\r\n\r\n this._cellMetadata = cellMetadata;\r\n this._sectionManager = sectionManager;\r\n this._height = height;\r\n this._width = width;\r\n },\r\n\r\n _cellRenderers: function (height, width, x, y) {\r\n this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y);\r\n return this._cellGroupRenderer();\r\n },\r\n\r\n _cellGroupRenderer: function () {\r\n var self = this, o = this.options;\r\n var rendered = [];\r\n BI.each(this._lastRenderedCellIndices, function (i, index) {\r\n var cellMetadata = self._sectionManager.getCellMetadata(index);\r\n rendered.push(cellMetadata);\r\n });\r\n return rendered;\r\n },\r\n\r\n _calculateChildrenToRender: function () {\r\n var self = this, o = this.options;\r\n var scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft());\r\n var scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop());\r\n var left = Math.max(0, scrollLeft - o.horizontalOverscanSize);\r\n var top = Math.max(0, scrollTop - o.verticalOverscanSize);\r\n var right = Math.min(this._width, scrollLeft + o.width + o.horizontalOverscanSize);\r\n var bottom = Math.min(this._height, scrollTop + o.height + o.verticalOverscanSize);\r\n if (right > 0 && bottom > 0) {\r\n // 如果滚动的区间并没有超出渲染的范围\r\n if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) {\r\n return;\r\n }\r\n var childrenToDisplay = this._cellRenderers(bottom - top, right - left, left, top);\r\n var renderedCells = [], renderedKeys = {}, renderedWidgets = {};\r\n // 存储所有的left和top\r\n var lefts = {}, tops = {};\r\n for (var i = 0, len = childrenToDisplay.length; i < len; i++) {\r\n var datum = childrenToDisplay[i];\r\n lefts[datum.x] = datum.x;\r\n lefts[datum.x + datum.width] = datum.x + datum.width;\r\n tops[datum.y] = datum.y;\r\n tops[datum.y + datum.height] = datum.y + datum.height;\r\n }\r\n lefts = BI.toArray(lefts);\r\n tops = BI.toArray(tops);\r\n var leftMap = BI.invert(lefts);\r\n var topMap = BI.invert(tops);\r\n // 存储上下左右四个边界\r\n var leftBorder = {}, rightBorder = {}, topBorder = {}, bottomBorder = {};\r\n var assertMinBorder = function (border, offset) {\r\n if (border[offset] == null) {\r\n border[offset] = Number.MAX_VALUE;\r\n }\r\n };\r\n var assertMaxBorder = function (border, offset) {\r\n if (border[offset] == null) {\r\n border[offset] = 0;\r\n }\r\n };\r\n for (var i = 0, len = childrenToDisplay.length; i < len; i++) {\r\n var datum = childrenToDisplay[i];\r\n var index = this.renderedKeys[datum.index] && this.renderedKeys[datum.index][1];\r\n var child;\r\n if (index >= 0) {\r\n if (datum.width !== this.renderedCells[index]._width) {\r\n this.renderedCells[index]._width = datum.width;\r\n this.renderedCells[index].el.setWidth(datum.width);\r\n }\r\n if (datum.height !== this.renderedCells[index]._height) {\r\n this.renderedCells[index]._height = datum.height;\r\n this.renderedCells[index].el.setHeight(datum.height);\r\n }\r\n if (this.renderedCells[index]._left !== datum.x) {\r\n this.renderedCells[index].el.element.css(\"left\", datum.x + \"px\");\r\n }\r\n if (this.renderedCells[index]._top !== datum.y) {\r\n this.renderedCells[index].el.element.css(\"top\", datum.y + \"px\");\r\n }\r\n renderedCells.push(child = this.renderedCells[index]);\r\n } else {\r\n child = BI.createWidget(BI.extend({\r\n type: \"bi.label\",\r\n width: datum.width,\r\n height: datum.height\r\n }, o.items[datum.index], {\r\n cls: (o.items[datum.index].cls || \"\") + \" container-cell\" + (datum.y === 0 ? \" first-row\" : \"\") + (datum.x === 0 ? \" first-col\" : \"\"),\r\n _left: datum.x,\r\n _top: datum.y\r\n }));\r\n renderedCells.push({\r\n el: child,\r\n left: datum.x,\r\n top: datum.y,\r\n _left: datum.x,\r\n _top: datum.y,\r\n _width: datum.width,\r\n _height: datum.height\r\n });\r\n }\r\n var startTopIndex = topMap[datum.y] | 0;\r\n var endTopIndex = topMap[datum.y + datum.height] | 0;\r\n for (var k = startTopIndex; k <= endTopIndex; k++) {\r\n var t = tops[k];\r\n assertMinBorder(leftBorder, t);\r\n assertMaxBorder(rightBorder, t);\r\n leftBorder[t] = Math.min(leftBorder[t], datum.x);\r\n rightBorder[t] = Math.max(rightBorder[t], datum.x + datum.width);\r\n }\r\n var startLeftIndex = leftMap[datum.x] | 0;\r\n var endLeftIndex = leftMap[datum.x + datum.width] | 0;\r\n for (var k = startLeftIndex; k <= endLeftIndex; k++) {\r\n var l = lefts[k];\r\n assertMinBorder(topBorder, l);\r\n assertMaxBorder(bottomBorder, l);\r\n topBorder[l] = Math.min(topBorder[l], datum.y);\r\n bottomBorder[l] = Math.max(bottomBorder[l], datum.y + datum.height);\r\n }\r\n\r\n renderedKeys[datum.index] = [datum.index, i];\r\n renderedWidgets[i] = child;\r\n }\r\n // 已存在的, 需要添加的和需要删除的\r\n var existSet = {}, addSet = {}, deleteArray = [];\r\n BI.each(renderedKeys, function (i, key) {\r\n if (self.renderedKeys[i]) {\r\n existSet[i] = key;\r\n } else {\r\n addSet[i] = key;\r\n }\r\n });\r\n BI.each(this.renderedKeys, function (i, key) {\r\n if (existSet[i]) {\r\n return;\r\n }\r\n if (addSet[i]) {\r\n return;\r\n }\r\n deleteArray.push(key[1]);\r\n });\r\n BI.each(deleteArray, function (i, index) {\r\n // 性能优化,不调用destroy方法防止触发destroy事件\r\n self.renderedCells[index].el._destroy();\r\n });\r\n var addedItems = [];\r\n BI.each(addSet, function (index, key) {\r\n addedItems.push(renderedCells[key[1]]);\r\n });\r\n this.container.addItems(addedItems);\r\n // 拦截父子级关系\r\n this.container._children = renderedWidgets;\r\n this.container.attr(\"items\", renderedCells);\r\n this.renderedCells = renderedCells;\r\n this.renderedKeys = renderedKeys;\r\n\r\n // Todo 左右比较特殊\r\n var minX = BI.min(leftBorder);\r\n var maxX = BI.max(rightBorder);\r\n\r\n var minY = BI.max(topBorder);\r\n var maxY = BI.min(bottomBorder);\r\n\r\n this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY};\r\n }\r\n },\r\n\r\n _getMaxScrollLeft: function () {\r\n return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollTop: function () {\r\n return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n this._reRange();\r\n if (items && items !== this.options.items) {\r\n this.options.items = items;\r\n this._calculateSizeAndPositionData();\r\n }\r\n if (o.items.length > 0) {\r\n this.container.setWidth(this._width);\r\n this.container.setHeight(this._height);\r\n\r\n this._calculateChildrenToRender();\r\n // 元素未挂载时不能设置scrollTop\r\n try {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n } catch (e) {\r\n }\r\n }\r\n },\r\n\r\n setScrollLeft: function (scrollLeft) {\r\n if (this.options.scrollLeft === scrollLeft) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollLeft(this.options.scrollLeft);\r\n },\r\n\r\n setScrollTop: function (scrollTop) {\r\n if (this.options.scrollTop === scrollTop) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollTop(this.options.scrollTop);\r\n },\r\n\r\n setOverflowX: function (b) {\r\n var self = this;\r\n if (this.options.overflowX !== !!b) {\r\n this.options.overflowX = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowX: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n setOverflowY: function (b) {\r\n var self = this;\r\n if (this.options.overflowY !== !!b) {\r\n this.options.overflowY = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowY: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n getScrollLeft: function () {\r\n return this.options.scrollLeft;\r\n },\r\n\r\n getScrollTop: function () {\r\n return this.options.scrollTop;\r\n },\r\n\r\n getMaxScrollLeft: function () {\r\n return this._getMaxScrollLeft();\r\n },\r\n\r\n getMaxScrollTop: function () {\r\n return this._getMaxScrollTop();\r\n },\r\n\r\n // 重新计算children\r\n _reRange: function () {\r\n this.renderRange = {};\r\n },\r\n\r\n _clearChildren: function () {\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n BI.each(this.renderedCells, function (i, cell) {\r\n cell.el._destroy();\r\n });\r\n this._clearChildren();\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n },\r\n\r\n populate: function (items) {\r\n if (items && items !== this.options.items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n }\r\n});\r\nBI.CollectionView.EVENT_SCROLL = \"EVENT_SCROLL\";\r\nBI.shortcut(\"bi.collection_view\", BI.CollectionView);/**\r\n * @class BI.Combo\r\n * @extends BI.Widget\r\n */\r\nBI.Combo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-combo\",\r\n trigger: \"click\",\r\n toggle: true,\r\n direction: \"bottom\", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft||innerRight||innerLeft\r\n logic: {\r\n dynamic: true\r\n },\r\n container: null, // popupview放置的容器,默认为this.element\r\n isDefaultInit: false,\r\n destroyWhenHide: false,\r\n isNeedAdjustHeight: true, // 是否需要高度调整\r\n isNeedAdjustWidth: true,\r\n stopEvent: false,\r\n stopPropagation: false,\r\n adjustLength: 0, // 调整的距离\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n hideChecker: BI.emptyFn,\r\n offsetStyle: \"left\", // left,right,center\r\n el: {},\r\n popup: {},\r\n comboClass: \"bi-combo-popup\",\r\n hoverClass: \"bi-combo-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Combo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._initCombo();\r\n this._initPullDownAction();\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj);\r\n }\r\n }\r\n });\r\n\r\n self.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend(o.logic, {\r\n items: [\r\n { el: this.combo }\r\n ]\r\n }))));\r\n o.isDefaultInit && (this._assertPopupView());\r\n BI.Resizers.add(this.getName(), BI.bind(function () {\r\n if (this.isViewVisible()) {\r\n this._hideView();\r\n }\r\n }, this));\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupViewRender();\r\n if (this.popupView.isVisible()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = (this.options.trigger || \"\").split(\",\");\r\n var st = function (e) {\r\n if (o.stopEvent) {\r\n e.stopEvent();\r\n }\r\n if (o.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n };\r\n\r\n var enterPopup = false;\r\n\r\n function hide () {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n self.popupView && self.popupView.element.off(\"mouseenter.\" + self.getName()).off(\"mouseleave.\" + self.getName());\r\n enterPopup = false;\r\n }\r\n\r\n BI.each(evs, function (i, ev) {\r\n switch (ev) {\r\n case \"hover\":\r\n self.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.popupView) {\r\n self.popupView.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n enterPopup = true;\r\n self.popupView.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n hide();\r\n });\r\n self.popupView.element.off(\"mouseenter.\" + self.getName());\r\n });\r\n BI.defer(function () {\r\n if (!enterPopup) {\r\n hide();\r\n }\r\n }, 50);\r\n }\r\n });\r\n break;\r\n case \"click\":\r\n var debounce = BI.debounce(function (e) {\r\n if (self.combo.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n // if (!o.toggle && self.isViewVisible()) {\r\n // return;\r\n // }\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isViewVisible()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n self.element.off(ev + \".\" + self.getName()).on(ev + \".\" + self.getName(), function (e) {\r\n debounce(e);\r\n st(e);\r\n });\r\n break;\r\n case \"click-hover\":\r\n var debounce = BI.debounce(function (e) {\r\n if (self.combo.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n // if (self.isViewVisible()) {\r\n // return;\r\n // }\r\n self._popupView();\r\n if (self.isViewVisible()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n self.element.off(\"click.\" + self.getName()).on(\"click.\" + self.getName(), function (e) {\r\n debounce(e);\r\n st(e);\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.popupView) {\r\n self.popupView.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n enterPopup = true;\r\n self.popupView.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n hide();\r\n });\r\n self.popupView.element.off(\"mouseenter.\" + self.getName());\r\n });\r\n BI.defer(function () {\r\n if (!enterPopup) {\r\n hide();\r\n }\r\n }, 50);\r\n }\r\n });\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initCombo: function () {\r\n this.combo = BI.createWidget(this.options.el, {\r\n value: this.options.value\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (this.popupView == null) {\r\n this.popupView = BI.createWidget(this.options.popup, {\r\n type: \"bi.popup_view\",\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self.combo.setValue(self.getValue());\r\n self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.popupView.setVisible(false);\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Combo.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _assertPopupViewRender: function () {\r\n this._assertPopupView();\r\n if (!this._rendered) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this.options.container || this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n this._rendered = true;\r\n }\r\n },\r\n\r\n _hideIf: function (e) {\r\n // if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {\r\n // return;\r\n // }\r\n // BI-10290 公式combo双击公式内容会收起\r\n if ((this.element.find(e.target).length > 0)\r\n || (this.popupView && this.popupView.element.find(e.target).length > 0)\r\n || e.target.className === \"CodeMirror-cursor\" || BI.Widget._renderEngine.createElement(e.target).closest(\".CodeMirror-hints\").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下\r\n var directions = this.options.direction.split(\",\");\r\n if (BI.contains(directions, \"innerLeft\") || BI.contains(directions, \"innerRight\")) {\r\n // popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置\r\n this.adjustWidth();\r\n this.adjustHeight();\r\n }\r\n return;\r\n }\r\n var isHide = this.options.hideChecker.apply(this, [e]);\r\n if (isHide === false) {\r\n return;\r\n }\r\n this._hideView();\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);\r\n if (this.options.destroyWhenHide === true) {\r\n this.popupView && this.popupView.destroy();\r\n this.popupView = null;\r\n this._rendered = false;\r\n } else {\r\n this.popupView && this.popupView.invisible();\r\n }\r\n this.element.removeClass(this.options.comboClass);\r\n\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName()).unbind(\"mousewheel.\" + this.getName());\r\n this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);\r\n },\r\n\r\n _popupView: function (e) {\r\n this._assertPopupViewRender();\r\n this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);\r\n\r\n this.popupView.visible();\r\n this.adjustWidth(e);\r\n this.adjustHeight(e);\r\n\r\n this.element.addClass(this.options.comboClass);\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName()).unbind(\"mousewheel.\" + this.getName());\r\n BI.Widget._renderEngine.createElement(document).bind(\"mousedown.\" + this.getName(), BI.bind(this._hideIf, this)).bind(\"mousewheel.\" + this.getName(), BI.bind(this._hideIf, this));\r\n this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);\r\n },\r\n\r\n adjustWidth: function (e) {\r\n var o = this.options;\r\n if (!this.popupView) {\r\n return;\r\n }\r\n if (o.isNeedAdjustWidth === true) {\r\n this.resetListWidth(\"\");\r\n var width = this.popupView.element.outerWidth();\r\n var maxW = this.element.outerWidth() || o.width;\r\n if (width > maxW + 80) {\r\n maxW = maxW + 80;\r\n } else if (width > maxW) {\r\n maxW = width;\r\n }\r\n this.resetListWidth(maxW < 100 ? 100 : maxW);\r\n }\r\n },\r\n\r\n adjustHeight: function (e) {\r\n var o = this.options, p = {};\r\n if (!this.popupView) {\r\n return;\r\n }\r\n var isVisible = this.popupView.isVisible();\r\n this.popupView.visible();\r\n var combo = BI.isNotNull(e) ? {\r\n element: {\r\n offset: function () {\r\n return {\r\n left: e.pageX,\r\n top: e.pageY\r\n };\r\n },\r\n bounds: function () {\r\n // offset为其相对于父定位元素的偏移\r\n return {\r\n x: e.offsetX,\r\n y: e.offsetY,\r\n width: 0,\r\n height: 24\r\n };\r\n },\r\n outerWidth: function () {\r\n return 0;\r\n },\r\n outerHeight: function () {\r\n return 24;\r\n }\r\n }\r\n } : this.combo;\r\n switch (o.direction) {\r\n case \"bottom\":\r\n case \"bottom,right\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"bottom\", \"top\", \"right\", \"left\"], o.offsetStyle);\r\n break;\r\n case \"top\":\r\n case \"top,right\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"top\", \"bottom\", \"right\", \"left\"], o.offsetStyle);\r\n break;\r\n case \"left\":\r\n case \"left,bottom\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"left\", \"right\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"right\":\r\n case \"right,bottom\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"top,left\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"top\", \"bottom\", \"left\", \"right\"], o.offsetStyle);\r\n break;\r\n case \"bottom,left\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"bottom\", \"top\", \"left\", \"right\"], o.offsetStyle);\r\n break;\r\n case \"left,top\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"left\", \"right\", \"top\", \"bottom\"], o.offsetStyle);\r\n break;\r\n case \"right,top\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"top\", \"bottom\"], o.offsetStyle);\r\n break;\r\n case \"right,innerRight\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"innerRight\", \"innerLeft\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"right,innerLeft\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"innerLeft\", \"innerRight\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"innerRight\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"innerRight\", \"innerLeft\", \"right\", \"left\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"innerLeft\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"innerLeft\", \"innerRight\", \"left\", \"right\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"top,custom\":\r\n case \"custom,top\":\r\n p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);\r\n break;\r\n case \"custom,bottom\":\r\n case \"bottom,custom\":\r\n p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);\r\n break;\r\n case \"left,custom\":\r\n case \"custom,left\":\r\n p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);\r\n delete p.top;\r\n delete p.adaptHeight;\r\n break;\r\n case \"custom,right\":\r\n case \"right,custom\":\r\n p = BI.DOM.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);\r\n delete p.top;\r\n delete p.adaptHeight;\r\n break;\r\n }\r\n\r\n if (\"adaptHeight\" in p) {\r\n this.resetListHeight(p[\"adaptHeight\"]);\r\n }\r\n if (\"left\" in p) {\r\n this.popupView.element.css({\r\n left: p.left\r\n });\r\n }\r\n if (\"top\" in p) {\r\n this.popupView.element.css({\r\n top: p.top\r\n });\r\n }\r\n this.position = p;\r\n this.popupView.setVisible(isVisible);\r\n },\r\n\r\n resetListHeight: function (h) {\r\n this._assertPopupView();\r\n this.popupView.resetHeight && this.popupView.resetHeight(h);\r\n },\r\n\r\n resetListWidth: function (w) {\r\n this._assertPopupView();\r\n this.popupView.resetWidth && this.popupView.resetWidth(w);\r\n },\r\n\r\n populate: function (items) {\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Combo.superclass._setEnable.apply(this, arguments);\r\n if (arg === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (arg === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n !arg && this.element.removeClass(this.options.hoverClass);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();\r\n },\r\n\r\n showView: function (e) {\r\n // 减少popup 调整宽高的次数\r\n if (this.isEnabled() && this.combo.isEnabled() && !this.isViewVisible()) {\r\n this._popupView(e);\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n getPopupPosition: function () {\r\n return this.position;\r\n },\r\n\r\n toggle: function () {\r\n this._toggle();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName())\r\n .unbind(\"mousewheel.\" + this.getName())\r\n .unbind(\"mouseenter.\" + this.getName())\r\n .unbind(\"mousemove.\" + this.getName())\r\n .unbind(\"mouseleave.\" + this.getName());\r\n BI.Resizers.remove(this.getName());\r\n this.popupView && this.popupView._destroy();\r\n }\r\n});\r\nBI.Combo.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Combo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Combo.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Combo.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Combo.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Combo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Combo.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Combo.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Combo.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.combo\", BI.Combo);/**\r\n *\r\n * 某个可以展开的节点\r\n *\r\n * Created by GUY on 2015/9/10.\r\n * @class BI.Expander\r\n * @extends BI.Widget\r\n */\r\nBI.Expander = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Expander.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-expander\",\r\n trigger: \"click\",\r\n toggle: true,\r\n // direction: \"bottom\", //top,bottom四个方向\r\n isDefaultInit: false, // 是否默认初始化子节点\r\n el: {},\r\n popup: {},\r\n expanderClass: \"bi-expander-popup\",\r\n hoverClass: \"bi-expander-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Expander.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._expanded = !!o.el.open;\r\n this._initExpander();\r\n this._initPullDownAction();\r\n this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj);\r\n }\r\n }\r\n });\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.expander}\r\n ]\r\n });\r\n o.isDefaultInit && this._assertPopupView();\r\n if (this.expander.isOpened() === true) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupViewRender();\r\n if (this.popupView.isVisible()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = this.options.trigger.split(\",\");\r\n BI.each(evs, function (i, e) {\r\n switch (e) {\r\n case \"hover\":\r\n self.element[e](function (e) {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n });\r\n break;\r\n case \"click\":\r\n if (e) {\r\n self.element.off(e + \".\" + self.getName()).on(e + \".\" + self.getName(), BI.debounce(function (e) {\r\n if (self.expander.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isExpanded()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n }));\r\n }\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initExpander: function () {\r\n this.expander = BI.createWidget(this.options.el);\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (this.popupView == null) {\r\n this.popupView = BI.createWidget(this.options.popup, {\r\n type: \"bi.button_group\",\r\n cls: \"expander-popup\",\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n // self.setValue(self.getValue());\r\n self.fireEvent(BI.Expander.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n this.popupView.setVisible(this.isExpanded());\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Expander.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _assertPopupViewRender: function () {\r\n this._assertPopupView();\r\n if (!this._rendered) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n this._rendered = true;\r\n }\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW);\r\n this._expanded = false;\r\n this.expander.setOpened(false);\r\n this.popupView && this.popupView.invisible();\r\n this.element.removeClass(this.options.expanderClass);\r\n\r\n this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW);\r\n },\r\n\r\n _popupView: function () {\r\n this._assertPopupViewRender();\r\n this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW);\r\n this._expanded = true;\r\n this.expander.setOpened(true);\r\n this.popupView.visible();\r\n this.element.addClass(this.options.expanderClass);\r\n this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW);\r\n },\r\n\r\n populate: function (items) {\r\n // this._assertPopupView();\r\n this.popupView && this.popupView.populate.apply(this.popupView, arguments);\r\n this.expander.populate.apply(this.expander, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Expander.superclass._setEnable.apply(this, arguments);\r\n !arg && this.element.removeClass(this.options.hoverClass);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.expander.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.expander.isEnabled() && !!this.popupView && this.popupView.isVisible();\r\n },\r\n\r\n isExpanded: function () {\r\n return this._expanded;\r\n },\r\n\r\n showView: function () {\r\n if (this.isEnabled() && this.expander.isEnabled()) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.popupView && this.popupView.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n if (this.expander.options.id === id) {\r\n return this.expander;\r\n }\r\n return this.popupView && this.popupView.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n if (this.expander.getValue() === value) {\r\n return this.expander;\r\n }\r\n return this.popupView && this.popupView.getNodeByValue(value);\r\n },\r\n\r\n destroy: function () {\r\n BI.Expander.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Expander.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Expander.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Expander.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Expander.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Expander.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Expander.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Expander.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Expander.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Expander.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.expander\", BI.Expander);/**\r\n * Created by GUY on 2015/8/10.\r\n */\r\n\r\nBI.ComboGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-combo-group bi-list-item\",\r\n\r\n // 以下这些属性对每一个combo都是公用的\r\n trigger: \"click,hover\",\r\n direction: \"right\",\r\n adjustLength: 0,\r\n isDefaultInit: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n\r\n el: {type: \"bi.text_button\", text: \"\", value: \"\"},\r\n children: [],\r\n\r\n popup: {\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ComboGroup.superclass._init.apply(this, arguments);\r\n this._populate(this.options.el);\r\n },\r\n\r\n _populate: function (item) {\r\n var self = this, o = this.options;\r\n var children = o.children;\r\n if (BI.isEmpty(children)) {\r\n throw new Error(\"ComboGroup构造错误\");\r\n }\r\n BI.each(children, function (i, ch) {\r\n var son = BI.formatEL(ch).el.children;\r\n ch = BI.formatEL(ch).el;\r\n if (!BI.isEmpty(son)) {\r\n ch.el = BI.clone(ch);\r\n ch.children = son;\r\n ch.type = \"bi.combo_group\";\r\n ch.action = o.action;\r\n ch.height = o.height;\r\n ch.direction = o.direction;\r\n ch.isDefaultInit = o.isDefaultInit;\r\n ch.isNeedAdjustHeight = o.isNeedAdjustHeight;\r\n ch.isNeedAdjustWidth = o.isNeedAdjustWidth;\r\n ch.adjustLength = o.adjustLength;\r\n ch.popup = o.popup;\r\n }\r\n });\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n height: o.height,\r\n trigger: o.trigger,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n isNeedAdjustWidth: o.isNeedAdjustWidth,\r\n isNeedAdjustHeight: o.isNeedAdjustHeight,\r\n adjustLength: o.adjustLength,\r\n el: item,\r\n popup: BI.extend({}, o.popup, {\r\n el: BI.extend({\r\n items: children\r\n }, o.popup.el)\r\n })\r\n });\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj);\r\n }\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n }\r\n});\r\nBI.ComboGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.combo_group\", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-virtual-group\",\r\n items: [],\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n },\r\n\r\n render: function () {\r\n var o = this.options;\r\n this.populate(o.items);\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _packageBtns: function (items) {\r\n var o = this.options;\r\n var map = this.buttonMap = {};\r\n for (var i = o.layouts.length - 1; i > 0; i--) {\r\n items = BI.map(items, function (k, it) {\r\n var el = BI.stripEL(it);\r\n return BI.extend({}, o.layouts[i], {\r\n items: [\r\n BI.extend({}, o.layouts[i].el, {\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n if (BI.isKey(map[el.value])) {\r\n map[el.value] = _ref;\r\n }\r\n }\r\n }, el)\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return items;\r\n },\r\n\r\n _packageLayout: function (items) {\r\n var o = this.options, layout = BI.deepClone(o.layouts[0]);\r\n\r\n var lay = BI.formatEL(layout).el;\r\n while (lay && lay.items && !BI.isEmpty(lay.items)) {\r\n lay = BI.formatEL(lay.items[0]).el;\r\n }\r\n lay.items = items;\r\n return layout;\r\n },\r\n\r\n addItems: function (items) {\r\n this.layouts.addItems(items);\r\n },\r\n\r\n prependItems: function (items) {\r\n this.layouts.prependItems(items);\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttonMap, function (key, item) {\r\n if (item) {\r\n if (v.deepContains(key)) {\r\n item.setSelected && item.setSelected(true);\r\n } else {\r\n item.setSelected && item.setSelected(false);\r\n }\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttonMap, function (i, item) {\r\n if (item) {\r\n if (item.isEnabled() && !(item.isSelected && item.isSelected())) {\r\n v.push(item.getValue());\r\n }\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttonMap, function (i, item) {\r\n if (item) {\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n populate: function (items) {\r\n var self = this;\r\n items = items || [];\r\n this.options.items = items;\r\n items = this._packageBtns(items);\r\n if (!this.layouts) {\r\n this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));\r\n } else {\r\n this.layouts.populate(items);\r\n }\r\n }\r\n});\r\nBI.VirtualGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.virtual_group\", BI.VirtualGroup);/**\r\n * 加载控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.Loader\r\n * @extends BI.Widget\r\n */\r\nBI.Loader = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Loader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-loader\",\r\n\r\n direction: \"top\",\r\n isDefaultInit: true, // 是否默认初始化数据\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n prev: false,\r\n next: {},\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn\r\n });\r\n },\r\n\r\n _prevLoad: function () {\r\n var self = this, o = this.options;\r\n this.prev.setLoading();\r\n o.itemsCreator.apply(this, [{times: --this.times}, function () {\r\n self.prev.setLoaded();\r\n self.prependItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _nextLoad: function () {\r\n var self = this, o = this.options;\r\n this.next.setLoading();\r\n o.itemsCreator.apply(this, [{times: ++this.times}, function () {\r\n self.next.setLoaded();\r\n self.addItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _init: function () {\r\n BI.Loader.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.itemsCreator === false) {\r\n o.prev = false;\r\n o.next = false;\r\n }\r\n if (o.prev !== false) {\r\n this.prev = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.prev));\r\n this.prev.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._prevLoad();\r\n }\r\n });\r\n }\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n chooseType: 0,\r\n items: o.items,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Loader.EVENT_CHANGE, obj);\r\n }\r\n });\r\n\r\n if (o.next !== false) {\r\n this.next = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.next));\r\n this.next.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._nextLoad();\r\n }\r\n });\r\n }\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.prev, this.button_group, this.next)\r\n }))));\r\n\r\n o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {\r\n o.isDefaultInit && BI.isEmpty(o.items) && this._populate();\r\n }, this));\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this._populate(o.items);\r\n }\r\n },\r\n\r\n hasPrev: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasPrev.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n hasNext: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasNext.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n prependItems: function (items) {\r\n this.count += items.length;\r\n if (this.next !== false) {\r\n if (this.hasPrev()) {\r\n this.options.items = this.options.items.concat(items);\r\n this.prev.setLoaded();\r\n } else {\r\n this.prev.setEnd();\r\n }\r\n }\r\n this.button_group.prependItems.apply(this.button_group, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.options.items = this.options.items.concat(items);\r\n this.next.setLoaded();\r\n } else {\r\n this.next.setEnd();\r\n }\r\n }\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n },\r\n\r\n\r\n _populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {\r\n o.itemsCreator.apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"arguments can not be null!!!\");\r\n }\r\n self.populate.apply(self, arguments);\r\n o.onLoaded();\r\n }]);\r\n return false;\r\n }\r\n this.options.items = items;\r\n this.times = 1;\r\n this.count = 0;\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.invisible();\r\n }\r\n }\r\n if (BI.isObject(this.prev)) {\r\n if (this.hasPrev()) {\r\n this.prev.setLoaded();\r\n } else {\r\n this.prev.invisible();\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n populate: function () {\r\n this._populate.apply(this, arguments) && this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n BI.each([this.prev, this.next], function (i, ob) {\r\n ob && ob.setVisible(false);\r\n });\r\n },\r\n\r\n destroy: function () {\r\n BI.Loader.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Loader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.loader\", BI.Loader);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Navigation = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), {\r\n direction: \"bottom\", // top, bottom, left, right, custom\r\n logic: {\r\n dynamic: false\r\n },\r\n single: false,\r\n showIndex: false,\r\n tab: false,\r\n cardCreator: function (v) {\r\n return BI.createWidget();\r\n },\r\n\r\n afterCardCreated: BI.emptyFn,\r\n afterCardShow: BI.emptyFn\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.tab = BI.createWidget(this.options.tab, {type: \"bi.button_group\"});\r\n this.cardMap = {};\r\n this.showIndex = 0;\r\n this.layout = BI.createWidget({\r\n type: \"bi.card\"\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout)\r\n }))));\r\n\r\n\r\n new BI.ShowListener({\r\n eventObj: this.tab,\r\n cardLayout: this.layout,\r\n cardNameCreator: function (v) {\r\n return self.showIndex + v;\r\n },\r\n cardCreator: function (v) {\r\n var card = o.cardCreator(v);\r\n self.cardMap[v] = card;\r\n return card;\r\n },\r\n afterCardCreated: BI.bind(this.afterCardCreated, this),\r\n afterCardShow: BI.bind(this.afterCardShow, this)\r\n });\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.showIndex !== false) {\r\n this.setSelect(o.showIndex);\r\n }\r\n },\r\n\r\n _deleteOtherCards: function (currCardName) {\r\n var self = this, o = this.options;\r\n if (o.single === true) {\r\n BI.each(this.cardMap, function (name, card) {\r\n if (name !== (currCardName + \"\")) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n }\r\n });\r\n }\r\n },\r\n\r\n afterCardCreated: function (v) {\r\n var self = this;\r\n this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Navigation.EVENT_CHANGE, obj);\r\n }\r\n });\r\n this.options.afterCardCreated.apply(this, arguments);\r\n },\r\n\r\n afterCardShow: function (v) {\r\n this.showIndex = v;\r\n this._deleteOtherCards(v);\r\n this.options.afterCardShow.apply(this, arguments);\r\n },\r\n\r\n populate: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.populate.apply(card, arguments);\r\n }\r\n },\r\n\r\n _assertCard: function (v) {\r\n if (!this.layout.isCardExisted(v)) {\r\n var card = this.options.cardCreator(v);\r\n this.cardMap[v] = card;\r\n this.layout.addCardByName(v, card);\r\n this.afterCardCreated(v);\r\n }\r\n },\r\n\r\n setSelect: function (v) {\r\n this._assertCard(v);\r\n this.layout.showCardByName(v);\r\n this._deleteOtherCards(v);\r\n if (this.showIndex !== v) {\r\n this.showIndex = v;\r\n BI.nextTick(BI.bind(this.afterCardShow, this, v));\r\n }\r\n },\r\n\r\n getSelect: function () {\r\n return this.showIndex;\r\n },\r\n\r\n getSelectedCard: function () {\r\n if (BI.isKey(this.showIndex)) {\r\n return this.cardMap[this.showIndex];\r\n }\r\n },\r\n\r\n /**\r\n * @override\r\n */\r\n setValue: function (v) {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n card.setValue(v);\r\n }\r\n },\r\n\r\n /**\r\n * @override\r\n */\r\n getValue: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.getValue();\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.layout.deleteAllCard();\r\n this.cardMap = {};\r\n },\r\n\r\n destroy: function () {\r\n BI.Navigation.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Navigation.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.navigation\", BI.Navigation);/**\r\n * 搜索逻辑控件\r\n *\r\n * Created by GUY on 2015/9/28.\r\n * @class BI.Searcher\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.Searcher = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-searcher\",\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n\r\n isDefaultInit: false,\r\n isAutoSearch: true, // 是否自动搜索\r\n isAutoSync: true, // 是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n\r\n // isAutoSearch为false时启用\r\n onSearch: function (op, callback) {\r\n callback([]);\r\n },\r\n\r\n el: {\r\n type: \"bi.search_editor\"\r\n },\r\n\r\n popup: {\r\n type: \"bi.searcher_view\"\r\n },\r\n\r\n adapter: null,\r\n masker: { // masker层\r\n offset: {}\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Searcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.search_editor\"\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap,\r\n items: [this.editor]\r\n });\r\n o.isDefaultInit && (this._assertPopupView());\r\n\r\n var search = BI.debounce(BI.bind(this._search, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n switch (type) {\r\n case BI.Events.STARTEDIT:\r\n self._startSearch();\r\n break;\r\n case BI.Events.EMPTY:\r\n self._stopSearch();\r\n break;\r\n case BI.Events.CHANGE:\r\n search();\r\n break;\r\n case BI.Events.PAUSE:\r\n self._pauseSearch();\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if ((o.masker && !BI.Maskers.has(this.getName())) || (o.masker === false && !this.popupView)) {\r\n this.popupView = BI.createWidget(o.popup, {\r\n type: \"bi.searcher_view\",\r\n chooseType: o.chooseType\r\n });\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n if (o.isAutoSync) {\r\n var values = o.adapter && o.adapter.getValue();\r\n if (!obj.isSelected()) {\r\n o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue()));\r\n } else {\r\n switch (o.chooseType) {\r\n case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:\r\n o.adapter && o.adapter.setValue([obj.getValue()]);\r\n break;\r\n case BI.ButtonGroup.CHOOSE_TYPE_MULTI:\r\n values.push(obj.getValue());\r\n o.adapter && o.adapter.setValue(values);\r\n break;\r\n }\r\n }\r\n }\r\n self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Searcher.EVENT_AFTER_INIT);\r\n });\r\n }\r\n if (o.masker && !BI.Maskers.has(this.getName())) {\r\n BI.Maskers.create(this.getName(), o.adapter, BI.extend({\r\n container: this,\r\n render: this.popupView\r\n }, o.masker), this);\r\n }\r\n },\r\n\r\n _startSearch: function () {\r\n this._assertPopupView();\r\n this._stop = false;\r\n this._isSearching = true;\r\n this.fireEvent(BI.Searcher.EVENT_START);\r\n this.popupView.startSearch && this.popupView.startSearch();\r\n // 搜索前先清空dom\r\n // BI.Maskers.get(this.getName()).empty();\r\n BI.nextTick(function (name) {\r\n BI.Maskers.show(name);\r\n }, this.getName());\r\n },\r\n\r\n _pauseSearch: function () {\r\n var o = this.options, name = this.getName();\r\n this._stop = true;\r\n BI.nextTick(function (name) {\r\n BI.Maskers.hide(name);\r\n }, this.getName());\r\n if (this._isSearching === true) {\r\n this.popupView && this.popupView.pauseSearch && this.popupView.pauseSearch();\r\n this.fireEvent(BI.Searcher.EVENT_PAUSE);\r\n }\r\n this._isSearching = false;\r\n },\r\n\r\n _stopSearch: function () {\r\n var o = this.options, name = this.getName();\r\n this._stop = true;\r\n BI.Maskers.hide(name);\r\n if (this._isSearching === true) {\r\n this.popupView && this.popupView.stopSearch && this.popupView.stopSearch();\r\n this.fireEvent(BI.Searcher.EVENT_STOP);\r\n }\r\n this._isSearching = false;\r\n },\r\n\r\n _search: function () {\r\n var self = this, o = this.options, keyword = this._getLastSearchKeyword();\r\n if (keyword === \"\" || this._stop) {\r\n return;\r\n }\r\n if (o.isAutoSearch) {\r\n var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr(\"items\"))) || [];\r\n var finding = BI.Func.getSearchResult(items, keyword);\r\n var match = finding.match, find = finding.find;\r\n this.popupView.populate(find, match, keyword);\r\n o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue());\r\n self.fireEvent(BI.Searcher.EVENT_SEARCHING);\r\n return;\r\n }\r\n this.popupView.loading && this.popupView.loading();\r\n o.onSearch({\r\n times: 1,\r\n keyword: keyword,\r\n selectedValues: o.adapter && o.adapter.getValue()\r\n }, function (searchResult, matchResult) {\r\n if (!self._stop) {\r\n var args = [].slice.call(arguments);\r\n if (args.length > 0) {\r\n args.push(keyword);\r\n }\r\n BI.Maskers.show(self.getName());\r\n self.popupView.populate.apply(self.popupView, args);\r\n o.isAutoSync && o.adapter && o.adapter.getValue && self.popupView.setValue(o.adapter.getValue());\r\n self.popupView.loaded && self.popupView.loaded();\r\n self.fireEvent(BI.Searcher.EVENT_SEARCHING);\r\n }\r\n });\r\n },\r\n\r\n _getLastSearchKeyword: function () {\r\n if (this.isValid()) {\r\n var res = this.editor.getValue().match(/[\\S]+/g);\r\n return BI.isNull(res) ? \"\" : res[res.length - 1];\r\n }\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.options.adapter = adapter;\r\n BI.Maskers.remove(this.getName());\r\n },\r\n\r\n doSearch: function () {\r\n if (this.isSearching()) {\r\n this._search();\r\n }\r\n },\r\n\r\n stopSearch: function () {\r\n this._stopSearch();// 先停止搜索,然后再去设置editor为空\r\n // important:停止搜索必须退出编辑状态,这里必须加上try(input框不显示时blur会抛异常)\r\n try {\r\n this.editor.blur();\r\n } catch (e) {\r\n if (!this.editor.blur) {\r\n throw new Error(\"editor没有实现blur方法\");\r\n }\r\n } finally {\r\n this.editor.setValue(\"\");\r\n }\r\n },\r\n\r\n isSearching: function () {\r\n return this._isSearching;\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.editor.isEnabled() && BI.Maskers.isVisible(this.getName());\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n hasMatched: function () {\r\n this._assertPopupView();\r\n return this.popupView.hasMatched();\r\n },\r\n\r\n adjustHeight: function () {\r\n if (BI.Maskers.has(this.getName()) && BI.Maskers.get(this.getName()).isVisible()) {\r\n BI.Maskers.show(this.getName());\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.isViewVisible() && BI.Maskers.show(this.getName());\r\n },\r\n\r\n setValue: function (v) {\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getKeyword: function () {\r\n return this._getLastSearchKeyword();\r\n },\r\n\r\n getKeywords: function () {\r\n return this.editor.getKeywords();\r\n },\r\n\r\n getValue: function () {\r\n var o = this.options;\r\n if (o.isAutoSync && o.adapter && o.adapter.getValue) {\r\n return o.adapter.getValue();\r\n }\r\n if (this.isSearching()) {\r\n return this.popupView.getValue();\r\n } else if (o.adapter && o.adapter.getValue) {\r\n return o.adapter.getValue();\r\n }\r\n if (BI.isNull(this.popupView)) {\r\n return o.popup.value;\r\n }\r\n return this.popupView.getValue();\r\n\r\n },\r\n\r\n populate: function (result, searchResult, keyword) {\r\n var o = this.options;\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n if (o.isAutoSync && o.adapter && o.adapter.getValue) {\r\n this.popupView.setValue(o.adapter.getValue());\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.popupView && this.popupView.empty();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Maskers.remove(this.getName());\r\n }\r\n});\r\nBI.Searcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Searcher.EVENT_START = \"EVENT_START\";\r\nBI.Searcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Searcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Searcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.Searcher.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\nBI.shortcut(\"bi.searcher\", BI.Searcher);/**\r\n *\r\n * 切换显示或隐藏面板\r\n *\r\n * Created by GUY on 2015/11/2.\r\n * @class BI.Switcher\r\n * @extends BI.Widget\r\n */\r\nBI.Switcher = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-switcher\",\r\n direction: BI.Direction.Top,\r\n trigger: \"click\",\r\n toggle: true,\r\n el: {},\r\n popup: {},\r\n adapter: null,\r\n masker: {},\r\n switcherClass: \"bi-switcher-popup\",\r\n hoverClass: \"bi-switcher-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Switcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._initSwitcher();\r\n this._initPullDownAction();\r\n this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj);\r\n }\r\n }\r\n });\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.switcher}\r\n ]\r\n });\r\n o.isDefaultInit && (this._assertPopupView());\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupView();\r\n if (this.isExpanded()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = this.options.trigger.split(\",\");\r\n BI.each(evs, function (i, e) {\r\n switch (e) {\r\n case \"hover\":\r\n self.element[e](function (e) {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n });\r\n break;\r\n default :\r\n if (e) {\r\n self.element.off(e + \".\" + self.getName()).on(e + \".\" + self.getName(), BI.debounce(function (e) {\r\n if (self.switcher.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isExpanded()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n }));\r\n }\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initSwitcher: function () {\r\n this.switcher = BI.createWidget(this.options.el, {\r\n value: this.options.value\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (!this._created) {\r\n this.popupView = BI.createWidget(o.popup, {\r\n type: \"bi.button_group\",\r\n element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)),\r\n cls: \"switcher-popup\",\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Switcher.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n if (o.direction !== BI.Direction.Custom && !o.adapter) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n }\r\n this._created = true;\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);\r\n var self = this, o = this.options;\r\n o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false));\r\n BI.nextTick(function () {\r\n o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false));\r\n self.element.removeClass(o.switcherClass);\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW);\r\n });\r\n },\r\n\r\n _popupView: function () {\r\n var self = this, o = this.options;\r\n this._assertPopupView();\r\n this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW);\r\n o.adapter ? BI.Maskers.show(this.getName()) : self.popupView.setVisible(true);\r\n BI.nextTick(function (name) {\r\n o.adapter ? BI.Maskers.show(name) : self.popupView.setVisible(true);\r\n self.element.addClass(o.switcherClass);\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW);\r\n }, this.getName());\r\n },\r\n\r\n populate: function (items) {\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n this.switcher.populate.apply(this.switcher, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Switcher.superclass._setEnable.apply(this, arguments);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.switcher.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.options.adapter = adapter;\r\n BI.Maskers.remove(this.getName());\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.switcher.isEnabled() &&\r\n (this.options.adapter ? BI.Maskers.isVisible(this.getName()) : (this.popupView && this.popupView.isVisible()));\r\n },\r\n\r\n isExpanded: function () {\r\n return this.isViewVisible();\r\n },\r\n\r\n showView: function () {\r\n if (this.isEnabled() && this.switcher.isEnabled()) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n adjustView: function () {\r\n this.isViewVisible() && BI.Maskers.show(this.getName());\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.popupView && this.popupView.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n if (this.switcher.attr(\"id\") === id) {\r\n return this.switcher;\r\n }\r\n return this.popupView && this.popupView.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n if (this.switcher.getValue() === value) {\r\n return this.switcher;\r\n }\r\n return this.popupView && this.popupView.getNodeByValue(value);\r\n },\r\n\r\n empty: function () {\r\n this.popupView && this.popupView.empty();\r\n }\r\n});\r\nBI.Switcher.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Switcher.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Switcher.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Switcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Switcher.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Switcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Switcher.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Switcher.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Switcher.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.switcher\", BI.Switcher);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Tab = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Tab.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tab\",\r\n direction: \"top\", // top, bottom, left, right, custom\r\n single: false, // 是不是单页面\r\n logic: {\r\n dynamic: false\r\n },\r\n showIndex: false,\r\n tab: false,\r\n cardCreator: function (v) {\r\n return BI.createWidget();\r\n }\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (BI.isObject(o.tab)) {\r\n this.tab = BI.createWidget(this.options.tab, {type: \"bi.button_group\"});\r\n this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n }\r\n this.cardMap = {};\r\n this.layout = BI.createWidget({\r\n type: \"bi.card\"\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout)\r\n }))));\r\n\r\n var listener = new BI.ShowListener({\r\n eventObj: this.tab,\r\n cardLayout: this.layout,\r\n cardCreator: function (v) {\r\n var card = o.cardCreator.apply(self, arguments);\r\n self.cardMap[v] = card;\r\n return card;\r\n },\r\n afterCardShow: function (v) {\r\n self._deleteOtherCards(v);\r\n self.curr = v;\r\n }\r\n });\r\n listener.on(BI.ShowListener.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.Tab.EVENT_CHANGE, value, self);\r\n });\r\n },\r\n\r\n _deleteOtherCards: function (currCardName) {\r\n var self = this, o = this.options;\r\n if (o.single === true) {\r\n BI.each(this.cardMap, function (name, card) {\r\n if (name !== (currCardName + \"\")) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n }\r\n });\r\n }\r\n },\r\n\r\n _assertCard: function (v) {\r\n if (!this.layout.isCardExisted(v)) {\r\n var card = this.options.cardCreator(v);\r\n this.cardMap[v] = card;\r\n this.layout.addCardByName(v, card);\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.showIndex !== false) {\r\n this.setSelect(o.showIndex);\r\n }\r\n },\r\n\r\n setSelect: function (v) {\r\n this.tab && this.tab.setValue(v);\r\n this._assertCard(v);\r\n this.layout.showCardByName(v);\r\n this._deleteOtherCards(v);\r\n if (this.curr !== v) {\r\n this.curr = v;\r\n }\r\n },\r\n\r\n removeTab: function (cardname) {\r\n var self = this, o = this.options;\r\n BI.any(this.cardMap, function (name, card) {\r\n if (BI.isEqual(name, (cardname + \"\"))) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n getSelect: function () {\r\n return this.curr;\r\n },\r\n\r\n getSelectedTab: function () {\r\n return this.layout.getShowingCard();\r\n },\r\n\r\n getTab: function (v) {\r\n this._assertCard(v);\r\n return this.layout.getCardByName(v);\r\n },\r\n\r\n setValue: function (v) {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n card.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.getValue();\r\n }\r\n },\r\n\r\n populate: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.populate && card.populate.apply(card, arguments);\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.layout.deleteAllCard();\r\n this.cardMap = {};\r\n },\r\n\r\n destroy: function () {\r\n this.cardMap = {};\r\n BI.Tab.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Tab.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.tab\", BI.Tab);/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.EL\r\n * @extends BI.Widget\r\n */\r\nBI.EL = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-el\",\r\n el: {},\r\n layout: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.EL.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.ele = BI.createWidget(o.el);\r\n BI.createWidget(o.layout, {\r\n type: \"bi.adaptive\",\r\n element: this,\r\n items: [this.ele]\r\n });\r\n this.ele.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.ele.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.ele.getValue();\r\n },\r\n\r\n populate: function () {\r\n this.ele.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.el\", BI.EL);/**\r\n * z-index在1亿层级\r\n * 弹出提示消息框,用于模拟阻塞操作(通过回调函数实现)\r\n * @class BI.Msg\r\n */\r\nBI.Msg = function () {\r\n\r\n var messageShow, $mask, $pop;\r\n\r\n var toastStack = [];\r\n\r\n return {\r\n alert: function (title, message, callback) {\r\n this._show(false, title, message, callback);\r\n },\r\n confirm: function (title, message, callback) {\r\n this._show(true, title, message, callback);\r\n },\r\n prompt: function (title, message, value, callback, min_width) {\r\n // BI.Msg.prompt(title, message, value, callback, min_width);\r\n },\r\n toast: function (message, options, context) {\r\n options = options || {};\r\n context = context || BI.Widget._renderEngine.createElement(\"body\");\r\n var level = options.level || \"normal\";\r\n var autoClose = BI.isNull(options.autoClose) ? true : options.autoClose;\r\n var callback = BI.isFunction(options.callback) ? options.callback : BI.emptyFn;\r\n var toast = BI.createWidget({\r\n type: \"bi.toast\",\r\n cls: \"bi-message-animate bi-message-leave\",\r\n level: level,\r\n autoClose: autoClose,\r\n text: message,\r\n listeners: [{\r\n eventName: BI.Toast.EVENT_DESTORY,\r\n action: function () {\r\n BI.remove(toastStack, toast.element);\r\n var _height = 10;\r\n BI.each(toastStack, function (i, element) {\r\n element.css({\"top\": _height});\r\n _height += element.outerHeight() + 10;\r\n });\r\n callback();\r\n }\r\n }]\r\n });\r\n var height = 10;\r\n BI.each(toastStack, function (i, element) {\r\n height += element.outerHeight() + 10;\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: context,\r\n items: [{\r\n el: toast,\r\n left: \"50%\",\r\n top: height\r\n }]\r\n });\r\n toastStack.push(toast.element);\r\n toast.element.css({\"margin-left\": -1 * toast.element.outerWidth() / 2});\r\n toast.element.removeClass(\"bi-message-leave\").addClass(\"bi-message-enter\");\r\n\r\n autoClose && BI.delay(function () {\r\n toast.element.removeClass(\"bi-message-enter\").addClass(\"bi-message-leave\");\r\n toast.destroy();\r\n }, 5000);\r\n },\r\n _show: function (hasCancel, title, message, callback) {\r\n $mask = BI.Widget._renderEngine.createElement(\"<div class=\\\"bi-z-index-mask\\\">\").css({\r\n position: \"absolute\",\r\n zIndex: BI.zIndex_tip - 2,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n opacity: 0.5\r\n }).appendTo(\"body\");\r\n $pop = BI.Widget._renderEngine.createElement(\"<div class=\\\"bi-message-depend\\\">\").css({\r\n position: \"absolute\",\r\n zIndex: BI.zIndex_tip - 1,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }).appendTo(\"body\");\r\n var close = function () {\r\n messageShow.destroy();\r\n $mask.remove();\r\n };\r\n var controlItems = [];\r\n if (hasCancel === true) {\r\n controlItems.push({\r\n el: {\r\n type: \"bi.button\",\r\n text: BI.i18nText(\"BI-Basic_Cancel\"),\r\n level: \"ignore\",\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [false]);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n controlItems.push({\r\n el: {\r\n type: \"bi.button\",\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [true]);\r\n }\r\n }\r\n }\r\n });\r\n var conf = {\r\n element: $pop,\r\n type: \"bi.center_adapt\",\r\n items: [\r\n {\r\n type: \"bi.border\",\r\n cls: \"bi-card\",\r\n items: {\r\n north: {\r\n el: {\r\n type: \"bi.border\",\r\n cls: \"bi-message-title bi-background\",\r\n items: {\r\n center: {\r\n el: {\r\n type: \"bi.label\",\r\n cls: \"bi-font-bold\",\r\n text: title || BI.i18nText(\"BI-Basic_Prompt\"),\r\n textAlign: \"left\",\r\n hgap: 20,\r\n height: 40\r\n }\r\n },\r\n east: {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-message-close close-font\",\r\n // height: 50,\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [false]);\r\n }\r\n }\r\n },\r\n width: 60\r\n }\r\n }\r\n },\r\n height: 40\r\n },\r\n center: {\r\n el: {\r\n type: \"bi.label\",\r\n vgap: 10,\r\n hgap: 20,\r\n whiteSpace: \"normal\",\r\n text: message\r\n }\r\n },\r\n south: {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: controlItems\r\n },\r\n top: 0,\r\n left: 20,\r\n right: 20,\r\n bottom: 0\r\n }]\r\n\r\n },\r\n height: 44\r\n }\r\n },\r\n width: 450,\r\n height: 200\r\n }\r\n ]\r\n };\r\n\r\n messageShow = BI.createWidget(conf);\r\n }\r\n };\r\n}();/**\r\n * GridView\r\n *\r\n * Created by GUY on 2016/1/11.\r\n * @class BI.GridView\r\n * @extends BI.Widget\r\n */\r\nBI.GridView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.GridView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-grid-view\",\r\n // width: 400, //必设\r\n // height: 300, //必设\r\n overflowX: true,\r\n overflowY: true,\r\n overscanColumnCount: 0,\r\n overscanRowCount: 0,\r\n rowHeightGetter: BI.emptyFn, // number类型或function类型\r\n columnWidthGetter: BI.emptyFn, // number类型或function类型\r\n // estimatedColumnSize: 100, //columnWidthGetter为function时必设\r\n // estimatedRowSize: 30, //rowHeightGetter为function时必设\r\n scrollLeft: 0,\r\n scrollTop: 0,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.GridView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n this._debounceRelease = BI.debounce(function () {\r\n self._scrollLock = false;\r\n }, 1000 / 60);\r\n this.container = BI.createWidget({\r\n type: \"bi.absolute\"\r\n });\r\n this.element.scroll(function () {\r\n if (self._scrollLock === true) {\r\n return;\r\n }\r\n o.scrollLeft = self.element.scrollLeft();\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateChildrenToRender();\r\n self.fireEvent(BI.GridView.EVENT_SCROLL, {\r\n scrollLeft: o.scrollLeft,\r\n scrollTop: o.scrollTop\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n scrollable: o.overflowX === true && o.overflowY === true,\r\n scrolly: o.overflowX === false && o.overflowY === true,\r\n scrollx: o.overflowX === true && o.overflowY === false,\r\n items: [this.container]\r\n });\r\n if (o.items.length > 0) {\r\n this._populate();\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.scrollLeft !== 0 || o.scrollTop !== 0) {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n }\r\n },\r\n\r\n _getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) {\r\n return {\r\n overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\r\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\r\n };\r\n },\r\n\r\n _calculateChildrenToRender: function () {\r\n var self = this, o = this.options;\r\n\r\n var width = o.width, height = o.height, scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()),\r\n scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()),\r\n overscanColumnCount = o.overscanColumnCount, overscanRowCount = o.overscanRowCount;\r\n\r\n if (height > 0 && width > 0) {\r\n var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft);\r\n var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop);\r\n\r\n if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) {\r\n return;\r\n }\r\n var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft);\r\n var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop);\r\n\r\n this._renderedColumnStartIndex = visibleColumnIndices.start;\r\n this._renderedColumnStopIndex = visibleColumnIndices.stop;\r\n this._renderedRowStartIndex = visibleRowIndices.start;\r\n this._renderedRowStopIndex = visibleRowIndices.stop;\r\n\r\n var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex);\r\n\r\n var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex);\r\n\r\n var columnStartIndex = overscanColumnIndices.overscanStartIndex;\r\n var columnStopIndex = overscanColumnIndices.overscanStopIndex;\r\n var rowStartIndex = overscanRowIndices.overscanStartIndex;\r\n var rowStopIndex = overscanRowIndices.overscanStopIndex;\r\n\r\n // 算区间size\r\n var minRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStartIndex);\r\n var minColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStartIndex);\r\n var maxRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStopIndex);\r\n var maxColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStopIndex);\r\n var top = minRowDatum.offset + verticalOffsetAdjustment;\r\n var left = minColumnDatum.offset + horizontalOffsetAdjustment;\r\n var bottom = maxRowDatum.offset + verticalOffsetAdjustment + maxRowDatum.size;\r\n var right = maxColumnDatum.offset + horizontalOffsetAdjustment + maxColumnDatum.size;\r\n // 如果滚动的区间并没有超出渲染的范围\r\n if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) {\r\n return;\r\n }\r\n\r\n var renderedCells = [], renderedKeys = {}, renderedWidgets = {};\r\n var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0;\r\n var count = 0;\r\n for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\r\n var rowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex);\r\n\r\n for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\r\n var key = rowIndex + \"-\" + columnIndex;\r\n var columnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);\r\n\r\n var index = this.renderedKeys[key] && this.renderedKeys[key][2];\r\n var child;\r\n if (index >= 0) {\r\n if (columnDatum.size !== this.renderedCells[index]._width) {\r\n this.renderedCells[index]._width = columnDatum.size;\r\n this.renderedCells[index].el.setWidth(columnDatum.size);\r\n }\r\n if (rowDatum.size !== this.renderedCells[index]._height) {\r\n this.renderedCells[index]._height = rowDatum.size;\r\n this.renderedCells[index].el.setHeight(rowDatum.size);\r\n }\r\n if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) {\r\n this.renderedCells[index].el.element.css(\"left\", (columnDatum.offset + horizontalOffsetAdjustment) + \"px\");\r\n }\r\n if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) {\r\n this.renderedCells[index].el.element.css(\"top\", (rowDatum.offset + verticalOffsetAdjustment) + \"px\");\r\n }\r\n renderedCells.push(child = this.renderedCells[index]);\r\n } else {\r\n child = BI.createWidget(BI.extend({\r\n type: \"bi.label\",\r\n width: columnDatum.size,\r\n height: rowDatum.size\r\n }, o.items[rowIndex][columnIndex], {\r\n cls: (o.items[rowIndex][columnIndex].cls || \"\") + \" grid-cell\" + (rowIndex === 0 ? \" first-row\" : \"\") + (columnIndex === 0 ? \" first-col\" : \"\"),\r\n _rowIndex: rowIndex,\r\n _columnIndex: columnIndex,\r\n _left: columnDatum.offset + horizontalOffsetAdjustment,\r\n _top: rowDatum.offset + verticalOffsetAdjustment\r\n }), this);\r\n renderedCells.push({\r\n el: child,\r\n left: columnDatum.offset + horizontalOffsetAdjustment,\r\n top: rowDatum.offset + verticalOffsetAdjustment,\r\n _left: columnDatum.offset + horizontalOffsetAdjustment,\r\n _top: rowDatum.offset + verticalOffsetAdjustment,\r\n _width: columnDatum.size,\r\n _height: rowDatum.size\r\n });\r\n }\r\n minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment);\r\n maxX = Math.max(maxX, columnDatum.offset + horizontalOffsetAdjustment + columnDatum.size);\r\n minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment);\r\n maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size);\r\n renderedKeys[key] = [rowIndex, columnIndex, count];\r\n renderedWidgets[count] = child;\r\n count++;\r\n }\r\n }\r\n // 已存在的, 需要添加的和需要删除的\r\n var existSet = {}, addSet = {}, deleteArray = [];\r\n BI.each(renderedKeys, function (i, key) {\r\n if (self.renderedKeys[i]) {\r\n existSet[i] = key;\r\n } else {\r\n addSet[i] = key;\r\n }\r\n });\r\n BI.each(this.renderedKeys, function (i, key) {\r\n if (existSet[i]) {\r\n return;\r\n }\r\n if (addSet[i]) {\r\n return;\r\n }\r\n deleteArray.push(key[2]);\r\n });\r\n BI.each(deleteArray, function (i, index) {\r\n // 性能优化,不调用destroy方法防止触发destroy事件\r\n self.renderedCells[index].el._destroy();\r\n });\r\n var addedItems = [];\r\n BI.each(addSet, function (index, key) {\r\n addedItems.push(renderedCells[key[2]]);\r\n });\r\n // 与listview一样, 给上下文\r\n this.container.addItems(addedItems, this);\r\n // 拦截父子级关系\r\n this.container._children = renderedWidgets;\r\n this.container.attr(\"items\", renderedCells);\r\n this.renderedCells = renderedCells;\r\n this.renderedKeys = renderedKeys;\r\n this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY};\r\n }\r\n },\r\n\r\n /**\r\n * 获取真实的可滚动的最大宽度\r\n * 对于grid_view如果没有全部渲染过,this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的\r\n * 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)\r\n */\r\n _getRealMaxScrollLeft: function () {\r\n var o = this.options;\r\n var totalWidth = 0;\r\n BI.count(0, this.columnCount, function (index) {\r\n totalWidth += o.columnWidthGetter(index);\r\n });\r\n return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollLeft: function () {\r\n return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollTop: function () {\r\n return Math.max(0, this._rowSizeAndPositionManager.getTotalSize() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _populate: function (items) {\r\n var self = this, o = this.options;\r\n this._reRange();\r\n this.columnCount = 0;\r\n this.rowCount = 0;\r\n if (items && items !== this.options.items) {\r\n this.options.items = items;\r\n }\r\n if (BI.isNumber(o.columnCount)) {\r\n this.columnCount = o.columnCount;\r\n } else if (o.items.length > 0) {\r\n this.columnCount = o.items[0].length;\r\n }\r\n if (BI.isNumber(o.rowCount)) {\r\n this.rowCount = o.rowCount;\r\n } else {\r\n this.rowCount = o.items.length;\r\n }\r\n this.container.setWidth(this.columnCount * o.estimatedColumnSize);\r\n this.container.setHeight(this.rowCount * o.estimatedRowSize);\r\n\r\n this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize);\r\n this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize);\r\n\r\n this._calculateChildrenToRender();\r\n // 元素未挂载时不能设置scrollTop\r\n try {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n } catch (e) {\r\n }\r\n },\r\n\r\n setScrollLeft: function (scrollLeft) {\r\n if (this.options.scrollLeft === scrollLeft) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollLeft(this.options.scrollLeft);\r\n },\r\n\r\n setScrollTop: function (scrollTop) {\r\n if (this.options.scrollTop === scrollTop) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollTop(this.options.scrollTop);\r\n },\r\n\r\n setColumnCount: function (columnCount) {\r\n this.options.columnCount = columnCount;\r\n },\r\n\r\n setRowCount: function (rowCount) {\r\n this.options.rowCount = rowCount;\r\n },\r\n\r\n setOverflowX: function (b) {\r\n var self = this;\r\n if (this.options.overflowX !== !!b) {\r\n this.options.overflowX = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowX: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n setOverflowY: function (b) {\r\n var self = this;\r\n if (this.options.overflowY !== !!b) {\r\n this.options.overflowY = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowY: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n getScrollLeft: function () {\r\n return this.options.scrollLeft;\r\n },\r\n\r\n getScrollTop: function () {\r\n return this.options.scrollTop;\r\n },\r\n\r\n getMaxScrollLeft: function () {\r\n return this._getMaxScrollLeft();\r\n },\r\n\r\n getMaxScrollTop: function () {\r\n return this._getMaxScrollTop();\r\n },\r\n\r\n setEstimatedColumnSize: function (width) {\r\n this.options.estimatedColumnSize = width;\r\n },\r\n\r\n setEstimatedRowSize: function (height) {\r\n this.options.estimatedRowSize = height;\r\n },\r\n\r\n // 重新计算children\r\n _reRange: function () {\r\n this.renderRange = {};\r\n },\r\n\r\n _clearChildren: function () {\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n BI.each(this.renderedCells, function (i, cell) {\r\n cell.el._destroy();\r\n });\r\n this._clearChildren();\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n },\r\n\r\n populate: function (items) {\r\n if (items && items !== this.options.items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n }\r\n});\r\nBI.GridView.EVENT_SCROLL = \"EVENT_SCROLL\";\r\nBI.shortcut(\"bi.grid_view\", BI.GridView);\r\n/**\r\n * Popover弹出层,\r\n * @class BI.Popover\r\n * @extends BI.Widget\r\n */\r\nBI.Popover = BI.inherit(BI.Widget, {\r\n _constant: {\r\n SIZE: {\r\n SMALL: \"small\",\r\n NORMAL: \"normal\",\r\n BIG: \"big\"\r\n },\r\n HEADER_HEIGHT: 40\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Popover.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-popover bi-card bi-border-radius\",\r\n // width: 600,\r\n // height: 500,\r\n size: \"normal\", // small, normal, big\r\n logic: {\r\n dynamic: false\r\n },\r\n header: null,\r\n body: null,\r\n footer: null,\r\n closable: true // BI-40839 是否显示右上角的关闭按钮\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.startX = 0;\r\n this.startY = 0;\r\n this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) {\r\n var size = self._calculateSize();\r\n var W = BI.Widget._renderEngine.createElement(\"body\").width(), H = BI.Widget._renderEngine.createElement(\"body\").height();\r\n self.startX += deltaX;\r\n self.startY += deltaY;\r\n self.element.css({\r\n left: BI.clamp(self.startX, 0, W - self.element.width()) + \"px\",\r\n top: BI.clamp(self.startY, 0, H - self.element.height()) + \"px\"\r\n });\r\n // BI-12134 没有什么特别好的方法\r\n BI.Resizers._resize();\r\n }, function () {\r\n self.tracker.releaseMouseMoves();\r\n }, _global);\r\n var items = [{\r\n el: {\r\n type: \"bi.htape\",\r\n cls: \"bi-message-title bi-header-background\",\r\n ref: function (_ref) {\r\n self.dragger = _ref;\r\n },\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, {\r\n extraCls: \"bi-font-bold\"\r\n }) : {\r\n type: \"bi.label\",\r\n cls: \"bi-font-bold\",\r\n height: this._constant.HEADER_HEIGHT,\r\n text: o.header,\r\n title: o.header,\r\n textAlign: \"left\"\r\n },\r\n left: 20,\r\n top: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n el: o.closable ? {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-message-close close-font\",\r\n height: this._constant.HEADER_HEIGHT,\r\n handler: function () {\r\n self.close();\r\n }\r\n } : {\r\n type: \"bi.layout\"\r\n },\r\n width: 56\r\n }],\r\n height: this._constant.HEADER_HEIGHT\r\n },\r\n height: this._constant.HEADER_HEIGHT\r\n }, {\r\n el: o.logic.dynamic ? {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n cls: \"popover-body\",\r\n ref: function () {\r\n self.body = this;\r\n },\r\n hgap: 20,\r\n tgap: 10,\r\n items: [{\r\n el: BI.createWidget(o.body)\r\n }]\r\n } : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.createWidget(o.body),\r\n left: 20,\r\n top: 10,\r\n right: 20,\r\n bottom: 0\r\n }]\r\n }\r\n }];\r\n if (o.footer) {\r\n items.push({\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.createWidget(o.footer),\r\n left: 20,\r\n top: 0,\r\n right: 20,\r\n bottom: 0\r\n }],\r\n height: 44\r\n },\r\n height: 44\r\n });\r\n }\r\n\r\n var size = this._calculateSize();\r\n\r\n return BI.extend({\r\n type: o.logic.dynamic ? \"bi.vertical\" : \"bi.vtape\",\r\n items: items,\r\n width: size.width\r\n }, o.logic.dynamic ? {\r\n type: \"bi.vertical\",\r\n scrolly: false\r\n } : {\r\n type: \"bi.vtape\",\r\n height: size.height\r\n });\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this.dragger.element.mousedown(function (e) {\r\n var pos = self.element.offset();\r\n self.startX = pos.left;\r\n self.startY = pos.top;\r\n self.tracker.captureMouseMoves(e);\r\n });\r\n if (o.logic.dynamic) {\r\n var size = this._calculateSize();\r\n var height = this.element.height();\r\n var compareHeight = BI.clamp(height, size.height, 600) - (o.footer ? 84 : 44);\r\n this.body.element.height(compareHeight);\r\n }\r\n },\r\n\r\n _calculateSize: function () {\r\n var o = this.options;\r\n var size = {};\r\n if (BI.isNotNull(o.size)) {\r\n switch (o.size) {\r\n case this._constant.SIZE.SMALL:\r\n size.width = 450;\r\n size.height = 200;\r\n break;\r\n case this._constant.SIZE.BIG:\r\n size.width = 900;\r\n size.height = 500;\r\n break;\r\n default:\r\n size.width = 550;\r\n size.height = 500;\r\n }\r\n }\r\n return {\r\n width: o.width || size.width,\r\n height: o.height || size.height\r\n };\r\n },\r\n\r\n hide: function () {\r\n\r\n },\r\n\r\n open: function () {\r\n this.show();\r\n this.fireEvent(BI.Popover.EVENT_OPEN, arguments);\r\n },\r\n\r\n close: function () {\r\n this.hide();\r\n this.fireEvent(BI.Popover.EVENT_CLOSE, arguments);\r\n },\r\n\r\n setZindex: function (zindex) {\r\n this.element.css({\"z-index\": zindex});\r\n },\r\n\r\n destroyed: function () {\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.popover\", BI.Popover);\r\n\r\nBI.BarPopover = BI.inherit(BI.Popover, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BarPopover.superclass._defaultConfig.apply(this, arguments), {\r\n btns: [BI.i18nText(\"BI-Basic_Sure\"), BI.i18nText(\"BI-Basic_Cancel\")]\r\n });\r\n },\r\n\r\n beforeCreate: function () {\r\n var self = this, o = this.options;\r\n o.footer || (o.footer = {\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: [{\r\n type: \"bi.button\",\r\n text: this.options.btns[1],\r\n value: 1,\r\n level: \"ignore\",\r\n handler: function (v) {\r\n self.fireEvent(BI.Popover.EVENT_CANCEL, v);\r\n self.close(v);\r\n }\r\n }, {\r\n type: \"bi.button\",\r\n text: this.options.btns[0],\r\n warningTitle: o.warningTitle,\r\n value: 0,\r\n handler: function (v) {\r\n self.fireEvent(BI.Popover.EVENT_CONFIRM, v);\r\n self.close(v);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bar_popover\", BI.BarPopover);\r\n\r\nBI.Popover.EVENT_CLOSE = \"EVENT_CLOSE\";\r\nBI.Popover.EVENT_OPEN = \"EVENT_OPEN\";\r\nBI.Popover.EVENT_CANCEL = \"EVENT_CANCEL\";\r\nBI.Popover.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n/**\r\n * 下拉框弹出层, zIndex在1000w\r\n * @class BI.PopupView\r\n * @extends BI.Widget\r\n */\r\nBI.PopupView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 100,\r\n // maxHeight: 200,\r\n minHeight: 24,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n innerVGap: 0,\r\n direction: BI.Direction.Top, // 工具栏的方向\r\n stopEvent: false, // 是否停止mousedown、mouseup事件\r\n stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡\r\n logic: {\r\n dynamic: true\r\n },\r\n\r\n tool: false, // 自定义工具栏\r\n tabs: [], // 导航栏\r\n buttons: [], // toolbar栏\r\n\r\n el: {\r\n type: \"bi.button_group\",\r\n items: [],\r\n chooseType: 0,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopupView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n }, stop = function (e) {\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.css({\r\n \"z-index\": BI.zIndex_popup,\r\n \"min-width\": o.minWidth + \"px\",\r\n \"max-width\": o.maxWidth + \"px\"\r\n }).bind({click: fn});\r\n\r\n this.element.bind(\"mousewheel\", fn);\r\n\r\n o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn});\r\n o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});\r\n this.tool = this._createTool();\r\n this.tab = this._createTab();\r\n this.view = this._createView();\r\n this.toolbar = this._createToolBar();\r\n\r\n this.view.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.PopupView.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n scrolly: false,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap,\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction,\r\n BI.extend({\r\n cls: \"list-view-outer bi-card list-view-shadow\"\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar)\r\n })))\r\n )\r\n }))));\r\n },\r\n\r\n _createView: function () {\r\n var o = this.options;\r\n this.button_group = BI.createWidget(o.el, {type: \"bi.button_group\", value: o.value});\r\n this.button_group.element.css({\"min-height\": o.minHeight + \"px\", \"padding-top\": o.innerVGap + \"px\", \"padding-bottom\": o.innerVGap + \"px\"});\r\n return this.button_group;\r\n },\r\n\r\n _createTool: function () {\r\n var o = this.options;\r\n if (false === o.tool) {\r\n return;\r\n }\r\n return BI.createWidget(o.tool);\r\n },\r\n\r\n _createTab: function () {\r\n var o = this.options;\r\n if (o.tabs.length === 0) {\r\n return;\r\n }\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n cls: \"list-view-tab\",\r\n height: 25,\r\n items: o.tabs,\r\n value: o.value\r\n });\r\n },\r\n\r\n _createToolBar: function () {\r\n var o = this.options;\r\n if (o.buttons.length === 0) {\r\n return;\r\n }\r\n\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n cls: \"list-view-toolbar bi-high-light bi-split-top\",\r\n height: 24,\r\n items: BI.createItems(o.buttons, {\r\n once: false,\r\n shadow: true,\r\n isShadowShowingOnSelected: true\r\n })\r\n });\r\n },\r\n\r\n getView: function () {\r\n return this.view;\r\n },\r\n\r\n populate: function (items) {\r\n this.view.populate.apply(this.view, arguments);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.options.width = w;\r\n this.element.width(w);\r\n },\r\n\r\n resetHeight: function (h) {\r\n var tbHeight = this.toolbar ? (this.toolbar.attr(\"height\") || 24) : 0,\r\n tabHeight = this.tab ? (this.tab.attr(\"height\") || 24) : 0,\r\n toolHeight = ((this.tool && this.tool.attr(\"height\")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0);\r\n var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap;\r\n this.view.resetHeight ? this.view.resetHeight(resetHeight) :\r\n this.view.element.css({\"max-height\": resetHeight + \"px\"});\r\n },\r\n\r\n setValue: function (selectedValues) {\r\n this.tab && this.tab.setValue(selectedValues);\r\n this.view.setValue(selectedValues);\r\n },\r\n\r\n getValue: function () {\r\n return this.view.getValue();\r\n }\r\n});\r\nBI.PopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.popup_view\", BI.PopupView);/**\r\n * 搜索面板\r\n *\r\n * Created by GUY on 2015/9/28.\r\n * @class BI.SearcherView\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SearcherView = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n var conf = BI.SearcherView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-searcher-view bi-card\",\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n chooseType: BI.Selection.Single,\r\n\r\n matcher: {// 完全匹配的构造器\r\n type: \"bi.button_group\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n items: [],\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n searcher: {\r\n type: \"bi.button_group\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n items: [],\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearcherView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.matcher = BI.createWidget(o.matcher, {\r\n type: \"bi.button_group\",\r\n chooseType: o.chooseType,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob);\r\n }\r\n });\r\n this.spliter = BI.createWidget({\r\n type: \"bi.vertical\",\r\n height: 1,\r\n hgap: 10,\r\n items: [{\r\n type: \"bi.layout\",\r\n height: 1,\r\n cls: \"searcher-view-spliter bi-background\"\r\n }]\r\n });\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.button_group\",\r\n chooseType: o.chooseType,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.matcher, this.spliter, this.searcher]\r\n });\r\n },\r\n\r\n startSearch: function () {\r\n\r\n },\r\n\r\n stopSearch: function () {\r\n\r\n },\r\n\r\n setValue: function (v) {\r\n this.matcher.setValue(v);\r\n this.searcher.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.matcher.getValue().concat(this.searcher.getValue());\r\n },\r\n\r\n populate: function (searchResult, matchResult, keyword) {\r\n searchResult || (searchResult = []);\r\n matchResult || (matchResult = []);\r\n this.setTipVisible(searchResult.length + matchResult.length === 0);\r\n this.spliter.setVisible(BI.isNotEmptyArray(matchResult) && BI.isNotEmptyArray(searchResult));\r\n this.matcher.populate(matchResult, keyword);\r\n this.searcher.populate(searchResult, keyword);\r\n },\r\n\r\n empty: function () {\r\n this.searcher.empty();\r\n this.matcher.empty();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.matcher.getAllButtons().length > 0;\r\n }\r\n});\r\nBI.SearcherView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.searcher_view\", BI.SearcherView);/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2017/5/23.\r\n * @class BI.ListView\r\n * @extends BI.Widget\r\n */\r\nBI.ListView = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n baseCls: \"bi-list-view\",\r\n overscanHeight: 100,\r\n blockSize: 10,\r\n scrollTop: 0,\r\n el: {},\r\n items: []\r\n };\r\n },\r\n\r\n init: function () {\r\n var self = this;\r\n this.renderedIndex = -1;\r\n this.cache = {};\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [BI.extend({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n ref: function () {\r\n self.container = this;\r\n }\r\n }, o.el)],\r\n element: this\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this._populate();\r\n this.element.scroll(function (e) {\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateBlocksToRender();\r\n });\r\n var lastWidth = this.element.width(),\r\n lastHeight = this.element.height();\r\n BI.ResizeDetector.addResizeListener(this, function () {\r\n var width = self.element.width(),\r\n height = self.element.height();\r\n if (width !== lastWidth || height !== lastHeight) {\r\n lastWidth = width;\r\n lastHeight = height;\r\n self._calculateBlocksToRender();\r\n }\r\n });\r\n },\r\n\r\n _renderMoreIf: function () {\r\n var self = this, o = this.options;\r\n var height = this.element.height();\r\n var minContentHeight = o.scrollTop + height + o.overscanHeight;\r\n var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0,\r\n cnt = this.renderedIndex + 1;\r\n var lastHeight;\r\n var getElementHeight = function () {\r\n return self.container.element.height();\r\n };\r\n while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) {\r\n var items = o.items.slice(index, index + o.blockSize);\r\n this.container.addItems(items, this);\r\n var addedHeight = getElementHeight() - lastHeight;\r\n this.cache[cnt] = {\r\n index: index,\r\n scrollTop: lastHeight,\r\n height: addedHeight\r\n };\r\n this.renderedIndex = cnt;\r\n cnt++;\r\n index += o.blockSize;\r\n }\r\n },\r\n\r\n _calculateBlocksToRender: function () {\r\n var o = this.options;\r\n this._renderMoreIf();\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n if (items && this.options.items !== items) {\r\n this.options.items = items;\r\n }\r\n this._calculateBlocksToRender();\r\n this.element.scrollTop(o.scrollTop);\r\n },\r\n\r\n restore: function () {\r\n this.renderedIndex = -1;\r\n this.container.empty();\r\n this.cache = {};\r\n },\r\n\r\n populate: function (items) {\r\n if (items && this.options.items !== items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n },\r\n\r\n destroyed: function () {\r\n this.restore();\r\n }\r\n});\r\nBI.shortcut(\"bi.list_view\", BI.ListView);\r\n\r\n/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2017/5/22.\r\n * @class BI.VirtualList\r\n * @extends BI.Widget\r\n */\r\nBI.VirtualList = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n baseCls: \"bi-virtual-list\",\r\n overscanHeight: 100,\r\n blockSize: 10,\r\n scrollTop: 0,\r\n items: []\r\n };\r\n },\r\n\r\n init: function () {\r\n var self = this;\r\n this.renderedIndex = -1;\r\n this.cache = {};\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.layout\",\r\n ref: function () {\r\n self.topBlank = this;\r\n }\r\n }, {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n ref: function () {\r\n self.container = this;\r\n }\r\n }, {\r\n type: \"bi.layout\",\r\n ref: function () {\r\n self.bottomBlank = this;\r\n }\r\n }],\r\n element: this\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this._populate();\r\n this.element.scroll(function (e) {\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateBlocksToRender();\r\n });\r\n BI.ResizeDetector.addResizeListener(this, function () {\r\n self._calculateBlocksToRender();\r\n });\r\n },\r\n\r\n _renderMoreIf: function () {\r\n var self = this, o = this.options;\r\n var height = this.element.height();\r\n var minContentHeight = o.scrollTop + height + o.overscanHeight;\r\n var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0,\r\n cnt = this.renderedIndex + 1;\r\n var lastHeight;\r\n var getElementHeight = function () {\r\n return self.container.element.height() + self.topBlank.element.height() + self.bottomBlank.element.height();\r\n };\r\n while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) {\r\n var items = o.items.slice(index, index + o.blockSize);\r\n this.container.addItems(items, this);\r\n var addedHeight = getElementHeight() - lastHeight;\r\n this.cache[cnt] = {\r\n index: index,\r\n scrollTop: lastHeight,\r\n height: addedHeight\r\n };\r\n this.tree.set(cnt, addedHeight);\r\n this.renderedIndex = cnt;\r\n cnt++;\r\n index += o.blockSize;\r\n }\r\n },\r\n\r\n _calculateBlocksToRender: function () {\r\n var o = this.options;\r\n this._renderMoreIf();\r\n var height = this.element.height();\r\n var minContentHeightFrom = o.scrollTop - o.overscanHeight;\r\n var minContentHeightTo = o.scrollTop + height + o.overscanHeight;\r\n var start = this.tree.greatestLowerBound(minContentHeightFrom);\r\n var end = this.tree.leastUpperBound(minContentHeightTo);\r\n var needDestroyed = [];\r\n for (var i = 0; i < start; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n needDestroyed.push(this.container._children[j]);\r\n this.container._children[j] = null;\r\n }\r\n this.cache[i].destroyed = true;\r\n }\r\n }\r\n for (var i = end + 1; i <= this.renderedIndex; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n needDestroyed.push(this.container._children[j]);\r\n this.container._children[j] = null;\r\n }\r\n this.cache[i].destroyed = true;\r\n }\r\n }\r\n var firstFragment = BI.Widget._renderEngine.createFragment(), lastFragment = BI.Widget._renderEngine.createFragment();\r\n var currentFragment = firstFragment;\r\n for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n currentFragment = lastFragment;\r\n }\r\n if (this.cache[i].destroyed === true) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n var w = this.container._addElement(j, BI.extend({root: true}, BI.stripEL(o.items[j])), this);\r\n currentFragment.appendChild(w.element[0]);\r\n }\r\n this.cache[i].destroyed = false;\r\n }\r\n }\r\n this.container.element.prepend(firstFragment);\r\n this.container.element.append(lastFragment);\r\n this.topBlank.setHeight(this.cache[start < 0 ? 0 : start].scrollTop);\r\n var lastCache = this.cache[Math.min(end, this.renderedIndex)];\r\n this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex) - lastCache.scrollTop - lastCache.height);\r\n BI.each(needDestroyed, function (i, child) {\r\n child && child._destroy();\r\n });\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n if (items && this.options.items !== items) {\r\n this.options.items = items;\r\n }\r\n this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize));\r\n this._calculateBlocksToRender();\r\n this.element.scrollTop(o.scrollTop);\r\n },\r\n\r\n _clearChildren: function () {\r\n BI.each(this.container._children, function (i, cell) {\r\n cell && cell._destroy();\r\n });\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n this.renderedIndex = -1;\r\n this._clearChildren();\r\n this.cache = {};\r\n this.options.scrollTop = 0;\r\n // 依赖于cache的占位元素也要初始化\r\n this.topBlank.setHeight(0);\r\n this.bottomBlank.setHeight(0);\r\n },\r\n\r\n populate: function (items) {\r\n if (items && this.options.items !== items) {\r\n this.restore();\r\n }\r\n this._populate();\r\n },\r\n\r\n destroyed: function () {\r\n this.restore();\r\n }\r\n});\r\nBI.shortcut(\"bi.virtual_list\", BI.VirtualList);\r\n\r\n/**\r\n * 分页控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.Pager\r\n * @extends BI.Widget\r\n */\r\nBI.Pager = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Pager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-pager\",\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n hgap: 10,\r\n vgap: 0\r\n }],\r\n\r\n dynamicShow: true, // 是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\r\n // dynamicShow为false时以下两个有用\r\n dynamicShowFirstLast: false, // 是否动态显示首页、尾页\r\n dynamicShowPrevNext: false, // 是否动态显示上一页、下一页\r\n pages: false, // 总页数\r\n curr: function () {\r\n return 1;\r\n }, // 初始化当前页\r\n groups: 0, // 连续显示分页数\r\n jump: BI.emptyFn, // 分页的回调函数\r\n\r\n first: false, // 是否显示首页\r\n last: false, // 是否显示尾页\r\n prev: \"上一页\",\r\n next: \"下一页\",\r\n\r\n firstPage: 1,\r\n lastPage: function () { // 在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\r\n return 1;\r\n },\r\n hasPrev: BI.emptyFn, // pages不可用时有效\r\n hasNext: BI.emptyFn // pages不可用时有效\r\n });\r\n },\r\n _init: function () {\r\n BI.Pager.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.currPage = BI.result(this.options, \"curr\");\r\n // 翻页太灵敏\r\n // this._lock = false;\r\n // this._debouce = BI.debounce(function () {\r\n // self._lock = false;\r\n // }, 300);\r\n this._populate();\r\n },\r\n\r\n _populate: function () {\r\n var self = this, o = this.options, view = [], dict = {};\r\n this.empty();\r\n var pages = BI.result(o, \"pages\");\r\n var curr = BI.result(this, \"currPage\");\r\n var groups = BI.result(o, \"groups\");\r\n var first = BI.result(o, \"first\");\r\n var last = BI.result(o, \"last\");\r\n var prev = BI.result(o, \"prev\");\r\n var next = BI.result(o, \"next\");\r\n\r\n if (pages === false) {\r\n groups = 0;\r\n first = false;\r\n last = false;\r\n } else {\r\n groups > pages && (groups = pages);\r\n }\r\n\r\n // 计算当前组\r\n dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups));\r\n\r\n // 当前页非首页,则输出上一页\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) {\r\n if (BI.isKey(prev)) {\r\n view.push({\r\n text: prev,\r\n value: \"prev\",\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n });\r\n } else {\r\n view.push(BI.extend({\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n }, prev));\r\n }\r\n }\r\n\r\n // 当前组非首组,则输出首页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) {\r\n view.push({\r\n text: first,\r\n value: \"first\",\r\n disabled: !(dict.index > 1 && groups !== 0)\r\n });\r\n if (dict.index > 1 && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n }\r\n\r\n // 输出当前页组\r\n dict.poor = Math.floor((groups - 1) / 2);\r\n dict.start = dict.index > 1 ? curr - dict.poor : 1;\r\n dict.end = dict.index > 1 ? (function () {\r\n var max = curr + (groups - dict.poor - 1);\r\n return max > pages ? pages : max;\r\n }()) : groups;\r\n if (dict.end - dict.start < groups - 1) { // 最后一组状态\r\n dict.start = dict.end - groups + 1;\r\n }\r\n var s = dict.start, e = dict.end;\r\n if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) {\r\n s++;\r\n e--;\r\n }\r\n for (; s <= e; s++) {\r\n if (s === curr) {\r\n view.push({\r\n text: s,\r\n value: s,\r\n selected: true\r\n });\r\n } else {\r\n view.push({\r\n text: s,\r\n value: s\r\n });\r\n }\r\n }\r\n\r\n // 总页数大于连续分页数,且当前组最大页小于总页,输出尾页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) {\r\n if (pages > groups && dict.end < pages && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n view.push({\r\n text: last,\r\n value: \"last\",\r\n disabled: !(pages > groups && dict.end < pages && groups !== 0)\r\n });\r\n }\r\n\r\n // 当前页不为尾页时,输出下一页\r\n dict.flow = !prev && groups === 0;\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) {\r\n view.push((function () {\r\n if (BI.isKey(next)) {\r\n if (pages === false) {\r\n return {text: next, value: \"next\", disabled: o.hasNext(curr) === false};\r\n }\r\n return (dict.flow && curr === pages)\r\n ?\r\n {text: next, value: \"next\", disabled: true}\r\n :\r\n {text: next, value: \"next\", disabled: !(curr !== pages && next || dict.flow)};\r\n }\r\n return BI.extend({\r\n disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)\r\n }, next);\r\n \r\n }()));\r\n }\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(view, {\r\n cls: \"bi-list-item-select bi-border-radius\",\r\n height: 23,\r\n hgap: 10\r\n }),\r\n behaviors: o.behaviors,\r\n layouts: o.layouts\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n // if (self._lock === true) {\r\n // return;\r\n // }\r\n // self._lock = true;\r\n // self._debouce();\r\n if (type === BI.Events.CLICK) {\r\n var v = self.button_group.getValue()[0];\r\n switch (v) {\r\n case \"first\":\r\n self.currPage = 1;\r\n break;\r\n case \"last\":\r\n self.currPage = pages;\r\n break;\r\n case \"prev\":\r\n self.currPage--;\r\n break;\r\n case \"next\":\r\n self.currPage++;\r\n break;\r\n default:\r\n self.currPage = v;\r\n break;\r\n }\r\n o.jump.apply(self, [{\r\n pages: pages,\r\n curr: self.currPage\r\n }]);\r\n self._populate();\r\n self.fireEvent(BI.Pager.EVENT_CHANGE, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.currPage;\r\n },\r\n\r\n setAllPages: function (pages) {\r\n this.options.pages = pages;\r\n },\r\n\r\n hasPrev: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasPrev(v) : v > 1;\r\n },\r\n\r\n hasNext: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasNext(v) : v < pages;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = v | 0;\r\n v = v < 1 ? 1 : v;\r\n if (o.pages === false) {\r\n var lastPage = BI.result(o, \"lastPage\"), firstPage = 1;\r\n this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, \"firstPage\")), (v < firstPage ? firstPage : v));\r\n } else {\r\n v = v > o.pages ? o.pages : v;\r\n this.currPage = v;\r\n }\r\n this._populate();\r\n },\r\n\r\n getValue: function () {\r\n var val = this.button_group.getValue()[0];\r\n switch (val) {\r\n case \"prev\":\r\n return -1;\r\n case \"next\":\r\n return 1;\r\n case \"first\":\r\n return BI.MIN;\r\n case \"last\":\r\n return BI.MAX;\r\n default :\r\n return val;\r\n }\r\n },\r\n\r\n attr: function (key, value) {\r\n BI.Pager.superclass.attr.apply(this, arguments);\r\n if (key === \"curr\") {\r\n this.currPage = BI.result(this.options, \"curr\");\r\n }\r\n },\r\n\r\n populate: function () {\r\n this._populate();\r\n }\r\n});\r\nBI.Pager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Pager.EVENT_AFTER_POPULATE = \"EVENT_AFTER_POPULATE\";\r\nBI.shortcut(\"bi.pager\", BI.Pager);/**\r\n * 超链接\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.A\r\n * @extends BI.Text\r\n * @abstract\r\n */\r\nBI.A = BI.inherit(BI.Text, {\r\n _defaultConfig: function () {\r\n var conf = BI.A.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-a display-block\",\r\n href: \"\",\r\n target: \"_blank\",\r\n el: null,\r\n tagName: \"a\"\r\n });\r\n },\r\n _init: function () {\r\n var o = this.options;\r\n BI.A.superclass._init.apply(this, arguments);\r\n this.element.attr({href: o.href, target: o.target});\r\n if (o.el) {\r\n BI.createWidget(o.el, {\r\n element: this\r\n });\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.a\", BI.A);/**\r\n * guy\r\n * 加载条\r\n * @type {*|void|Object}\r\n */\r\nBI.LoadingBar = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend( conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-loading-bar bi-tips\",\r\n height: 30,\r\n handler: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.LoadingBar.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.loaded = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"loading-text bi-list-item-simple\",\r\n text: BI.i18nText(\"BI-Load_More\"),\r\n width: 120,\r\n handler: this.options.handler\r\n });\r\n this.loaded.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.loading = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: this.options.height,\r\n height: this.options.height,\r\n cls: \"loading-background cursor-default\"\r\n });\r\n var loaded = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n items: [this.loaded]\r\n });\r\n var loading = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n items: [this.loading]\r\n });\r\n this.cardLayout = BI.createWidget({\r\n type: \"bi.card\",\r\n element: this,\r\n items: [{\r\n el: loaded,\r\n cardName: \"loaded\"\r\n }, {\r\n el: loading,\r\n cardName: \"loading\"\r\n }]\r\n });\r\n this.invisible();\r\n },\r\n\r\n _reset: function () {\r\n this.visible();\r\n this.loaded.setText(BI.i18nText(\"BI-Load_More\"));\r\n this.loaded.enable();\r\n },\r\n\r\n setLoaded: function () {\r\n this._reset();\r\n this.cardLayout.showCardByName(\"loaded\");\r\n },\r\n\r\n setEnd: function () {\r\n this.setLoaded();\r\n this.loaded.setText(BI.i18nText(\"BI-No_More_Data\"));\r\n this.loaded.disable();\r\n },\r\n\r\n setLoading: function () {\r\n this._reset();\r\n this.cardLayout.showCardByName(\"loading\");\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.loading_bar\", BI.LoadingBar);/**\r\n * @class BI.IconButton\r\n * @extends BI.BasicButton\r\n * 图标的button\r\n */\r\nBI.IconButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-icon-button horizon-center\",\r\n iconWidth: null,\r\n iconHeight: null\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n textAlign: \"center\"\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n });\r\n if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) {\r\n this.element.css(\"lineHeight\", o.height + \"px\");\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.icon]\r\n });\r\n } else {\r\n this.element.css(\"lineHeight\", \"1\");\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.center_adapt\",\r\n items: [this.icon]\r\n });\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.IconButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconButton.EVENT_CHANGE, this);\r\n }\r\n }\r\n});\r\nBI.IconButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_button\", BI.IconButton);/**\r\n * 图片的button\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.ImageButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.ImageButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-image-button\",\r\n src: \"\",\r\n iconWidth: \"100%\",\r\n iconHeight: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ImageButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.image = BI.createWidget({\r\n type: \"bi.img\",\r\n width: o.iconWidth,\r\n height: o.iconHeight,\r\n src: o.src\r\n });\r\n if (BI.isNumber(o.iconWidth) || BI.isNumber(o.iconHeight)) {\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n items: [this.image]\r\n });\r\n } else {\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n items: [this.image],\r\n scrollable: false\r\n });\r\n }\r\n },\r\n\r\n setWidth: function (w) {\r\n BI.ImageButton.superclass.setWidth.apply(this, arguments);\r\n this.options.width = w;\r\n },\r\n\r\n setHeight: function (h) {\r\n BI.ImageButton.superclass.setHeight.apply(this, arguments);\r\n this.options.height = h;\r\n },\r\n\r\n setImageWidth: function (w) {\r\n this.image.setWidth(w);\r\n },\r\n\r\n setImageHeight: function (h) {\r\n this.image.setHeight(h);\r\n },\r\n\r\n getImageWidth: function () {\r\n return this.image.element.width();\r\n },\r\n\r\n getImageHeight: function () {\r\n return this.image.element.height();\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.image.setSrc(src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.image.getSrc();\r\n },\r\n\r\n doClick: function () {\r\n BI.ImageButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.ImageButton.EVENT_CHANGE, this);\r\n }\r\n }\r\n});\r\nBI.ImageButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.image_button\", BI.ImageButton);\r\n/**\r\n * 文字类型的按钮\r\n * @class BI.Button\r\n * @extends BI.BasicButton\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景\r\n */\r\nBI.Button = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function (props) {\r\n var conf = BI.Button.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-button\" + ((BI.isIE() && BI.isIE9Below()) ? \" hack\" : \"\"),\r\n minWidth: (props.block === true || props.clear === true) ? 0 : 80,\r\n height: 24,\r\n shadow: props.clear !== true,\r\n isShadowShowingOnSelected: true,\r\n readonly: true,\r\n iconCls: \"\",\r\n level: \"common\",\r\n block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制\r\n clear: false, // 是否去掉边框和背景\r\n ghost: false, // 是否幽灵显示, 即正常状态无背景\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: props.clear ? 0 : 10,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Button.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n if (BI.isNumber(o.height) && !o.clear && !o.block) {\r\n this.element.css({height: o.height + \"px\", lineHeight: (o.height - 2) + \"px\"});\r\n } else if (o.clear || o.block) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n } else {\r\n this.element.css({lineHeight: (o.height - 2) + \"px\"});\r\n }\r\n if (BI.isKey(o.iconCls)) {\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls,\r\n width: 18,\r\n height: o.height - 2,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.text,\r\n value: o.value,\r\n height: o.height - 2\r\n });\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n items: [{\r\n type: \"bi.horizontal\",\r\n items: [this.icon, this.text]\r\n }]\r\n });\r\n } else {\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textWidth: o.textWidth,\r\n textHeight: o.textHeight,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n element: this,\r\n text: o.text,\r\n value: o.value\r\n });\r\n }\r\n if (o.block === true) {\r\n this.element.addClass(\"block\");\r\n }\r\n if (o.clear === true) {\r\n this.element.addClass(\"clear\");\r\n }\r\n if (o.ghost === true) {\r\n this.element.addClass(\"ghost\");\r\n }\r\n if (o.minWidth > 0) {\r\n this.element.css({\"min-width\": o.minWidth + \"px\"});\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Button.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.Button.EVENT_CHANGE, this);\r\n }\r\n },\r\n\r\n setText: function (text) {\r\n BI.Button.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Button.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.text.setValue(text);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n destroy: function () {\r\n BI.Button.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.button\", BI.Button);\r\nBI.Button.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n/**\r\n * guy\r\n * 可以点击的一行文字\r\n * @class BI.TextButton\r\n * @extends BI.BasicButton\r\n * 文字button\r\n */\r\nBI.TextButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.TextButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-button\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n text: \"\",\r\n py: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textWidth: o.textWidth,\r\n textHeight: o.textHeight,\r\n width: o.width,\r\n height: o.height,\r\n hgap: o.hgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextButton.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setText: function (text) {\r\n BI.TextButton.superclass.setText.apply(this, arguments);\r\n text = BI.isArray(text) ? text.join(\",\") : text;\r\n this.text.setText(text);\r\n },\r\n\r\n setStyle: function (style) {\r\n this.text.setStyle(style);\r\n },\r\n\r\n setValue: function (text) {\r\n BI.TextButton.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n text = BI.isArray(text) ? text.join(\",\") : text;\r\n this.text.setValue(text);\r\n }\r\n }\r\n});\r\nBI.TextButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_button\", BI.TextButton);/**\r\n * 带有一个占位\r\n *\r\n * Created by GUY on 2015/9/11.\r\n * @class BI.BlankIconIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconIconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.blankWidth,\r\n height: o.height\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon1 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls1,\r\n forceNotSelected: true,\r\n width: o.height,\r\n height: o.height\r\n });\r\n this.icon2 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls2,\r\n forceNotSelected: true,\r\n width: o.height,\r\n height: o.height\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", blank, this.icon1, this.icon2, this.text)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconIconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.BlankIconIconTextItem.superclass.setSelected.apply(this, arguments);\r\n this.icon1.setSelected(b);\r\n this.icon2.setSelected(b);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.BlankIconIconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_icon_text_item\", BI.BlankIconIconTextItem);/**\r\n * guy\r\n * 一个占位符和两个icon和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.BlankIconTextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconTextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.layout\",\r\n width: o.blankWidth\r\n }, icon1, this.text, {\r\n type: \"bi.layout\",\r\n width: o.height\r\n })\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconTextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.BlankIconTextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_text_icon_item\", BI.BlankIconTextIconItem);/**\r\n * 带有一个占位\r\n *\r\n * Created by GUY on 2015/9/11.\r\n * @class BI.BlankIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.blankWidth\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", blank, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.BlankIconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_text_item\", BI.BlankIconTextItem);/**\r\n * guy\r\n * 两个icon和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.IconTextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.leftIconWrapperWidth,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.height\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.rightIconWrapperWidth,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", icon1, this.text, blank)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.IconTextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_icon_item\", BI.IconTextIconItem);/**\r\n * guy\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.IconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-item\",\r\n direction: BI.Direction.Left,\r\n logic: {\r\n dynamic: false\r\n },\r\n iconWrapperWidth: null,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.iconWrapperWidth || o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.IconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_item\", BI.IconTextItem);/**\r\n *\r\n * 图标的button\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.text, this.icon)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.TextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.TextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_icon_item\", BI.TextIconItem);/**\r\n * guy\r\n * 一个button和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-item\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textHeight: o.whiteSpace == \"nowrap\" ? o.height : o.textHeight,\r\n height: o.height,\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.TextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_item\", BI.TextItem);/**\r\n * guy\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextIconNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconTextIconNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextIconNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-icon-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextIconNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.height,\r\n height: o.height\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", icon1, this.text, blank)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextIconNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.IconTextIconNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_icon_node\", BI.IconTextIconNode);/**\r\n * guy\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconTextNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\nBI.IconTextNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_node\", BI.IconTextNode);/**\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextIconNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.TextIconNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextIconNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-icon-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextIconNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.text, this.icon)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.TextIconNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextIconNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\nBI.TextIconNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_icon_node\", BI.TextIconNode);/**\r\n * guy\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.TextNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-node\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextNode.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textHeight: o.whiteSpace == \"nowrap\" ? o.height : o.textHeight,\r\n height: o.height,\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.TextNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_node\", BI.TextNode);/**\r\n * Created by GUY on 2015/4/15.\r\n * @class BI.Editor\r\n * @extends BI.Single\r\n */\r\nBI.Editor = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Editor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-editor bi-focus-shadow\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n // title,warningTitle这两个属性没用\r\n tipType: \"warning\",\r\n inputType: \"text\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Editor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = this.addWidget(BI.createWidget({\r\n type: \"bi.input\",\r\n element: \"<input type='\" + o.inputType + \"'/>\",\r\n root: true,\r\n value: o.value,\r\n watermark: o.watermark,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank\r\n }));\r\n this.editor.element.css({\r\n width: \"100%\",\r\n height: \"100%\",\r\n border: \"none\",\r\n outline: \"none\",\r\n padding: \"0\",\r\n margin: \"0\"\r\n });\r\n if (BI.isKey(this.options.watermark)) {\r\n this._assertWaterMark();\r\n }\r\n\r\n var _items = [];\r\n if (this.watermark) {\r\n _items.push({\r\n el: this.watermark,\r\n left: 3,\r\n right: 3,\r\n top: 0,\r\n bottom: 0\r\n });\r\n }\r\n _items.push({\r\n el: this.editor,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n });\r\n\r\n var items = [{\r\n el: {\r\n type: \"bi.absolute\",\r\n ref: function(_ref) {\r\n self.contentWrapper = _ref;\r\n },\r\n items: _items\r\n },\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap\r\n }];\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: items\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_FOCUS, function () {\r\n self._checkError();\r\n self.element.addClass(\"bi-editor-focus\");\r\n self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_BLUR, function () {\r\n self._setErrorVisible(false);\r\n self.element.removeClass(\"bi-editor-focus\");\r\n self.fireEvent(BI.Editor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CLICK, function () {\r\n self.fireEvent(BI.Editor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (e) {\r\n // tab键就不要隐藏了\r\n if (e.keyCode !== BI.KeyCode.TAB && self.watermark) {\r\n self.watermark.invisible();\r\n }\r\n });\r\n\r\n this.editor.on(BI.Input.EVENT_VALID, function () {\r\n self._checkWaterMark();\r\n self._setErrorVisible(false);\r\n self.fireEvent(BI.Editor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_ERROR, function () {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.Editor.EVENT_ERROR, arguments);\r\n self._setErrorVisible(self.isEditing());\r\n });\r\n this.editor.on(BI.Input.EVENT_RESTRICT, function () {\r\n self._checkWaterMark();\r\n var tip = self._setErrorVisible(true);\r\n tip && tip.element.fadeOut(100, function () {\r\n tip.element.fadeIn(100);\r\n });\r\n self.fireEvent(BI.Editor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_EMPTY, function () {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.Editor.EVENT_EMPTY, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_ENTER, function () {\r\n self.fireEvent(BI.Editor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_SPACE, function () {\r\n self.fireEvent(BI.Editor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.Editor.EVENT_BACKSPACE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.Editor.EVENT_REMOVE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_START, function () {\r\n self.fireEvent(BI.Editor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.Editor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_STOP, function () {\r\n self.fireEvent(BI.Editor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.element.click(function (e) {\r\n e.stopPropagation();\r\n return false;\r\n });\r\n if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {\r\n this._checkError();\r\n this._checkWaterMark();\r\n } else {\r\n this._checkWaterMark();\r\n }\r\n },\r\n\r\n _checkToolTip: function () {\r\n var o = this.options;\r\n var errorText = o.errorText;\r\n if (BI.isFunction(errorText)) {\r\n errorText = errorText(this.editor.getValue());\r\n }\r\n if (BI.isKey(errorText)) {\r\n if (!this.isEnabled() || this.isValid() || (BI.Bubbles.has(this.getName()) && BI.Bubbles.get(this.getName()).isVisible())) {\r\n this.setTitle(\"\");\r\n } else {\r\n this.setTitle(errorText);\r\n }\r\n }\r\n },\r\n\r\n _assertWaterMark: function() {\r\n var self = this, o = this.options;\r\n if(BI.isNull(this.watermark)) {\r\n this.watermark = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bi-water-mark\",\r\n text: this.options.watermark,\r\n height: o.height - 2 * (o.vgap + o.tgap),\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"left\"\r\n });\r\n this.watermark.element.bind({\r\n mousedown: function (e) {\r\n if (self.isEnabled()) {\r\n self.editor.isEditing() || self.editor.focus();\r\n } else {\r\n self.editor.isEditing() && self.editor.blur();\r\n }\r\n e.stopEvent();\r\n }\r\n });\r\n this.watermark.element.bind(\"click\", function (e) {\r\n if (self.isEnabled()) {\r\n self.editor.isEditing() || self.editor.focus();\r\n } else {\r\n self.editor.isEditing() && self.editor.blur();\r\n }\r\n e.stopEvent();\r\n });\r\n }\r\n },\r\n\r\n _checkError: function () {\r\n this._setErrorVisible(this.isEnabled() && !this.isValid());\r\n this._checkToolTip();\r\n },\r\n\r\n _checkWaterMark: function () {\r\n var o = this.options;\r\n if (!this.disabledWaterMark && this.editor.getValue() === \"\" && BI.isKey(o.watermark)) {\r\n this.watermark && this.watermark.visible();\r\n } else {\r\n this.watermark && this.watermark.invisible();\r\n }\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.options.errorText = text;\r\n },\r\n\r\n getErrorText: function () {\r\n return this.options.errorText;\r\n },\r\n\r\n setWaterMark: function(v) {\r\n this.options.watermark = v;\r\n if(BI.isNull(this.watermark)) {\r\n this._assertWaterMark();\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.contentWrapper,\r\n items: [{\r\n el: this.watermark,\r\n left: 3,\r\n right: 3,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n })\r\n }\r\n BI.isKey(v) && this.watermark.setText(v);\r\n },\r\n\r\n _setErrorVisible: function (b) {\r\n var o = this.options;\r\n var errorText = o.errorText;\r\n if (BI.isFunction(errorText)) {\r\n errorText = errorText(BI.trim(this.editor.getValue()));\r\n }\r\n if (!this.disabledError && BI.isKey(errorText)) {\r\n BI.Bubbles[b ? \"show\" : \"hide\"](this.getName(), errorText, this, {\r\n adjustYOffset: 2\r\n });\r\n this._checkToolTip();\r\n return BI.Bubbles.get(this.getName());\r\n }\r\n },\r\n\r\n disableError: function () {\r\n this.disabledError = true;\r\n this._checkError();\r\n },\r\n\r\n enableError: function () {\r\n this.disabledError = false;\r\n this._checkError();\r\n },\r\n\r\n disableWaterMark: function () {\r\n this.disabledWaterMark = true;\r\n this._checkWaterMark();\r\n },\r\n\r\n enableWaterMark: function () {\r\n this.disabledWaterMark = false;\r\n this._checkWaterMark();\r\n },\r\n\r\n focus: function () {\r\n this.element.addClass(\"text-editor-focus\");\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.element.removeClass(\"text-editor-focus\");\r\n this.editor.blur();\r\n },\r\n\r\n selectAll: function () {\r\n this.editor.selectAll();\r\n },\r\n\r\n onKeyDown: function (k) {\r\n this.editor.onKeyDown(k);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.Editor.superclass.setValue.apply(this, arguments);\r\n this.editor.setValue(v);\r\n this._checkError();\r\n this._checkWaterMark();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n getValue: function () {\r\n if (!this.isValid()) {\r\n return BI.trim(this.editor.getLastValidValue());\r\n }\r\n return BI.trim(this.editor.getValue());\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Bubbles.remove(this.getName());\r\n }\r\n});\r\nBI.Editor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Editor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.Editor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.Editor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.Editor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.Editor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.Editor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.Editor.EVENT_START = \"EVENT_START\";\r\nBI.Editor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Editor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Editor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.Editor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.Editor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.Editor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.Editor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.Editor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.Editor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.Editor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.editor\", BI.Editor);/**\r\n * 多文件\r\n *\r\n * Created by GUY on 2016/4/13.\r\n * @class BI.MultifileEditor\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.MultifileEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultifileEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-multifile-editor\",\r\n multiple: false,\r\n maxSize: -1, // 1024 * 1024\r\n accept: \"\",\r\n url: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.MultifileEditor.superclass._init.apply(this, arguments);\r\n this.file = BI.createWidget({\r\n type: \"bi.file\",\r\n cls: \"multifile-editor\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n name: o.name,\r\n url: o.url,\r\n multiple: o.multiple,\r\n accept: o.accept,\r\n maxSize: o.maxSize,\r\n title: o.title\r\n });\r\n this.file.on(BI.File.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_UPLOADSTART, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_ERROR, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_PROGRESS, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_UPLOADED, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.adaptive\",\r\n scrollable: false,\r\n items: [this.file]\r\n },\r\n top: 0,\r\n right: 0,\r\n left: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n select: function () {\r\n this.file.select();\r\n },\r\n\r\n getValue: function () {\r\n return this.file.getValue();\r\n },\r\n\r\n upload: function () {\r\n this.file.upload();\r\n },\r\n\r\n reset: function () {\r\n this.file.reset();\r\n }\r\n});\r\nBI.MultifileEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultifileEditor.EVENT_UPLOADSTART = \"EVENT_UPLOADSTART\";\r\nBI.MultifileEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.MultifileEditor.EVENT_PROGRESS = \"EVENT_PROGRESS\";\r\nBI.MultifileEditor.EVENT_UPLOADED = \"EVENT_UPLOADED\";\r\nBI.shortcut(\"bi.multifile_editor\", BI.MultifileEditor);/**\r\n *\r\n * Created by GUY on 2016/1/18.\r\n * @class BI.TextAreaEditor\r\n * @extends BI.Single\r\n */\r\nBI.TextAreaEditor = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), {\r\n baseCls: \"bi-textarea-editor\",\r\n value: \"\"\r\n });\r\n },\r\n\r\n render: function() {\r\n var o = this.options, self = this;\r\n this.content = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"textarea\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n cls: \"bi-textarea textarea-editor-content display-block\"\r\n });\r\n this.content.element.css({resize: \"none\"});\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.adaptive\",\r\n items: [this.content]\r\n },\r\n left: 4,\r\n right: 4,\r\n top: 4,\r\n bottom: 8\r\n }]\r\n });\r\n\r\n this.content.element.on(\"input propertychange\", function (e) {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_CHANGE);\r\n });\r\n\r\n this.content.element.focus(function () {\r\n if (self.isValid()) {\r\n self._focus();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS);\r\n }\r\n BI.Widget._renderEngine.createElement(document).bind(\"mousedown.\" + self.getName(), function (e) {\r\n if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + self.getName());\r\n self.content.element.blur();\r\n }\r\n });\r\n });\r\n this.content.element.blur(function () {\r\n if (self.isValid()) {\r\n self._blur();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_BLUR);\r\n }\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + self.getName());\r\n });\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n if (BI.isNotNull(o.style)) {\r\n this.setStyle(o.style);\r\n }\r\n this._checkWaterMark();\r\n },\r\n\r\n _checkWaterMark: function () {\r\n var self = this, o = this.options;\r\n var val = this.getValue();\r\n if (BI.isNotEmptyString(val)) {\r\n this.watermark && this.watermark.destroy();\r\n this.watermark = null;\r\n } else {\r\n if (BI.isNotEmptyString(o.watermark)) {\r\n if (!this.watermark) {\r\n this.watermark = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark cursor-default\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: o.watermark,\r\n invalid: o.invalid,\r\n disabled: o.disabled\r\n });\r\n this.watermark.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.focus();\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.watermark,\r\n left: 4,\r\n top: 4,\r\n right: 0\r\n }]\r\n });\r\n } else {\r\n this.watermark.setText(o.watermark);\r\n this.watermark.setValid(!o.invalid);\r\n this.watermark.setEnable(!o.disabled);\r\n }\r\n }\r\n }\r\n },\r\n\r\n _focus: function () {\r\n this.content.element.addClass(\"textarea-editor-focus\");\r\n this._checkWaterMark();\r\n },\r\n\r\n _blur: function () {\r\n this.content.element.removeClass(\"textarea-editor-focus\");\r\n this._checkWaterMark();\r\n },\r\n\r\n focus: function () {\r\n this._focus();\r\n this.content.element.focus();\r\n },\r\n\r\n blur: function () {\r\n this._blur();\r\n this.content.element.blur();\r\n },\r\n\r\n getValue: function () {\r\n return this.content.element.val();\r\n },\r\n\r\n setValue: function (value) {\r\n this.content.element.val(value);\r\n this._checkWaterMark();\r\n },\r\n\r\n setStyle: function (style) {\r\n this.style = style;\r\n this.element.css(style);\r\n this.content.element.css(BI.extend({}, style, {\r\n color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor)\r\n }));\r\n },\r\n\r\n getStyle: function () {\r\n return this.style;\r\n },\r\n\r\n _setValid: function (b) {\r\n BI.TextAreaEditor.superclass._setValid.apply(this, arguments);\r\n // this.content.setValid(b);\r\n // this.watermark && this.watermark.setValid(b);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.TextAreaEditor.superclass._setEnable.apply(this, [b]);\r\n this.content && (this.content.element[0].disabled = !b);\r\n }\r\n});\r\nBI.TextAreaEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TextAreaEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TextAreaEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.shortcut(\"bi.textarea_editor\", BI.TextAreaEditor);/**\r\n * guy 表示一行数据,通过position来定位位置的数据\r\n * @class BI.Html\r\n * @extends BI.Single\r\n */\r\nBI.Html = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-html\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n lineHeight: null,\r\n handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n highLight: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (o.hgap + o.lgap > 0) {\r\n this.element.css({\r\n \"padding-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n this.element.css({\r\n \"padding-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n this.element.css({\r\n \"padding-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n this.element.css({\r\n \"padding-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n }\r\n if (BI.isNumber(o.lineHeight)) {\r\n this.element.css({lineHeight: o.lineHeight + \"px\"});\r\n }\r\n if (BI.isWidthOrHeight(o.maxWidth)) {\r\n this.element.css({maxWidth: o.maxWidth});\r\n }\r\n this.element.css({\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textOverflow: o.whiteSpace === 'nowrap' ? \"ellipsis\" : \"\",\r\n overflow: o.whiteSpace === \"nowrap\" ? \"\" : \"auto\"\r\n });\r\n if (o.handler) {\r\n this.text = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"span\"\r\n });\r\n this.text.element.click(function () {\r\n o.handler(self.getValue());\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n } else {\r\n this.text = this;\r\n }\r\n\r\n if (BI.isKey(o.text)) {\r\n this.setText(o.text);\r\n } else if (BI.isKey(o.value)) {\r\n this.setText(o.value);\r\n }\r\n if (o.highLight) {\r\n this.doHighLight();\r\n }\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.element.addClass(\"bi-high-light\");\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.element.removeClass(\"bi-high-light\");\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Html.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.setText(text);\r\n }\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.element.css(css);\r\n },\r\n\r\n setText: function (text) {\r\n BI.Html.superclass.setText.apply(this, arguments);\r\n this.options.text = text;\r\n this.text.element.html(text);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.html\", BI.Html);/**\r\n * guy 图标\r\n * @class BI.Icon\r\n * @extends BI.Single\r\n */\r\nBI.Icon = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Icon.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"i\",\r\n baseCls: (conf.baseCls || \"\") + \" x-icon b-font horizon-center display-block\"\r\n });\r\n },\r\n _init: function () {\r\n BI.Icon.superclass._init.apply(this, arguments);\r\n if (BI.isIE9Below && BI.isIE9Below()) {\r\n this.element.addClass(\"hack\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.icon\", BI.Icon);/**\r\n * @class BI.Iframe\r\n * @extends BI.Single\r\n * @abstract\r\n * Created by GameJian on 2016/3/2.\r\n */\r\nBI.Iframe = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"iframe\",\r\n baseCls: (conf.baseCls || \"\") + \" bi-iframe\",\r\n src: \"\",\r\n name: \"\",\r\n attributes: {},\r\n width: \"100%\",\r\n height: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n o.attributes.frameborder = \"0\";\r\n o.attributes.src = o.src;\r\n o.attributes.name = o.name;\r\n BI.Iframe.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.element.attr(\"src\", src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.options.src;\r\n },\r\n\r\n setName: function (name) {\r\n this.options.name = name;\r\n this.element.attr(\"name\", name);\r\n },\r\n\r\n getName: function () {\r\n return this.options.name;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.iframe\", BI.Iframe);/**\r\n * ͼƬ\r\n *\r\n * Created by GUY on 2016/1/26.\r\n * @class BI.Img\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Img = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Img.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"img\",\r\n baseCls: (conf.baseCls || \"\") + \" bi-img display-block\",\r\n src: \"\",\r\n attributes: {},\r\n width: \"100%\",\r\n height: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n o.attributes.src = o.src;\r\n BI.Img.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.element.attr(\"src\", src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.options.src;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.img\", BI.Img);\r\n/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.ImageCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageCheckbox.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-image-checkbox check-box-icon\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n });\r\n }\r\n});\r\nBI.ImageCheckbox.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.image_checkbox\", BI.ImageCheckbox);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Checkbox = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n baseCls: \"bi-checkbox\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n type: \"bi.default\",\r\n ref: function (_ref) {\r\n self.checkbox = _ref;\r\n },\r\n cls: \"checkbox-content\",\r\n width: o.iconWidth - 2,\r\n height: o.iconHeight - 2\r\n }]\r\n };\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Checkbox.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.checkbox.element.removeClass(\"base-disabled disabled\");\r\n } else {\r\n this.checkbox.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Checkbox.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.Checkbox.EVENT_CHANGE);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.Checkbox.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this.checkbox.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.checkbox.element.removeClass(\"bi-high-light-background\");\r\n }\r\n }\r\n});\r\nBI.Checkbox.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.checkbox\", BI.Checkbox);/**\r\n * 文件\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.File\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\n(function (document) {\r\n\r\n /**\r\n * @description normalize input.files. create if not present, add item method if not present\r\n * @param Object generated wrap object\r\n * @return Object the wrap object itself\r\n */\r\n var F = (function (item) {\r\n return function (input) {\r\n var files = input.files || [input];\r\n if (!files.item) {\r\n files.item = item;\r\n }\r\n return files;\r\n };\r\n })(function (i) {\r\n return this[i];\r\n });\r\n\r\n var event = {\r\n\r\n /**\r\n * @description add an event via addEventListener or attachEvent\r\n * @param DOMElement the element to add event\r\n * @param String event name without \"on\" (e.g. \"mouseover\")\r\n * @param Function the callback to associate as event\r\n * @return Object noswfupload.event\r\n */\r\n add: document.addEventListener ?\r\n function (node, name, callback) {\r\n node.addEventListener(name, callback, false);\r\n return this;\r\n } :\r\n function (node, name, callback) {\r\n node.attachEvent(\"on\" + name, callback);\r\n return this;\r\n },\r\n\r\n /**\r\n * @description remove an event via removeEventListener or detachEvent\r\n * @param DOMElement the element to remove event\r\n * @param String event name without \"on\" (e.g. \"mouseover\")\r\n * @param Function the callback associated as event\r\n * @return Object noswfupload.event\r\n */\r\n del: document.removeEventListener ?\r\n function (node, name, callback) {\r\n node.removeEventListener(name, callback, false);\r\n return this;\r\n } :\r\n function (node, name, callback) {\r\n node.detachEvent(\"on\" + name, callback);\r\n return this;\r\n },\r\n\r\n /**\r\n * @description to block event propagation and prevent event default\r\n * @param void generated event or undefined\r\n * @return Boolean false\r\n */\r\n stop: function (e) {\r\n if (!e) {\r\n if (self.event) {\r\n event.returnValue = !(event.cancelBubble = true);\r\n }\r\n } else {\r\n e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;\r\n e.preventDefault ? e.preventDefault() : e.returnValue = false;\r\n }\r\n\r\n return false;\r\n }\r\n };\r\n\r\n var sendFile = (function (toString) {\r\n var multipart = function (boundary, name, file) {\r\n return \"--\".concat(\r\n boundary, CRLF,\r\n \"Content-Disposition: form-data; name=\\\"\", name, \"\\\"; filename=\\\"\", _global.encodeURIComponent(file.fileName), \"\\\"\", CRLF,\r\n \"Content-Type: application/octet-stream\", CRLF,\r\n CRLF,\r\n file.getAsBinary(), CRLF,\r\n \"--\", boundary, \"--\", CRLF\r\n );\r\n },\r\n isFunction = function (Function) {\r\n return toString.call(Function) === \"[object Function]\";\r\n },\r\n split = \"onabort.onerror.onloadstart.onprogress\".split(\".\"),\r\n length = split.length,\r\n CRLF = \"\\r\\n\",\r\n xhr = this.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject(\"Microsoft.XMLHTTP\"),\r\n sendFile;\r\n\r\n // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work)\r\n if (xhr.upload || xhr.sendAsBinary) {\r\n sendFile = function (handler, maxSize, width, height) {\r\n if (-1 < maxSize && maxSize < handler.file.fileSize) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror();\r\n }\r\n return;\r\n }\r\n for (var\r\n xhr = new XMLHttpRequest,\r\n upload = xhr.upload || {\r\n addEventListener: function (event, callback) {\r\n this[\"on\" + event] = callback;\r\n }\r\n },\r\n i = 0;\r\n i < length;\r\n i++\r\n ) {\r\n upload.addEventListener(\r\n split[i].substring(2),\r\n (function (event) {\r\n return function (rpe) {\r\n if (isFunction(handler[event])) {\r\n handler[event](rpe, xhr);\r\n }\r\n };\r\n })(split[i]),\r\n false\r\n );\r\n }\r\n upload.addEventListener(\r\n \"load\",\r\n function (rpe) {\r\n if (handler.onreadystatechange === false) {\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, xhr);\r\n }\r\n } else {\r\n setTimeout(function () {\r\n if (xhr.readyState === 4) {\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, xhr);\r\n }\r\n } else {\r\n setTimeout(arguments.callee, 15);\r\n }\r\n }, 15);\r\n }\r\n },\r\n false\r\n );\r\n xhr.open(\"post\", handler.url + \"&filename=\" + _global.encodeURIComponent(handler.file.fileName), true);\r\n if (!xhr.upload) {\r\n var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true};\r\n rpe.interval = setInterval(function () {\r\n rpe.loaded += 1024 / 4;\r\n if (rpe.total <= rpe.loaded) {\r\n rpe.loaded = rpe.total;\r\n }\r\n upload.onprogress(rpe);\r\n }, 100);\r\n xhr.onabort = function () {\r\n upload.onabort({});\r\n };\r\n xhr.onerror = function () {\r\n upload.onerror({});\r\n };\r\n xhr.onreadystatechange = function () {\r\n switch (xhr.readyState) {\r\n case 2:\r\n case 3:\r\n if (rpe.total <= rpe.loaded) {\r\n rpe.loaded = rpe.total;\r\n }\r\n upload.onprogress(rpe);\r\n break;\r\n case 4:\r\n clearInterval(rpe.interval);\r\n rpe.interval = 0;\r\n rpe.loaded = rpe.total;\r\n upload.onprogress(rpe);\r\n if (199 < xhr.status && xhr.status < 400) {\r\n upload[\"onload\"]({});\r\n var attachO = BI.jsonDecode(xhr.responseText);\r\n attachO.filename = handler.file.fileName;\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n handler.attach_array.push(attachO);\r\n } else {\r\n upload[\"onerror\"]({});\r\n }\r\n break;\r\n }\r\n };\r\n upload.onloadstart(rpe);\r\n } else {\r\n xhr.onreadystatechange = function () {\r\n switch (xhr.readyState) {\r\n case 4:\r\n var attachO = BI.jsonDecode(xhr.responseText);\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n attachO.filename = handler.file.fileName;\r\n if (handler.maxlength == 1) {\r\n handler.attach_array[0] = attachO;\r\n // handler.attach_array.push(attachO);\r\n } else {\r\n handler.attach_array.push(attachO);\r\n }\r\n break;\r\n }\r\n };\r\n if (isFunction(upload.onloadstart)) {\r\n upload.onloadstart();\r\n }\r\n }\r\n var boundary = \"AjaxUploadBoundary\" + (new Date).getTime();\r\n xhr.setRequestHeader(\"Content-Type\", \"multipart/form-data; boundary=\" + boundary);\r\n if (handler.file.getAsBinary) {\r\n xhr[xhr.sendAsBinary ? \"sendAsBinary\" : \"send\"](multipart(boundary, handler.name, handler.file));\r\n } else {\r\n xhr.setRequestHeader(\"Content-Type\", \"multipart/form-data\");\r\n // xhr.setRequestHeader(\"X-Name\", handler.name);\r\n // xhr.setRequestHeader(\"X-File-Name\", handler.file.fileName);\r\n var form = new FormData();\r\n form.append(\"FileData\", handler.file);\r\n xhr.send(form);\r\n }\r\n return handler;\r\n };\r\n }\r\n // Internet Explorer, Opera, others\r\n else {\r\n sendFile = function (handler, maxSize, width, height) {\r\n var url = handler.url.concat(-1 === handler.url.indexOf(\"?\") ? \"?\" : \"&\", \"AjaxUploadFrame=true\"),\r\n rpe = {\r\n loaded: 1, total: 100, simulation: true, interval: setInterval(function () {\r\n if (rpe.loaded < rpe.total) {\r\n ++rpe.loaded;\r\n }\r\n if (isFunction(handler.onprogress)) {\r\n handler.onprogress(rpe, {});\r\n }\r\n }, 100)\r\n },\r\n onload = function () {\r\n iframe.onreadystatechange = iframe.onload = iframe.onerror = null;\r\n form.parentNode.removeChild(form);\r\n form = null;\r\n clearInterval(rpe.interval);\r\n // rpe.loaded = rpe.total;\r\n try {\r\n var responseText = (iframe.contentWindow.document || iframe.contentWindow.contentDocument).body.innerHTML;\r\n var attachO = BI.jsonDecode(responseText);\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n\r\n // attachO.fileSize = responseText.length;\r\n attachO.filename = _global.decodeURIComponent(handler.file.fileName);\r\n if (handler.maxlength == 1) {\r\n handler.attach_array[0] = attachO;\r\n } else {\r\n handler.attach_array.push(attachO);\r\n }\r\n } catch (e) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror(rpe, event || _global.event);\r\n }\r\n }\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, {responseText: responseText});\r\n }\r\n },\r\n target = [\"AjaxUpload\", (new Date).getTime(), String(Math.random()).substring(2)].join(\"_\");\r\n try { // IE < 8 does not accept enctype attribute ...\r\n var form = document.createElement(\"<form enctype=\\\"multipart/form-data\\\"></form>\"),\r\n iframe = handler.iframe || (handler.iframe = document.createElement(\"<iframe id=\\\"\" + target + \"\\\" name=\\\"\" + target + \"\\\" src=\\\"\" + url + \"\\\"></iframe>\"));\r\n } catch (e) {\r\n var form = document.createElement(\"form\"),\r\n iframe = handler.iframe || (handler.iframe = document.createElement(\"iframe\"));\r\n form.setAttribute(\"enctype\", \"multipart/form-data\");\r\n iframe.setAttribute(\"name\", iframe.id = target);\r\n iframe.setAttribute(\"src\", url);\r\n }\r\n iframe.style.position = \"absolute\";\r\n iframe.style.left = iframe.style.top = \"-10000px\";\r\n iframe.onload = onload;\r\n iframe.onerror = function (event) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror(rpe, event || _global.event);\r\n }\r\n };\r\n iframe.onreadystatechange = function () {\r\n if (/loaded|complete/i.test(iframe.readyState)) {\r\n onload();\r\n\r\n // wei : todo,将附件信息放到handler.attach\r\n } else if (isFunction(handler.onloadprogress)) {\r\n if (rpe.loaded < rpe.total) {\r\n ++rpe.loaded;\r\n }\r\n handler.onloadprogress(rpe, {\r\n readyState: {\r\n loading: 2,\r\n interactive: 3,\r\n loaded: 4,\r\n complete: 4\r\n }[iframe.readyState] || 1\r\n });\r\n }\r\n };\r\n form.setAttribute(\"action\", handler.url + \"&filename=\" + _global.encodeURIComponent(handler.file.fileName));\r\n form.setAttribute(\"target\", iframe.id);\r\n form.setAttribute(\"method\", \"post\");\r\n form.appendChild(handler.file);\r\n form.style.display = \"none\";\r\n if (isFunction(handler.onloadstart)) {\r\n handler.onloadstart(rpe, {});\r\n }\r\n with (document.body || document.documentElement) {\r\n appendChild(iframe);\r\n appendChild(form);\r\n form.submit();\r\n }\r\n\r\n return handler;\r\n };\r\n }\r\n xhr = null;\r\n return sendFile;\r\n })(Object.prototype.toString);\r\n\r\n var sendFiles = function (handler, maxSize, width, height) {\r\n\r\n var length = handler.files.length,\r\n i = 0,\r\n onload = handler.onload,\r\n onloadstart = handler.onloadstart;\r\n handler.current = 0;\r\n handler.total = 0;\r\n handler.sent = 0;\r\n while (handler.current < length) {\r\n handler.total += (handler.files[handler.current].fileSize || handler.files[handler.current].size);\r\n handler.current++;\r\n }\r\n handler.current = 0;\r\n if (length && handler.files[0].fileSize !== -1) {\r\n handler.file = handler.files[handler.current];\r\n\r\n sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) {\r\n handler.onloadstart = null;\r\n handler.sent += (handler.files[handler.current].fileSize || handler.files[handler.current].size);\r\n if (++handler.current < length) {\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = arguments.callee;\r\n } else if (onload) {\r\n handler.onloadstart = onloadstart;\r\n handler.onload = onload;\r\n handler.onload(rpe, xhr);\r\n }\r\n };\r\n } else if (length) {\r\n handler.total = length * 100;\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) {\r\n var callee = arguments.callee;\r\n handler.onloadstart = null;\r\n handler.sent += 100;\r\n if (++handler.current < length) {\r\n if (/\\b(chrome|safari)\\b/i.test(navigator.userAgent)) {\r\n handler.iframe.parentNode.removeChild(handler.iframe);\r\n handler.iframe = null;\r\n }\r\n setTimeout(function () {\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = callee;\r\n }, 15);\r\n } else if (onload) {\r\n setTimeout(function () {\r\n handler.iframe.parentNode.removeChild(handler.iframe);\r\n handler.iframe = null;\r\n handler.onloadstart = onloadstart;\r\n handler.onload = onload;\r\n handler.onload(rpe, xhr);\r\n }, 15);\r\n }\r\n };\r\n }\r\n return handler;\r\n };\r\n\r\n BI.File = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.File.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-file display-block\",\r\n tagName: \"input\",\r\n attributes: {\r\n type: \"file\"\r\n },\r\n name: \"\",\r\n url: \"\",\r\n multiple: true,\r\n accept: \"\", /** '*.jpg; *.zip'**/\r\n maxSize: -1 // 1024 * 1024\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.File.superclass._init.apply(this, arguments);\r\n if (o.multiple === true) {\r\n this.element.attr(\"multiple\", \"multiple\");\r\n }\r\n this.element.attr(\"name\", o.name || this.getName());\r\n this.element.attr(\"title\", o.title || \"\");\r\n },\r\n\r\n created: function () {\r\n var self = this, o = this.options;\r\n // create the noswfupload.wrap Object\r\n // wrap.maxSize 文件大小限制\r\n // wrap.maxlength 文件个数限制\r\n var _wrap = this.wrap = this._wrap(this.element[0], o.maxSize);\r\n // fileType could contain whatever text but filter checks *.{extension}\r\n // if present\r\n\r\n // handlers\r\n\r\n _wrap.onloadstart = function (rpe, xhr) {\r\n // BI.Msg.toast(\"loadstart\");\r\n self.fireEvent(BI.File.EVENT_UPLOADSTART, arguments);\r\n };\r\n\r\n _wrap.onprogress = function (rpe, xhr) {\r\n // BI.Msg.toast(\"onprogress\");\r\n // percent for each bar\r\n\r\n // fileSize is -1 only if browser does not support file info access\r\n // this if splits recent browsers from others\r\n if (this.file.fileSize !== -1) {\r\n // simulation property indicates when the progress event is fake\r\n if (rpe.simulation) {\r\n\r\n } else {\r\n\r\n }\r\n } else {\r\n // if fileSIze is -1 browser is using an iframe because it does\r\n // not support\r\n // files sent via Ajax (XMLHttpRequest)\r\n // We can still show some information\r\n }\r\n self.fireEvent(BI.File.EVENT_PROGRESS, {\r\n file: this.file,\r\n total: rpe.total,\r\n loaded: rpe.loaded,\r\n simulation: rpe.simulation\r\n });\r\n };\r\n\r\n // generated if there is something wrong during upload\r\n _wrap.onerror = function () {\r\n // just inform the user something was wrong\r\n self.fireEvent(BI.File.EVENT_ERROR);\r\n };\r\n\r\n // generated when every file has been sent (one or more, it does not\r\n // matter)\r\n _wrap.onload = function (rpe, xhr) {\r\n var self_ = this;\r\n // just show everything is fine ...\r\n // ... and after a second reset the component\r\n setTimeout(function () {\r\n self_.clean(); // remove files from list\r\n self_.hide(); // hide progress bars and enable input file\r\n\r\n if (200 > xhr.status || xhr.status > 399) {\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR);\r\n return;\r\n }\r\n var error = BI.some(_wrap.attach_array, function (index, attach) {\r\n if (attach.errorCode) {\r\n BI.Msg.toast(attach.errorMsg, {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, attach);\r\n return true;\r\n }\r\n });\r\n !error && self.fireEvent(BI.File.EVENT_UPLOADED);\r\n // enable again the submit button/element\r\n }, 1000);\r\n };\r\n _wrap.url = o.url;\r\n _wrap.fileType = o.accept; // 文件类型限制\r\n _wrap.attach_array = [];\r\n _wrap.attach_names = [];\r\n _wrap.attachNum = 0;\r\n },\r\n\r\n _events: function (wrap) {\r\n var self = this;\r\n event.add(wrap.dom.input, \"change\", function () {\r\n event.del(wrap.dom.input, \"change\", arguments.callee);\r\n for (var input = wrap.dom.input.cloneNode(true), i = 0, files = F(wrap.dom.input); i < files.length; i++) {\r\n var item = files.item(i);\r\n var tempFile = item.value || item.name;\r\n var value = item.fileName || (item.fileName = tempFile.split(\"\\\\\").pop()),\r\n ext = -1 !== value.indexOf(\".\") ? value.split(\".\").pop().toLowerCase() : \"unknown\",\r\n size = item.fileSize || item.size;\r\n if (wrap.fileType && -1 === wrap.fileType.indexOf(\"*.\" + ext)) {\r\n // 文件类型不支持\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Type_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, {\r\n errorType: 0,\r\n file: item\r\n });\r\n } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {\r\n // 文件大小不支持\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Size_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, {\r\n errorType: 1,\r\n file: item\r\n });\r\n } else {\r\n wrap.files.unshift(item);\r\n // BI.Msg.toast(value);\r\n }\r\n }\r\n wrap.files.length > 0 && self.fireEvent(BI.File.EVENT_CHANGE, {\r\n files: wrap.files\r\n });\r\n input.value = \"\";\r\n wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input);\r\n wrap.dom.input = input;\r\n event.add(wrap.dom.input, \"change\", arguments.callee);\r\n });\r\n return wrap;\r\n },\r\n\r\n _wrap: function () {\r\n var self = this, o = this.options;\r\n // be sure input accept multiple files\r\n var input = this.element[0];\r\n if (o.multiple === true) {\r\n this.element.attr(\"multiple\", \"multiple\");\r\n }\r\n input.value = \"\";\r\n\r\n // wrap Object\r\n return this._events({\r\n\r\n // DOM namespace\r\n dom: {\r\n input: input, // input file\r\n disabled: false // internal use, checks input file state\r\n },\r\n name: input.name, // name to send for each file ($_FILES[{name}] in the server)\r\n // maxSize is the maximum amount of bytes for each file\r\n maxSize: o.maxSize ? o.maxSize >> 0 : -1,\r\n files: [], // file list\r\n\r\n // remove every file from the noswfupload component\r\n clean: function () {\r\n this.files = [];\r\n },\r\n\r\n // upload one file a time (which make progress possible rather than all files in one shot)\r\n // the handler is an object injected into the wrap one, could be the wrap itself or\r\n // something like {onload:function(){alert(\"OK\")},onerror:function(){alert(\"Error\")}, etc ...}\r\n upload: function (handler) {\r\n if (handler) {\r\n for (var key in handler) {\r\n this[key] = handler[key];\r\n }\r\n }\r\n sendFiles(this, this.maxSize);\r\n return this;\r\n },\r\n\r\n // hide progress bar (total + current) and enable files selection\r\n hide: function () {\r\n if (this.dom.disabled) {\r\n this.dom.disabled = false;\r\n this.dom.input.removeAttribute(\"disabled\");\r\n }\r\n },\r\n\r\n // show progress bar and disable file selection (used during upload)\r\n // total and current are pixels used to style bars\r\n // totalProp and currentProp are properties to change, \"height\" by default\r\n show: function (total, current, totalProp, currentProp) {\r\n if (!this.dom.disabled) {\r\n this.dom.disabled = true;\r\n this.dom.input.setAttribute(\"disabled\", \"disabled\");\r\n }\r\n }\r\n });\r\n },\r\n\r\n select: function () {\r\n this.wrap && BI.Widget._renderEngine.createElement(this.wrap.dom.input).click();\r\n },\r\n\r\n upload: function (handler) {\r\n this.wrap && this.wrap.upload(handler);\r\n },\r\n\r\n getValue: function () {\r\n return this.wrap ? this.wrap.attach_array : [];\r\n },\r\n\r\n reset: function () {\r\n if (this.wrap) {\r\n this.wrap.attach_array = [];\r\n this.wrap.attach_names = [];\r\n this.wrap.attachNum = 0;\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.File.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.attr(\"disabled\", \"disabled\");\r\n } else {\r\n this.element.removeAttr(\"disabled\");\r\n }\r\n }\r\n });\r\n BI.File.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.File.EVENT_UPLOADSTART = \"EVENT_UPLOADSTART\";\r\n BI.File.EVENT_ERROR = \"EVENT_ERROR\";\r\n BI.File.EVENT_PROGRESS = \"EVENT_PROGRESS\";\r\n BI.File.EVENT_UPLOADED = \"EVENT_UPLOADED\";\r\n BI.shortcut(\"bi.file\", BI.File);\r\n})(_global.document || {});/**\r\n * guy\r\n * @class BI.Input 一个button和一行数 组成的一行listitem\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Input = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Input.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-input display-block overflow-dot\",\r\n tagName: \"input\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn, // 按确定键能否退出编辑\r\n allowBlank: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Input.superclass._init.apply(this, arguments);\r\n var self = this;\r\n var ctrlKey = false;\r\n var keyCode = null;\r\n var inputEventValid = false;\r\n var _keydown = BI.debounce(function (keyCode) {\r\n self.onKeyDown(keyCode, ctrlKey);\r\n self._keydown_ = false;\r\n }, 300);\r\n var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this._focusDebounce = BI.debounce(BI.bind(this._focus, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this.element\r\n .keydown(function (e) {\r\n inputEventValid = false;\r\n ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下\r\n keyCode = e.keyCode;\r\n self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);\r\n })\r\n .keyup(function (e) {\r\n keyCode = null;\r\n if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) {\r\n self._keydown_ = true;\r\n _keydown(e.keyCode);\r\n }\r\n })\r\n .on(\"input propertychange\", function (e) {\r\n // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了\r\n // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8\r\n // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓)\r\n var originalEvent = e.originalEvent;\r\n if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === \"value\") {\r\n inputEventValid = true;\r\n self._keydown_ = true;\r\n _keydown(keyCode);\r\n keyCode = null;\r\n }\r\n })\r\n .click(function (e) {\r\n e.stopPropagation();\r\n _clk();\r\n })\r\n .mousedown(function (e) {\r\n self.element.val(self.element.val());\r\n })\r\n .focus(function (e) { // 可以不用冒泡\r\n self._focusDebounce();\r\n })\r\n .focusout(function (e) {\r\n self._blurDebounce();\r\n });\r\n if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n _focus: function () {\r\n this.element.addClass(\"bi-input-focus\");\r\n this._checkValidationOnValueChange();\r\n this._isEditing = true;\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this.fireEvent(BI.Input.EVENT_FOCUS);\r\n },\r\n\r\n _blur: function () {\r\n var self = this;\r\n if (self._keydown_ === true) {\r\n BI.delay(blur, 300);\r\n } else {\r\n blur();\r\n }\r\n\r\n function blur () {\r\n if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) {\r\n self.element.val(self._lastValidValue ? self._lastValidValue : \"\");\r\n self._checkValidationOnValueChange();\r\n self._defaultState();\r\n }\r\n self.element.removeClass(\"bi-input-focus\");\r\n self._isEditing = false;\r\n self._start = false;\r\n if (self.isValid()) {\r\n var lastValidValue = self._lastValidValue;\r\n self._lastValidValue = self.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);\r\n self.fireEvent(BI.Input.EVENT_CONFIRM);\r\n if (self._lastValidValue !== lastValidValue) {\r\n self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);\r\n }\r\n }\r\n self.fireEvent(BI.Input.EVENT_BLUR);\r\n }\r\n },\r\n\r\n _click: function () {\r\n if (this._isEditing !== true) {\r\n this.selectAll();\r\n this.fireEvent(BI.Input.EVENT_CLICK);\r\n }\r\n },\r\n\r\n onClick: function () {\r\n this._click();\r\n },\r\n\r\n onKeyDown: function (keyCode, ctrlKey) {\r\n if (!this.isValid() || BI.trim(this._lastChangedValue) !== BI.trim(this.getValue())) {\r\n this._checkValidationOnValueChange();\r\n }\r\n if (this.isValid() && BI.trim(this.getValue()) !== \"\") {\r\n if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === \"\")\r\n || (this._pause === true && !/(\\s|\\u00A0)$/.test(this.getValue()))) {\r\n this._start = true;\r\n this._pause = false;\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STARTEDIT, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_START);\r\n }\r\n }\r\n if (keyCode == BI.KeyCode.ENTER) {\r\n if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {\r\n this.blur();\r\n this.fireEvent(BI.Input.EVENT_ENTER);\r\n } else {\r\n this.fireEvent(BI.Input.EVENT_RESTRICT);\r\n }\r\n }\r\n if (keyCode == BI.KeyCode.SPACE) {\r\n this.fireEvent(BI.Input.EVENT_SPACE);\r\n }\r\n if (keyCode == BI.KeyCode.BACKSPACE && this._lastValue == \"\") {\r\n this.fireEvent(BI.Input.EVENT_REMOVE);\r\n }\r\n if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {\r\n this.fireEvent(BI.Input.EVENT_BACKSPACE);\r\n }\r\n this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);\r\n\r\n // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务\r\n var lastValue = this._lastValue;\r\n if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || \"\")){\r\n this._valueChange();\r\n }\r\n if (BI.isEndWithBlank(this.getValue())) {\r\n this._pause = true;\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, \"\", this);\r\n this.fireEvent(BI.Input.EVENT_PAUSE);\r\n this._defaultState();\r\n } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&\r\n BI.trim(this.getValue()) === \"\" && (lastValue !== null && BI.trim(lastValue) !== \"\")) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_STOP);\r\n }\r\n },\r\n\r\n // 初始状态\r\n _defaultState: function () {\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this._lastValue = this.getValue();\r\n this._lastSubmitValue = null;\r\n },\r\n\r\n _valueChange: function () {\r\n if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_CHANGE);\r\n this._lastSubmitValue = BI.trim(this.getValue());\r\n }\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this._lastValue = this.getValue();\r\n },\r\n\r\n _checkValidationOnValueChange: function () {\r\n var o = this.options;\r\n var v = this.getValue();\r\n this.setValid(\r\n (o.allowBlank === true && BI.trim(v) == \"\") || (\r\n BI.isNotEmptyString(BI.trim(v)) && o.validationChecker.apply(this, [BI.trim(v)]) !== false\r\n )\r\n );\r\n },\r\n\r\n focus: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能focus\");\r\n }\r\n if (!this._isEditing === true) {\r\n this.element.focus();\r\n this.selectAll();\r\n }\r\n },\r\n\r\n blur: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能blur\");\r\n }\r\n if (this._isEditing === true) {\r\n this.element.blur();\r\n this._blurDebounce();\r\n }\r\n },\r\n\r\n selectAll: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能select\");\r\n }\r\n this.element.select();\r\n this._isEditing = true;\r\n },\r\n\r\n setValue: function (textValue) {\r\n this.element.val(textValue);\r\n BI.nextTick(BI.bind(function () {\r\n this._checkValidationOnValueChange();\r\n this._defaultState();\r\n if (this.isValid()) {\r\n this._lastValidValue = this._lastSubmitValue = this.getValue();\r\n }\r\n }, this));\r\n },\r\n\r\n getValue: function () {\r\n return this.element.val() || \"\";\r\n },\r\n\r\n isEditing: function () {\r\n return this._isEditing;\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this._lastValidValue;\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this._lastChangedValue;\r\n },\r\n\r\n _setValid: function () {\r\n BI.Input.superclass._setValid.apply(this, arguments);\r\n if (this.isValid()) {\r\n this._lastChangedValue = this.getValue();\r\n this.element.removeClass(\"bi-input-error\");\r\n this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this);\r\n } else {\r\n if (this._lastChangedValue === this.getValue()) {\r\n this._lastChangedValue = null;\r\n }\r\n this.element.addClass(\"bi-input-error\");\r\n this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this);\r\n }\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.Input.superclass._setEnable.apply(this, [b]);\r\n this.element[0].disabled = !b;\r\n }\r\n});\r\nBI.Input.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.Input.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.Input.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.Input.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.Input.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.Input.EVENT_QUICK_DOWN = \"EVENT_QUICK_DOWN\";\r\nBI.Input.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.Input.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.Input.EVENT_START = \"EVENT_START\";\r\nBI.Input.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Input.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Input.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.Input.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.Input.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.Input.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.Input.EVENT_VALID = \"EVENT_VALID\";\r\nBI.Input.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.Input.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.Input.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.shortcut(\"bi.input\", BI.Input);\r\n/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.ImageRadio = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageRadio.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-radio radio-icon\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ImageRadio.superclass._init.apply(this, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.ImageRadio.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.ImageRadio.EVENT_CHANGE);\r\n }\r\n }\r\n});\r\nBI.ImageRadio.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.image_radio\", BI.ImageRadio);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Radio = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n baseCls: \"bi-radio\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 14,\r\n iconHeight: 14\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.center_adapt\",\r\n element: this.element,\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"radio-content\",\r\n ref: function (_ref) {\r\n self.radio = _ref;\r\n },\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }]\r\n };\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Radio.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.radio.element.removeClass(\"base-disabled disabled\");\r\n } else {\r\n this.radio.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Radio.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.Radio.EVENT_CHANGE);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.Radio.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this.radio.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.radio.element.removeClass(\"bi-high-light-background\");\r\n }\r\n }\r\n});\r\nBI.Radio.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.radio\", BI.Radio);/**\r\n * Created by dailer on 2019/6/19.\r\n */\r\n\r\nBI.AbstractLabel = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function (props) {\r\n var conf = BI.AbstractLabel.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\", // normal or nowrap\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n highLight: false\r\n });\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.text\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n highLight: o.highLight\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.AbstractLabel.superclass._init.apply(this, arguments);\r\n\r\n if (this.options.textAlign === \"center\") {\r\n this._createCenterEl();\r\n } else {\r\n this._createNotCenterEl();\r\n }\r\n },\r\n\r\n _createCenterEl: function () {\r\n var o = this.options;\r\n var json = this._createJson();\r\n json.textAlign = \"left\";\r\n if (BI.isNumber(o.width) && o.width > 0) {\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.maxWidth = o.textWidth;\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.1\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n height: o.height,\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n BI.createWidget({ // 1.2\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (o.whiteSpace == \"normal\") { // 1.3\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.4\r\n this.element.css({\r\n \"line-height\": o.height + \"px\"\r\n });\r\n json.textAlign = o.textAlign;\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, { // 1.5\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n maxWidth: \"100%\"\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6\r\n json.maxWidth = o.textWidth;\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (o.whiteSpace == \"normal\") { // 1.7\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: true,\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.8\r\n this.element.css({\r\n \"line-height\": o.height + \"px\"\r\n });\r\n json.textAlign = o.textAlign;\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n\r\n this.text = BI.createWidget(BI.extend(json, {\r\n maxWidth: \"100%\"\r\n }));\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n },\r\n\r\n _createNotCenterEl: function () {\r\n var o = this.options;\r\n var adaptLayout = o.textAlign === \"right\" ? \"bi.right_vertical_adapt\" : \"bi.vertical_adapt\";\r\n var json = this._createJson();\r\n if (BI.isNumber(o.width) && o.width > 0) {\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.width = o.textWidth;\r\n if (BI.isNumber(o.height) && o.height > 0) { // 2.1\r\n BI.createWidget({\r\n type: adaptLayout,\r\n height: o.height,\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n BI.createWidget({ // 2.2\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 2.3\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n if (o.whiteSpace !== \"normal\") {\r\n this.element.css({\r\n \"line-height\": o.height - (o.vgap * 2) + \"px\"\r\n });\r\n }\r\n return;\r\n }\r\n json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;\r\n BI.createWidget({ // 2.4\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [{\r\n el: (this.text = BI.createWidget(json))\r\n }]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.width = o.textWidth;\r\n BI.createWidget({ // 2.5\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) {\r\n if (o.whiteSpace !== \"normal\") {\r\n this.element.css({\r\n \"line-height\": o.height - (o.vgap * 2) + \"px\"\r\n });\r\n }\r\n this.text = BI.createWidget(BI.extend(json, { // 2.6\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n\r\n this.text = BI.createWidget(BI.extend(json, {\r\n maxWidth: \"100%\"\r\n }));\r\n BI.createWidget({\r\n type: adaptLayout,\r\n element: this,\r\n items: [this.text]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setText: function (v) {\r\n this.options.text = v;\r\n this.text.setText(v);\r\n },\r\n\r\n getText: function () {\r\n return this.options.text;\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.setStyle(css);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.AbstractLabel.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.text.setValue(v);\r\n }\r\n },\r\n\r\n populate: function () {\r\n BI.AbstractLabel.superclass.populate.apply(this, arguments);\r\n }\r\n});/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.HtmlLabel = BI.inherit(BI.AbstractLabel, {\r\n\r\n props: {\r\n baseCls: \"bi-html-label\"\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.html\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value\r\n };\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.html_label\", BI.HtmlLabel);/**\r\n * @class BI.IconButton\r\n * @extends BI.BasicButton\r\n * 图标标签\r\n */\r\nBI.IconLabel = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-icon-label horizon-center\",\r\n iconWidth: null,\r\n iconHeight: null\r\n },\r\n\r\n _init: function () {\r\n BI.IconLabel.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n textAlign: \"center\"\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n });\r\n if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) {\r\n this.element.css(\"lineHeight\", o.height + \"px\");\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.icon]\r\n });\r\n } else {\r\n this.element.css(\"lineHeight\", \"1\");\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.center_adapt\",\r\n items: [this.icon]\r\n });\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_label\", BI.IconLabel);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Label = BI.inherit(BI.AbstractLabel, {\r\n\r\n props: {\r\n baseCls: \"bi-label\",\r\n py: \"\",\r\n keyword: \"\"\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.text\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n highLight: o.highLight\r\n };\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.label\", BI.Label);/**\r\n * guy a元素\r\n * @class BI.Link\r\n * @extends BI.Text\r\n */\r\nBI.Link = BI.inherit(BI.Label, {\r\n _defaultConfig: function () {\r\n var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-link display-block\",\r\n tagName: \"a\",\r\n href: \"\",\r\n target: \"_blank\"\r\n });\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.a\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py,\r\n href: o.href,\r\n target: o.target\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.Link.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.link\", BI.Link);/**\r\n * guy\r\n * 气泡提示\r\n * @class BI.Bubble\r\n * @extends BI.Tip\r\n * @type {*|void|Object}\r\n */\r\nBI.Bubble = BI.inherit(BI.Tip, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-bubble\",\r\n direction: \"top\",\r\n text: \"\",\r\n level: \"error\",\r\n height: 18\r\n });\r\n },\r\n _init: function () {\r\n BI.Bubble.superclass._init.apply(this, arguments);\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.bind({click: fn, mousedown: fn, mouseup: fn, mouseover: fn, mouseenter: fn, mouseleave: fn, mousemove: fn});\r\n BI.createWidget({\r\n type: \"bi.left\",\r\n element: this,\r\n items: [this[\"_\" + this.options.direction]()]\r\n });\r\n },\r\n\r\n _createBubbleText: function () {\r\n var o = this.options;\r\n return (this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bubble-text\" + (\" bubble-\" + o.level),\r\n text: o.text,\r\n hgap: 5,\r\n height: 18\r\n }));\r\n },\r\n\r\n _top: function () {\r\n return BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: this._createBubbleText(),\r\n height: 18\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n height: 3\r\n }]\r\n });\r\n },\r\n\r\n _bottom: function () {\r\n return BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n height: 3\r\n }, {\r\n el: this._createBubbleText(),\r\n height: 18\r\n }]\r\n });\r\n },\r\n\r\n _left: function () {\r\n return BI.createWidget({\r\n type: \"bi.right\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n width: 3,\r\n height: 18\r\n }\r\n }, {\r\n el: this._createBubbleText()\r\n }]\r\n });\r\n },\r\n\r\n _right: function () {\r\n return BI.createWidget({\r\n type: \"bi.left\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n width: 3,\r\n height: 18\r\n }\r\n }, {\r\n el: this._createBubbleText()\r\n }]\r\n });\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bubble\", BI.Bubble);/**\r\n * toast提示\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Toast\r\n * @extends BI.Tip\r\n */\r\nBI.Toast = BI.inherit(BI.Tip, {\r\n _const: {\r\n minWidth: 200,\r\n hgap: 10\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Toast.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-toast\",\r\n text: \"\",\r\n level: \"success\" // success或warning\r\n });\r\n },\r\n _init: function () {\r\n BI.Toast.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.element.css({\r\n minWidth: this._const.minWidth + \"px\"\r\n });\r\n this.element.addClass(\"toast-\" + o.level);\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.bind({click: fn, mousedown: fn, mouseup: fn, mouseover: fn, mouseenter: fn, mouseleave: fn, mousemove: fn});\r\n var cls = \"close-font\";\r\n switch(o.level) {\r\n case \"success\":\r\n cls = \"toast-success-font\";\r\n break;\r\n case \"error\":\r\n cls = \"toast-error-font\";\r\n break;\r\n case \"warning\":\r\n cls = \"toast-warning-font\";\r\n break;\r\n case \"normal\":\r\n default:\r\n cls = \"toast-message-font\";\r\n break;\r\n }\r\n\r\n var items = [{\r\n type: \"bi.icon_label\",\r\n cls: cls + \" toast-icon\",\r\n width: 36\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n textHeight: 16,\r\n textAlign: \"left\"\r\n },\r\n rgap: o.autoClose ? this._const.hgap : 0\r\n }];\r\n\r\n var columnSize = [36, \"\"];\r\n\r\n if(o.autoClose === false) {\r\n items.push({\r\n type: \"bi.icon_button\",\r\n cls: \"close-font toast-icon\",\r\n handler: function () {\r\n self.destroy();\r\n },\r\n width: 36\r\n });\r\n columnSize.push(36);\r\n }\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.horizontal_adapt\",\r\n element: this,\r\n items: items,\r\n vgap: 7,\r\n columnSize: columnSize\r\n });\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n },\r\n\r\n beforeDestroy: function () {\r\n this.fireEvent(BI.Toast.EVENT_DESTORY);\r\n }\r\n});\r\nBI.Toast.EVENT_DESTORY = \"EVENT_DESTORY\";\r\nBI.shortcut(\"bi.toast\", BI.Toast);/**\r\n * title提示\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Tooltip\r\n * @extends BI.Tip\r\n */\r\nBI.Tooltip = BI.inherit(BI.Tip, {\r\n _const: {\r\n hgap: 5,\r\n vgap: 3\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-tooltip\",\r\n text: \"\",\r\n level: \"success\", // success或warning\r\n stopEvent: false,\r\n stopPropagation: false\r\n });\r\n },\r\n _init: function () {\r\n BI.Tooltip.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.element.addClass(\"tooltip-\" + o.level);\r\n var fn = function (e) {\r\n o.stopPropagation && e.stopPropagation();\r\n o.stopEvent && e.stopEvent();\r\n };\r\n this.element.bind({\r\n click: fn,\r\n mousedown: fn,\r\n mouseup: fn,\r\n mouseover: fn,\r\n mouseenter: fn,\r\n mouseleave: fn,\r\n mousemove: fn\r\n });\r\n\r\n var texts = (o.text + \"\").split(\"\\n\");\r\n if (texts.length > 1) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n hgap: this._const.hgap,\r\n items: BI.map(texts, function (i, text) {\r\n return {\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: text,\r\n textHeight: 18\r\n };\r\n })\r\n });\r\n } else {\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n textHeight: 18,\r\n hgap: this._const.hgap\r\n });\r\n }\r\n },\r\n\r\n setWidth: function (width) {\r\n this.element.width(width - 2 * this._const.hgap);\r\n },\r\n\r\n setText: function (text) {\r\n this.text && this.text.setText(text);\r\n },\r\n\r\n setLevel: function (level) {\r\n this.element.removeClass(\"tooltip-success\").removeClass(\"tooltip-warning\");\r\n this.element.addClass(\"tooltip-\" + level);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.tooltip\", BI.Tooltip);/**\r\n * 下拉\r\n * @class BI.Trigger\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Trigger = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-trigger cursor-pointer\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Trigger.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setKey: function () {\r\n\r\n },\r\n\r\n getKey: function () {\r\n\r\n }\r\n});/**\r\n *\r\n * 自定义树\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.CustomTree\r\n * @extends BI.Single\r\n */\r\nBI.CustomTree = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-custom-tree\",\r\n expander: {\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CustomTree.superclass._init.apply(this, arguments);\r\n this.initTree(this.options.items);\r\n },\r\n\r\n _formatItems: function (nodes) {\r\n var self = this, o = this.options;\r\n nodes = BI.Tree.transformToTreeFormat(nodes);\r\n\r\n var items = [];\r\n BI.each(nodes, function (i, node) {\r\n if (BI.isNotEmptyArray(node.children) || node.isParent === true) {\r\n var item = BI.extend({\r\n type: \"bi.expander\",\r\n el: {\r\n value: node.value\r\n },\r\n popup: {type: \"bi.custom_tree\"}\r\n }, BI.deepClone(o.expander), {\r\n id: node.id,\r\n pId: node.pId\r\n });\r\n var el = BI.stripEL(node);\r\n if (!BI.isWidget(el)) {\r\n el = BI.clone(el);\r\n delete el.children;\r\n BI.extend(item.el, el);\r\n } else {\r\n item.el = el;\r\n }\r\n item.popup.expander = BI.deepClone(o.expander);\r\n item.items = item.popup.items = node.children;\r\n item.itemsCreator = item.popup.itemsCreator = function (op) {\r\n if (BI.isNotNull(op.node)) {// 从子节点传过来的itemsCreator直接向上传递\r\n return o.itemsCreator.apply(self, arguments);\r\n }\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[0].node = node;\r\n return o.itemsCreator.apply(self, args);\r\n };\r\n BI.isNull(item.popup.el) && (item.popup.el = BI.deepClone(o.el));\r\n items.push(item);\r\n } else {\r\n items.push(node);\r\n }\r\n });\r\n return items;\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget(o.el, {\r\n element: this,\r\n items: this._formatItems(nodes),\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(this, [op, function (items) {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[0] = self._formatItems(items);\r\n callback.apply(null, args);\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.CustomTree.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (nodes) {\r\n this.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n if (arguments.length > 0) {\r\n args[0] = this._formatItems(nodes);\r\n }\r\n this.tree.populate.apply(this.tree, args);\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree && this.tree.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree ? this.tree.getValue() : [];\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.tree ? this.tree.getAllButtons() : [];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree ? this.tree.getAllLeaves() : [];\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree && this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree && this.tree.getNodeByValue(id);\r\n },\r\n\r\n empty: function () {\r\n this.tree.empty();\r\n }\r\n});\r\nBI.CustomTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.custom_tree\", BI.CustomTree);/*\r\n * JQuery zTree core v3.5.18\r\n * http://zTree.me/\r\n *\r\n * Copyright (c) 2010 Hunter.z\r\n *\r\n * Licensed same as jquery - MIT License\r\n * http://www.opensource.org/licenses/mit-license.php\r\n *\r\n * email: hunter.z@263.net\r\n * Date: 2015-06-18\r\n */\r\n(function($){\r\n\tvar settings = {}, roots = {}, caches = {},\r\n\t//default consts of core\r\n\t_consts = {\r\n\t\tclassName: {\r\n\t\t\tBUTTON: \"button\",\r\n\t\t\tLEVEL: \"level\",\r\n\t\t\tICO_LOADING: \"ico_loading\",\r\n\t\t\tSWITCH: \"switch\"\r\n\t\t},\r\n\t\tevent: {\r\n\t\t\tNODECREATED: \"ztree_nodeCreated\",\r\n\t\t\tCLICK: \"ztree_click\",\r\n\t\t\tEXPAND: \"ztree_expand\",\r\n\t\t\tCOLLAPSE: \"ztree_collapse\",\r\n\t\t\tASYNC_SUCCESS: \"ztree_async_success\",\r\n\t\t\tASYNC_ERROR: \"ztree_async_error\",\r\n\t\t\tREMOVE: \"ztree_remove\",\r\n\t\t\tSELECTED: \"ztree_selected\",\r\n\t\t\tUNSELECTED: \"ztree_unselected\"\r\n\t\t},\r\n\t\tid: {\r\n\t\t\tA: \"_a\",\r\n\t\t\tICON: \"_ico\",\r\n\t\t\tSPAN: \"_span\",\r\n\t\t\tSWITCH: \"_switch\",\r\n\t\t\tUL: \"_ul\"\r\n\t\t},\r\n\t\tline: {\r\n\t\t\tROOT: \"root\",\r\n\t\t\tROOTS: \"roots\",\r\n\t\t\tCENTER: \"center\",\r\n\t\t\tBOTTOM: \"bottom\",\r\n\t\t\tNOLINE: \"noline\",\r\n\t\t\tLINE: \"line\"\r\n\t\t},\r\n\t\tfolder: {\r\n\t\t\tOPEN: \"open\",\r\n\t\t\tCLOSE: \"close\",\r\n\t\t\tDOCU: \"docu\"\r\n\t\t},\r\n\t\tnode: {\r\n\t\t\tCURSELECTED: \"curSelectedNode\"\r\n\t\t}\r\n\t},\r\n\t//default setting of core\r\n\t_setting = {\r\n\t\ttreeId: \"\",\r\n\t\ttreeObj: null,\r\n\t\tview: {\r\n\t\t\taddDiyDom: null,\r\n\t\t\tautoCancelSelected: true,\r\n\t\t\tdblClickExpand: true,\r\n\t\t\texpandSpeed: \"fast\",\r\n\t\t\tfontCss: {},\r\n\t\t\tnameIsHTML: false,\r\n\t\t\tselectedMulti: true,\r\n\t\t\tshowIcon: true,\r\n\t\t\tshowLine: true,\r\n\t\t\tshowTitle: true,\r\n\t\t\ttxtSelectedEnable: false\r\n\t\t},\r\n\t\tdata: {\r\n\t\t\tkey: {\r\n\t\t\t\tchildren: \"children\",\r\n\t\t\t\tname: \"name\",\r\n\t\t\t\ttitle: \"\",\r\n\t\t\t\turl: \"url\"\r\n\t\t\t},\r\n\t\t\tsimpleData: {\r\n\t\t\t\tenable: false,\r\n\t\t\t\tidKey: \"id\",\r\n\t\t\t\tpIdKey: \"pId\",\r\n\t\t\t\trootPId: null\r\n\t\t\t},\r\n\t\t\tkeep: {\r\n\t\t\t\tparent: false,\r\n\t\t\t\tleaf: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tasync: {\r\n\t\t\tenable: false,\r\n\t\t\tcontentType: \"application/x-www-form-urlencoded\",\r\n\t\t\ttype: \"post\",\r\n\t\t\tdataType: \"text\",\r\n\t\t\turl: \"\",\r\n\t\t\tautoParam: [],\r\n\t\t\totherParam: [],\r\n\t\t\tdataFilter: null\r\n\t\t},\r\n\t\tcallback: {\r\n\t\t\tbeforeAsync:null,\r\n\t\t\tbeforeClick:null,\r\n\t\t\tbeforeDblClick:null,\r\n\t\t\tbeforeRightClick:null,\r\n\t\t\tbeforeMouseDown:null,\r\n\t\t\tbeforeMouseUp:null,\r\n\t\t\tbeforeExpand:null,\r\n\t\t\tbeforeCollapse:null,\r\n\t\t\tbeforeRemove:null,\r\n\r\n\t\t\tonAsyncError:null,\r\n\t\t\tonAsyncSuccess:null,\r\n\t\t\tonNodeCreated:null,\r\n\t\t\tonClick:null,\r\n\t\t\tonDblClick:null,\r\n\t\t\tonRightClick:null,\r\n\t\t\tonMouseDown:null,\r\n\t\t\tonMouseUp:null,\r\n\t\t\tonExpand:null,\r\n\t\t\tonCollapse:null,\r\n\t\t\tonRemove:null\r\n\t\t}\r\n\t},\r\n\t//default root of core\r\n\t//zTree use root to save full data\r\n\t_initRoot = function (setting) {\r\n\t\tvar r = data.getRoot(setting);\r\n\t\tif (!r) {\r\n\t\t\tr = {};\r\n\t\t\tdata.setRoot(setting, r);\r\n\t\t}\r\n\t\tr[setting.data.key.children] = [];\r\n\t\tr.expandTriggerFlag = false;\r\n\t\tr.curSelectedList = [];\r\n\t\tr.noSelection = true;\r\n\t\tr.createdNodes = [];\r\n\t\tr.zId = 0;\r\n\t\tr._ver = (new Date()).getTime();\r\n\t},\r\n\t//default cache of core\r\n\t_initCache = function(setting) {\r\n\t\tvar c = data.getCache(setting);\r\n\t\tif (!c) {\r\n\t\t\tc = {};\r\n\t\t\tdata.setCache(setting, c);\r\n\t\t}\r\n\t\tc.nodes = [];\r\n\t\tc.doms = [];\r\n\t},\r\n\t//default bindEvent of core\r\n\t_bindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.bind(c.NODECREATED, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onNodeCreated, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {\r\n\t\t\ttools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);\r\n\t\t});\r\n\r\n\t\to.bind(c.EXPAND, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onExpand, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.COLLAPSE, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onCollapse, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {\r\n\t\t\ttools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);\r\n\t\t});\r\n\r\n\t\to.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {\r\n\t\t\ttools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);\r\n\t\t});\r\n\r\n\t\to.bind(c.REMOVE, function (event, treeId, treeNode) {\r\n\t\t\ttools.apply(setting.callback.onRemove, [event, treeId, treeNode]);\r\n\t\t});\r\n\r\n\t\to.bind(c.SELECTED, function (event, srcEvent, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onSelected, [srcEvent, treeId, node]);\r\n\t\t});\r\n\t\to.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]);\r\n\t\t});\r\n\t},\r\n\t_unbindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.unbind(c.NODECREATED)\r\n\t\t.unbind(c.CLICK)\r\n\t\t.unbind(c.EXPAND)\r\n\t\t.unbind(c.COLLAPSE)\r\n\t\t.unbind(c.ASYNC_SUCCESS)\r\n\t\t.unbind(c.ASYNC_ERROR)\r\n\t\t.unbind(c.REMOVE)\r\n\t\t.unbind(c.SELECTED)\r\n\t\t.unbind(c.UNSELECTED);\r\n\t},\r\n\t//default event proxy of core\r\n\t_eventProxy = function(event) {\r\n\t\tvar target = event.target,\r\n\t\tsetting = data.getSetting(event.data.treeId),\r\n\t\ttId = \"\", node = null,\r\n\t\tnodeEventType = \"\", treeEventType = \"\",\r\n\t\tnodeEventCallback = null, treeEventCallback = null,\r\n\t\ttmp = null;\r\n\r\n\t\tif (tools.eqs(event.type, \"mousedown\")) {\r\n\t\t\ttreeEventType = \"mousedown\";\r\n\t\t} else if (tools.eqs(event.type, \"mouseup\")) {\r\n\t\t\ttreeEventType = \"mouseup\";\r\n\t\t} else if (tools.eqs(event.type, \"contextmenu\")) {\r\n\t\t\ttreeEventType = \"contextmenu\";\r\n\t\t} else if (tools.eqs(event.type, \"click\")) {\r\n\t\t\tif (tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.SWITCH) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"switchNode\";\r\n\t\t\t} else {\r\n\t\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\t\tif (tmp) {\r\n\t\t\t\t\ttId = tools.getNodeMainDom(tmp).id;\r\n\t\t\t\t\tnodeEventType = \"clickNode\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(event.type, \"dblclick\")) {\r\n\t\t\ttreeEventType = \"dblclick\";\r\n\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\tif (tmp) {\r\n\t\t\t\ttId = tools.getNodeMainDom(tmp).id;\r\n\t\t\t\tnodeEventType = \"switchNode\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (treeEventType.length > 0 && tId.length == 0) {\r\n\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\tif (tmp) {tId = tools.getNodeMainDom(tmp).id;}\r\n\t\t}\r\n\t\t// event to node\r\n\t\tif (tId.length>0) {\r\n\t\t\tnode = data.getNodeCache(setting, tId);\r\n\t\t\tswitch (nodeEventType) {\r\n\t\t\t\tcase \"switchNode\" :\r\n\t\t\t\t\tif (!node.isParent) {\r\n\t\t\t\t\t\tnodeEventType = \"\";\r\n\t\t\t\t\t} else if (tools.eqs(event.type, \"click\")\r\n\t\t\t\t\t\t|| (tools.eqs(event.type, \"dblclick\") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {\r\n\t\t\t\t\t\tnodeEventCallback = handler.onSwitchNode;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnodeEventType = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"clickNode\" :\r\n\t\t\t\t\tnodeEventCallback = handler.onClickNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// event to zTree\r\n\t\tswitch (treeEventType) {\r\n\t\t\tcase \"mousedown\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeMousedown;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"mouseup\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeMouseup;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"dblclick\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeDblclick;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"contextmenu\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeContextmenu;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tvar proxyResult = {\r\n\t\t\tstop: false,\r\n\t\t\tnode: node,\r\n\t\t\tnodeEventType: nodeEventType,\r\n\t\t\tnodeEventCallback: nodeEventCallback,\r\n\t\t\ttreeEventType: treeEventType,\r\n\t\t\ttreeEventCallback: treeEventCallback\r\n\t\t};\r\n\t\treturn proxyResult\r\n\t},\r\n\t//default init node of core\r\n\t_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {\r\n\t\tif (!n) return;\r\n\t\tvar r = data.getRoot(setting),\r\n\t\tchildKey = setting.data.key.children;\r\n\t\tn.level = level;\r\n\t\tn.tId = setting.treeId + \"_\" + (++r.zId);\r\n\t\tn.parentTId = parentNode ? parentNode.tId : null;\r\n\t\tn.open = (typeof n.open == \"string\") ? tools.eqs(n.open, \"true\") : !!n.open;\r\n\t\tif (n[childKey] && n[childKey].length > 0) {\r\n\t\t\tn.isParent = true;\r\n\t\t\tn.zAsync = true;\r\n\t\t} else {\r\n\t\t\tn.isParent = (typeof n.isParent == \"string\") ? tools.eqs(n.isParent, \"true\") : !!n.isParent;\r\n\t\t\tn.open = (n.isParent && !setting.async.enable) ? n.open : false;\r\n\t\t\tn.zAsync = !n.isParent;\r\n\t\t}\r\n\t\tn.isFirstNode = isFirstNode;\r\n\t\tn.isLastNode = isLastNode;\r\n\t\tn.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};\r\n\t\tn.getPreNode = function() {return data.getPreNode(setting, n);};\r\n\t\tn.getNextNode = function() {return data.getNextNode(setting, n);};\r\n\t\tn.isAjaxing = false;\r\n\t\tdata.fixPIdKeyValue(setting, n);\r\n\t},\r\n\t_init = {\r\n\t\tbind: [_bindEvent],\r\n\t\tunbind: [_unbindEvent],\r\n\t\tcaches: [_initCache],\r\n\t\tnodes: [_initNode],\r\n\t\tproxys: [_eventProxy],\r\n\t\troots: [_initRoot],\r\n\t\tbeforeA: [],\r\n\t\tafterA: [],\r\n\t\tinnerBeforeA: [],\r\n\t\tinnerAfterA: [],\r\n\t\tzTreeTools: []\r\n\t},\r\n\t//method of operate data\r\n\tdata = {\r\n\t\taddNodeCache: function(setting, node) {\r\n\t\t\tdata.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;\r\n\t\t},\r\n\t\tgetNodeCacheId: function(tId) {\r\n\t\t\treturn tId.substring(tId.lastIndexOf(\"_\")+1);\r\n\t\t},\r\n\t\taddAfterA: function(afterA) {\r\n\t\t\t_init.afterA.push(afterA);\r\n\t\t},\r\n\t\taddBeforeA: function(beforeA) {\r\n\t\t\t_init.beforeA.push(beforeA);\r\n\t\t},\r\n\t\taddInnerAfterA: function(innerAfterA) {\r\n\t\t\t_init.innerAfterA.push(innerAfterA);\r\n\t\t},\r\n\t\taddInnerBeforeA: function(innerBeforeA) {\r\n\t\t\t_init.innerBeforeA.push(innerBeforeA);\r\n\t\t},\r\n\t\taddInitBind: function(bindEvent) {\r\n\t\t\t_init.bind.push(bindEvent);\r\n\t\t},\r\n\t\taddInitUnBind: function(unbindEvent) {\r\n\t\t\t_init.unbind.push(unbindEvent);\r\n\t\t},\r\n\t\taddInitCache: function(initCache) {\r\n\t\t\t_init.caches.push(initCache);\r\n\t\t},\r\n\t\taddInitNode: function(initNode) {\r\n\t\t\t_init.nodes.push(initNode);\r\n\t\t},\r\n\t\taddInitProxy: function(initProxy, isFirst) {\r\n\t\t\tif (!!isFirst) {\r\n\t\t\t\t_init.proxys.splice(0,0,initProxy);\r\n\t\t\t} else {\r\n\t\t\t\t_init.proxys.push(initProxy);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddInitRoot: function(initRoot) {\r\n\t\t\t_init.roots.push(initRoot);\r\n\t\t},\r\n\t\taddNodesData: function(setting, parentNode, nodes) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (!parentNode[childKey]) parentNode[childKey] = [];\r\n\t\t\tif (parentNode[childKey].length > 0) {\r\n\t\t\t\tparentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;\r\n\t\t\t\tview.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);\r\n\t\t\t}\r\n\t\t\tparentNode.isParent = true;\r\n\t\t\tparentNode[childKey] = parentNode[childKey].concat(nodes);\r\n\t\t},\r\n\t\taddSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tif (!data.isSelectedNode(setting, node)) {\r\n\t\t\t\troot.curSelectedList.push(node);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddCreatedNode: function(setting, node) {\r\n\t\t\tif (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {\r\n\t\t\t\tvar root = data.getRoot(setting);\r\n\t\t\t\troot.createdNodes.push(node);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddZTreeTools: function(zTreeTools) {\r\n\t\t\t_init.zTreeTools.push(zTreeTools);\r\n\t\t},\r\n\t\texSetting: function(s) {\r\n\t\t\t$.extend(true, _setting, s);\r\n\t\t},\r\n\t\tfixPIdKeyValue: function(setting, node) {\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\tnode[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetAfterA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.afterA.length; i<j; i++) {\r\n\t\t\t\t_init.afterA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetBeforeA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.beforeA.length; i<j; i++) {\r\n\t\t\t\t_init.beforeA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetInnerAfterA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.innerAfterA.length; i<j; i++) {\r\n\t\t\t\t_init.innerAfterA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetInnerBeforeA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.innerBeforeA.length; i<j; i++) {\r\n\t\t\t\t_init.innerBeforeA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetCache: function(setting) {\r\n\t\t\treturn caches[setting.treeId];\r\n\t\t},\r\n\t\tgetNextNode: function(setting, node) {\r\n\t\t\tif (!node) return null;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tp = node.parentTId ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\tfor (var i=0, l=p[childKey].length-1; i<=l; i++) {\r\n\t\t\t\tif (p[childKey][i] === node) {\r\n\t\t\t\t\treturn (i==l ? null : p[childKey][i+1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeByParam: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return null;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i][key] == value) {\r\n\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t}\r\n\t\t\t\tvar tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);\r\n\t\t\t\tif (tmp) return tmp;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeCache: function(setting, tId) {\r\n\t\t\tif (!tId) return null;\r\n\t\t\tvar n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)];\r\n\t\t\treturn n ? n : null;\r\n\t\t},\r\n\t\tgetNodeName: function(setting, node) {\r\n\t\t\tvar nameKey = setting.data.key.name;\r\n\t\t\treturn \"\" + node[nameKey];\r\n\t\t},\r\n\t\tgetNodeTitle: function(setting, node) {\r\n\t\t\tvar t = setting.data.key.title === \"\" ? setting.data.key.name : setting.data.key.title;\r\n\t\t\treturn \"\" + node[t];\r\n\t\t},\r\n\t\tgetNodes: function(setting) {\r\n\t\t\treturn data.getRoot(setting)[setting.data.key.children];\r\n\t\t},\r\n\t\tgetNodesByParam: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = [];\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i][key] == value) {\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tresult = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetNodesByParamFuzzy: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = [];\r\n\t\t\tvalue = value.toLowerCase();\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (typeof nodes[i][key] == \"string\" && nodes[i][key].toLowerCase().indexOf(value)>-1) {\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tresult = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {\r\n\t\t\tif (!nodes) return (isSingle ? null : []);\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = isSingle ? null : [];\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (tools.apply(filter, [nodes[i], invokeParam], false)) {\r\n\t\t\t\t\tif (isSingle) {return nodes[i];}\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tvar tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);\r\n\t\t\t\tif (isSingle && !!tmpResult) {return tmpResult;}\r\n\t\t\t\tresult = isSingle ? tmpResult : result.concat(tmpResult);\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetPreNode: function(setting, node) {\r\n\t\t\tif (!node) return null;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tp = node.parentTId ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\tfor (var i=0, l=p[childKey].length; i<l; i++) {\r\n\t\t\t\tif (p[childKey][i] === node) {\r\n\t\t\t\t\treturn (i==0 ? null : p[childKey][i-1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetRoot: function(setting) {\r\n\t\t\treturn setting ? roots[setting.treeId] : null;\r\n\t\t},\r\n\t\tgetRoots: function() {\r\n\t\t\treturn roots;\r\n\t\t},\r\n\t\tgetSetting: function(treeId) {\r\n\t\t\treturn settings[treeId];\r\n\t\t},\r\n\t\tgetSettings: function() {\r\n\t\t\treturn settings;\r\n\t\t},\r\n\t\tgetZTreeTools: function(treeId) {\r\n\t\t\tvar r = this.getRoot(this.getSetting(treeId));\r\n\t\t\treturn r ? r.treeTools : null;\r\n\t\t},\r\n\t\tinitCache: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.caches.length; i<j; i++) {\r\n\t\t\t\t_init.caches[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitNode: function(setting, level, node, parentNode, preNode, nextNode) {\r\n\t\t\tfor (var i=0, j=_init.nodes.length; i<j; i++) {\r\n\t\t\t\t_init.nodes[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitRoot: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.roots.length; i<j; i++) {\r\n\t\t\t\t_init.roots[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tisSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tfor (var i=0, j=root.curSelectedList.length; i<j; i++) {\r\n\t\t\t\tif(node === root.curSelectedList[i]) return true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\tremoveNodeCache: function(setting, node) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i=0, l=node[childKey].length; i<l; i++) {\r\n\t\t\t\t\targuments.callee(setting, node[childKey][i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdata.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null;\r\n\t\t},\r\n\t\tremoveSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tfor (var i=0, j=root.curSelectedList.length; i<j; i++) {\r\n\t\t\t\tif(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {\r\n\t\t\t\t\troot.curSelectedList.splice(i, 1);\r\n\t\t\t\t\ti--;j--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetCache: function(setting, cache) {\r\n\t\t\tcaches[setting.treeId] = cache;\r\n\t\t},\r\n\t\tsetRoot: function(setting, root) {\r\n\t\t\troots[setting.treeId] = root;\r\n\t\t},\r\n\t\tsetZTreeTools: function(setting, zTreeTools) {\r\n\t\t\tfor (var i=0, j=_init.zTreeTools.length; i<j; i++) {\r\n\t\t\t\t_init.zTreeTools[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\ttransformToArrayFormat: function (setting, nodes) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tr = [];\r\n\t\t\tif (tools.isArray(nodes)) {\r\n\t\t\t\tfor (var i=0, l=nodes.length; i<l; i++) {\r\n\t\t\t\t\tr.push(nodes[i]);\r\n\t\t\t\t\tif (nodes[i][childKey])\r\n\t\t\t\t\t\tr = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr.push(nodes);\r\n\t\t\t\tif (nodes[childKey])\r\n\t\t\t\t\tr = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));\r\n\t\t\t}\r\n\t\t\treturn r;\r\n\t\t},\r\n\t\ttransformTozTreeFormat: function(setting, sNodes) {\r\n\t\t\tvar i,l,\r\n\t\t\tkey = setting.data.simpleData.idKey,\r\n\t\t\tparentKey = setting.data.simpleData.pIdKey,\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tif (!key || key==\"\" || !sNodes) return [];\r\n\r\n\t\t\tif (tools.isArray(sNodes)) {\r\n\t\t\t\tvar r = [];\r\n\t\t\t\tvar tmpMap = {};\r\n\t\t\t\tfor (i=0, l=sNodes.length; i<l; i++) {\r\n\t\t\t\t\ttmpMap[sNodes[i][key]] = sNodes[i];\r\n\t\t\t\t}\r\n\t\t\t\tfor (i=0, l=sNodes.length; i<l; i++) {\r\n\t\t\t\t\tif (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {\r\n\t\t\t\t\t\tif (!tmpMap[sNodes[i][parentKey]][childKey])\r\n\t\t\t\t\t\t\ttmpMap[sNodes[i][parentKey]][childKey] = [];\r\n\t\t\t\t\t\ttmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tr.push(sNodes[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn r;\r\n\t\t\t}else {\r\n\t\t\t\treturn [sNodes];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t//method of event proxy\r\n\tevent = {\r\n\t\tbindEvent: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.bind.length; i<j; i++) {\r\n\t\t\t\t_init.bind[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tunbindEvent: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.unbind.length; i<j; i++) {\r\n\t\t\t\t_init.unbind[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tbindTree: function(setting) {\r\n\t\t\tvar eventParam = {\r\n\t\t\t\ttreeId: setting.treeId\r\n\t\t\t},\r\n\t\t\to = setting.treeObj;\r\n\t\t\tif (!setting.view.txtSelectedEnable) {\r\n\t\t\t\t// for can't select text\r\n\t\t\t\to.bind('selectstart', function(e){\r\n\t\t\t\t\tvar node\r\n\t\t\t\t\tvar n = e.originalEvent.srcElement.nodeName.toLowerCase();\r\n\t\t\t\t\treturn (n === \"input\" || n === \"textarea\" );\r\n\t\t\t\t}).css({\r\n\t\t\t\t\t\"-moz-user-select\":\"-moz-none\"\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\to.bind('click', eventParam, event.proxy);\r\n\t\t\to.bind('dblclick', eventParam, event.proxy);\r\n\t\t\to.bind('mouseover', eventParam, event.proxy);\r\n\t\t\to.bind('mouseout', eventParam, event.proxy);\r\n\t\t\to.bind('mousedown', eventParam, event.proxy);\r\n\t\t\to.bind('mouseup', eventParam, event.proxy);\r\n\t\t\to.bind('contextmenu', eventParam, event.proxy);\r\n\t\t},\r\n\t\tunbindTree: function(setting) {\r\n\t\t\tvar o = setting.treeObj;\r\n\t\t\to.unbind('click', event.proxy)\r\n\t\t\t.unbind('dblclick', event.proxy)\r\n\t\t\t.unbind('mouseover', event.proxy)\r\n\t\t\t.unbind('mouseout', event.proxy)\r\n\t\t\t.unbind('mousedown', event.proxy)\r\n\t\t\t.unbind('mouseup', event.proxy)\r\n\t\t\t.unbind('contextmenu', event.proxy);\r\n\t\t},\r\n\t\tdoProxy: function(e) {\r\n\t\t\tvar results = [];\r\n\t\t\tfor (var i=0, j=_init.proxys.length; i<j; i++) {\r\n\t\t\t\tvar proxyResult = _init.proxys[i].apply(this, arguments);\r\n\t\t\t\tresults.push(proxyResult);\r\n\t\t\t\tif (proxyResult.stop) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tproxy: function(e) {\r\n\t\t\tvar setting = data.getSetting(e.data.treeId);\r\n\t\t\tif (!tools.uCanDo(setting, e)) return true;\r\n\t\t\tvar results = event.doProxy(e),\r\n\t\t\tr = true, x = false;\r\n\t\t\tfor (var i=0, l=results.length; i<l; i++) {\r\n\t\t\t\tvar proxyResult = results[i];\r\n\t\t\t\tif (proxyResult.nodeEventCallback) {\r\n\t\t\t\t\tx = true;\r\n\t\t\t\t\tr = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;\r\n\t\t\t\t}\r\n\t\t\t\tif (proxyResult.treeEventCallback) {\r\n\t\t\t\t\tx = true;\r\n\t\t\t\t\tr = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn r;\r\n\t\t}\r\n\t},\r\n\t//method of event handler\r\n\thandler = {\r\n\t\tonSwitchNode: function (event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (node.open) {\r\n\t\t\t\tif (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;\r\n\t\t\t\tdata.getRoot(setting).expandTriggerFlag = true;\r\n\t\t\t\tview.switchNode(setting, node);\r\n\t\t\t} else {\r\n\t\t\t\tif (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;\r\n\t\t\t\tdata.getRoot(setting).expandTriggerFlag = true;\r\n\t\t\t\tview.switchNode(setting, node);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonClickNode: function (event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tclickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1;\r\n\t\t\tif (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;\r\n\t\t\tif (clickFlag === 0) {\r\n\t\t\t\tview.cancelPreSelectedNode(setting, node);\r\n\t\t\t} else {\r\n\t\t\t\tview.selectNode(setting, node, clickFlag === 2);\r\n\t\t\t}\r\n\t\t\tsetting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeMousedown: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeMouseup: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeDblclick: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeContextmenu: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn (typeof setting.callback.onRightClick) != \"function\";\r\n\t\t}\r\n\t},\r\n\t//method of tools for zTree\r\n\ttools = {\r\n\t\tapply: function(fun, param, defaultValue) {\r\n\t\t\tif ((typeof fun) == \"function\") {\r\n\t\t\t\treturn fun.apply(zt, param?param:[]);\r\n\t\t\t}\r\n\t\t\treturn defaultValue;\r\n\t\t},\r\n\t\tcanAsync: function(setting, node) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\treturn (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));\r\n\t\t},\r\n\t\tclone: function (obj){\r\n\t\t\tif (obj === null) return null;\r\n\t\t\tvar o = tools.isArray(obj) ? [] : {};\r\n\t\t\tfor(var i in obj){\r\n\t\t\t\to[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === \"object\" ? arguments.callee(obj[i]) : obj[i]);\r\n\t\t\t}\r\n\t\t\treturn o;\r\n\t\t},\r\n\t\teqs: function(str1, str2) {\r\n\t\t\treturn str1.toLowerCase() === str2.toLowerCase();\r\n\t\t},\r\n\t\tisArray: function(arr) {\r\n\t\t\treturn Object.prototype.toString.apply(arr) === \"[object Array]\";\r\n\t\t},\r\n\t\t$: function(node, exp, setting) {\r\n\t\t\tif (!!exp && typeof exp != \"string\") {\r\n\t\t\t\tsetting = exp;\r\n\t\t\t\texp = \"\";\r\n\t\t\t}\r\n\t\t\tif (typeof node == \"string\") {\r\n\t\t\t\treturn $(node, setting ? setting.treeObj.get(0).ownerDocument : null);\r\n\t\t\t} else {\r\n\t\t\t\treturn $(\"#\" + node.tId + exp, setting ? setting.treeObj : null);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetMDom: function (setting, curDom, targetExpr) {\r\n\t\t\tif (!curDom) return null;\r\n\t\t\twhile (curDom && curDom.id !== setting.treeId) {\r\n\t\t\t\tfor (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {\r\n\t\t\t\t\tif (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {\r\n\t\t\t\t\t\treturn curDom;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcurDom = curDom.parentNode;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeMainDom:function(target) {\r\n\t\t\treturn ($(target).parent(\"li\").get(0) || $(target).parentsUntil(\"li\").parent().get(0));\r\n\t\t},\r\n\t\tisChildOrSelf: function(dom, parentId) {\r\n\t\t\treturn ( $(dom).closest(\"#\" + parentId).length> 0 );\r\n\t\t},\r\n\t\tuCanDo: function(setting, e) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\t//method of operate ztree dom\r\n\tview = {\r\n\t\taddNodes: function(setting, parentNode, newNodes, isSilent) {\r\n\t\t\tif (setting.data.keep.leaf && parentNode && !parentNode.isParent) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!tools.isArray(newNodes)) {\r\n\t\t\t\tnewNodes = [newNodes];\r\n\t\t\t}\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\tnewNodes = data.transformTozTreeFormat(setting, newNodes);\r\n\t\t\t}\r\n\t\t\tif (parentNode) {\r\n\t\t\t\tvar target_switchObj = $$(parentNode, consts.id.SWITCH, setting),\r\n\t\t\t\ttarget_icoObj = $$(parentNode, consts.id.ICON, setting),\r\n\t\t\t\ttarget_ulObj = $$(parentNode, consts.id.UL, setting);\r\n\r\n\t\t\t\tif (!parentNode.open) {\r\n\t\t\t\t\tview.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);\r\n\t\t\t\t\tview.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);\r\n\t\t\t\t\tparentNode.open = false;\r\n\t\t\t\t\ttarget_ulObj.css({\r\n\t\t\t\t\t\t\"display\": \"none\"\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdata.addNodesData(setting, parentNode, newNodes);\r\n\t\t\t\tview.createNodes(setting, parentNode.level + 1, newNodes, parentNode);\r\n\t\t\t\tif (!isSilent) {\r\n\t\t\t\t\tview.expandCollapseParentNode(setting, parentNode, true);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdata.addNodesData(setting, data.getRoot(setting), newNodes);\r\n\t\t\t\tview.createNodes(setting, 0, newNodes, null);\r\n\t\t\t}\r\n\t\t},\r\n\t\tappendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar html = [],\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tvar node = nodes[i];\r\n\t\t\t\tif (initFlag) {\r\n\t\t\t\t\tvar tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),\r\n\t\t\t\t\ttmpPChild = tmpPNode[childKey],\r\n\t\t\t\t\tisFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),\r\n\t\t\t\t\tisLastNode = (i == (nodes.length - 1));\r\n\t\t\t\t\tdata.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);\r\n\t\t\t\t\tdata.addNodeCache(setting, node);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar childHtml = [];\r\n\t\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\t\t//make child html first, because checkType\r\n\t\t\t\t\tchildHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);\r\n\t\t\t\t}\r\n\t\t\t\tif (openFlag) {\r\n\r\n\t\t\t\t\tview.makeDOMNodeMainBefore(html, setting, node);\r\n\t\t\t\t\tview.makeDOMNodeLine(html, setting, node);\r\n\t\t\t\t\tdata.getBeforeA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeNameBefore(html, setting, node);\r\n\t\t\t\t\tdata.getInnerBeforeA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeIcon(html, setting, node);\r\n\t\t\t\t\tdata.getInnerAfterA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeNameAfter(html, setting, node);\r\n\t\t\t\t\tdata.getAfterA(setting, node, html);\r\n\t\t\t\t\tif (node.isParent && node.open) {\r\n\t\t\t\t\t\tview.makeUlHtml(setting, node, html, childHtml.join(''));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.makeDOMNodeMainAfter(html, setting, node);\r\n\t\t\t\t\tdata.addCreatedNode(setting, node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tappendParentULDom: function(setting, node) {\r\n\t\t\tvar html = [],\r\n\t\t\tnObj = $$(node, setting);\r\n\t\t\tif (!nObj.get(0) && !!node.parentTId) {\r\n\t\t\t\tview.appendParentULDom(setting, node.getParentNode());\r\n\t\t\t\tnObj = $$(node, setting);\r\n\t\t\t}\r\n\t\t\tvar ulObj = $$(node, consts.id.UL, setting);\r\n\t\t\tif (ulObj.get(0)) {\r\n\t\t\t\tulObj.remove();\r\n\t\t\t}\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tchildHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);\r\n\t\t\tview.makeUlHtml(setting, node, html, childHtml.join(''));\r\n\t\t\tnObj.append(html.join(''));\r\n\t\t},\r\n\t\tasyncNode: function(setting, node, isSilent, callback) {\r\n\t\t\tvar i, l;\r\n\t\t\tif (node && !node.isParent) {\r\n\t\t\t\ttools.apply(callback);\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (node && node.isAjaxing) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {\r\n\t\t\t\ttools.apply(callback);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (node) {\r\n\t\t\t\tnode.isAjaxing = true;\r\n\t\t\t\tvar icoObj = $$(node, consts.id.ICON, setting);\r\n\t\t\t\ticoObj.attr({\"style\":\"\", \"class\":consts.className.BUTTON + \" \" + consts.className.ICO_LOADING});\r\n\t\t\t}\r\n\r\n\t\t\tvar tmpParam = {};\r\n\t\t\tfor (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {\r\n\t\t\t\tvar pKey = setting.async.autoParam[i].split(\"=\"), spKey = pKey;\r\n\t\t\t\tif (pKey.length>1) {\r\n\t\t\t\t\tspKey = pKey[1];\r\n\t\t\t\t\tpKey = pKey[0];\r\n\t\t\t\t}\r\n\t\t\t\ttmpParam[spKey] = node[pKey];\r\n\t\t\t}\r\n\t\t\tif (tools.isArray(setting.async.otherParam)) {\r\n\t\t\t\tfor (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {\r\n\t\t\t\t\ttmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (var p in setting.async.otherParam) {\r\n\t\t\t\t\ttmpParam[p] = setting.async.otherParam[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar _tmpV = data.getRoot(setting)._ver;\r\n\t\t\t$.ajax({\r\n\t\t\t\tcontentType: setting.async.contentType,\r\n cache: false,\r\n\t\t\t\ttype: setting.async.type,\r\n\t\t\t\turl: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),\r\n\t\t\t\tdata: tmpParam,\r\n\t\t\t\tdataType: setting.async.dataType,\r\n\t\t\t\tsuccess: function(msg) {\r\n\t\t\t\t\tif (_tmpV != data.getRoot(setting)._ver) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar newNodes = [];\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (!msg || msg.length == 0) {\r\n\t\t\t\t\t\t\tnewNodes = [];\r\n\t\t\t\t\t\t} else if (typeof msg == \"string\") {\r\n\t\t\t\t\t\t\tnewNodes = eval(\"(\" + msg + \")\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnewNodes = msg;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch(err) {\r\n\t\t\t\t\t\tnewNodes = msg;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (node) {\r\n\t\t\t\t\t\tnode.isAjaxing = null;\r\n\t\t\t\t\t\tnode.zAsync = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\tif (newNodes && newNodes !== \"\") {\r\n\t\t\t\t\t\tnewNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);\r\n\t\t\t\t\t\tview.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tview.addNodes(setting, node, [], !!isSilent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);\r\n\t\t\t\t\ttools.apply(callback);\r\n\t\t\t\t},\r\n\t\t\t\terror: function(XMLHttpRequest, textStatus, errorThrown) {\r\n\t\t\t\t\tif (_tmpV != data.getRoot(setting)._ver) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (node) node.isAjaxing = null;\r\n\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tcancelPreSelectedNode: function (setting, node, excludeNode) {\r\n\t\t\tvar list = data.getRoot(setting).curSelectedList,\r\n\t\t\t\ti, n;\r\n\t\t\tfor (i=list.length-1; i>=0; i--) {\r\n\t\t\t\tn = list[i];\r\n\t\t\t\tif (node === n || (!node && (!excludeNode || excludeNode !== n))) {\r\n\t\t\t\t\t$$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED);\r\n\t\t\t\t\tif (node) {\r\n\t\t\t\t\t\tdata.removeSelectedNode(setting, node);\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlist.splice(i, 1);\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreateNodeCallback: function(setting) {\r\n\t\t\tif (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {\r\n\t\t\t\tvar root = data.getRoot(setting);\r\n\t\t\t\twhile (root.createdNodes.length>0) {\r\n\t\t\t\t\tvar node = root.createdNodes.shift();\r\n\t\t\t\t\ttools.apply(setting.view.addDiyDom, [setting.treeId, node]);\r\n\t\t\t\t\tif (!!setting.callback.onNodeCreated) {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreateNodes: function(setting, level, nodes, parentNode) {\r\n\t\t\tif (!nodes || nodes.length == 0) return;\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\topenFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0);\r\n\t\t\troot.createdNodes = [];\r\n\t\t\tvar zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);\r\n\t\t\tif (!parentNode) {\r\n\t\t\t\tsetting.treeObj.append(zTreeHtml.join(''));\r\n\t\t\t} else {\r\n\t\t\t\tvar ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\tif (ulObj.get(0)) {\r\n\t\t\t\t\tulObj.append(zTreeHtml.join(''));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tview.createNodeCallback(setting);\r\n\t\t},\r\n\t\tdestroy: function(setting) {\r\n\t\t\tif (!setting) return;\r\n\t\t\tdata.initCache(setting);\r\n\t\t\tdata.initRoot(setting);\r\n\t\t\tevent.unbindTree(setting);\r\n\t\t\tevent.unbindEvent(setting);\r\n\t\t\tsetting.treeObj.empty();\r\n\t\t\tdelete settings[setting.treeId];\r\n\t\t},\r\n\t\texpandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tif (!node) {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (root.expandTriggerFlag) {\r\n\t\t\t\tvar _callback = callback;\r\n\t\t\t\tcallback = function(){\r\n\t\t\t\t\tif (_callback) _callback();\r\n\t\t\t\t\tif (node.open) {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\troot.expandTriggerFlag = false;\r\n\t\t\t}\r\n\t\t\tif (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) {\r\n\t\t\t\tview.appendParentULDom(setting, node);\r\n\t\t\t\tview.createNodeCallback(setting);\r\n\t\t\t}\r\n\t\t\tif (node.open == expandFlag) {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar ulObj = $$(node, consts.id.UL, setting),\r\n\t\t\tswitchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\ticoObj = $$(node, consts.id.ICON, setting);\r\n\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tnode.open = !node.open;\r\n\t\t\t\tif (node.iconOpen && node.iconClose) {\r\n\t\t\t\t\ticoObj.attr(\"style\", view.makeNodeIcoStyle(setting, node));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (node.open) {\r\n\t\t\t\t\tview.replaceSwitchClass(node, switchObj, consts.folder.OPEN);\r\n\t\t\t\t\tview.replaceIcoClass(node, icoObj, consts.folder.OPEN);\r\n\t\t\t\t\tif (animateFlag == false || setting.view.expandSpeed == \"\") {\r\n\t\t\t\t\t\tulObj.show();\r\n\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\t\t\t\tulObj.slideDown(setting.view.expandSpeed, callback);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tulObj.show();\r\n\t\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tview.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);\r\n\t\t\t\t\tview.replaceIcoClass(node, icoObj, consts.folder.CLOSE);\r\n\t\t\t\t\tif (animateFlag == false || setting.view.expandSpeed == \"\" || !(node[childKey] && node[childKey].length > 0)) {\r\n\t\t\t\t\t\tulObj.hide();\r\n\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tulObj.slideUp(setting.view.expandSpeed, callback);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t}\r\n\t\t},\r\n\t\texpandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tif (!node) return;\r\n\t\t\tif (!node.parentTId) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag);\r\n\t\t\t}\r\n\t\t\tif (node.parentTId) {\r\n\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);\r\n\t\t\t}\r\n\t\t},\r\n\t\texpandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\ttreeNodes = (node) ? node[childKey]: root[childKey],\r\n\t\t\tselfAnimateSign = (node) ? false : animateFlag,\r\n\t\t\texpandTriggerFlag = data.getRoot(setting).expandTriggerFlag;\r\n\t\t\tdata.getRoot(setting).expandTriggerFlag = false;\r\n\t\t\tif (treeNodes) {\r\n\t\t\t\tfor (var i = 0, l = treeNodes.length; i < l; i++) {\r\n\t\t\t\t\tif (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdata.getRoot(setting).expandTriggerFlag = expandTriggerFlag;\r\n\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );\r\n\t\t},\r\n\t\tisSelectedNode: function (setting, node) {\r\n\t\t\tif (!node) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar list = data.getRoot(setting).curSelectedList,\r\n\t\t\t\ti;\r\n\t\t\tfor (i=list.length-1; i>=0; i--) {\r\n\t\t\t\tif (node === list[i]) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\tmakeDOMNodeIcon: function(html, setting, node) {\r\n\t\t\tvar nameStr = data.getNodeName(setting, node),\r\n\t\t\tname = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');\r\n\t\t\thtml.push(\"<span id='\", node.tId, consts.id.ICON,\r\n\t\t\t\t\"' title='' treeNode\", consts.id.ICON,\" class='\", view.makeNodeIcoClass(setting, node),\r\n\t\t\t\t\"' style='\", view.makeNodeIcoStyle(setting, node), \"'></span><span id='\", node.tId, consts.id.SPAN,\r\n\t\t\t\t\"'>\",name,\"</span>\");\r\n\t\t},\r\n\t\tmakeDOMNodeLine: function(html, setting, node) {\r\n\t\t\thtml.push(\"<span id='\", node.tId, consts.id.SWITCH,\t\"' title='' class='\", view.makeNodeLineClass(setting, node), \"' treeNode\", consts.id.SWITCH,\"></span>\");\r\n\t\t},\r\n\t\tmakeDOMNodeMainAfter: function(html, setting, node) {\r\n\t\t\thtml.push(\"</li>\");\r\n\t\t},\r\n\t\tmakeDOMNodeMainBefore: function(html, setting, node) {\r\n\t\t\thtml.push(\"<li id='\", node.tId, \"' class='\", consts.className.LEVEL, node.level,\"' tabindex='0' hidefocus='true' treenode>\");\r\n\t\t},\r\n\t\tmakeDOMNodeNameAfter: function(html, setting, node) {\r\n\t\t\thtml.push(\"</a>\");\r\n\t\t},\r\n\t\tmakeDOMNodeNameBefore: function(html, setting, node) {\r\n\t\t\tvar title = data.getNodeTitle(setting, node),\r\n\t\t\turl = view.makeNodeUrl(setting, node),\r\n\t\t\tfontcss = view.makeNodeFontCss(setting, node),\r\n\t\t\tfontStyle = [];\r\n\t\t\tfor (var f in fontcss) {\r\n\t\t\t\tfontStyle.push(f, \":\", fontcss[f], \";\");\r\n\t\t\t}\r\n\t\t\thtml.push(\"<a id='\", node.tId, consts.id.A, \"' class='\", consts.className.LEVEL, node.level,\"' treeNode\", consts.id.A,\" onclick=\\\"\", (node.click || ''),\r\n\t\t\t\t\"\\\" \", ((url != null && url.length > 0) ? \"href='\" + url + \"'\" : \"\"), \" target='\",view.makeNodeTarget(node),\"' style='\", fontStyle.join(''),\r\n\t\t\t\t\"'\");\r\n\t\t\tif (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push(\"title='\", title.replace(/'/g,\"&#39;\").replace(/</g,'&lt;').replace(/>/g,'&gt;'),\"'\");}\r\n\t\t\thtml.push(\">\");\r\n\t\t},\r\n\t\tmakeNodeFontCss: function(setting, node) {\r\n\t\t\tvar fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);\r\n\t\t\treturn (fontCss && ((typeof fontCss) != \"function\")) ? fontCss : {};\r\n\t\t},\r\n\t\tmakeNodeIcoClass: function(setting, node) {\r\n\t\t\tvar icoCss = [\"ico\"];\r\n\t\t\tif (!node.isAjaxing) {\r\n\t\t\t\ticoCss[0] = (node.iconSkin ? node.iconSkin + \"_\" : \"\") + icoCss[0];\r\n\t\t\t\tif (node.isParent) {\r\n\t\t\t\t\ticoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ticoCss.push(consts.folder.DOCU);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn consts.className.BUTTON + \" \" + icoCss.join('_');\r\n\t\t},\r\n\t\tmakeNodeIcoStyle: function(setting, node) {\r\n\t\t\tvar icoStyle = [];\r\n\t\t\tif (!node.isAjaxing) {\r\n\t\t\t\tvar icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;\r\n\t\t\t\tif (icon) icoStyle.push(\"background:url(\", icon, \") 0 0 no-repeat;\");\r\n\t\t\t\tif (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {\r\n\t\t\t\t\ticoStyle.push(\"width:0px;height:0px;\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn icoStyle.join('');\r\n\t\t},\r\n\t\tmakeNodeLineClass: function(setting, node) {\r\n\t\t\tvar lineClass = [];\r\n\t\t\tif (setting.view.showLine) {\r\n\t\t\t\tif (node.level == 0 && node.isFirstNode && node.isLastNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.ROOT);\r\n\t\t\t\t} else if (node.level == 0 && node.isFirstNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.ROOTS);\r\n\t\t\t\t} else if (node.isLastNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.BOTTOM);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlineClass.push(consts.line.CENTER);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlineClass.push(consts.line.NOLINE);\r\n\t\t\t}\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tlineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);\r\n\t\t\t} else {\r\n\t\t\t\tlineClass.push(consts.folder.DOCU);\r\n\t\t\t}\r\n\t\t\treturn view.makeNodeLineClassEx(node) + lineClass.join('_');\r\n\t\t},\r\n\t\tmakeNodeLineClassEx: function(node) {\r\n\t\t\treturn consts.className.BUTTON + \" \" + consts.className.LEVEL + node.level + \" \" + consts.className.SWITCH + \" \";\r\n\t\t},\r\n\t\tmakeNodeTarget: function(node) {\r\n\t\t\treturn (node.target || \"_blank\");\r\n\t\t},\r\n\t\tmakeNodeUrl: function(setting, node) {\r\n\t\t\tvar urlKey = setting.data.key.url;\r\n\t\t\treturn node[urlKey] ? node[urlKey] : null;\r\n\t\t},\r\n\t\tmakeUlHtml: function(setting, node, html, content) {\r\n\t\t\thtml.push(\"<ul id='\", node.tId, consts.id.UL, \"' class='\", consts.className.LEVEL, node.level, \" \", view.makeUlLineClass(setting, node), \"' style='display:\", (node.open ? \"block\": \"none\"),\"'>\");\r\n\t\t\thtml.push(content);\r\n\t\t\thtml.push(\"</ul>\");\r\n\t\t},\r\n\t\tmakeUlLineClass: function(setting, node) {\r\n\t\t\treturn ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : \"\");\r\n\t\t},\r\n\t\tremoveChildNodes: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tnodes = node[childKey];\r\n\t\t\tif (!nodes) return;\r\n\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tdata.removeNodeCache(setting, nodes[i]);\r\n\t\t\t}\r\n\t\t\tdata.removeSelectedNode(setting);\r\n\t\t\tdelete node[childKey];\r\n\r\n\t\t\tif (!setting.data.keep.parent) {\r\n\t\t\t\tnode.isParent = false;\r\n\t\t\t\tnode.open = false;\r\n\t\t\t\tvar tmp_switchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\t\ttmp_icoObj = $$(node, consts.id.ICON, setting);\r\n\t\t\t\tview.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);\r\n\t\t\t\tview.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);\r\n\t\t\t\t$$(node, consts.id.UL, setting).remove();\r\n\t\t\t} else {\r\n\t\t\t\t$$(node, consts.id.UL, setting).empty();\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetFirstNode: function(setting, parentNode) {\r\n\t\t\tvar childKey = setting.data.key.children, childLength = parentNode[childKey].length;\r\n\t\t\tif ( childLength > 0) {\r\n\t\t\t\tparentNode[childKey][0].isFirstNode = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetLastNode: function(setting, parentNode) {\r\n\t\t\tvar childKey = setting.data.key.children, childLength = parentNode[childKey].length;\r\n\t\t\tif ( childLength > 0) {\r\n\t\t\t\tparentNode[childKey][childLength - 1].isLastNode = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\tremoveNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\tparentNode = (node.parentTId) ? node.getParentNode() : root;\r\n\r\n\t\t\tnode.isFirstNode = false;\r\n\t\t\tnode.isLastNode = false;\r\n\t\t\tnode.getPreNode = function() {return null;};\r\n\t\t\tnode.getNextNode = function() {return null;};\r\n\r\n\t\t\tif (!data.getNodeCache(setting, node.tId)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$$(node, setting).remove();\r\n\t\t\tdata.removeNodeCache(setting, node);\r\n\t\t\tdata.removeSelectedNode(setting, node);\r\n\r\n\t\t\tfor (var i = 0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\tif (parentNode[childKey][i].tId == node.tId) {\r\n\t\t\t\t\tparentNode[childKey].splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tview.setFirstNode(setting, parentNode);\r\n\t\t\tview.setLastNode(setting, parentNode);\r\n\r\n\t\t\tvar tmp_ulObj,tmp_switchObj,tmp_icoObj,\r\n\t\t\tchildLength = parentNode[childKey].length;\r\n\r\n\t\t\t//repair nodes old parent\r\n\t\t\tif (!setting.data.keep.parent && childLength == 0) {\r\n\t\t\t\t//old parentNode has no child nodes\r\n\t\t\t\tparentNode.isParent = false;\r\n\t\t\t\tparentNode.open = false;\r\n\t\t\t\ttmp_ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\ttmp_switchObj = $$(parentNode, consts.id.SWITCH, setting);\r\n\t\t\t\ttmp_icoObj = $$(parentNode, consts.id.ICON, setting);\r\n\t\t\t\tview.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);\r\n\t\t\t\tview.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);\r\n\t\t\t\ttmp_ulObj.css(\"display\", \"none\");\r\n\r\n\t\t\t} else if (setting.view.showLine && childLength > 0) {\r\n\t\t\t\t//old parentNode has child nodes\r\n\t\t\t\tvar newLast = parentNode[childKey][childLength - 1];\r\n\t\t\t\ttmp_ulObj = $$(newLast, consts.id.UL, setting);\r\n\t\t\t\ttmp_switchObj = $$(newLast, consts.id.SWITCH, setting);\r\n\t\t\t\ttmp_icoObj = $$(newLast, consts.id.ICON, setting);\r\n\t\t\t\tif (parentNode == root) {\r\n\t\t\t\t\tif (parentNode[childKey].length == 1) {\r\n\t\t\t\t\t\t//node was root, and ztree has only one root after move node\r\n\t\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting);\r\n\t\t\t\t\t\tview.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);\r\n\t\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);\r\n\t\t\t\t}\r\n\t\t\t\ttmp_ulObj.removeClass(consts.line.LINE);\r\n\t\t\t}\r\n\t\t},\r\n\t\treplaceIcoClass: function(node, obj, newName) {\r\n\t\t\tif (!obj || node.isAjaxing) return;\r\n\t\t\tvar tmpName = obj.attr(\"class\");\r\n\t\t\tif (tmpName == undefined) return;\r\n\t\t\tvar tmpList = tmpName.split(\"_\");\r\n\t\t\tswitch (newName) {\r\n\t\t\t\tcase consts.folder.OPEN:\r\n\t\t\t\tcase consts.folder.CLOSE:\r\n\t\t\t\tcase consts.folder.DOCU:\r\n\t\t\t\t\ttmpList[tmpList.length-1] = newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tobj.attr(\"class\", tmpList.join(\"_\"));\r\n\t\t},\r\n\t\treplaceSwitchClass: function(node, obj, newName) {\r\n\t\t\tif (!obj) return;\r\n\t\t\tvar tmpName = obj.attr(\"class\");\r\n\t\t\tif (tmpName == undefined) return;\r\n\t\t\tvar tmpList = tmpName.split(\"_\");\r\n\t\t\tswitch (newName) {\r\n\t\t\t\tcase consts.line.ROOT:\r\n\t\t\t\tcase consts.line.ROOTS:\r\n\t\t\t\tcase consts.line.CENTER:\r\n\t\t\t\tcase consts.line.BOTTOM:\r\n\t\t\t\tcase consts.line.NOLINE:\r\n\t\t\t\t\ttmpList[0] = view.makeNodeLineClassEx(node) + newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase consts.folder.OPEN:\r\n\t\t\t\tcase consts.folder.CLOSE:\r\n\t\t\t\tcase consts.folder.DOCU:\r\n\t\t\t\t\ttmpList[1] = newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tobj.attr(\"class\", tmpList.join(\"_\"));\r\n\t\t\tif (newName !== consts.folder.DOCU) {\r\n\t\t\t\tobj.removeAttr(\"disabled\");\r\n\t\t\t} else {\r\n\t\t\t\tobj.attr(\"disabled\", \"disabled\");\r\n\t\t\t}\r\n\t\t},\r\n\t\tselectNode: function(setting, node, addFlag) {\r\n\t\t\tif (!addFlag) {\r\n\t\t\t\tview.cancelPreSelectedNode(setting, null, node);\r\n\t\t\t}\r\n\t\t\t$$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED);\r\n\t\t\tdata.addSelectedNode(setting, node);\r\n\t\t\tsetting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]);\r\n\t\t},\r\n\t\tsetNodeFontCss: function(setting, treeNode) {\r\n\t\t\tvar aObj = $$(treeNode, consts.id.A, setting),\r\n\t\t\tfontCss = view.makeNodeFontCss(setting, treeNode);\r\n\t\t\tif (fontCss) {\r\n\t\t\t\taObj.css(fontCss);\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetNodeLineIcos: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar switchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\tulObj = $$(node, consts.id.UL, setting),\r\n\t\t\ticoObj = $$(node, consts.id.ICON, setting),\r\n\t\t\tulLine = view.makeUlLineClass(setting, node);\r\n\t\t\tif (ulLine.length==0) {\r\n\t\t\t\tulObj.removeClass(consts.line.LINE);\r\n\t\t\t} else {\r\n\t\t\t\tulObj.addClass(ulLine);\r\n\t\t\t}\r\n\t\t\tswitchObj.attr(\"class\", view.makeNodeLineClass(setting, node));\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tswitchObj.removeAttr(\"disabled\");\r\n\t\t\t} else {\r\n\t\t\t\tswitchObj.attr(\"disabled\", \"disabled\");\r\n\t\t\t}\r\n\t\t\ticoObj.removeAttr(\"style\");\r\n\t\t\ticoObj.attr(\"style\", view.makeNodeIcoStyle(setting, node));\r\n\t\t\ticoObj.attr(\"class\", view.makeNodeIcoClass(setting, node));\r\n\t\t},\r\n\t\tsetNodeName: function(setting, node) {\r\n\t\t\tvar title = data.getNodeTitle(setting, node),\r\n\t\t\tnObj = $$(node, consts.id.SPAN, setting);\r\n\t\t\tnObj.empty();\r\n\t\t\tif (setting.view.nameIsHTML) {\r\n\t\t\t\tnObj.html(data.getNodeName(setting, node));\r\n\t\t\t} else {\r\n\t\t\t\tnObj.text(data.getNodeName(setting, node));\r\n\t\t\t}\r\n\t\t\tif (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {\r\n\t\t\t\tvar aObj = $$(node, consts.id.A, setting);\r\n\t\t\t\taObj.attr(\"title\", !title ? \"\" : title);\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetNodeTarget: function(setting, node) {\r\n\t\t\tvar aObj = $$(node, consts.id.A, setting);\r\n\t\t\taObj.attr(\"target\", view.makeNodeTarget(node));\r\n\t\t},\r\n\t\tsetNodeUrl: function(setting, node) {\r\n\t\t\tvar aObj = $$(node, consts.id.A, setting),\r\n\t\t\turl = view.makeNodeUrl(setting, node);\r\n\t\t\tif (url == null || url.length == 0) {\r\n\t\t\t\taObj.removeAttr(\"href\");\r\n\t\t\t} else {\r\n\t\t\t\taObj.attr(\"href\", url);\r\n\t\t\t}\r\n\t\t},\r\n\t\tswitchNode: function(setting, node) {\r\n\t\t\tif (node.open || !tools.canAsync(setting, node)) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t} else if (setting.async.enable) {\r\n\t\t\t\tif (!view.asyncNode(setting, node)) {\r\n\t\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t} else if (node) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t// zTree defind\r\n\t$.fn.zTree = {\r\n\t\tconsts : _consts,\r\n\t\t_z : {\r\n\t\t\ttools: tools,\r\n\t\t\tview: view,\r\n\t\t\tevent: event,\r\n\t\t\tdata: data\r\n\t\t},\r\n\t\tgetZTreeObj: function(treeId) {\r\n\t\t\tvar o = data.getZTreeTools(treeId);\r\n\t\t\treturn o ? o : null;\r\n\t\t},\r\n\t\tdestroy: function(treeId) {\r\n\t\t\tif (!!treeId && treeId.length > 0) {\r\n\t\t\t\tview.destroy(data.getSetting(treeId));\r\n\t\t\t} else {\r\n\t\t\t\tfor(var s in settings) {\r\n\t\t\t\t\tview.destroy(settings[s]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tinit: function(obj, zSetting, zNodes) {\r\n\t\t\tvar setting = tools.clone(_setting);\r\n\t\t\t$.extend(true, setting, zSetting);\r\n\t\t\tsetting.treeId = obj.attr(\"id\");\r\n\t\t\tsetting.treeObj = obj;\r\n\t\t\tsetting.treeObj.empty();\r\n\t\t\tsettings[setting.treeId] = setting;\r\n\t\t\t//For some older browser,(e.g., ie6)\r\n\t\t\tif(typeof document.body.style.maxHeight === \"undefined\") {\r\n\t\t\t\tsetting.view.expandSpeed = \"\";\r\n\t\t\t}\r\n\t\t\tdata.initRoot(setting);\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tzNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\troot[childKey] = data.transformTozTreeFormat(setting, zNodes);\r\n\t\t\t} else {\r\n\t\t\t\troot[childKey] = zNodes;\r\n\t\t\t}\r\n\r\n\t\t\tdata.initCache(setting);\r\n\t\t\tevent.unbindTree(setting);\r\n\t\t\tevent.bindTree(setting);\r\n\t\t\tevent.unbindEvent(setting);\r\n\t\t\tevent.bindEvent(setting);\r\n\r\n\t\t\tvar zTreeTools = {\r\n\t\t\t\tsetting : setting,\r\n\t\t\t\taddNodes : function(parentNode, newNodes, isSilent) {\r\n\t\t\t\t\tif (!newNodes) return null;\r\n\t\t\t\t\tif (!parentNode) parentNode = null;\r\n\t\t\t\t\tif (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;\r\n\t\t\t\t\tvar xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);\r\n\t\t\t\t\tfunction addCallback() {\r\n\t\t\t\t\t\tview.addNodes(setting, parentNode, xNewNodes, (isSilent==true));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tools.canAsync(setting, parentNode)) {\r\n\t\t\t\t\t\tview.asyncNode(setting, parentNode, isSilent, addCallback);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\taddCallback();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn xNewNodes;\r\n\t\t\t\t},\r\n\t\t\t\tcancelSelectedNode : function(node) {\r\n\t\t\t\t\tview.cancelPreSelectedNode(setting, node);\r\n\t\t\t\t},\r\n\t\t\t\tdestroy : function() {\r\n\t\t\t\t\tview.destroy(setting);\r\n\t\t\t\t},\r\n\t\t\t\texpandAll : function(expandFlag) {\r\n\t\t\t\t\texpandFlag = !!expandFlag;\r\n\t\t\t\t\tview.expandCollapseSonNode(setting, null, expandFlag, true);\r\n\t\t\t\t\treturn expandFlag;\r\n\t\t\t\t},\r\n\t\t\t\texpandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {\r\n\t\t\t\t\tif (!node || !node.isParent) return null;\r\n\t\t\t\t\tif (expandFlag !== true && expandFlag !== false) {\r\n\t\t\t\t\t\texpandFlag = !node.open;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcallbackFlag = !!callbackFlag;\r\n\r\n\t\t\t\t\tif (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t} else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (expandFlag && node.parentTId) {\r\n\t\t\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (expandFlag === node.open && !sonSign) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdata.getRoot(setting).expandTriggerFlag = callbackFlag;\r\n\t\t\t\t\tif (!tools.canAsync(setting, node) && sonSign) {\r\n\t\t\t\t\t\tview.expandCollapseSonNode(setting, node, expandFlag, true, function() {\r\n\t\t\t\t\t\t\tif (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnode.open = !expandFlag;\r\n\t\t\t\t\t\tview.switchNode(this.setting, node);\r\n\t\t\t\t\t\tif (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn expandFlag;\r\n\t\t\t\t},\r\n\t\t\t\tgetNodes : function() {\r\n\t\t\t\t\treturn data.getNodes(setting);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeByParam : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeByTId : function(tId) {\r\n\t\t\t\t\treturn data.getNodeCache(setting, tId);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByParam : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByParamFuzzy : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {\r\n\t\t\t\t\tisSingle = !!isSingle;\r\n\t\t\t\t\tif (!filter || (typeof filter != \"function\")) return (isSingle ? null : []);\r\n\t\t\t\t\treturn data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeIndex : function(node) {\r\n\t\t\t\t\tif (!node) return null;\r\n\t\t\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\t\t\tparentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\t\t\tfor (var i=0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\t\t\tif (parentNode[childKey][i] == node) return i;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t},\r\n\t\t\t\tgetSelectedNodes : function() {\r\n\t\t\t\t\tvar r = [], list = data.getRoot(setting).curSelectedList;\r\n\t\t\t\t\tfor (var i=0, l=list.length; i<l; i++) {\r\n\t\t\t\t\t\tr.push(list[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn r;\r\n\t\t\t\t},\r\n\t\t\t\tisSelectedNode : function(node) {\r\n\t\t\t\t\treturn data.isSelectedNode(setting, node);\r\n\t\t\t\t},\r\n\t\t\t\treAsyncChildNodes : function(parentNode, reloadType, isSilent) {\r\n\t\t\t\t\tif (!this.setting.async.enable) return;\r\n\t\t\t\t\tvar isRoot = !parentNode;\r\n\t\t\t\t\tif (isRoot) {\r\n\t\t\t\t\t\tparentNode = data.getRoot(setting);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (reloadType==\"refresh\") {\r\n\t\t\t\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\t\t\t\tfor (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) {\r\n\t\t\t\t\t\t\tdata.removeNodeCache(setting, parentNode[childKey][i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdata.removeSelectedNode(setting);\r\n\t\t\t\t\t\tparentNode[childKey] = [];\r\n\t\t\t\t\t\tif (isRoot) {\r\n\t\t\t\t\t\t\tthis.setting.treeObj.empty();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\t\t\t\tulObj.empty();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);\r\n\t\t\t\t},\r\n\t\t\t\trefresh : function() {\r\n\t\t\t\t\tthis.setting.treeObj.empty();\r\n\t\t\t\t\tvar root = data.getRoot(setting),\r\n\t\t\t\t\tnodes = root[setting.data.key.children]\r\n\t\t\t\t\tdata.initRoot(setting);\r\n\t\t\t\t\troot[setting.data.key.children] = nodes\r\n\t\t\t\t\tdata.initCache(setting);\r\n\t\t\t\t\tview.createNodes(setting, 0, root[setting.data.key.children]);\r\n\t\t\t\t},\r\n\t\t\t\tremoveChildNodes : function(node) {\r\n\t\t\t\t\tif (!node) return null;\r\n\t\t\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\t\t\tnodes = node[childKey];\r\n\t\t\t\t\tview.removeChildNodes(setting, node);\r\n\t\t\t\t\treturn nodes ? nodes : null;\r\n\t\t\t\t},\r\n\t\t\t\tremoveNode : function(node, callbackFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tcallbackFlag = !!callbackFlag;\r\n\t\t\t\t\tif (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;\r\n\t\t\t\t\tview.removeNode(setting, node);\r\n\t\t\t\t\tif (callbackFlag) {\r\n\t\t\t\t\t\tthis.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tselectNode : function(node, addFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tif (tools.uCanDo(setting)) {\r\n\t\t\t\t\t\taddFlag = setting.view.selectedMulti && addFlag;\r\n\t\t\t\t\t\tif (node.parentTId) {\r\n\t\t\t\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() {\r\n\t\t\t\t\t\t\t\ttry{$$(node, setting).focus().blur();}catch(e){}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttry{$$(node, setting).focus().blur();}catch(e){}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tview.selectNode(setting, node, addFlag);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\ttransformTozTreeNodes : function(simpleNodes) {\r\n\t\t\t\t\treturn data.transformTozTreeFormat(setting, simpleNodes);\r\n\t\t\t\t},\r\n\t\t\t\ttransformToArray : function(nodes) {\r\n\t\t\t\t\treturn data.transformToArrayFormat(setting, nodes);\r\n\t\t\t\t},\r\n\t\t\t\tupdateNode : function(node, checkTypeFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tvar nObj = $$(node, setting);\r\n\t\t\t\t\tif (nObj.get(0) && tools.uCanDo(setting)) {\r\n\t\t\t\t\t\tview.setNodeName(setting, node);\r\n\t\t\t\t\t\tview.setNodeTarget(setting, node);\r\n\t\t\t\t\t\tview.setNodeUrl(setting, node);\r\n\t\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\t\tview.setNodeFontCss(setting, node);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\troot.treeTools = zTreeTools;\r\n\t\t\tdata.setZTreeTools(setting, zTreeTools);\r\n\r\n\t\t\tif (root[childKey] && root[childKey].length > 0) {\r\n\t\t\t\tview.createNodes(setting, 0, root[childKey]);\r\n\t\t\t} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {\r\n\t\t\t\tview.asyncNode(setting);\r\n\t\t\t}\r\n\t\t\treturn zTreeTools;\r\n\t\t}\r\n\t};\r\n\r\n\tvar zt = $.fn.zTree,\r\n\t$$ = tools.$,\r\n\tconsts = zt.consts;\r\n})(BI.jQuery);/*\r\n * JQuery zTree excheck v3.5.18\r\n * http://zTree.me/\r\n *\r\n * Copyright (c) 2010 Hunter.z\r\n *\r\n * Licensed same as jquery - MIT License\r\n * http://www.opensource.org/licenses/mit-license.php\r\n *\r\n * email: hunter.z@263.net\r\n * Date: 2015-06-18\r\n */\r\n(function($){\r\n\t//default consts of excheck\r\n\tvar _consts = {\r\n\t\tevent: {\r\n\t\t\tCHECK: \"ztree_check\"\r\n\t\t},\r\n\t\tid: {\r\n\t\t\tCHECK: \"_check\"\r\n\t\t},\r\n\t\tcheckbox: {\r\n\t\t\tSTYLE: \"checkbox\",\r\n\t\t\tDEFAULT: \"chk\",\r\n\t\t\tDISABLED: \"disable\",\r\n\t\t\tFALSE: \"false\",\r\n\t\t\tTRUE: \"true\",\r\n\t\t\tFULL: \"full\",\r\n\t\t\tPART: \"part\",\r\n\t\t\tFOCUS: \"focus\"\r\n\t\t},\r\n\t\tradio: {\r\n\t\t\tSTYLE: \"radio\",\r\n\t\t\tTYPE_ALL: \"all\",\r\n\t\t\tTYPE_LEVEL: \"level\"\r\n\t\t}\r\n\t},\r\n\t//default setting of excheck\r\n\t_setting = {\r\n\t\tcheck: {\r\n\t\t\tenable: false,\r\n\t\t\tautoCheckTrigger: false,\r\n\t\t\tchkStyle: _consts.checkbox.STYLE,\r\n\t\t\tnocheckInherit: false,\r\n\t\t\tchkDisabledInherit: false,\r\n\t\t\tradioType: _consts.radio.TYPE_LEVEL,\r\n\t\t\tchkboxType: {\r\n\t\t\t\t\"Y\": \"ps\",\r\n\t\t\t\t\"N\": \"ps\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata: {\r\n\t\t\tkey: {\r\n\t\t\t\tchecked: \"checked\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tcallback: {\r\n\t\t\tbeforeCheck:null,\r\n\t\t\tonCheck:null\r\n\t\t}\r\n\t},\r\n\t//default root of excheck\r\n\t_initRoot = function (setting) {\r\n\t\tvar r = data.getRoot(setting);\r\n\t\tr.radioCheckedList = [];\r\n\t},\r\n\t//default cache of excheck\r\n\t_initCache = function(treeId) {},\r\n\t//default bind event of excheck\r\n\t_bindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.bind(c.CHECK, function (event, srcEvent, treeId, node) {\r\n\t\t\tevent.srcEvent = srcEvent;\r\n\t\t\ttools.apply(setting.callback.onCheck, [event, treeId, node]);\r\n\t\t});\r\n\t},\r\n\t_unbindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.unbind(c.CHECK);\r\n\t},\r\n\t//default event proxy of excheck\r\n\t_eventProxy = function(e) {\r\n\t\tvar target = e.target,\r\n\t\tsetting = data.getSetting(e.data.treeId),\r\n\t\ttId = \"\", node = null,\r\n\t\tnodeEventType = \"\", treeEventType = \"\",\r\n\t\tnodeEventCallback = null, treeEventCallback = null;\r\n\r\n\t\tif (tools.eqs(e.type, \"mouseover\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"mouseoverCheck\";\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(e.type, \"mouseout\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"mouseoutCheck\";\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(e.type, \"click\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"checkNode\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (tId.length>0) {\r\n\t\t\tnode = data.getNodeCache(setting, tId);\r\n\t\t\tswitch (nodeEventType) {\r\n\t\t\t\tcase \"checkNode\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onCheckNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"mouseoverCheck\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onMouseoverCheck;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"mouseoutCheck\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onMouseoutCheck;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar proxyResult = {\r\n\t\t\tstop: nodeEventType === \"checkNode\",\r\n\t\t\tnode: node,\r\n\t\t\tnodeEventType: nodeEventType,\r\n\t\t\tnodeEventCallback: nodeEventCallback,\r\n\t\t\ttreeEventType: treeEventType,\r\n\t\t\ttreeEventCallback: treeEventCallback\r\n\t\t};\r\n\t\treturn proxyResult\r\n\t},\r\n\t//default init node of excheck\r\n\t_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {\r\n\t\tif (!n) return;\r\n\t\tvar checkedKey = setting.data.key.checked;\r\n\t\tif (typeof n[checkedKey] == \"string\") n[checkedKey] = tools.eqs(n[checkedKey], \"true\");\r\n\t\tn[checkedKey] = !!n[checkedKey];\r\n\t\tn.checkedOld = n[checkedKey];\r\n\t\tif (typeof n.nocheck == \"string\") n.nocheck = tools.eqs(n.nocheck, \"true\");\r\n\t\tn.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);\r\n\t\tif (typeof n.chkDisabled == \"string\") n.chkDisabled = tools.eqs(n.chkDisabled, \"true\");\r\n\t\tn.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);\r\n\t\tif (typeof n.halfCheck == \"string\") n.halfCheck = tools.eqs(n.halfCheck, \"true\");\r\n\t\tn.halfCheck = !!n.halfCheck;\r\n\t\tn.check_Child_State = -1;\r\n\t\tn.check_Focus = false;\r\n\t\tn.getCheckStatus = function() {return data.getCheckStatus(setting, n);};\r\n\r\n\t\tif (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) {\r\n\t\t\tvar r = data.getRoot(setting);\r\n\t\t\tr.radioCheckedList.push(n);\r\n\t\t}\r\n\t},\r\n\t//add dom for check\r\n\t_beforeA = function(setting, node, html) {\r\n\t\tvar checkedKey = setting.data.key.checked;\r\n\t\tif (setting.check.enable) {\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\thtml.push(\"<span ID='\", node.tId, consts.id.CHECK, \"' class='\", view.makeChkClass(setting, node), \"' treeNode\", consts.id.CHECK, (node.nocheck === true?\" style='display:none;'\":\"\"),\"></span>\");\r\n\t\t}\r\n\t},\r\n\t//update zTreeObj, add method of check\r\n\t_zTreeTools = function(setting, zTreeTools) {\r\n\t\tzTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {\r\n\t\t\tvar checkedKey = this.setting.data.key.checked;\r\n\t\t\tif (node.chkDisabled === true) return;\r\n\t\t\tif (checked !== true && checked !== false) {\r\n\t\t\t\tchecked = !node[checkedKey];\r\n\t\t\t}\r\n\t\t\tcallbackFlag = !!callbackFlag;\r\n\r\n\t\t\tif (node[checkedKey] === checked && !checkTypeFlag) {\r\n\t\t\t\treturn;\r\n\t\t\t} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {\r\n\t\t\t\tnode[checkedKey] = checked;\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, this.setting);\r\n\t\t\t\tif (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);\r\n\t\t\t\tview.setChkClass(this.setting, checkObj, node);\r\n\t\t\t\tview.repairParentChkClassWithSelf(this.setting, node);\r\n\t\t\t\tif (callbackFlag) {\r\n\t\t\t\t\tthis.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tzTreeTools.checkAllNodes = function(checked) {\r\n\t\t\tview.repairAllChk(this.setting, !!checked);\r\n\t\t}\r\n\r\n\t\tzTreeTools.getCheckedNodes = function(checked) {\r\n\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\tchecked = (checked !== false);\r\n\t\t\treturn data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked);\r\n\t\t}\r\n\r\n\t\tzTreeTools.getChangeCheckedNodes = function() {\r\n\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\treturn data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]);\r\n\t\t}\r\n\r\n\t\tzTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {\r\n\t\t\tdisabled = !!disabled;\r\n\t\t\tinheritParent = !!inheritParent;\r\n\t\t\tinheritChildren = !!inheritChildren;\r\n\t\t\tview.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);\r\n\t\t\tview.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);\r\n\t\t}\r\n\r\n\t\tvar _updateNode = zTreeTools.updateNode;\r\n\t\tzTreeTools.updateNode = function(node, checkTypeFlag) {\r\n\t\t\tif (_updateNode) _updateNode.apply(zTreeTools, arguments);\r\n\t\t\tif (!node || !this.setting.check.enable) return;\r\n\t\t\tvar nObj = $$(node, this.setting);\r\n\t\t\tif (nObj.get(0) && tools.uCanDo(this.setting)) {\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, this.setting);\r\n\t\t\t\tif (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);\r\n\t\t\t\tview.setChkClass(this.setting, checkObj, node);\r\n\t\t\t\tview.repairParentChkClassWithSelf(this.setting, node);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t//method of operate data\r\n\t_data = {\r\n\t\tgetRadioCheckedList: function(setting) {\r\n\t\t\tvar checkedList = data.getRoot(setting).radioCheckedList;\r\n\t\t\tfor (var i=0, j=checkedList.length; i<j; i++) {\r\n\t\t\t\tif(!data.getNodeCache(setting, checkedList[i].tId)) {\r\n\t\t\t\t\tcheckedList.splice(i, 1);\r\n\t\t\t\t\ti--; j--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn checkedList;\r\n\t\t},\r\n\t\tgetCheckStatus: function(setting, node) {\r\n\t\t\tif (!setting.check.enable || node.nocheck || node.chkDisabled) return null;\r\n\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\tr = {\r\n\t\t\t\tchecked: node[checkedKey],\r\n\t\t\t\thalf: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))\r\n\t\t\t};\r\n\t\t\treturn r;\r\n\t\t},\r\n\t\tgetTreeCheckedNodes: function(setting, nodes, checked, results) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tonlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);\r\n\t\t\tresults = !results ? [] : results;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {\r\n\t\t\t\t\tresults.push(nodes[i]);\r\n\t\t\t\t\tif(onlyOne) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdata.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);\r\n\t\t\t\tif(onlyOne && results.length > 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tgetTreeChangeCheckedNodes: function(setting, nodes, results) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked;\r\n\t\t\tresults = !results ? [] : results;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {\r\n\t\t\t\t\tresults.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tdata.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tmakeChkFlag: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tchkFlag = -1;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l; i++) {\r\n\t\t\t\t\tvar cNode = node[childKey][i];\r\n\t\t\t\t\tvar tmp = -1;\r\n\t\t\t\t\tif (setting.check.chkStyle == consts.radio.STYLE) {\r\n\t\t\t\t\t\tif (cNode.nocheck === true || cNode.chkDisabled === true) {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State;\r\n\t\t\t\t\t\t} else if (cNode.halfCheck === true) {\r\n\t\t\t\t\t\t\ttmp = 2;\r\n\t\t\t\t\t\t} else if (cNode[checkedKey]) {\r\n\t\t\t\t\t\t\ttmp = 2;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State > 0 ? 2:0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (tmp == 2) {\r\n\t\t\t\t\t\t\tchkFlag = 2; break;\r\n\t\t\t\t\t\t} else if (tmp == 0){\r\n\t\t\t\t\t\t\tchkFlag = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (setting.check.chkStyle == consts.checkbox.STYLE) {\r\n\t\t\t\t\t\tif (cNode.nocheck === true || cNode.chkDisabled === true) {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State;\r\n\t\t\t\t\t\t} else if (cNode.halfCheck === true) {\r\n\t\t\t\t\t\t\ttmp = 1;\r\n\t\t\t\t\t\t} else if (cNode[checkedKey] ) {\r\n\t\t\t\t\t\t\ttmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttmp = (cNode.check_Child_State > 0) ? 1 : 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (tmp === 1) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (tmp > -1) {\r\n\t\t\t\t\t\t\tchkFlag = tmp;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnode.check_Child_State = chkFlag;\r\n\t\t}\r\n\t},\r\n\t//method of event proxy\r\n\t_event = {\r\n\r\n\t},\r\n\t//method of event handler\r\n\t_handler = {\r\n\t\tonCheckNode: function (event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckedKey = setting.data.key.checked;\r\n\t\t\tif (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;\r\n\t\t\tnode[checkedKey] = !node[checkedKey];\r\n\t\t\tview.checkNodeRelation(setting, node);\r\n\t\t\tvar checkObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\tview.repairParentChkClassWithSelf(setting, node);\r\n\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonMouseoverCheck: function(event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tnode.check_Focus = true;\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonMouseoutCheck: function(event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tnode.check_Focus = false;\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\t//method of tools for zTree\r\n\t_tools = {\r\n\r\n\t},\r\n\t//method of operate ztree dom\r\n\t_view = {\r\n\t\tcheckNodeRelation: function(setting, node) {\r\n\t\t\tvar pNode, i, l,\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tr = consts.radio;\r\n\t\t\tif (setting.check.chkStyle == r.STYLE) {\r\n\t\t\t\tvar checkedList = data.getRadioCheckedList(setting);\r\n\t\t\t\tif (node[checkedKey]) {\r\n\t\t\t\t\tif (setting.check.radioType == r.TYPE_ALL) {\r\n\t\t\t\t\t\tfor (i = checkedList.length-1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tpNode = checkedList[i];\r\n\t\t\t\t\t\t\tif (pNode[checkedKey] && pNode != node) {\r\n\t\t\t\t\t\t\t\tpNode[checkedKey] = false;\r\n\t\t\t\t\t\t\t\tcheckedList.splice(i, 1);\r\n\r\n\t\t\t\t\t\t\t\tview.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);\r\n\t\t\t\t\t\t\t\tif (pNode.parentTId != node.parentTId) {\r\n\t\t\t\t\t\t\t\t\tview.repairParentChkClassWithSelf(setting, pNode);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcheckedList.push(node);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\t\t\t\tfor (i = 0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\t\t\t\tpNode = parentNode[childKey][i];\r\n\t\t\t\t\t\t\tif (pNode[checkedKey] && pNode != node) {\r\n\t\t\t\t\t\t\t\tpNode[checkedKey] = false;\r\n\t\t\t\t\t\t\t\tview.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (setting.check.radioType == r.TYPE_ALL) {\r\n\t\t\t\t\tfor (i = 0, l = checkedList.length; i < l; i++) {\r\n\t\t\t\t\t\tif (node == checkedList[i]) {\r\n\t\t\t\t\t\t\tcheckedList.splice(i, 1);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf(\"s\") > -1)) {\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, true);\r\n\t\t\t\t}\r\n\t\t\t\tif (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf(\"s\") > -1)) {\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, false);\r\n\t\t\t\t}\r\n\t\t\t\tif (node[checkedKey] && setting.check.chkboxType.Y.indexOf(\"p\") > -1) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node, true);\r\n\t\t\t\t}\r\n\t\t\t\tif (!node[checkedKey] && setting.check.chkboxType.N.indexOf(\"p\") > -1) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tmakeChkClass: function(setting, node) {\r\n\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\tc = consts.checkbox, r = consts.radio,\r\n\t\t\tcheckboxType = setting.check.chkboxType;\r\n\t\t\tvar notEffectByOtherNode = (checkboxType.Y === \"\" && checkboxType.N === \"\");\r\n\t\t\tfullStyle = \"\";\r\n\t\t\tif (node.chkDisabled === true) {\r\n\t\t\t\tfullStyle = c.DISABLED;\r\n\t\t\t} else if (node.halfCheck) {\r\n\t\t\t\tfullStyle = c.PART;\r\n\t\t\t} else if (setting.check.chkStyle == r.STYLE) {\r\n\t\t\t\tfullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;\r\n\t\t\t} else {\r\n\t\t\t\tfullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) || notEffectByOtherNode ? c.FULL:c.PART) : ((node.check_Child_State < 1 || notEffectByOtherNode)? c.FULL:c.PART);\r\n\t\t\t}\r\n\t\t\tvar chkName = setting.check.chkStyle + \"_\" + (node[checkedKey] ? c.TRUE : c.FALSE) + \"_\" + fullStyle;\r\n\t\t\tchkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + \"_\" + c.FOCUS : chkName;\r\n\t\t\treturn consts.className.BUTTON + \" \" + c.DEFAULT + \" \" + chkName;\r\n\t\t},\r\n\t\trepairAllChk: function(setting, checked) {\r\n\t\t\tif (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {\r\n\t\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\t\tchildKey = setting.data.key.children,\r\n\t\t\t\troot = data.getRoot(setting);\r\n\t\t\t\tfor (var i = 0, l = root[childKey].length; i<l ; i++) {\r\n\t\t\t\t\tvar node = root[childKey][i];\r\n\t\t\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\t\tnode[checkedKey] = checked;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, checked);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairChkClass: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\tif (node.nocheck !== true) {\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairParentChkClass: function(setting, node) {\r\n\t\t\tif (!node || !node.parentTId) return;\r\n\t\t\tvar pNode = node.getParentNode();\r\n\t\t\tview.repairChkClass(setting, pNode);\r\n\t\t\tview.repairParentChkClass(setting, pNode);\r\n\t\t},\r\n\t\trepairParentChkClassWithSelf: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\tview.repairParentChkClass(setting, node[childKey][0]);\r\n\t\t\t} else {\r\n\t\t\t\tview.repairParentChkClass(setting, node);\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairSonChkDisabled: function(setting, node, chkDisabled, inherit) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node.chkDisabled != chkDisabled) {\r\n\t\t\t\tnode.chkDisabled = chkDisabled;\r\n\t\t\t}\r\n\t\t\tview.repairChkClass(setting, node);\r\n\t\t\tif (node[childKey] && inherit) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l; i++) {\r\n\t\t\t\t\tvar sNode = node[childKey][i];\r\n\t\t\t\t\tview.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairParentChkDisabled: function(setting, node, chkDisabled, inherit) {\r\n\t\t\tif (!node) return;\r\n\t\t\tif (node.chkDisabled != chkDisabled && inherit) {\r\n\t\t\t\tnode.chkDisabled = chkDisabled;\r\n\t\t\t}\r\n\t\t\tview.repairChkClass(setting, node);\r\n\t\t\tview.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);\r\n\t\t},\r\n\t\tsetChkClass: function(setting, obj, node) {\r\n\t\t\tif (!obj) return;\r\n\t\t\tif (node.nocheck === true) {\r\n\t\t\t\tobj.hide();\r\n\t\t\t} else {\r\n\t\t\t\tobj.show();\r\n\t\t\t}\r\n obj.attr('class', view.makeChkClass(setting, node));\r\n\t\t},\r\n\t\tsetParentNodeCheckBox: function(setting, node, value, srcNode) {\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tif (!srcNode) srcNode = node;\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\tnode[checkedKey] = value;\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t\tif (setting.check.autoCheckTrigger && node != srcNode) {\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (node.parentTId) {\r\n\t\t\t\tvar pSign = true;\r\n\t\t\t\tif (!value) {\r\n\t\t\t\t\tvar pNodes = node.getParentNode()[childKey];\r\n\t\t\t\t\tfor (var i = 0, l = pNodes.length; i < l; i++) {\r\n\t\t\t\t\t\tif ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])\r\n\t\t\t\t\t\t|| ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {\r\n\t\t\t\t\t\t\tpSign = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (pSign) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetSonNodeCheckBox: function(setting, node, value, srcNode) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tif (!srcNode) srcNode = node;\r\n\r\n\t\t\tvar hasDisable = false;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {\r\n\t\t\t\t\tvar sNode = node[childKey][i];\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, sNode, value, srcNode);\r\n\t\t\t\t\tif (sNode.chkDisabled === true) hasDisable = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (node != data.getRoot(setting) && node.chkDisabled !== true) {\r\n\t\t\t\tif (hasDisable && node.nocheck !== true) {\r\n\t\t\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\t\t}\r\n\t\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\tnode[checkedKey] = value;\r\n\t\t\t\t\tif (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnode.check_Child_State = -1;\r\n\t\t\t\t}\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t\tif (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_z = {\r\n\t\ttools: _tools,\r\n\t\tview: _view,\r\n\t\tevent: _event,\r\n\t\tdata: _data\r\n\t};\r\n\t$.extend(true, $.fn.zTree.consts, _consts);\r\n\t$.extend(true, $.fn.zTree._z, _z);\r\n\r\n\tvar zt = $.fn.zTree,\r\n\ttools = zt._z.tools,\r\n\tconsts = zt.consts,\r\n\tview = zt._z.view,\r\n\tdata = zt._z.data,\r\n\tevent = zt._z.event,\r\n\t$$ = tools.$;\r\n\r\n\tdata.exSetting(_setting);\r\n\tdata.addInitBind(_bindEvent);\r\n\tdata.addInitUnBind(_unbindEvent);\r\n\tdata.addInitCache(_initCache);\r\n\tdata.addInitNode(_initNode);\r\n\tdata.addInitProxy(_eventProxy, true);\r\n\tdata.addInitRoot(_initRoot);\r\n\tdata.addBeforeA(_beforeA);\r\n\tdata.addZTreeTools(_zTreeTools);\r\n\r\n\tvar _createNodes = view.createNodes;\r\n\tview.createNodes = function(setting, level, nodes, parentNode) {\r\n\t\tif (_createNodes) _createNodes.apply(view, arguments);\r\n\t\tif (!nodes) return;\r\n\t\tview.repairParentChkClassWithSelf(setting, parentNode);\r\n\t}\r\n\tvar _removeNode = view.removeNode;\r\n\tview.removeNode = function(setting, node) {\r\n\t\tvar parentNode = node.getParentNode();\r\n\t\tif (_removeNode) _removeNode.apply(view, arguments);\r\n\t\tif (!node || !parentNode) return;\r\n\t\tview.repairChkClass(setting, parentNode);\r\n\t\tview.repairParentChkClass(setting, parentNode);\r\n\t}\r\n\r\n\tvar _appendNodes = view.appendNodes;\r\n\tview.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {\r\n\t\tvar html = \"\";\r\n\t\tif (_appendNodes) {\r\n\t\t\thtml = _appendNodes.apply(view, arguments);\r\n\t\t}\r\n\t\tif (parentNode) {\r\n\t\t\tdata.makeChkFlag(setting, parentNode);\r\n\t\t}\r\n\t\treturn html;\r\n\t}\r\n})(BI.jQuery);/**\r\n * 可以改变图标的button\r\n *\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconChangeButton\r\n * @extends BI.Single\r\n */\r\nBI.IconChangeButton = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-icon-change-button\",\r\n iconCls: \"\",\r\n iconWidth: null,\r\n iconHeight: null,\r\n\r\n stopEvent: false,\r\n stopPropagation: false,\r\n selected: false,\r\n once: false, // 点击一次选中有效,再点无效\r\n forceSelected: false, // 点击即选中, 选中了就不会被取消\r\n forceNotSelected: false, // 无论怎么点击都不会被选中\r\n disableSelected: false, // 使能选中\r\n\r\n shadow: false,\r\n isShadowShowingOnSelected: false, // 选中状态下是否显示阴影\r\n trigger: null,\r\n handler: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconChangeButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.button = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n element: this,\r\n cls: o.iconCls,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n\r\n stopEvent: o.stopEvent,\r\n stopPropagation: o.stopPropagation,\r\n selected: o.selected,\r\n once: o.once,\r\n forceSelected: o.forceSelected,\r\n forceNotSelected: o.forceNotSelected,\r\n disableSelected: o.disableSelected,\r\n\r\n shadow: o.shadow,\r\n isShadowShowingOnSelected: o.isShadowShowingOnSelected,\r\n trigger: o.trigger,\r\n handler: o.handler\r\n });\r\n\r\n this.button.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.IconChangeButton.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isSelected: function () {\r\n return this.button.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n this.button.setSelected(b);\r\n },\r\n\r\n setIcon: function (cls) {\r\n var o = this.options;\r\n if (o.iconCls !== cls) {\r\n this.element.removeClass(o.iconCls).addClass(cls);\r\n o.iconCls = cls;\r\n }\r\n }\r\n});\r\nBI.IconChangeButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_change_button\", BI.IconChangeButton);/**\r\n * 统一的trigger图标按钮\r\n *\r\n * Created by GUY on 2015/9/16.\r\n * @class BI.TriggerIconButton\r\n * @extends BI.IconButton\r\n */\r\nBI.TriggerIconButton = BI.inherit(BI.IconButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TriggerIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-trigger-icon-button\",\r\n extraCls: \"pull-down-font\"\r\n });\r\n }\r\n});\r\nBI.TriggerIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\nBI.shortcut(\"bi.trigger_icon_button\", BI.TriggerIconButton);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.HalfIconButton = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-half-icon-button check-half-select-icon\",\r\n height: 16,\r\n width: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n selected: false\r\n });\r\n }\r\n});\r\nBI.HalfIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.half_icon_button\", BI.HalfIconButton);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.HalfButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-half-button bi-high-light-border\",\r\n height: 14,\r\n width: 14,\r\n selected: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.HalfButton.superclass._init.apply(this, arguments);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this.element,\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"bi-high-light-background\",\r\n width: 8,\r\n height: 8\r\n }]\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.HalfButton.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.HalfButton.EVENT_CHANGE);\r\n }\r\n }\r\n});\r\nBI.HalfButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.half_button\", BI.HalfButton);/**\r\n * guy\r\n * 复选框item\r\n * @type {*|void|Object}\r\n */\r\nBI.MultiSelectItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multi-select-item\",\r\n height: 24,\r\n logic: {\r\n dynamic: false\r\n },\r\n iconWrapperWidth: 26\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n rgap: o.rgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.checkbox],\r\n width: o.iconWrapperWidth\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiSelectItem.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiSelectItem.superclass.setSelected.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\nBI.MultiSelectItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_item\", BI.MultiSelectItem);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.SingleSelectIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.SingleSelectIconTextItem = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-icon-text-item bi-list-item-active\",\r\n iconCls: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.icon_text_item\",\r\n element: this,\r\n cls: o.iconCls,\r\n once: o.once,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n selected: o.selected,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.text.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isSelected: function () {\r\n return this.text.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n this.text.setSelected(b);\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.single_select_icon_text_item\", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-item bi-list-item-active\",\r\n hgap: 10,\r\n height: 24,\r\n textAlign: \"left\"\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n title: o.title || o.text,\r\n warningTitle: o.warningTitle,\r\n py: o.py\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectItem.superclass.setSelected.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_item\", BI.SingleSelectItem);/**\r\n * guy\r\n * 单选框item\r\n * @type {*|void|Object}\r\n */\r\nBI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-radio-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n hgap: 10,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectRadioItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.radio = BI.createWidget({\r\n type: \"bi.radio\",\r\n once: o.once\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.radio],\r\n width: 16\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments);\r\n this.radio.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectRadioItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectRadioItem.superclass.setSelected.apply(this, arguments);\r\n this.radio.setSelected(v);\r\n\r\n }\r\n});\r\n\r\nBI.SingleSelectRadioItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_radio_item\", BI.SingleSelectRadioItem);/**\r\n * Created by roy on 15/10/16.\r\n */\r\nBI.ArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-arrow-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.ArrowNode.superclass._init.apply(this, arguments);\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.arrow_group_node_checkbox\"\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 16,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.ArrowNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isOpened());\r\n },\r\n \r\n setText: function (text) {\r\n BI.ArrowNode.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.ArrowNode.superclass.setOpened.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.arrow_group_node\", BI.ArrowNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.FirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-first-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.FirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.first_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.FirstPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.FirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.first_plus_group_node\", BI.FirstPlusGroupNode);/**\r\n * Created by User on 2016/3/31.\r\n */\r\n/**\r\n * > + icon + 文本\r\n * @class BI.IconArrowNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-arrow-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n iconCls: \"\"\r\n });\r\n },\r\n _init: function () {\r\n BI.IconArrowNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.arrow_group_node_checkbox\",\r\n width: 24,\r\n stopPropagation: true\r\n });\r\n\r\n var icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: 24,\r\n cls: o.iconCls,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 16,\r\n el: this.checkbox\r\n }, {\r\n width: 16,\r\n el: icon\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items,\r\n rgap: 5\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.IconArrowNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.IconArrowNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.icon_arrow_node\", BI.IconArrowNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.LastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.LastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.LastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-last-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.LastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.last_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if(type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.LastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.LastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.last_plus_group_node\", BI.LastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.MidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-mid-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.mid_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.mid_plus_group_node\", BI.MidPlusGroupNode);BI.MultiLayerIconArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-icon-arrow-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconHeight: 16,\r\n iconWidth: 16,\r\n iconCls: \"\"\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerIconArrowNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.icon_arrow_node\",\r\n iconCls: o.iconCls,\r\n cls: \"bi-list-item-none\",\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function () {\r\n items.push({\r\n type: \"bi.layout\",\r\n width: 15,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 15),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_icon_arrow_node\", BI.MultiLayerIconArrowNode);\r\n/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.PlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.PlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.PlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.PlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.tree_node_checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.PlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.PlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (this.checkbox) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.plus_group_node\", BI.PlusGroupNode);/**\r\n * Created by Windy on 2018/2/1.\r\n */\r\nBI.Switch = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n extraCls: \"bi-switch\",\r\n height: 22,\r\n width: 44,\r\n logic: {\r\n dynamic: false\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n ref: function () {\r\n self.layout = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n cls: \"circle-button bi-card\"\r\n },\r\n width: 18,\r\n height: 18,\r\n top: 2,\r\n left: this.options.selected ? 24 : 2\r\n }]\r\n };\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.Switch.superclass.setSelected.apply(this, arguments);\r\n this.layout.attr(\"items\")[0].left = v ? 24 : 2;\r\n this.layout.resize();\r\n },\r\n\r\n doClick: function () {\r\n BI.Switch.superclass.doClick.apply(this, arguments);\r\n this.fireEvent(BI.Switch.EVENT_CHANGE);\r\n }\r\n});\r\nBI.Switch.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.switch\", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-first-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.FirstTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"first-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.FirstTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.FirstTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.first_tree_leaf_item\", BI.FirstTreeLeafItem);BI.IconTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-icon-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n iconCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var icon = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n width: 24,\r\n cls: o.iconCls,\r\n items: [{\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }]\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 16,\r\n el: icon\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items,\r\n hgap: 5\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.IconTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.icon_tree_leaf_item\", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-last-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.LastTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"last-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.LastTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n // this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.LastTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n // this.checkbox.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.last_tree_leaf_item\", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-mid-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MidTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"mid-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MidTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MidTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.mid_tree_leaf_item\", BI.MidTreeLeafItem);/**\r\n * @class BI.MultiLayerIconTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-icon-tree-leaf-item bi-list-item-active\",\r\n layer: 0,\r\n height: 24,\r\n iconCls: \"\",\r\n iconHeight: 16,\r\n iconWidth: 16\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.icon_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n iconCls: o.iconCls,\r\n id: o.id,\r\n pId: o.pId,\r\n isFront: true,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function () {\r\n items.push({\r\n type: \"bi.layout\",\r\n width: 15,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 15),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.item.doRedMark.apply(this.item, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.item.unRedMark.apply(this.item, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_icon_tree_leaf_item\", BI.MultiLayerIconTreeLeafItem);\r\n/**\r\n * 树叶子节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.TreeTextLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TreeTextLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-tree-text-leaf-item bi-list-item-active\",\r\n id: \"\",\r\n pId: \"\",\r\n height: 24,\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TreeTextLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n lgap: o.lgap,\r\n rgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.text\r\n }]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.tree_text_leaf_item\", BI.TreeTextLeafItem);/**\r\n * 专门为calendar的视觉加的button,作为私有button,不能配置任何属性,也不要用这个玩意\r\n */\r\nBI.CalendarDateItem = BI.inherit(BI.BasicButton, {\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n value: o.value,\r\n ref: function () {\r\n self.text = this;\r\n }\r\n },\r\n left: o.lgap,\r\n right: o.rgap,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);\r\n this.text.setSelected(b);\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n }\r\n});\r\nBI.shortcut(\"bi.calendar_date_item\", BI.CalendarDateItem);/**\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.Calendar\r\n * @extends BI.Widget\r\n */\r\nBI.Calendar = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Calendar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n year: 2015,\r\n month: 8,\r\n day: 25\r\n });\r\n },\r\n\r\n _dateCreator: function (Y, M, D) {\r\n var self = this, o = this.options, log = {}, De = BI.getDate();\r\n var mins = o.min.match(/\\d+/g);\r\n var maxs = o.max.match(/\\d+/g);\r\n Y < (mins[0] | 0) && (Y = (mins[0] | 0));\r\n Y > (maxs[0] | 0) && (Y = (maxs[0] | 0));\r\n\r\n De.setFullYear(Y, M, D);\r\n log.ymd = [De.getFullYear(), De.getMonth(), De.getDate()];\r\n\r\n var MD = BI.Date._MD.slice(0);\r\n MD[1] = BI.isLeapYear(log.ymd[0]) ? 29 : 28;\r\n\r\n // 日期所在月第一天\r\n De.setFullYear(log.ymd[0], log.ymd[1], 1);\r\n // 是周几\r\n log.FDay = De.getDay();\r\n\r\n // 当前BI.StartOfWeek与周日对齐后的FDay是周几\r\n var offSetFDay = (7 - BI.StartOfWeek + log.FDay) % 7;\r\n\r\n // 当前月页第一天是几号\r\n log.PDay = MD[M === 0 ? 11 : M - 1] - offSetFDay + 1;\r\n log.NDay = 1;\r\n\r\n var items = [];\r\n BI.each(BI.range(42), function (i) {\r\n var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD;\r\n // 上个月的日期\r\n if (i < offSetFDay) {\r\n td.lastMonth = true;\r\n DD = i + log.PDay;\r\n // 上一年\r\n MM === 1 && (YY -= 1);\r\n MM = MM === 1 ? 12 : MM - 1;\r\n } else if (i >= offSetFDay && i < offSetFDay + MD[log.ymd[1]]) {\r\n DD = i - offSetFDay + 1;\r\n if (i - offSetFDay + 1 === log.ymd[2]) {\r\n td.currentDay = true;\r\n }\r\n } else {\r\n td.nextMonth = true;\r\n DD = log.NDay++;\r\n MM === 12 && (YY += 1);\r\n MM = MM === 12 ? 1 : MM + 1;\r\n }\r\n if (BI.checkDateVoid(YY, MM, DD, mins, maxs)[0]) {\r\n td.disabled = true;\r\n }\r\n td.text = DD;\r\n items.push(td);\r\n });\r\n return items;\r\n },\r\n\r\n _init: function () {\r\n BI.Calendar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var items = BI.map(this._getWeekLabel(), function (i, value) {\r\n return {\r\n type: \"bi.label\",\r\n height: 24,\r\n text: value\r\n };\r\n });\r\n var title = BI.createWidget({\r\n type: \"bi.button_group\",\r\n height: 44,\r\n items: items,\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 5,\r\n vgap: 10\r\n }]\r\n });\r\n\r\n this.days = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(this._getItems(), {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({}, o.logic, {\r\n columns: 7,\r\n rows: 6,\r\n columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],\r\n rowSize: 24,\r\n vgap: 10\r\n }))]\r\n });\r\n this.days.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", title, this.days)\r\n }))));\r\n },\r\n\r\n _getWeekLabel: function () {\r\n return BI.map(BI.range(0, 7), function (idx, v) {\r\n return BI.Date._SDN[(v + BI.StartOfWeek) % 7];\r\n });\r\n },\r\n\r\n isFrontDate: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();\r\n Y = Y | 0;\r\n De.setFullYear(Y, M, 1);\r\n var newDate = BI.getOffsetDate(De, -1 * (day + 1));\r\n return !!BI.checkDateVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0];\r\n },\r\n\r\n isFinalDate: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();\r\n Y = Y | 0;\r\n De.setFullYear(Y, M, 1);\r\n var newDate = BI.getOffsetDate(De, 42 - day);\r\n return !!BI.checkDateVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0];\r\n },\r\n\r\n _getItems: function () {\r\n var o = this.options;\r\n var days = this._dateCreator(o.year, o.month - 1, o.day);\r\n var items = [];\r\n items.push(days.slice(0, 7));\r\n items.push(days.slice(7, 14));\r\n items.push(days.slice(14, 21));\r\n items.push(days.slice(21, 28));\r\n items.push(days.slice(28, 35));\r\n items.push(days.slice(35, 42));\r\n\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);\r\n return BI.extend(td, {\r\n type: \"bi.calendar_date_item\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24,\r\n value: o.year + \"-\" + month + \"-\" + td.text,\r\n disabled: td.lastMonth || td.nextMonth || td.disabled,\r\n lgap: 5,\r\n rgap: 5\r\n // selected: td.currentDay\r\n });\r\n });\r\n });\r\n },\r\n\r\n _populate: function() {\r\n this.days.populate(this._getItems());\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.min)) {\r\n o.min = minDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.max)) {\r\n o.max = maxDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.days.setValue([ob.year + \"-\" + ob.month + \"-\" + ob.day]);\r\n },\r\n\r\n getValue: function () {\r\n var date = this.days.getValue()[0].match(/\\d+/g);\r\n return {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n };\r\n }\r\n});\r\n\r\nBI.extend(BI.Calendar, {\r\n getPageByDateJSON: function (json) {\r\n var year = BI.getDate().getFullYear();\r\n var month = BI.getDate().getMonth();\r\n var page = (json.year - year) * 12;\r\n page += json.month - 1 - month;\r\n return page;\r\n },\r\n getDateJSONByPage: function (v) {\r\n var months = BI.getDate().getMonth();\r\n var page = v;\r\n\r\n // 对当前page做偏移,使到当前年初\r\n page = page + months;\r\n\r\n var year = BI.parseInt(page / 12);\r\n if(page < 0 && page % 12 !== 0) {\r\n year--;\r\n }\r\n var month = page >= 0 ? (page % 12) : ((12 + page % 12) % 12);\r\n return {\r\n year: BI.getDate().getFullYear() + year,\r\n month: month + 1\r\n };\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.calendar\", BI.Calendar);/**\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.YearCalendar\r\n * @extends BI.Widget\r\n */\r\nBI.YearCalendar = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-year-calendar\",\r\n behaviors: {},\r\n logic: {\r\n dynamic: false\r\n },\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n year: null\r\n });\r\n },\r\n\r\n _yearCreator: function (Y) {\r\n var o = this.options;\r\n Y = Y | 0;\r\n var start = BI.YearCalendar.getStartYear(Y);\r\n var items = [];\r\n // 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的\r\n var startDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var endDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) {\r\n var td = {};\r\n if (BI.checkDateVoid(start + i, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), \"%Y-%X-%d\"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), \"%Y-%X-%d\"))[0]) {\r\n td.disabled = true;\r\n }\r\n td.text = start + i;\r\n items.push(td);\r\n });\r\n return items;\r\n },\r\n\r\n _init: function () {\r\n BI.YearCalendar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.currentYear = BI.getDate().getFullYear();\r\n\r\n this.years = BI.createWidget({\r\n type: \"bi.button_group\",\r\n behaviors: o.behaviors,\r\n items: BI.createItems(this._getItems(), {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({}, o.logic, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 24\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1\r\n }]\r\n });\r\n this.years.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", this.years)\r\n }))));\r\n },\r\n\r\n isFrontYear: function () {\r\n var o = this.options;\r\n var Y = o.year;\r\n Y = Y | 0;\r\n return !!BI.checkDateVoid(BI.YearCalendar.getStartYear(Y) - 1, 1, 1, o.min, o.max)[0];\r\n },\r\n\r\n isFinalYear: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year;\r\n Y = Y | 0;\r\n return !!BI.checkDateVoid(BI.YearCalendar.getEndYear(Y) + 1, 1, 1, o.min, o.max)[0];\r\n },\r\n\r\n _getItems: function () {\r\n var o = this.options;\r\n var years = this._yearCreator(o.year || this.currentYear);\r\n\r\n // 纵向排列年\r\n var len = years.length, tyears = BI.makeArray(len, \"\");\r\n var map = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11];\r\n BI.each(years, function (i, y) {\r\n tyears[i] = years[map[i]];\r\n });\r\n\r\n var items = [];\r\n items.push(tyears.slice(0, 2));\r\n items.push(tyears.slice(2, 4));\r\n items.push(tyears.slice(4, 6));\r\n items.push(tyears.slice(6, 8));\r\n items.push(tyears.slice(8, 10));\r\n items.push(tyears.slice(10, 12));\r\n\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return BI.extend(td, {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24,\r\n width: 45,\r\n value: td.text,\r\n disabled: td.disabled\r\n });\r\n });\r\n });\r\n },\r\n\r\n _populate: function () {\r\n this.years.populate(this._getItems());\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.min)) {\r\n o.min = minDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n o.max = maxDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setValue: function (val) {\r\n this.years.setValue([val]);\r\n },\r\n\r\n getValue: function () {\r\n return this.years.getValue()[0];\r\n }\r\n});\r\n// 类方法\r\nBI.extend(BI.YearCalendar, {\r\n INTERVAL: 12,\r\n\r\n // 获取显示的第一年\r\n getStartYear: function (year) {\r\n var cur = BI.getDate().getFullYear();\r\n return year - ((year - cur + 3) % BI.YearCalendar.INTERVAL + 12) % BI.YearCalendar.INTERVAL;\r\n },\r\n\r\n getEndYear: function (year) {\r\n return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;\r\n },\r\n\r\n getPageByYear: function (year) {\r\n var cur = BI.getDate().getFullYear();\r\n year = BI.YearCalendar.getStartYear(year);\r\n return (year - cur + 3) / BI.YearCalendar.INTERVAL;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.year_calendar\", BI.YearCalendar);/**\r\n * Created by roy on 15/10/16.\r\n * 右与下箭头切换的树节点\r\n */\r\nBI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-arrow-group-node-checkbox\"\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v) {\r\n this.element.removeClass(\"expander-right-font\").addClass(\"expander-down-font\");\r\n } else {\r\n this.element.removeClass(\"expander-down-font\").addClass(\"expander-right-font\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.arrow_group_node_checkbox\", BI.ArrowTreeGroupNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.CheckingMarkNode\r\n * @extends BI.IconButton\r\n */\r\nBI.CheckingMarkNode = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"check-mark-font\"\r\n });\r\n },\r\n _init: function () {\r\n BI.CheckingMarkNode.superclass._init.apply(this, arguments);\r\n this.setSelected(this.options.selected);\r\n\r\n },\r\n setSelected: function (v) {\r\n BI.CheckingMarkNode.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"check-mark-font\");\r\n } else {\r\n this.element.removeClass(\"check-mark-font\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.checking_mark_node\", BI.CheckingMarkNode);/**\r\n * 十字型的树节点\r\n * @class BI.FirstTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type2\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"tree-expand-icon-type2\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type2\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.first_tree_node_checkbox\", BI.FirstTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.LastTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type4\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if (v === true) {\r\n this.element.addClass(\"tree-expand-icon-type4\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type4\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.last_tree_node_checkbox\", BI.LastTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.MidTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type3\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"tree-expand-icon-type3\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type3\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.mid_tree_node_checkbox\", BI.MidTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.TreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.TreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type1\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v) {\r\n this.element.addClass(\"tree-expand-icon-type1\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type1\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.tree_node_checkbox\", BI.TreeNodeCheckbox);/**\r\n * 自定义选色\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.CustomColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.CustomColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-custom-color-chooser\",\r\n width: 227,\r\n height: 245\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CustomColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.editor, {\r\n type: \"bi.simple_color_picker_editor\"\r\n });\r\n this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n });\r\n this.farbtastic = BI.createWidget({\r\n type: \"bi.farbtastic\"\r\n });\r\n this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.editor,\r\n left: 0,\r\n top: 0,\r\n right: 0\r\n }],\r\n height: 30\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.farbtastic,\r\n left: 15,\r\n right: 15,\r\n top: 7\r\n }],\r\n height: 215\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (color) {\r\n this.editor.setValue(color);\r\n this.farbtastic.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n }\r\n});\r\nBI.CustomColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.custom_color_chooser\", BI.CustomColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.ColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-chooser\",\r\n value: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 1,\r\n isNeedAdjustWidth: false,\r\n isNeedAdjustHeight: false,\r\n el: BI.extend({\r\n type: o.width <= 24 ? \"bi.color_chooser_trigger\" : \"bi.long_color_chooser_trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n width: o.width - 2,\r\n height: o.height - 2\r\n }, o.el),\r\n popup: {\r\n el: BI.extend({\r\n type: \"bi.color_chooser_popup\",\r\n ref: function (_ref) {\r\n self.colorPicker = _ref;\r\n },\r\n listeners: [{\r\n eventName: BI.ColorChooserPopup.EVENT_VALUE_CHANGE,\r\n action: function () {\r\n fn();\r\n if (!self._isRGBColor(self.colorPicker.getValue())) {\r\n self.combo.hideView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.ColorChooserPopup.EVENT_CHANGE,\r\n action: function () {\r\n fn();\r\n self.combo.hideView();\r\n }\r\n }]\r\n }, o.popup),\r\n width: 230\r\n },\r\n value: o.value\r\n });\r\n\r\n var fn = function () {\r\n var color = self.colorPicker.getValue();\r\n self.trigger.setValue(color);\r\n };\r\n\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _isRGBColor: function (color) {\r\n return BI.isNotEmptyString(color) && color !== \"transparent\";\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo.showView();\r\n },\r\n\r\n setValue: function (color) {\r\n this.combo.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n }\r\n});\r\nBI.ColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser\", BI.ColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooserPopup\r\n * @extends BI.Widget\r\n */\r\nBI.ColorChooserPopup = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-color-chooser-popup\",\r\n width: 230,\r\n height: 145,\r\n simple: false // 简单模式, popup中没有自动和透明\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.colorEditor = BI.createWidget(o.editor, {\r\n type: o.simple ? \"bi.simple_color_picker_editor\" : \"bi.color_picker_editor\",\r\n value: o.value,\r\n cls: \"bi-header-background bi-border-bottom\",\r\n height: 30\r\n });\r\n\r\n this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);\r\n });\r\n\r\n this.storeColors = BI.createWidget({\r\n type: \"bi.color_picker\",\r\n cls: \"bi-border-bottom bi-border-right\",\r\n items: [this._digestStoreColors(this._getStoreColors())],\r\n width: 210,\r\n height: 24,\r\n value: o.value\r\n });\r\n this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue()[0]);\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.colorPicker = BI.createWidget({\r\n type: \"bi.color_picker\",\r\n width: 210,\r\n height: 50,\r\n value: o.value\r\n });\r\n\r\n this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue()[0]);\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.customColorChooser = BI.createWidget({\r\n type: \"bi.custom_color_chooser\",\r\n editor: o.editor\r\n });\r\n\r\n var panel = BI.createWidget({\r\n type: \"bi.popup_panel\",\r\n buttons: [BI.i18nText(\"BI-Basic_Cancel\"), BI.i18nText(\"BI-Basic_Save\")],\r\n title: BI.i18nText(\"BI-Custom_Color\"),\r\n el: this.customColorChooser,\r\n stopPropagation: false,\r\n bgap: -1,\r\n rgap: 1,\r\n lgap: 1,\r\n minWidth: 227\r\n });\r\n\r\n this.more = BI.createWidget({\r\n type: \"bi.combo\",\r\n cls: \"bi-border-top\",\r\n container: null,\r\n direction: \"right,top\",\r\n isNeedAdjustHeight: false,\r\n el: {\r\n type: \"bi.text_item\",\r\n cls: \"color-chooser-popup-more bi-list-item\",\r\n textAlign: \"center\",\r\n height: 24,\r\n textLgap: 10,\r\n text: BI.i18nText(\"BI-Basic_More\") + \"...\"\r\n },\r\n popup: panel\r\n });\r\n\r\n this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {\r\n self.customColorChooser.setValue(self.getValue());\r\n });\r\n panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.more.hideView();\r\n break;\r\n case 1:\r\n self.setValue(self.customColorChooser.getValue());\r\n self._dealStoreColors();\r\n self.more.hideView();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n break;\r\n }\r\n });\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vtape\",\r\n items: [this.colorEditor, {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.storeColors,\r\n left: 10,\r\n right: 10,\r\n top: 5\r\n }]\r\n },\r\n height: 29\r\n }, {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.colorPicker,\r\n left: 10,\r\n right: 10,\r\n top: 5,\r\n bottom: 5\r\n }]\r\n },\r\n height: 60\r\n }, {\r\n el: this.more,\r\n height: 24\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"disable-mask\",\r\n invisible: !o.disabled,\r\n ref: function () {\r\n self.mask = this;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this;\r\n var o = this.options;\r\n if (BI.isNotNull(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.ColorChooserPopup.superclass._setEnable.apply(this, arguments);\r\n this.mask.setVisible(!enable);\r\n },\r\n\r\n _dealStoreColors: function () {\r\n var color = this.getValue();\r\n var colors = this._getStoreColors();\r\n var que = new BI.Queue(8);\r\n que.fromArray(colors);\r\n que.remove(color);\r\n que.unshift(color);\r\n var array = que.toArray();\r\n BI.Cache.setItem(\"colors\", BI.array2String(array));\r\n this.setStoreColors(array);\r\n },\r\n\r\n _digestStoreColors: function (colors) {\r\n var items = BI.map(colors, function (i, color) {\r\n return {\r\n value: color\r\n };\r\n });\r\n BI.count(colors.length, 8, function (i) {\r\n items.push({\r\n value: \"\",\r\n disabled: true\r\n });\r\n });\r\n return items;\r\n },\r\n\r\n _getStoreColors: function() {\r\n var self = this, o = this.options;\r\n var colorsArray = BI.string2Array(BI.Cache.getItem(\"colors\") || \"\");\r\n return BI.filter(colorsArray, function (idx, color) {\r\n return o.simple ? self._isRGBColor(color) : true;\r\n });\r\n },\r\n\r\n _isRGBColor: function (color) {\r\n return BI.isNotEmptyString(color) && color !== \"transparent\";\r\n },\r\n\r\n setStoreColors: function (colors) {\r\n if (BI.isArray(colors)) {\r\n this.storeColors.populate([this._digestStoreColors(colors)]);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n this.colorEditor.setValue(color);\r\n this.colorPicker.setValue(color);\r\n this.storeColors.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.colorEditor.getValue();\r\n }\r\n});\r\nBI.ColorChooserPopup.EVENT_VALUE_CHANGE = \"EVENT_VALUE_CHANGE\";\r\nBI.ColorChooserPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser_popup\", BI.ColorChooserPopup);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.SimpleColorChooserPopup\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorChooserPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-chooser-popup\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorChooserPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popup = BI.createWidget({\r\n type: \"bi.color_chooser_popup\",\r\n value: o.value,\r\n element: this,\r\n simple: true // 是否有自动\r\n });\r\n this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE, arguments);\r\n });\r\n },\r\n\r\n setStoreColors: function (colors) {\r\n this.popup.setStoreColors(colors);\r\n },\r\n\r\n setValue: function (color) {\r\n this.popup.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE = \"EVENT_VALUE_CHANGE\";\r\nBI.SimpleColorChooserPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_chooser_popup\", BI.SimpleColorChooserPopup);/**\r\n * 简单选色控件,没有自动和透明\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.SimpleColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-simple-color-chooser\",\r\n value: \"#ffffff\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.color_chooser\",\r\n element: this,\r\n container: o.container,\r\n value: o.value,\r\n width: o.width,\r\n height: o.height,\r\n popup: {\r\n type: \"bi.simple_color_chooser_popup\"\r\n }\r\n });\r\n this.combo.on(BI.ColorChooser.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo.showView();\r\n },\r\n\r\n setValue: function (color) {\r\n this.combo.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n }\r\n});\r\nBI.SimpleColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_chooser\", BI.SimpleColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooserTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.ColorChooserTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-chooser-trigger bi-border\",\r\n height: 22\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorChooserTrigger.superclass._init.apply(this, arguments);\r\n this.colorContainer = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-chooser-trigger-content\" + (BI.isIE9Below && BI.isIE9Below() ? \" hack\" : \"\")\r\n });\r\n\r\n var down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font icon-size-12\",\r\n width: 12,\r\n height: 8\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.colorContainer,\r\n left: 3,\r\n right: 3,\r\n top: 3,\r\n bottom: 3\r\n }, {\r\n el: down,\r\n right: -1,\r\n bottom: 1\r\n }]\r\n });\r\n if (BI.isNotNull(this.options.value)) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments);\r\n if (color === \"\") {\r\n this.colorContainer.element.css(\"background-color\", \"\").removeClass(\"trans-color-background\").addClass(\"auto-color-background\");\r\n } else if (color === \"transparent\") {\r\n this.colorContainer.element.css(\"background-color\", \"\").removeClass(\"auto-color-background\").addClass(\"trans-color-background\");\r\n } else {\r\n this.colorContainer.element.css({\"background-color\": color}).removeClass(\"auto-color-background\").removeClass(\"trans-color-background\");\r\n }\r\n }\r\n});\r\nBI.ColorChooserTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser_trigger\", BI.ColorChooserTrigger);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.LongColorChooserTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.LongColorChooserTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-chooser-trigger bi-border\",\r\n height: 22\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LongColorChooserTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.colorContainer = BI.createWidget({\r\n type: \"bi.htape\",\r\n cls: \"color-chooser-trigger-content\",\r\n items: [{\r\n type: \"bi.icon_change_button\",\r\n ref: function (_ref) {\r\n self.changeIcon = _ref;\r\n },\r\n disableSelected: true,\r\n iconCls: \"auto-color-icon\",\r\n width: 24,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n ref: function (_ref) {\r\n self.label = _ref;\r\n },\r\n textAlign: \"left\",\r\n hgap: 5,\r\n height: 18,\r\n text: BI.i18nText(\"BI-Basic_Auto\")\r\n }\r\n }]\r\n });\r\n\r\n var down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font icon-size-12\",\r\n width: 12,\r\n height: 8\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.colorContainer,\r\n left: 3,\r\n right: 3,\r\n top: 3,\r\n bottom: 3\r\n }, {\r\n el: down,\r\n right: 3,\r\n bottom: 3\r\n }]\r\n });\r\n if (this.options.value) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n BI.LongColorChooserTrigger.superclass.setValue.apply(this, arguments);\r\n if (color === \"\") {\r\n this.colorContainer.element.css(\"background-color\", \"\");\r\n this.changeIcon.setVisible(true);\r\n this.label.setVisible(true);\r\n this.changeIcon.setIcon(\"auto-color-icon\");\r\n this.label.setText(BI.i18nText(\"BI-Basic_Auto\"));\r\n } else if (color === \"transparent\") {\r\n this.colorContainer.element.css(\"background-color\", \"\");\r\n this.changeIcon.setVisible(true);\r\n this.label.setVisible(true);\r\n this.changeIcon.setIcon(\"trans-color-icon\");\r\n this.label.setText(BI.i18nText(\"BI-Transparent_Color\"));\r\n } else {\r\n this.colorContainer.element.css({\"background-color\": color});\r\n this.changeIcon.setVisible(false);\r\n this.label.setVisible(false);\r\n }\r\n }\r\n});\r\nBI.LongColorChooserTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.long_color_chooser_trigger\", BI.LongColorChooserTrigger);/**\r\n * 简单选色控件按钮\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPickerButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.ColorPickerButton = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ColorPickerButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-picker-button bi-background bi-border-top bi-border-left\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorPickerButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.value) {\r\n this.element.css(\"background-color\", o.value);\r\n var name = this.getName();\r\n this.element.hover(function () {\r\n self._createMask();\r\n if (self.isEnabled()) {\r\n BI.Maskers.show(name);\r\n }\r\n }, function () {\r\n if (!self.isSelected()) {\r\n BI.Maskers.hide(name);\r\n }\r\n });\r\n }\r\n },\r\n\r\n _createMask: function () {\r\n var o = this.options, name = this.getName();\r\n if (this.isEnabled() && !BI.Maskers.has(name)) {\r\n var w = BI.Maskers.make(name, this, {\r\n offset: {\r\n left: -1,\r\n top: -1,\r\n right: -1,\r\n bottom: -1\r\n }\r\n });\r\n w.element.addClass(\"color-picker-button-mask\").css(\"background-color\", o.value);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.ColorPickerButton.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this._createMask();\r\n }\r\n BI.Maskers[b ? \"show\" : \"hide\"](this.getName());\r\n }\r\n});\r\nBI.ColorPickerButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker_button\", BI.ColorPickerButton);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPicker\r\n * @extends BI.Widget\r\n */\r\nBI.ColorPicker = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker\",\r\n items: null\r\n });\r\n },\r\n\r\n _items: [\r\n [{\r\n value: \"#ffffff\"\r\n }, {\r\n value: \"#f2f2f2\"\r\n }, {\r\n value: \"#e5e5e5\"\r\n }, {\r\n value: \"#d9d9d9\"\r\n }, {\r\n value: \"#cccccc\"\r\n }, {\r\n value: \"#bfbfbf\"\r\n }, {\r\n value: \"#b2b2b2\"\r\n }, {\r\n value: \"#a6a6a6\"\r\n }, {\r\n value: \"#999999\"\r\n }, {\r\n value: \"#8c8c8c\"\r\n }, {\r\n value: \"#808080\"\r\n }, {\r\n value: \"#737373\"\r\n }, {\r\n value: \"#666666\"\r\n }, {\r\n value: \"#4d4d4d\"\r\n }, {\r\n value: \"#333333\"\r\n }, {\r\n value: \"#000000\"\r\n }],\r\n [{\r\n value: \"#d8b5a6\"\r\n }, {\r\n value: \"#ff9e9a\"\r\n }, {\r\n value: \"#ffc17d\"\r\n }, {\r\n value: \"#f5e56b\"\r\n }, {\r\n value: \"#d8e698\"\r\n }, {\r\n value: \"#e0ebaf\"\r\n }, {\r\n value: \"#c3d825\"\r\n }, {\r\n value: \"#bbe2e7\"\r\n }, {\r\n value: \"#85d3cd\"\r\n }, {\r\n value: \"#bde1e6\"\r\n }, {\r\n value: \"#a0d8ef\"\r\n }, {\r\n value: \"#89c3eb\"\r\n }, {\r\n value: \"#bbc8e6\"\r\n }, {\r\n value: \"#bbbcde\"\r\n }, {\r\n value: \"#d6b4cc\"\r\n }, {\r\n value: \"#fbc0d3\"\r\n }],\r\n [{\r\n value: \"#bb9581\"\r\n }, {\r\n value: \"#f37d79\"\r\n }, {\r\n value: \"#fba74f\"\r\n }, {\r\n value: \"#ffdb4f\"\r\n }, {\r\n value: \"#c7dc68\"\r\n }, {\r\n value: \"#b0ca71\"\r\n }, {\r\n value: \"#99ab4e\"\r\n }, {\r\n value: \"#84b9cb\"\r\n }, {\r\n value: \"#00a3af\"\r\n }, {\r\n value: \"#2ca9e1\"\r\n }, {\r\n value: \"#0095d9\"\r\n }, {\r\n value: \"#4c6cb3\"\r\n }, {\r\n value: \"#8491c3\"\r\n }, {\r\n value: \"#a59aca\"\r\n }, {\r\n value: \"#cc7eb1\"\r\n }, {\r\n value: \"#e89bb4\"\r\n }],\r\n [{\r\n value: \"#9d775f\"\r\n }, {\r\n value: \"#dd4b4b\"\r\n }, {\r\n value: \"#ef8b07\"\r\n }, {\r\n value: \"#fcc800\"\r\n }, {\r\n value: \"#aacf53\"\r\n }, {\r\n value: \"#82ae46\"\r\n }, {\r\n value: \"#69821b\"\r\n }, {\r\n value: \"#59b9c6\"\r\n }, {\r\n value: \"#2a83a2\"\r\n }, {\r\n value: \"#007bbb\"\r\n }, {\r\n value: \"#19448e\"\r\n }, {\r\n value: \"#274a78\"\r\n }, {\r\n value: \"#4a488e\"\r\n }, {\r\n value: \"#7058a3\"\r\n }, {\r\n value: \"#884898\"\r\n }, {\r\n value: \"#d47596\"\r\n }]\r\n ],\r\n\r\n _init: function () {\r\n BI.ColorPicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.colors = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(o.items || this._items, {\r\n type: \"bi.color_picker_button\",\r\n once: false\r\n }),\r\n layouts: [{\r\n type: \"bi.grid\"\r\n }],\r\n value: o.value\r\n });\r\n this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n var args = [].slice.call(arguments);\r\n args[0] = BI.createItems(items, {\r\n type: \"bi.color_picker_button\",\r\n once: false\r\n });\r\n this.colors.populate.apply(this.colors, args);\r\n },\r\n\r\n setValue: function (color) {\r\n this.colors.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.colors.getValue();\r\n }\r\n});\r\nBI.ColorPicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker\", BI.ColorPicker);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPickerEditor\r\n * @extends BI.Widget\r\n */\r\nBI.ColorPickerEditor = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n REB_WIDTH: 32\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker-editor\",\r\n // width: 200,\r\n height: 30\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorPickerEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this.constants;\r\n this.storeValue = {};\r\n this.colorShow = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-picker-editor-display bi-card bi-border\",\r\n height: 16,\r\n width: 16\r\n });\r\n var RGB = BI.createWidgets(BI.createItems([{text: \"R\"}, {text: \"G\"}, {text: \"B\"}], {\r\n type: \"bi.label\",\r\n cls: \"color-picker-editor-label\",\r\n width: 20,\r\n height: 20\r\n }));\r\n\r\n var checker = function (v) {\r\n return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255;\r\n };\r\n var Ws = BI.createWidgets([{}, {}, {}], {\r\n type: \"bi.small_text_editor\",\r\n cls: \"color-picker-editor-input\",\r\n validationChecker: checker,\r\n errorText: BI.i18nText(\"BI-Color_Picker_Error_Text\"),\r\n allowBlank: true,\r\n value: 255,\r\n width: c.REB_WIDTH,\r\n height: 20\r\n });\r\n BI.each(Ws, function (i, w) {\r\n w.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self._checkEditors();\r\n if (checker(self.storeValue.r) && checker(self.storeValue.g) && checker(self.storeValue.b)) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n });\r\n this.R = Ws[0];\r\n this.G = Ws[1];\r\n this.B = Ws[2];\r\n\r\n this.none = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"auto-color-icon\",\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n title: BI.i18nText(\"BI-Basic_Auto\")\r\n });\r\n this.none.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (this.isSelected()) {\r\n self.lastColor = self.getValue();\r\n self.setValue(\"\");\r\n } else {\r\n self.setValue(self.lastColor || \"#ffffff\");\r\n }\r\n if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || self._isEmptyRGB()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n this.transparent = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"trans-color-icon\",\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n title: BI.i18nText(\"BI-Transparent_Color\")\r\n });\r\n this.transparent.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (this.isSelected()) {\r\n self.lastColor = self.getValue();\r\n self.setValue(\"transparent\");\r\n } else {\r\n if (self.lastColor === \"transparent\") {\r\n self.lastColor = \"\";\r\n }\r\n self.setValue(self.lastColor || \"#ffffff\");\r\n }\r\n if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) ||\r\n self._isEmptyRGB()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [{\r\n el: this.colorShow,\r\n width: 16\r\n }, {\r\n el: RGB[0],\r\n width: 20\r\n }, {\r\n el: this.R,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[1],\r\n width: 20\r\n }, {\r\n el: this.G,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[2],\r\n width: 20\r\n }, {\r\n el: this.B,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: this.transparent,\r\n width: 16,\r\n lgap: 5\r\n }, {\r\n el: this.none,\r\n width: 16,\r\n lgap: 5\r\n }]\r\n },\r\n left: 10,\r\n right: 10,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _checkEditors: function () {\r\n if(BI.isEmptyString(this.R.getValue())) {\r\n this.R.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.G.getValue())) {\r\n this.G.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.B.getValue())) {\r\n this.B.setValue(0);\r\n }\r\n this.storeValue = {\r\n r: this.R.getValue() || 0,\r\n g: this.G.getValue() || 0,\r\n b: this.B.getValue() || 0\r\n };\r\n },\r\n\r\n _isEmptyRGB: function () {\r\n return BI.isEmptyString(this.storeValue.r) && BI.isEmptyString(this.storeValue.g) && BI.isEmptyString(this.storeValue.b);\r\n },\r\n\r\n _showPreColor: function (color) {\r\n if (color === \"\") {\r\n this.colorShow.element.css(\"background-color\", \"\").removeClass(\"trans-color-background\").addClass(\"auto-color-normal-background\");\r\n } else if (color === \"transparent\") {\r\n this.colorShow.element.css(\"background-color\", \"\").removeClass(\"auto-color-normal-background\").addClass(\"trans-color-background\");\r\n } else {\r\n this.colorShow.element.css({\"background-color\": color}).removeClass(\"auto-color-normal-background\").removeClass(\"trans-color-background\");\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.ColorPickerEditor.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n if (color === \"transparent\") {\r\n this.transparent.setSelected(true);\r\n this.none.setSelected(false);\r\n this._showPreColor(\"transparent\");\r\n this.R.setValue(\"\");\r\n this.G.setValue(\"\");\r\n this.B.setValue(\"\");\r\n this.storeValue = {\r\n r: \"\",\r\n g: \"\",\r\n b: \"\"\r\n };\r\n return;\r\n }\r\n if (!color) {\r\n color = \"\";\r\n this.none.setSelected(true);\r\n } else {\r\n this.none.setSelected(false);\r\n }\r\n this.transparent.setSelected(false);\r\n this._showPreColor(color);\r\n var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));\r\n this.storeValue = {\r\n r: BI.isNull(json.r) ? \"\" : json.r,\r\n g: BI.isNull(json.r) ? \"\" : json.g,\r\n b: BI.isNull(json.r) ? \"\" : json.b\r\n };\r\n this.R.setValue(this.storeValue.r);\r\n this.G.setValue(this.storeValue.g);\r\n this.B.setValue(this.storeValue.b);\r\n },\r\n\r\n getValue: function () {\r\n if (this._isEmptyRGB() && this.transparent.isSelected()) {\r\n return \"transparent\";\r\n }\r\n return BI.DOM.rgb2hex(BI.DOM.json2rgb({\r\n r: this.storeValue.r,\r\n g: this.storeValue.g,\r\n b: this.storeValue.b\r\n }));\r\n }\r\n});\r\nBI.ColorPickerEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker_editor\", BI.ColorPickerEditor);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.SimpleColorPickerEditor\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n REB_WIDTH: 32\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker-editor\",\r\n // width: 200,\r\n height: 30\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorPickerEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this.constants;\r\n this.colorShow = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-picker-editor-display bi-card bi-border\",\r\n height: 16,\r\n width: 16\r\n });\r\n var RGB = BI.createWidgets(BI.createItems([{text: \"R\"}, {text: \"G\"}, {text: \"B\"}], {\r\n type: \"bi.label\",\r\n cls: \"color-picker-editor-label\",\r\n width: 20,\r\n height: 20\r\n }));\r\n\r\n var checker = function (v) {\r\n return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255;\r\n };\r\n var Ws = BI.createWidgets([{}, {}, {}], {\r\n type: \"bi.small_text_editor\",\r\n cls: \"color-picker-editor-input\",\r\n validationChecker: checker,\r\n errorText: BI.i18nText(\"BI-Color_Picker_Error_Text\"),\r\n allowBlank: true,\r\n value: 255,\r\n width: c.REB_WIDTH,\r\n height: 20\r\n });\r\n BI.each(Ws, function (i, w) {\r\n w.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self._checkEditors();\r\n if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n });\r\n this.R = Ws[0];\r\n this.G = Ws[1];\r\n this.B = Ws[2];\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical_adapt\",\r\n element: this,\r\n items: [{\r\n el: this.colorShow,\r\n width: 16,\r\n lgap: 20,\r\n rgap: 15\r\n }, {\r\n el: RGB[0],\r\n width: 20\r\n }, {\r\n el: this.R,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[1],\r\n width: 20\r\n }, {\r\n el: this.G,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[2],\r\n width: 20\r\n }, {\r\n el: this.B,\r\n width: c.REB_WIDTH\r\n }]\r\n });\r\n },\r\n\r\n _checkEditors: function () {\r\n if(BI.isEmptyString(this.R.getValue())) {\r\n this.R.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.G.getValue())) {\r\n this.G.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.B.getValue())) {\r\n this.B.setValue(0);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n this.colorShow.element.css({\"background-color\": color});\r\n var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));\r\n this.R.setValue(BI.isNull(json.r) ? \"\" : json.r);\r\n this.G.setValue(BI.isNull(json.g) ? \"\" : json.g);\r\n this.B.setValue(BI.isNull(json.b) ? \"\" : json.b);\r\n },\r\n\r\n getValue: function () {\r\n return BI.DOM.rgb2hex(BI.DOM.json2rgb({\r\n r: this.R.getValue(),\r\n g: this.G.getValue(),\r\n b: this.B.getValue()\r\n }));\r\n }\r\n});\r\nBI.SimpleColorPickerEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_picker_editor\", BI.SimpleColorPickerEditor);BI.Farbtastic = BI.inherit(BI.BasicButton, {\r\n\r\n constants: {\r\n RADIUS: 84,\r\n SQUARE: 100,\r\n WIDTH: 194\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-farbtastic\",\r\n width: 195,\r\n height: 195,\r\n stopPropagation: true,\r\n value: \"#000000\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"\",\r\n ref: function (_ref) {\r\n self.colorWrapper = _ref;\r\n }\r\n },\r\n top: 47,\r\n left: 47,\r\n width: 101,\r\n height: 101\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"wheel\",\r\n ref: function (_ref) {\r\n self.wheel = _ref;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"overlay\",\r\n ref: function (_ref) {\r\n self.overlay = _ref;\r\n }\r\n },\r\n top: 47,\r\n left: 47,\r\n width: 101,\r\n height: 101\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"marker\",\r\n ref: function (_ref) {\r\n self.hMarker = _ref;\r\n },\r\n scrollable: false,\r\n width: 17,\r\n height: 17\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"marker\",\r\n ref: function (_ref) {\r\n self.slMarker = _ref;\r\n },\r\n scrollable: false,\r\n width: 17,\r\n height: 17\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _unpack: function (color) {\r\n if (color.length === 7) {\r\n return [parseInt(\"0x\" + color.substring(1, 3)) / 255,\r\n parseInt(\"0x\" + color.substring(3, 5)) / 255,\r\n parseInt(\"0x\" + color.substring(5, 7)) / 255];\r\n } else if (color.length === 4) {\r\n return [parseInt(\"0x\" + color.substring(1, 2)) / 15,\r\n parseInt(\"0x\" + color.substring(2, 3)) / 15,\r\n parseInt(\"0x\" + color.substring(3, 4)) / 15];\r\n }\r\n },\r\n\r\n _pack: function (rgb) {\r\n var r = Math.round(rgb[0] * 255);\r\n var g = Math.round(rgb[1] * 255);\r\n var b = Math.round(rgb[2] * 255);\r\n return \"#\" + (r < 16 ? \"0\" : \"\") + r.toString(16) +\r\n (g < 16 ? \"0\" : \"\") + g.toString(16) +\r\n (b < 16 ? \"0\" : \"\") + b.toString(16);\r\n },\r\n\r\n _setColor: function (color) {\r\n var unpack = this._unpack(color);\r\n if (this.value !== color && unpack) {\r\n this.value = color;\r\n this.rgb = unpack;\r\n this.hsl = this._RGBToHSL(this.rgb);\r\n this._updateDisplay();\r\n }\r\n },\r\n\r\n _setHSL: function (hsl) {\r\n this.hsl = hsl;\r\n this.rgb = this._HSLToRGB(hsl);\r\n this.value = this._pack(this.rgb);\r\n this._updateDisplay();\r\n return this;\r\n },\r\n\r\n _HSLToRGB: function (hsl) {\r\n var m1, m2, r, g, b;\r\n var h = hsl[0], s = hsl[1], l = hsl[2];\r\n m2 = (l <= 0.5) ? l * (s + 1) : l + s - l * s;\r\n m1 = l * 2 - m2;\r\n return [this._hueToRGB(m1, m2, h + 0.33333),\r\n this._hueToRGB(m1, m2, h),\r\n this._hueToRGB(m1, m2, h - 0.33333)];\r\n },\r\n\r\n _hueToRGB: function (m1, m2, h) {\r\n h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);\r\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\r\n if (h * 2 < 1) return m2;\r\n if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;\r\n return m1;\r\n },\r\n\r\n _RGBToHSL: function (rgb) {\r\n var min, max, delta, h, s, l;\r\n var r = rgb[0], g = rgb[1], b = rgb[2];\r\n min = Math.min(r, Math.min(g, b));\r\n max = Math.max(r, Math.max(g, b));\r\n delta = max - min;\r\n l = (min + max) / 2;\r\n s = 0;\r\n if (l > 0 && l < 1) {\r\n s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));\r\n }\r\n h = 0;\r\n if (delta > 0) {\r\n if (max == r && max != g) h += (g - b) / delta;\r\n if (max == g && max != b) h += (2 + (b - r) / delta);\r\n if (max == b && max != r) h += (4 + (r - g) / delta);\r\n h /= 6;\r\n }\r\n return [h, s, l];\r\n },\r\n\r\n _updateDisplay: function () {\r\n var angle = this.hsl[0] * 6.28;\r\n this.hMarker.element.css({\r\n left: Math.round(Math.sin(angle) * this.constants.RADIUS + this.constants.WIDTH / 2) + \"px\",\r\n top: Math.round(-Math.cos(angle) * this.constants.RADIUS + this.constants.WIDTH / 2) + \"px\"\r\n });\r\n\r\n this.slMarker.element.css({\r\n left: Math.round(this.constants.SQUARE * (.5 - this.hsl[1]) + this.constants.WIDTH / 2) + \"px\",\r\n top: Math.round(this.constants.SQUARE * (.5 - this.hsl[2]) + this.constants.WIDTH / 2) + \"px\"\r\n });\r\n\r\n // Saturation/Luminance gradient\r\n this.colorWrapper.element.css(\"backgroundColor\", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));\r\n\r\n this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);\r\n },\r\n\r\n _absolutePosition: function (el) {\r\n var r = {x: el.offsetLeft, y: el.offsetTop};\r\n // Resolve relative to offsetParent\r\n if (el.offsetParent) {\r\n var tmp = this._absolutePosition(el.offsetParent);\r\n r.x += tmp.x;\r\n r.y += tmp.y;\r\n }\r\n return r;\r\n },\r\n\r\n _widgetCoords: function (event) {\r\n var x, y;\r\n var el = event.target || event.srcElement;\r\n var reference = this.wheel.element[0];\r\n\r\n if (typeof event.offsetX !== \"undefined\") {\r\n // Use offset coordinates and find common offsetParent\r\n var pos = {x: event.offsetX, y: event.offsetY};\r\n\r\n // Send the coordinates upwards through the offsetParent chain.\r\n var e = el;\r\n while (e) {\r\n e.mouseX = pos.x;\r\n e.mouseY = pos.y;\r\n pos.x += e.offsetLeft;\r\n pos.y += e.offsetTop;\r\n e = e.offsetParent;\r\n }\r\n\r\n // Look for the coordinates starting from the wheel widget.\r\n var e = reference;\r\n var offset = {x: 0, y: 0};\r\n while (e) {\r\n if (typeof e.mouseX !== \"undefined\") {\r\n x = e.mouseX - offset.x;\r\n y = e.mouseY - offset.y;\r\n break;\r\n }\r\n offset.x += e.offsetLeft;\r\n offset.y += e.offsetTop;\r\n e = e.offsetParent;\r\n }\r\n\r\n // Reset stored coordinates\r\n e = el;\r\n while (e) {\r\n e.mouseX = undefined;\r\n e.mouseY = undefined;\r\n e = e.offsetParent;\r\n }\r\n } else {\r\n // Use absolute coordinates\r\n var pos = this._absolutePosition(reference);\r\n x = (event.pageX || 0) - pos.x;\r\n y = (event.pageY || 0) - pos.y;\r\n }\r\n // Subtract distance to middle\r\n return {x: x - this.constants.WIDTH / 2, y: y - this.constants.WIDTH / 2};\r\n },\r\n\r\n _doMouseMove: function (event) {\r\n var pos = this._widgetCoords(event);\r\n\r\n // Set new HSL parameters\r\n if (this.circleDrag) {\r\n var hue = Math.atan2(pos.x, -pos.y) / 6.28;\r\n if (hue < 0) hue += 1;\r\n this._setHSL([hue, this.hsl[1], this.hsl[2]]);\r\n } else {\r\n var sat = Math.max(0, Math.min(1, -(pos.x / this.constants.SQUARE) + .5));\r\n var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));\r\n this._setHSL([this.hsl[0], sat, lum]);\r\n }\r\n },\r\n\r\n doClick: function (event) {\r\n var pos = this._widgetCoords(event);\r\n this.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > this.constants.SQUARE;\r\n\r\n // Process\r\n this._doMouseMove(event);\r\n return false;\r\n },\r\n\r\n setValue: function (color) {\r\n this._setColor(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n }\r\n});\r\nBI.Farbtastic.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.farbtastic\", BI.Farbtastic);/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubbleCombo\r\n * @extends BI.Widget\r\n */\r\nBI.BubbleCombo = BI.inherit(BI.Widget, {\r\n _const: {\r\n TRIANGLE_LENGTH: 6\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-bubble-combo\",\r\n trigger: \"click\",\r\n toggle: true,\r\n direction: \"bottom,left\", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right\r\n isDefaultInit: false,\r\n destroyWhenHide: false,\r\n isNeedAdjustHeight: true, // 是否需要高度调整\r\n isNeedAdjustWidth: true,\r\n stopPropagation: false,\r\n adjustLength: 0, // 调整的距离\r\n // adjustXOffset: 0,\r\n // adjustYOffset: 10,\r\n hideChecker: BI.emptyFn,\r\n offsetStyle: \"left\", // left,right,center\r\n el: {},\r\n popup: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.BubbleCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n trigger: o.trigger,\r\n toggle: o.toggle,\r\n container: o.container,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n destroyWhenHide: o.destroyWhenHide,\r\n isNeedAdjustHeight: o.isNeedAdjustHeight,\r\n isNeedAdjustWidth: o.isNeedAdjustWidth,\r\n adjustLength: this._getAdjustLength(),\r\n stopPropagation: o.stopPropagation,\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n hideChecker: o.hideChecker,\r\n offsetStyle: o.offsetStyle,\r\n el: o.el,\r\n popup: BI.extend({\r\n type: \"bi.bubble_popup_view\"\r\n }, o.popup)\r\n });\r\n this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_EXPAND, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_EXPAND, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_COLLAPSE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_INIT, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {\r\n self._showTriangle();\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n self._hideTriangle();\r\n self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW, arguments);\r\n });\r\n },\r\n\r\n _getAdjustLength: function () {\r\n return this._const.TRIANGLE_LENGTH + this.options.adjustLength;\r\n },\r\n\r\n _createTriangle: function (direction) {\r\n var pos = {}, op = {};\r\n var adjustLength = this.options.adjustLength;\r\n var offset = this.element.offset();\r\n var left = offset.left, right = offset.left + this.element.outerWidth();\r\n var top = offset.top, bottom = offset.top + this.element.outerHeight();\r\n switch (direction) {\r\n case \"left\":\r\n pos = {\r\n top: top,\r\n height: this.element.outerHeight(),\r\n left: left - adjustLength - this._const.TRIANGLE_LENGTH\r\n };\r\n op = {width: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"right\":\r\n pos = {\r\n top: top,\r\n height: this.element.outerHeight(),\r\n left: right + adjustLength\r\n };\r\n op = {width: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"top\":\r\n pos = {\r\n left: left,\r\n width: this.element.outerWidth(),\r\n top: top - adjustLength - this._const.TRIANGLE_LENGTH\r\n };\r\n op = {height: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"bottom\":\r\n pos = {\r\n left: left,\r\n width: this.element.outerWidth(),\r\n top: bottom + adjustLength\r\n };\r\n op = {height: this._const.TRIANGLE_LENGTH};\r\n break;\r\n default:\r\n break;\r\n }\r\n this.triangle && this.triangle.destroy();\r\n this.triangle = BI.createWidget(op, {\r\n type: \"bi.center_adapt\",\r\n cls: \"button-combo-triangle-wrapper\",\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"bubble-combo-triangle-\" + direction\r\n }]\r\n });\r\n pos.el = this.triangle;\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [pos]\r\n });\r\n },\r\n\r\n _createLeftTriangle: function () {\r\n this._createTriangle(\"left\");\r\n },\r\n\r\n _createRightTriangle: function () {\r\n this._createTriangle(\"right\");\r\n },\r\n\r\n _createTopTriangle: function () {\r\n this._createTriangle(\"top\");\r\n },\r\n\r\n _createBottomTriangle: function () {\r\n this._createTriangle(\"bottom\");\r\n },\r\n\r\n _showTriangle: function () {\r\n var pos = this.combo.getPopupPosition();\r\n switch (pos.dir) {\r\n case \"left,top\":\r\n case \"left,bottom\":\r\n this._createLeftTriangle();\r\n break;\r\n case \"right,top\":\r\n case \"right,bottom\":\r\n this._createRightTriangle();\r\n break;\r\n case \"top,left\":\r\n case \"top,right\":\r\n this._createTopTriangle();\r\n break;\r\n case \"bottom,left\":\r\n case \"bottom,right\":\r\n this._createBottomTriangle();\r\n break;\r\n }\r\n },\r\n\r\n _hideTriangle: function () {\r\n this.triangle && this.triangle.destroy();\r\n this.triangle = null;\r\n },\r\n\r\n hideView: function () {\r\n this._hideTriangle();\r\n this.combo && this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo && this.combo.showView();\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n }\r\n});\r\n\r\nBI.BubbleCombo.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.BubbleCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.BubbleCombo.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.BubbleCombo.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.BubbleCombo.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.BubbleCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.BubbleCombo.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.BubbleCombo.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\nBI.shortcut(\"bi.bubble_combo\", BI.BubbleCombo);/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubblePopupView\r\n * @extends BI.PopupView\r\n */\r\nBI.BubblePopupView = BI.inherit(BI.PopupView, {\r\n _defaultConfig: function () {\r\n var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(config, {\r\n baseCls: config.baseCls + \" bi-bubble-popup-view\",\r\n minWidth: 220,\r\n maxWidth: 300,\r\n minHeight: 90\r\n });\r\n },\r\n _init: function () {\r\n BI.BubblePopupView.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bubble_popup_view\", BI.BubblePopupView);\r\n\r\n/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubblePopupBarView\r\n * @extends BI.BubblePopupView\r\n */\r\nBI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-bubble-bar-popup-view\",\r\n buttons: [{\r\n value: false,\r\n text: BI.i18nText(\"BI-Basic_Cancel\"),\r\n ghost: true\r\n }, {\r\n text: BI.i18nText(BI.i18nText(\"BI-Basic_Sure\")),\r\n value: true\r\n }]\r\n });\r\n },\r\n _init: function () {\r\n BI.BubblePopupBarView.superclass._init.apply(this, arguments);\r\n },\r\n _createToolBar: function () {\r\n var o = this.options, self = this;\r\n\r\n var items = [];\r\n BI.each(o.buttons, function (i, buttonOpt) {\r\n if (BI.isWidget(buttonOpt)) {\r\n items.push(buttonOpt);\r\n } else {\r\n items.push(BI.extend({\r\n type: \"bi.button\",\r\n height: 24,\r\n handler: function (v) {\r\n self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);\r\n }\r\n }, buttonOpt));\r\n }\r\n });\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n height: 44,\r\n rgap: 15,\r\n items: [{\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: items\r\n }]\r\n });\r\n },\r\n\r\n _createView: function () {\r\n var o = this.options;\r\n\r\n var button = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: [o.el],\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n cls: \"bar-popup-container\",\r\n hgap: 15,\r\n tgap: 10\r\n }]\r\n });\r\n\r\n button.element.css(\"min-height\", o.minHeight - 44);\r\n\r\n return button;\r\n }\r\n});\r\nBI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\nBI.shortcut(\"bi.bubble_bar_popup_view\", BI.BubblePopupBarView);\r\n\r\n/**\r\n * Created by Windy on 2018/2/2.\r\n *\r\n * @class BI.TextBubblePopupBarView\r\n * @extends BI.BubblePopupView\r\n */\r\nBI.TextBubblePopupBarView = BI.inherit(BI.Widget, {\r\n\r\n props: function () {\r\n return {\r\n baseCls: \"bi-text-bubble-bar-popup-view\",\r\n text: \"\",\r\n buttons: [{\r\n level: \"ignore\",\r\n value: false,\r\n stopPropagation: true,\r\n text: BI.i18nText(\"BI-Basic_Cancel\")\r\n }, {\r\n value: true,\r\n stopPropagation: true,\r\n text: BI.i18nText(\"BI-Basic_Sure\")\r\n }]\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var buttons = BI.map(o.buttons, function (index, buttonOpt) {\r\n if (BI.isWidget(buttonOpt)) {\r\n return buttonOpt;\r\n }\r\n return BI.extend({\r\n type: \"bi.button\",\r\n height: 24,\r\n handler: function (v) {\r\n self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);\r\n }\r\n }, buttonOpt);\r\n\r\n });\r\n return {\r\n type: \"bi.bubble_bar_popup_view\",\r\n minWidth: o.minWidth,\r\n maxWidth: o.maxWidth,\r\n minHeight: o.minHeight,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n el: {\r\n type: \"bi.label\",\r\n text: o.text,\r\n whiteSpace: \"normal\",\r\n textAlign: \"left\",\r\n ref: function () {\r\n self.text = this;\r\n }\r\n },\r\n buttons: buttons\r\n };\r\n },\r\n\r\n populate: function (v) {\r\n this.text.setText(v || this.options.text);\r\n }\r\n});\r\nBI.TextBubblePopupBarView.EVENT_CHANGE = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\nBI.shortcut(\"bi.text_bubble_bar_popup_view\", BI.TextBubblePopupBarView);\r\n/**\r\n * Created by Young's on 2016/4/28.\r\n */\r\nBI.EditorIconCheckCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseClass: \"bi-check-editor-combo\",\r\n width: 100,\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.EditorIconCheckCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.editor_trigger\",\r\n items: o.items,\r\n height: o.height,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText,\r\n value: o.value\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () {\r\n self.popup.setValue(this.getValue());\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_FOCUS, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_EMPTY, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_VALID, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_VALID, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_ERROR, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_ERROR, arguments);\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_check_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.editorIconCheckCombo.hideView();\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editorIconCheckCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 300\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.editorIconCheckCombo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.trigger.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.editorIconCheckCombo.populate(items);\r\n }\r\n});\r\nBI.EditorIconCheckCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.EditorIconCheckCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.EditorIconCheckCombo.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.EditorIconCheckCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.EditorIconCheckCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.editor_icon_check_combo\", BI.EditorIconCheckCombo);\r\n/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconCombo\r\n * @extend BI.Widget\r\n */\r\nBI.IconCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-combo\",\r\n width: 24,\r\n height: 24,\r\n el: {},\r\n popup: {},\r\n minWidth: 100,\r\n maxWidth: \"auto\",\r\n maxHeight: 300,\r\n direction: \"bottom\",\r\n adjustLength: 3, // 调整的距离\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n offsetStyle: \"left\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget(o.el, {\r\n type: \"bi.icon_combo_trigger\",\r\n iconCls: o.iconCls,\r\n title: o.title,\r\n items: o.items,\r\n width: o.width,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n value: o.value\r\n });\r\n this.popup = BI.createWidget(o.popup, {\r\n type: \"bi.icon_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.iconCombo.hideView();\r\n self.fireEvent(BI.IconCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.iconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n direction: o.direction,\r\n trigger: o.trigger,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n adjustXOffset: o.adjustXOffset,\r\n adjustYOffset: o.adjustYOffset,\r\n offsetStyle: o.offsetStyle,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxWidth: o.maxWidth,\r\n maxHeight: o.maxHeight,\r\n minWidth: o.minWidth\r\n }\r\n });\r\n },\r\n\r\n showView: function () {\r\n this.iconCombo.showView();\r\n },\r\n\r\n hideView: function () {\r\n this.iconCombo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.iconCombo.populate(items);\r\n }\r\n});\r\nBI.IconCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo\", BI.IconCombo);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconComboPopup\r\n * @extend BI.Pane\r\n */\r\nBI.IconComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi.icon-combo-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24\r\n }),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.IconComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.IconComboPopup.superclass.populate.apply(this, arguments);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.IconComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo_popup\", BI.IconComboPopup);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconComboTrigger\r\n * @extend BI.Widget\r\n */\r\nBI.IconComboTrigger = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-icon-combo-trigger\",\r\n el: {},\r\n items: [],\r\n iconCls: \"\",\r\n width: 24,\r\n height: 24,\r\n isShowDown: true,\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconComboTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n var iconCls = \"\";\r\n if(BI.isKey(o.value)){\r\n iconCls = this._digest(o.value, o.items);\r\n }\r\n this.button = BI.createWidget(o.el, {\r\n type: \"bi.icon_change_button\",\r\n cls: \"icon-combo-trigger-icon\",\r\n iconCls: iconCls,\r\n disableSelected: true,\r\n width: o.isShowDown ? o.width - 12 : o.width,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n selected: BI.isNotEmptyString(iconCls)\r\n });\r\n this.down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font font-size-12\",\r\n width: 12,\r\n height: 8,\r\n selected: BI.isNotEmptyString(iconCls)\r\n });\r\n this.down.setVisible(o.isShowDown);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.button,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: this.down,\r\n right: 3,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _digest: function (v, items) {\r\n var iconCls = \"\";\r\n v = BI.isArray(v) ? v[0] : v;\r\n BI.any(items, function (i, item) {\r\n if (v === item.value) {\r\n iconCls = item.iconCls;\r\n return true;\r\n }\r\n });\r\n return iconCls;\r\n },\r\n\r\n populate: function (items) {\r\n var o = this.options;\r\n this.options.items = items || [];\r\n this.button.setIcon(o.iconCls);\r\n this.button.setSelected(false);\r\n this.down.setSelected(false);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.IconComboTrigger.superclass.setValue.apply(this, arguments);\r\n var o = this.options;\r\n var iconCls = this._digest(v, this.options.items);\r\n v = BI.isArray(v) ? v[0] : v;\r\n if (BI.isNotEmptyString(iconCls)) {\r\n this.button.setIcon(iconCls);\r\n this.button.setSelected(true);\r\n this.down.setSelected(true);\r\n } else {\r\n this.button.setIcon(o.iconCls);\r\n this.button.setSelected(false);\r\n this.down.setSelected(false);\r\n }\r\n }\r\n});\r\nBI.IconComboTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo_trigger\", BI.IconComboTrigger);/**\r\n * Created by Windy on 2017/12/12.\r\n * combo : icon + text + icon, popup : icon + text\r\n */\r\nBI.IconTextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-text-value-combo\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_icon_text_trigger\",\r\n cls: \"icon-text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n iconCls: o.iconCls,\r\n value: o.value,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n title: o.title,\r\n warningTitle: o.warningTitle\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.icon_text_value_combo_popup\",\r\n items: o.items,\r\n value: o.value,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n });\r\n this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCombo.hideView();\r\n self.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNotNull(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.trigger.options.tipType = \"warning\";\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n } else {\r\n this.trigger.options.tipType = \"success\";\r\n this.element.removeClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCombo.populate(items);\r\n }\r\n});\r\nBI.IconTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_value_combo\", BI.IconTextValueCombo);\r\n/**\r\n * Created by Windy on 2017/12/12.\r\n */\r\nBI.IconTextValueComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-text-icon-popup\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextValueComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n }),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n behaviors: o.behaviors,\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n this.check();\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items, keyword) {\r\n BI.IconTextValueComboPopup.superclass.populate.apply(this, arguments);\r\n var o = this.options;\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth\r\n });\r\n this.popup.populate(items, keyword);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.IconTextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_value_combo_popup\", BI.IconTextValueComboPopup);\r\n/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.SearchTextValueCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-search-text-value-combo\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n tipType: \"\",\r\n warningTitle: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n adjustLength: 2,\r\n toggle: false,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n el: {\r\n type: \"bi.search_text_value_trigger\",\r\n cls: \"search-text-value-trigger\",\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n items: o.items,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n value: o.value,\r\n items: o.items,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.getSearcher().setAdapter(self.popup);\r\n },\r\n listeners: [{\r\n eventName: BI.TextValueComboPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n value: o.value,\r\n maxHeight: 252,\r\n minHeight: 25\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }, {\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function () {\r\n self.triggerBtn = this;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if(BI.isKey(o.value)) {\r\n this._checkError(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNotNull(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n this.trigger.attr(\"tipType\", \"warning\");\r\n } else {\r\n this.element.removeClass(\"combo-error\");\r\n this.trigger.attr(\"tipType\", \"success\");\r\n }\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.combo.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.combo.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n }\r\n});\r\nBI.SearchTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.search_text_value_combo\", BI.SearchTextValueCombo);\r\n/**\r\n * Created by Windy on 2018/2/5.\r\n */\r\nBI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {\r\n\r\n props: {\r\n baseCls: \"bi-search-text-value-popup\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.button_group\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_item\",\r\n textAlign: o.textAlign,\r\n height: 24\r\n }),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n mounted: function() {\r\n this.check();\r\n },\r\n\r\n populate: function (find, match, keyword) {\r\n var items = BI.concat(find, match);\r\n BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items, keyword);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.SearchTextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_text_value_combo_popup\", BI.SearchTextValueComboPopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: {\r\n extraCls: \"bi-search-text-value-trigger bi-border\",\r\n height: 24\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value, o.items),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\"\r\n },\r\n popup: {\r\n type: \"bi.search_text_value_combo_popup\",\r\n cls: \"bi-card\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n var finding = BI.Func.getSearchResult(o.items, keyword);\r\n var matched = finding.match, find = finding.find;\r\n callback(find, matched);\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n },\r\n\r\n _setState: function (v) {\r\n this.editor.setState(v);\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return result.join(\",\");\r\n } else {\r\n return BI.isFunction(o.text) ? o.text() : o.text;\r\n }\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n },\r\n\r\n setValue: function (vals) {\r\n this._setState(this._digest(vals, this.options.items));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\nBI.SearchTextValueTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SearchTextValueTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchTextValueTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SearchTextValueTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_text_value_trigger\", BI.SearchTextValueTrigger);/**\r\n * @class BI.TextValueCheckCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : check + text\r\n */\r\nBI.TextValueCheckCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-check-combo\",\r\n width: 100,\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCheckCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n cls: \"text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n value: o.value\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_check_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCheckCombo.hideView();\r\n self.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCheckCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 300\r\n }\r\n });\r\n\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n setTitle: function (title) {\r\n this.trigger.setTitle(title);\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.trigger.setWarningTitle(title);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCheckCombo.populate(items);\r\n }\r\n});\r\nBI.TextValueCheckCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_check_combo\", BI.TextValueCheckCombo);BI.TextValueCheckComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-icon-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCheckComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: this._formatItems(o.items),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n _formatItems: function (items) {\r\n return BI.map(items, function (i, item) {\r\n return BI.extend({\r\n type: \"bi.single_select_item\",\r\n cls: \"bi-list-item\",\r\n height: 24\r\n }, item);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.TextValueCheckComboPopup.superclass.populate.apply(this, arguments);\r\n this.popup.populate(this._formatItems(items));\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.TextValueCheckComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_check_combo_popup\", BI.TextValueCheckComboPopup);\r\n/**\r\n * @class BI.TextValueCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : text\r\n * 参见场景dashboard布局方式选择\r\n */\r\nBI.TextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-combo\",\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n text: \"\",\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n cls: \"text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n value: o.value,\r\n warningTitle: o.warningTitle\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: o.chooseType,\r\n value: o.value,\r\n items: o.items\r\n });\r\n this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCombo.hideView();\r\n self.fireEvent(BI.TextValueCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n if(BI.isKey(o.value)) {\r\n this._checkError(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNotNull(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.trigger.setTipType(\"warning\");\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n } else {\r\n this.trigger.setTipType(\"success\");\r\n this.element.removeClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCombo.populate(items);\r\n }\r\n});\r\nBI.TextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_combo\", BI.TextValueCombo);\r\n/**\r\n * @class BI.SmallTextValueCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : text\r\n * 参见场景dashboard布局方式选择\r\n */\r\nBI.SmallTextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n width: 100,\r\n height: 20,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n el: {},\r\n text: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget(o.el, {\r\n type: \"bi.small_select_text_trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items\r\n });\r\n this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.SmallTextValueCombo.hideView();\r\n self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.SmallTextValueCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.SmallTextValueCombo.populate(items);\r\n }\r\n});\r\nBI.SmallTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.small_text_value_combo\", BI.SmallTextValueCombo);BI.TextValueComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-icon-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_item\",\r\n textAlign: o.textAlign,\r\n height: 24\r\n }),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n this.check();\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.TextValueComboPopup.superclass.populate.apply(this, arguments);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.TextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_combo_popup\", BI.TextValueComboPopup);/**\r\n * 有清楚按钮的文本框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallTextEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.ClearEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-clear-editor\",\r\n height: 24,\r\n errorText: \"\",\r\n watermark: \"\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.ClearEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n errorText: o.errorText,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n value: o.value\r\n });\r\n this.clear = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n stopEvent: true,\r\n cls: \"search-close-h-font\"\r\n });\r\n this.clear.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(\"\");\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT);\r\n self.fireEvent(BI.ClearEditor.EVENT_CLEAR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.editor\r\n },\r\n {\r\n el: this.clear,\r\n width: 24\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.ClearEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.ClearEditor.EVENT_EMPTY);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_STOP);\r\n });\r\n\r\n if (BI.isKey(o.value)) {\r\n this.clear.visible();\r\n } else {\r\n this.clear.invisible();\r\n }\r\n },\r\n\r\n _checkClear: function () {\r\n if (!this.getValue()) {\r\n this.clear.invisible();\r\n } else {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isValid()) {\r\n var res = this.editor.getValue().match(/[\\S]+/g);\r\n return BI.isNull(res) ? \"\" : res[res.length - 1];\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n if (BI.isKey(v)) {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n});\r\nBI.ClearEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.ClearEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ClearEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ClearEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.ClearEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.ClearEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.ClearEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\nBI.ClearEditor.EVENT_CLEAR = \"EVENT_CLEAR\";\r\n\r\nBI.ClearEditor.EVENT_START = \"EVENT_START\";\r\nBI.ClearEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.ClearEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ClearEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ClearEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.ClearEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.ClearEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.ClearEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.ClearEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.ClearEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.ClearEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.shortcut(\"bi.clear_editor\", BI.ClearEditor);/**\r\n * 带标记的文本框\r\n * Created by GUY on 2016/1/25.\r\n * @class BI.ShelterEditor\r\n * @extends BI.Widget\r\n */\r\nBI.ShelterEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-shelter-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n textAlign: \"left\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ShelterEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"shelter-editor-text\",\r\n title: o.title,\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType,\r\n textAlign: o.textAlign,\r\n height: o.height,\r\n hgap: o.hgap\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.text.on(BI.Controller.EVENT_CHANGE, function () {\r\n arguments[2] = self;\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL);\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setValue(this.editor.getValue());\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n BI.isKey(o.keyword) && this.text.doRedMark(o.keyword);\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setTextStyle: function (style) {\r\n this.text.setStyle(style);\r\n },\r\n\r\n setValue: function (k) {\r\n var o = this.options;\r\n this.editor.setValue(k);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n this._showHint();\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.ShelterEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.ShelterEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ShelterEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ShelterEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.ShelterEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.ShelterEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.ShelterEditor.EVENT_START = \"EVENT_START\";\r\nBI.ShelterEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.ShelterEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ShelterEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ShelterEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.ShelterEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.ShelterEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.ShelterEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.ShelterEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.ShelterEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.ShelterEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.shelter_editor\", BI.ShelterEditor);\r\n/**\r\n * 带标记的文本框\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.SignEditor\r\n * @extends BI.Widget\r\n */\r\nBI.SignEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-sign-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SignEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"sign-editor-text\",\r\n title: o.title,\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType,\r\n textAlign: \"left\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.selectAll();\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n BI.nextTick(BI.bind(function () {\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setValue(this.editor.getValue());\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n BI.isKey(o.keyword) && this.text.doRedMark(o.keyword);\r\n }\r\n }, this));\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n this._showHint();\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.SignEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SignEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SignEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SignEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SignEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SignEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.SignEditor.EVENT_START = \"EVENT_START\";\r\nBI.SignEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SignEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SignEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SignEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SignEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SignEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SignEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SignEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SignEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SignEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.sign_editor\", BI.SignEditor);/**\r\n * guy\r\n * 记录状态的输入框\r\n * @class BI.StateEditor\r\n * @extends BI.Single\r\n */\r\nBI.StateEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-state-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n defaultText: \"\", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色\r\n text: BI.i18nText(\"BI-Basic_Unrestricted\") // 显示值\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.StateEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark tip-text-style\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.setValue(\"\");\r\n },\r\n title: BI.isNotNull(o.tipText) ? o.tipText : function () {\r\n var title = \"\";\r\n if (BI.isString(self.stateValue)) {\r\n title = self.stateValue;\r\n }\r\n if (BI.isArray(self.stateValue) && self.stateValue.length === 1) {\r\n title = self.stateValue[0];\r\n }\r\n return title;\r\n },\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n if (BI.isNotNull(o.text)) {\r\n this.setState(o.text);\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n focus: function () {\r\n if (this.options.disabled === false) {\r\n this._showInput();\r\n this.editor.focus();\r\n }\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getValue().match(/[^\\s]+/g);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n BI.StateEditor.superclass.setValue.apply(this, arguments);\r\n this.stateValue = v;\r\n if (BI.isNumber(v)) {\r\n if (v === BI.Selection.All) {\r\n this.text.setText(BI.i18nText(\"BI-Select_All\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v === BI.Selection.Multi) {\r\n this.text.setText(BI.i18nText(\"BI-Select_Part\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);\r\n BI.isKey(o.defaultText) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n return;\r\n }\r\n if (BI.isString(v)) {\r\n this.text.setText(v);\r\n // 配置了defaultText才判断标灰,其他情况不标灰\r\n (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n return;\r\n }\r\n if (BI.isArray(v)) {\r\n if (BI.isEmpty(v)) {\r\n this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);\r\n BI.isKey(o.defaultText) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v.length === 1) {\r\n this.text.setText(v[0]);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setText(BI.i18nText(\"BI-Select_Part\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n }\r\n },\r\n\r\n setTipType: function (v) {\r\n this.text.options.tipType = v;\r\n }\r\n});\r\nBI.StateEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.StateEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.StateEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.StateEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.StateEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.StateEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.StateEditor.EVENT_START = \"EVENT_START\";\r\nBI.StateEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.StateEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.StateEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.StateEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.StateEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.StateEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.StateEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.StateEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.StateEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.StateEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.state_editor\", BI.StateEditor);\r\n/**\r\n * 无限制-已选择状态输入框\r\n * Created by GUY on 2016/5/18.\r\n * @class BI.SimpleStateEditor\r\n * @extends BI.Single\r\n */\r\nBI.SimpleStateEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SimpleStateEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-simple-state-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n mouseOut: false,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n text: BI.i18nText(\"BI-Basic_Unrestricted\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleStateEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark\",\r\n textAlign: \"left\",\r\n text: o.text,\r\n height: o.height,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.setValue(\"\");\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n if(BI.isNotNull(o.text)){\r\n this.setState(o.text);\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getValue().match(/[^\\s]+/g);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n BI.SimpleStateEditor.superclass.setValue.apply(this, arguments);\r\n if (BI.isNumber(v)) {\r\n if (v === BI.Selection.All) {\r\n this.text.setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v === BI.Selection.Multi) {\r\n this.text.setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setText(o.text);\r\n this.text.element.addClass(\"bi-water-mark\");\r\n }\r\n return;\r\n }\r\n if (!BI.isArray(v) || v.length === 1) {\r\n this.text.setText(v);\r\n this.text.setTitle(v);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (BI.isEmpty(v)) {\r\n this.text.setText(o.text);\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n }\r\n});\r\nBI.SimpleStateEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SimpleStateEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SimpleStateEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SimpleStateEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SimpleStateEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SimpleStateEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.SimpleStateEditor.EVENT_START = \"EVENT_START\";\r\nBI.SimpleStateEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SimpleStateEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SimpleStateEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SimpleStateEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SimpleStateEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SimpleStateEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SimpleStateEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SimpleStateEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SimpleStateEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.simple_state_editor\", BI.SimpleStateEditor);/**\r\n * 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w\r\n * @class BI.MultiPopupView\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.MultiPopupView = BI.inherit(BI.PopupView, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-multi-list-view\",\r\n buttons: [BI.i18nText(\"BI-Basic_Sure\")]\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiPopupView.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _createToolBar: function () {\r\n var o = this.options, self = this;\r\n if (o.buttons.length === 0) {\r\n return;\r\n }\r\n\r\n var text = []; // 构造[{text:content},……]\r\n BI.each(o.buttons, function (idx, item) {\r\n text.push({\r\n text: item,\r\n value: idx\r\n });\r\n });\r\n\r\n this.buttongroup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n cls: \"list-view-toolbar bi-high-light bi-split-top\",\r\n height: 24,\r\n items: BI.createItems(text, {\r\n type: \"bi.text_button\",\r\n once: false,\r\n shadow: true,\r\n isShadowShowingOnSelected: true\r\n }),\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n\r\n this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, value, obj);\r\n });\r\n\r\n return this.buttongroup;\r\n }\r\n\r\n});\r\n\r\nBI.MultiPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\n\r\nBI.shortcut(\"bi.multi_popup_view\", BI.MultiPopupView);/**\r\n * 可以理解为MultiPopupView和Panel两个面板的结合体\r\n * @class BI.PopupPanel\r\n * @extends BI.MultiPopupView\r\n */\r\n\r\nBI.PopupPanel = BI.inherit(BI.MultiPopupView, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-popup-panel\",\r\n title: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopupPanel.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _createTool: function () {\r\n var self = this, o = this.options;\r\n var close = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"close-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n close.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setVisible(false);\r\n self.fireEvent(BI.PopupPanel.EVENT_CLOSE);\r\n });\r\n return BI.createWidget({\r\n type: \"bi.htape\",\r\n cls: \"popup-panel-title bi-header-background\",\r\n height: 25,\r\n items: [{\r\n el: {\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n text: o.title,\r\n height: 25,\r\n lgap: 10\r\n }\r\n }, {\r\n el: close,\r\n width: 25\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.PopupPanel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.PopupPanel.EVENT_CLOSE = \"EVENT_CLOSE\";\r\nBI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\n\r\nBI.shortcut(\"bi.popup_panel\", BI.PopupPanel);/**\r\n * list面板\r\n *\r\n * Created by GUY on 2015/10/30.\r\n * @class BI.ListPane\r\n * @extends BI.Pane\r\n */\r\nBI.ListPane = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-list-pane\",\r\n logic: {\r\n dynamic: true\r\n },\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.button_group\"\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.ListPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {},\r\n items: o.items,\r\n itemsCreator: function (op, calback) {\r\n if (op.times === 1) {\r\n self.empty();\r\n BI.nextTick(function () {\r\n self.loading();\r\n });\r\n }\r\n o.itemsCreator(op, function () {\r\n calback.apply(self, arguments);\r\n op.times === 1 && BI.nextTick(function () {\r\n self.loaded();\r\n // callback可能在loading之前执行, check保证显示正确\r\n self.check();\r\n });\r\n });\r\n },\r\n hasNext: o.hasNext,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n this.check();\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({\r\n scrolly: true,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)\r\n }))));\r\n },\r\n\r\n hasPrev: function () {\r\n return this.button_group.hasPrev && this.button_group.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.button_group.hasNext && this.button_group.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.options.items = items.concat(this.options.items);\r\n this.button_group.prependItems.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n addItems: function (items) {\r\n this.options.items = this.options.items.concat(items);\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n indexes = indexes || [];\r\n BI.removeAt(this.options.items, indexes);\r\n this.button_group.removeItemAt.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(this.button_group.attr(\"itemsCreator\")))) {// 接管loader的populate方法\r\n this.button_group.attr(\"itemsCreator\").apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"参数不能为空\");\r\n }\r\n self.populate.apply(self, arguments);\r\n }]);\r\n return;\r\n }\r\n BI.ListPane.superclass.populate.apply(this, arguments);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n }\r\n});\r\nBI.ListPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.list_pane\", BI.ListPane);/**\r\n * 带有标题栏的pane\r\n * @class BI.Panel\r\n * @extends BI.Widget\r\n */\r\nBI.Panel = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Panel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-panel bi-border\",\r\n title: \"\",\r\n titleButtons: [],\r\n el: {},\r\n logic: {\r\n dynamic: false\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Panel.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", this._createTitle()\r\n , this.options.el)\r\n }))));\r\n },\r\n\r\n _createTitle: function () {\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"panel-title-text\",\r\n text: o.title,\r\n height: 30\r\n });\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: o.titleButtons,\r\n layouts: [{\r\n type: \"bi.center_adapt\",\r\n lgap: 10\r\n }]\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.button_group.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.Panel.EVENT_CHANGE, value, obj);\r\n });\r\n\r\n return {\r\n el: {\r\n type: \"bi.left_right_vertical_adapt\",\r\n cls: \"panel-title bi-header-background bi-border-bottom\",\r\n height: 29,\r\n items: {\r\n left: [this.text],\r\n right: [this.button_group]\r\n },\r\n lhgap: 10,\r\n rhgap: 10\r\n },\r\n height: 29\r\n };\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setValue(title);\r\n }\r\n});\r\nBI.Panel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.panel\", BI.Panel);\r\nBI.LinearSegmentButton = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n extraCls: \"bi-line-segment-button bi-list-item-effect\",\r\n once: true,\r\n readonly: true,\r\n hgap: 10,\r\n height: 25\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return [{\r\n type: \"bi.label\",\r\n text: o.text,\r\n height: o.height,\r\n value: o.value,\r\n hgap: o.hgap,\r\n ref: function () {\r\n self.text = this;\r\n }\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"line-segment-button-line\",\r\n height: 2,\r\n ref: function () {\r\n self.line = this;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n }];\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.LinearSegmentButton.superclass.setSelected.apply(this, arguments);\r\n if (v) {\r\n this.line.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.line.element.removeClass(\"bi-high-light-background\");\r\n }\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.linear_segment_button\", BI.LinearSegmentButton);BI.LinearSegment = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-linear-segment bi-split-bottom\",\r\n items: [],\r\n height: 29\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.linear_segment_button\",\r\n height: o.height - 1\r\n }),\r\n layout: [{\r\n type: \"bi.center\"\r\n }],\r\n listeners: [{\r\n eventName: \"__EVENT_CHANGE__\",\r\n action: function () {\r\n self.fireEvent(\"__EVENT_CHANGE__\", arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.buttonGroup = this;\r\n }\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.buttonGroup.setValue(v);\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n this.buttonGroup.setEnabledValue(v);\r\n },\r\n\r\n\r\n getValue: function () {\r\n return this.buttonGroup.getValue();\r\n }\r\n});\r\nBI.shortcut(\"bi.linear_segment\", BI.LinearSegment);/**\r\n * 选择列表\r\n *\r\n * Created by GUY on 2015/11/1.\r\n * @class BI.SelectList\r\n * @extends BI.Widget\r\n */\r\nBI.SelectList = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-list\",\r\n direction: BI.Direction.Top, // toolbar的位置\r\n logic: {\r\n dynamic: true\r\n },\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n iconWrapperWidth: 36\r\n },\r\n el: {\r\n type: \"bi.list_pane\"\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n // 全选\r\n this.toolbar = BI.createWidget(o.toolbar);\r\n this.allSelected = false;\r\n this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.allSelected = this.isSelected();\r\n if (type === BI.Events.CLICK) {\r\n self.setAllSelected(self.allSelected);\r\n self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.list = BI.createWidget(o.el, {\r\n type: \"bi.list_pane\",\r\n items: o.items,\r\n itemsCreator: function (op, callback) {\r\n op.times === 1 && self.toolbar.setVisible(false);\r\n o.itemsCreator(op, function (items) {\r\n callback.apply(self, arguments);\r\n if (op.times === 1) {\r\n self.toolbar.setVisible(items && items.length > 0);\r\n self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);\r\n }\r\n self._checkAllSelected();\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n hasNext: o.hasNext\r\n });\r\n\r\n this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self._checkAllSelected();\r\n self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.toolbar, this.list)\r\n }))));\r\n\r\n if (o.items.length <= 0) {\r\n this.toolbar.setVisible(false);\r\n this.toolbar.setEnable(false);\r\n }\r\n if(BI.isNotNull(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkAllSelected: function () {\r\n var selectLength = this.list.getValue().length;\r\n var notSelectLength = this.getAllLeaves().length - selectLength;\r\n var hasNext = this.list.hasNext();\r\n var isAlreadyAllSelected = this.toolbar.isSelected();\r\n var isHalf = selectLength > 0 && (notSelectLength > 0 || (!isAlreadyAllSelected && hasNext));\r\n isHalf = isHalf || (notSelectLength > 0 && hasNext && isAlreadyAllSelected);\r\n this.toolbar.setHalfSelected(isHalf);\r\n !isHalf && this.toolbar.setSelected(selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected));\r\n },\r\n\r\n setAllSelected: function (v) {\r\n BI.each(this.getAllButtons(), function (i, btn) {\r\n (btn.setSelected || btn.setAllSelected).apply(btn, [v]);\r\n });\r\n this.allSelected = !!v;\r\n this.toolbar.setSelected(v);\r\n this.toolbar.setHalfSelected(false);\r\n },\r\n\r\n setToolBarVisible: function (b) {\r\n this.toolbar.setVisible(b);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.allSelected;\r\n // return this.toolbar.isSelected();\r\n },\r\n\r\n hasPrev: function () {\r\n return this.list.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.list.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.list.prependItems.apply(this.list, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.list.addItems.apply(this.list, arguments);\r\n },\r\n\r\n setValue: function (data) {\r\n var selectAll = data.type === BI.ButtonGroup.CHOOSE_TYPE_ALL;\r\n this.setAllSelected(selectAll);\r\n this.list[selectAll ? \"setNotSelectedValue\" : \"setValue\"](data.value);\r\n this._checkAllSelected();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isAllSelected() === false) {\r\n return {\r\n type: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n value: this.list.getValue(),\r\n assist: this.list.getNotSelectedValue()\r\n };\r\n }\r\n return {\r\n type: BI.ButtonGroup.CHOOSE_TYPE_ALL,\r\n value: this.list.getNotSelectedValue(),\r\n assist: this.list.getValue()\r\n };\r\n\r\n },\r\n\r\n empty: function () {\r\n this.list.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.toolbar.setVisible(!BI.isEmptyArray(items));\r\n this.toolbar.setEnable(this.isEnabled() && !BI.isEmptyArray(items));\r\n this.list.populate.apply(this.list, arguments);\r\n this._checkAllSelected();\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.SelectList.superclass._setEnable.apply(this, arguments);\r\n this.toolbar.setEnable(enable);\r\n },\r\n\r\n resetHeight: function (h) {\r\n var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0);\r\n this.list.resetHeight ? this.list.resetHeight(h - toolHeight) :\r\n this.list.element.css({\"max-height\": h - toolHeight + \"px\"});\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.list.setNotSelectedValue.apply(this.list, arguments);\r\n this._checkAllSelected();\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.list.getNotSelectedValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.list.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.list.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.list.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.list.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.list.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.list.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.list.getNodeByValue(value);\r\n }\r\n});\r\nBI.SelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.select_list\", BI.SelectList);/**\r\n * Created by roy on 15/11/6.\r\n */\r\nBI.LazyLoader = BI.inherit(BI.Widget, {\r\n _const: {\r\n PAGE: 100\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-lazy-loader\",\r\n el: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.LazyLoader.superclass._init.apply(this, arguments);\r\n var all = o.items.length;\r\n this.loader = BI.createWidget({\r\n type: \"bi.loader\",\r\n element: this,\r\n // 下面是button_group的属性\r\n el: o.el,\r\n\r\n itemsCreator: function (options, populate) {\r\n populate(self._getNextItems(options));\r\n },\r\n hasNext: function (option) {\r\n return option.count < all;\r\n }\r\n });\r\n\r\n this.loader.on(BI.Loader.EVENT_CHANGE, function (obj) {\r\n self.fireEvent(BI.LazyLoader.EVENT_CHANGE, obj);\r\n });\r\n },\r\n _getNextItems: function (options) {\r\n var self = this, o = this.options;\r\n var lastNum = o.items.length - this._const.PAGE * (options.times - 1);\r\n var lastItems = BI.takeRight(o.items, lastNum);\r\n var nextItems = BI.take(lastItems, this._const.PAGE);\r\n return nextItems;\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate(items);\r\n },\r\n\r\n addItems: function (items) {\r\n this.loader.addItems(items);\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.loader.setNotSelectedValue.apply(this.loader, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.loader.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.loader.setValue.apply(this.loader, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue.apply(this.loader, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.loader.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.loader.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.loader.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.loader.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.loader.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.loader.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.loader.getNodeByValue(value);\r\n }\r\n});\r\nBI.LazyLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.lazy_loader\", BI.LazyLoader);/**\r\n * 恶心的加载控件, 为解决排序问题引入的控件\r\n *\r\n * Created by GUY on 2015/11/12.\r\n * @class BI.ListLoader\r\n * @extends BI.Widget\r\n */\r\nBI.ListLoader = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-list-loader\",\r\n\r\n isDefaultInit: true, // 是否默认初始化数据\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n next: {},\r\n hasNext: BI.emptyFn\r\n });\r\n },\r\n\r\n _nextLoad: function () {\r\n var self = this, o = this.options;\r\n this.next.setLoading();\r\n o.itemsCreator.apply(this, [{times: ++this.times}, function () {\r\n self.next.setLoaded();\r\n self.addItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _init: function () {\r\n BI.ListLoader.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.itemsCreator === false) {\r\n o.next = false;\r\n }\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n element: this,\r\n chooseType: 0,\r\n items: o.items,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ListLoader.EVENT_CHANGE, obj);\r\n }\r\n });\r\n\r\n if (o.next !== false) {\r\n this.next = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.next));\r\n this.next.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._nextLoad();\r\n }\r\n });\r\n }\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.next]\r\n });\r\n\r\n o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {\r\n this.populate();\r\n }, this));\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this.populate(o.items);\r\n }\r\n },\r\n\r\n hasNext: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasNext.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n addItems: function (items) {\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n this.options.items = this.options.items.concat(items);\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.setEnd();\r\n }\r\n }\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n this.next.element.appendTo(this.element);\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {\r\n o.itemsCreator.apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"参数不能为空\");\r\n }\r\n self.populate.apply(self, arguments);\r\n o.onLoaded();\r\n }]);\r\n return;\r\n }\r\n this.options.items = items;\r\n this.times = 1;\r\n this.count = 0;\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.invisible();\r\n }\r\n }\r\n BI.DOM.hang([this.next]);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n this.next.element.appendTo(this.element);\r\n },\r\n\r\n empty: function () {\r\n BI.DOM.hang([this.next]);\r\n this.button_group.empty();\r\n this.next.element.appendTo(this.element);\r\n BI.each([this.next], function (i, ob) {\r\n ob && ob.setVisible(false);\r\n });\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n }\r\n});\r\nBI.ListLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.list_loader\", BI.ListLoader);/**\r\n * Created by GUY on 2016/4/29.\r\n *\r\n * @class BI.SortList\r\n * @extends BI.Widget\r\n */\r\nBI.SortList = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SortList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-sort-list\",\r\n\r\n isDefaultInit: true, // 是否默认初始化数据\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n next: {},\r\n hasNext: BI.emptyFn\r\n\r\n // containment: this.element,\r\n // connectWith: \".bi-sort-list\",\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SortList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.loader = BI.createWidget({\r\n type: \"bi.list_loader\",\r\n element: this,\r\n isDefaultInit: o.isDefaultInit,\r\n el: o.el,\r\n items: this._formatItems(o.items),\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (items) {\r\n callback(self._formatItems(items));\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n count: o.count,\r\n next: o.next,\r\n hasNext: o.hasNext\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SortList.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n\r\n this.loader.element.sortable({\r\n containment: o.containment || this.element,\r\n connectWith: o.connectWith || \".bi-sort-list\",\r\n items: \".sort-item\",\r\n cursor: o.cursor || \"drag\",\r\n tolerance: o.tolerance || \"intersect\",\r\n placeholder: {\r\n element: function ($currentItem) {\r\n var holder = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"bi-sortable-holder\",\r\n height: $currentItem.outerHeight()\r\n });\r\n holder.element.css({\r\n \"margin-left\": $currentItem.css(\"margin-left\"),\r\n \"margin-right\": $currentItem.css(\"margin-right\"),\r\n \"margin-top\": $currentItem.css(\"margin-top\"),\r\n \"margin-bottom\": $currentItem.css(\"margin-bottom\"),\r\n margin: $currentItem.css(\"margin\")\r\n });\r\n return holder.element;\r\n },\r\n update: function () {\r\n\r\n }\r\n },\r\n start: function (event, ui) {\r\n\r\n },\r\n stop: function (event, ui) {\r\n self.fireEvent(BI.SortList.EVENT_CHANGE);\r\n },\r\n over: function (event, ui) {\r\n\r\n }\r\n });\r\n },\r\n\r\n _formatItems: function (items) {\r\n BI.each(items, function (i, item) {\r\n item = BI.stripEL(item);\r\n item.cls = item.cls ? item.cls + \" sort-item\" : \"sort-item\";\r\n item.attributes = {\r\n sorted: item.value\r\n };\r\n });\r\n return items;\r\n },\r\n\r\n hasNext: function () {\r\n return this.loader.hasNext();\r\n },\r\n\r\n addItems: function (items) {\r\n this.loader.addItems(items);\r\n },\r\n\r\n populate: function (items) {\r\n if (items) {\r\n arguments[0] = this._formatItems(items);\r\n }\r\n this.loader.populate.apply(this.loader, arguments);\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.loader.setNotSelectedValue.apply(this.loader, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.loader.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.loader.setValue.apply(this.loader, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.loader.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.loader.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.loader.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.loader.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.loader.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.loader.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.loader.getNodeByValue(value);\r\n },\r\n\r\n getSortedValues: function () {\r\n return this.loader.element.sortable(\"toArray\", {attribute: \"sorted\"});\r\n }\r\n});\r\nBI.SortList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.sort_list\", BI.SortList);\r\n/**\r\n * author: young\r\n * createdDate: 2018/12/18\r\n * description:\r\n */\r\nBI.LoadingPane = BI.inherit(BI.Pane, {\r\n _mount: function () {\r\n var isMounted = BI.Pane.superclass._mount.apply(this, arguments);\r\n if (isMounted) {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.loading();\r\n this.beforeInit(BI.bind(this.__loaded, this));\r\n }\r\n }\r\n },\r\n\r\n _initRender: function () {\r\n if (this.beforeInit) {\r\n this.__async = true;\r\n } else {\r\n this._render();\r\n }\r\n },\r\n\r\n __loaded: function () {\r\n this.__asking = false;\r\n this.loaded();\r\n this._render();\r\n }\r\n});/**\r\n * 有总页数和总行数的分页控件\r\n * Created by Young's on 2016/10/13.\r\n */\r\nBI.AllCountPager = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-all-count-pager\",\r\n pagerDirection: \"vertical\", // 翻页按钮方向,可选值:vertical/horizontal\r\n height: 24,\r\n pages: 1, // 必选项\r\n curr: 1, // 初始化当前页, pages为数字时可用,\r\n count: 1 // 总行数\r\n });\r\n },\r\n _init: function () {\r\n BI.AllCountPager.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, pagerIconCls = this._getPagerIconCls();\r\n this.editor = BI.createWidget({\r\n type: \"bi.small_text_editor\",\r\n cls: \"pager-editor bi-border-radius\",\r\n validationChecker: function (v) {\r\n return (self.rowCount.getValue() === 0 && v === \"0\") || BI.isPositiveInteger(v);\r\n },\r\n hgap: 4,\r\n vgap: 0,\r\n value: o.curr,\r\n errorText: BI.i18nText(\"BI-Please_Input_Positive_Integer\"),\r\n width: 40,\r\n height: 24,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.pager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 58,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n lgap: 5\r\n }],\r\n\r\n dynamicShow: false,\r\n pages: o.pages,\r\n curr: o.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Previous_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius all-pager-prev bi-list-item-select2 \" + pagerIconCls.preCls\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Next_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius all-pager-next bi-list-item-select2 \" + pagerIconCls.nextCls\r\n },\r\n\r\n hasPrev: o.hasPrev,\r\n hasNext: o.hasNext,\r\n firstPage: o.firstPage,\r\n lastPage: o.lastPage,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {\r\n self.pager.setValue(BI.parseInt(self.editor.getValue()));\r\n self.fireEvent(BI.AllCountPager.EVENT_CHANGE);\r\n });\r\n this.pager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.AllCountPager.EVENT_CHANGE);\r\n });\r\n this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.editor.setValue(self.pager.getCurrentPage());\r\n });\r\n\r\n this.allPages = BI.createWidget({\r\n type: \"bi.label\",\r\n title: o.pages,\r\n text: \"/\" + o.pages,\r\n lgap: 5,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.rowCount = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"row-count\",\r\n height: o.height,\r\n hgap: 5,\r\n text: o.count,\r\n title: o.count\r\n });\r\n\r\n var count = BI.createWidget({\r\n type: \"bi.left\",\r\n height: o.height,\r\n scrollable: false,\r\n items: [{\r\n type: \"bi.label\",\r\n height: o.height,\r\n text: BI.i18nText(\"BI-Basic_Total\"),\r\n width: 15\r\n }, this.rowCount, {\r\n type: \"bi.label\",\r\n height: o.height,\r\n text: BI.i18nText(\"BI-Tiao_Data\"),\r\n width: 50,\r\n textAlign: \"left\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.left_right_vertical_adapt\",\r\n element: this,\r\n items: {\r\n left: [count],\r\n right: [this.editor, this.allPages, this.pager]\r\n }\r\n });\r\n },\r\n\r\n alwaysShowPager: true,\r\n\r\n _getPagerIconCls: function () {\r\n var o = this.options;\r\n switch (o.pagerDirection) {\r\n case \"horizontal\":\r\n return {\r\n preCls: \"row-pre-page-h-font \",\r\n nextCls: \"row-next-page-h-font \"\r\n };\r\n case \"vertical\":\r\n default:\r\n return {\r\n preCls: \"column-pre-page-h-font \",\r\n nextCls: \"column-next-page-h-font \"\r\n };\r\n }\r\n },\r\n\r\n setAllPages: function (v) {\r\n this.allPages.setText(\"/\" + v);\r\n this.allPages.setTitle(v);\r\n this.options.pages = v;\r\n this.pager.setAllPages(v);\r\n this.editor.setEnable(v >= 1);\r\n this.setPagerVisible(v > 1);\r\n },\r\n\r\n setValue: function (v) {\r\n this.pager.setValue(v);\r\n },\r\n\r\n setVPage: function (v) {\r\n this.pager.setValue(v);\r\n },\r\n\r\n setCount: function (count) {\r\n this.rowCount.setText(count);\r\n this.rowCount.setTitle(count);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.pager.getCurrentPage();\r\n },\r\n\r\n hasPrev: function () {\r\n return this.pager.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.pager.hasNext();\r\n },\r\n\r\n setPagerVisible: function (b) {\r\n this.editor.setVisible(b);\r\n this.allPages.setVisible(b);\r\n this.pager.setVisible(b);\r\n },\r\n\r\n populate: function () {\r\n this.pager.populate();\r\n this.setPagerVisible(this.options.pages > 1);\r\n }\r\n});\r\nBI.AllCountPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.all_count_pager\", BI.AllCountPager);/**\r\n * 显示页码的分页控件\r\n *\r\n * Created by GUY on 2016/6/30.\r\n * @class BI.DirectionPager\r\n * @extends BI.Widget\r\n */\r\nBI.DirectionPager = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-direction-pager\",\r\n height: 24,\r\n horizontal: {\r\n pages: false, // 总页数\r\n curr: 1, // 初始化当前页, pages为数字时可用\r\n\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n firstPage: 1,\r\n lastPage: BI.emptyFn\r\n },\r\n vertical: {\r\n pages: false, // 总页数\r\n curr: 1, // 初始化当前页, pages为数字时可用\r\n\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n firstPage: 1,\r\n lastPage: BI.emptyFn\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.DirectionPager.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var v = o.vertical, h = o.horizontal;\r\n this._createVPager();\r\n this._createHPager();\r\n this.layout = BI.createWidget({\r\n type: \"bi.absolute\",\r\n scrollable: false,\r\n element: this,\r\n items: [{\r\n el: this.vpager,\r\n top: 0,\r\n right: 86\r\n }, {\r\n el: this.vlabel,\r\n top: 0,\r\n right: 110\r\n }, {\r\n el: this.hpager,\r\n top: 0,\r\n right: 0\r\n }, {\r\n el: this.hlabel,\r\n top: 0,\r\n right: 24\r\n }]\r\n });\r\n },\r\n\r\n _createVPager: function () {\r\n var self = this, o = this.options;\r\n var v = o.vertical;\r\n this.vlabel = BI.createWidget({\r\n type: \"bi.label\",\r\n width: 24,\r\n height: 24,\r\n value: v.curr,\r\n title: v.curr,\r\n invisible: true\r\n });\r\n this.vpager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 72,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n scrollx: false,\r\n rgap: 24\r\n }],\r\n invisible: true,\r\n\r\n dynamicShow: false,\r\n pages: v.pages,\r\n curr: v.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Up_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2\"\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Down_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2\"\r\n },\r\n\r\n hasPrev: v.hasPrev,\r\n hasNext: v.hasNext,\r\n firstPage: v.firstPage,\r\n lastPage: v.lastPage\r\n });\r\n\r\n this.vpager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DirectionPager.EVENT_CHANGE);\r\n });\r\n this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.vlabel.setValue(this.getCurrentPage());\r\n self.vlabel.setTitle(this.getCurrentPage());\r\n });\r\n },\r\n\r\n _createHPager: function () {\r\n var self = this, o = this.options;\r\n var h = o.horizontal;\r\n this.hlabel = BI.createWidget({\r\n type: \"bi.label\",\r\n width: 24,\r\n height: 24,\r\n value: h.curr,\r\n title: h.curr,\r\n invisible: true\r\n });\r\n this.hpager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 72,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n scrollx: false,\r\n rgap: 24\r\n }],\r\n invisible: true,\r\n\r\n dynamicShow: false,\r\n pages: h.pages,\r\n curr: h.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Left_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2\"\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Right_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2\"\r\n },\r\n\r\n hasPrev: h.hasPrev,\r\n hasNext: h.hasNext,\r\n firstPage: h.firstPage,\r\n lastPage: h.lastPage\r\n });\r\n\r\n this.hpager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DirectionPager.EVENT_CHANGE);\r\n });\r\n this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.hlabel.setValue(this.getCurrentPage());\r\n self.hlabel.setTitle(this.getCurrentPage());\r\n });\r\n },\r\n\r\n getVPage: function () {\r\n return this.vpager.getCurrentPage();\r\n },\r\n\r\n getHPage: function () {\r\n return this.hpager.getCurrentPage();\r\n },\r\n\r\n setVPage: function (v) {\r\n this.vpager.setValue(v);\r\n this.vlabel.setValue(v);\r\n this.vlabel.setTitle(v);\r\n },\r\n\r\n setHPage: function (v) {\r\n this.hpager.setValue(v);\r\n this.hlabel.setValue(v);\r\n this.hlabel.setTitle(v);\r\n },\r\n\r\n hasVNext: function () {\r\n return this.vpager.hasNext();\r\n },\r\n\r\n hasHNext: function () {\r\n return this.hpager.hasNext();\r\n },\r\n\r\n hasVPrev: function () {\r\n return this.vpager.hasPrev();\r\n },\r\n\r\n hasHPrev: function () {\r\n return this.hpager.hasPrev();\r\n },\r\n\r\n setHPagerVisible: function (b) {\r\n this.hpager.setVisible(b);\r\n this.hlabel.setVisible(b);\r\n },\r\n\r\n setVPagerVisible: function (b) {\r\n this.vpager.setVisible(b);\r\n this.vlabel.setVisible(b);\r\n },\r\n\r\n populate: function () {\r\n this.vpager.populate();\r\n this.hpager.populate();\r\n var vShow = false, hShow = false;\r\n if (!this.hasHNext() && !this.hasHPrev()) {\r\n this.setHPagerVisible(false);\r\n } else {\r\n this.setHPagerVisible(true);\r\n hShow = true;\r\n }\r\n if (!this.hasVNext() && !this.hasVPrev()) {\r\n this.setVPagerVisible(false);\r\n } else {\r\n this.setVPagerVisible(true);\r\n vShow = true;\r\n }\r\n this.setVisible(hShow || vShow);\r\n var num = [86, 110, 0, 24];\r\n var items = this.layout.attr(\"items\");\r\n\r\n if (vShow === true && hShow === true) {\r\n items[0].right = num[0];\r\n items[1].right = num[1];\r\n items[2].right = num[2];\r\n items[3].right = num[3];\r\n } else if (vShow === true) {\r\n items[0].right = num[2];\r\n items[1].right = num[3];\r\n } else if (hShow === true) {\r\n items[2].right = num[2];\r\n items[3].right = num[3];\r\n }\r\n this.layout.attr(\"items\", items);\r\n this.layout.resize();\r\n },\r\n\r\n clear: function () {\r\n this.vpager.attr(\"curr\", 1);\r\n this.hpager.attr(\"curr\", 1);\r\n }\r\n});\r\nBI.DirectionPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.direction_pager\", BI.DirectionPager);/**\r\n * 分页控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.DetailPager\r\n * @extends BI.Widget\r\n */\r\nBI.DetailPager = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-detail-pager\",\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n hgap: 10,\r\n vgap: 0\r\n }],\r\n\r\n dynamicShow: true, // 是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\r\n // dynamicShow为false时以下两个有用\r\n dynamicShowFirstLast: false, // 是否动态显示首页、尾页\r\n dynamicShowPrevNext: false, // 是否动态显示上一页、下一页\r\n pages: false, // 总页数\r\n curr: function () {\r\n return 1;\r\n }, // 初始化当前页\r\n groups: 0, // 连续显示分页数\r\n jump: BI.emptyFn, // 分页的回调函数\r\n\r\n first: false, // 是否显示首页\r\n last: false, // 是否显示尾页\r\n prev: \"上一页\",\r\n next: \"下一页\",\r\n\r\n firstPage: 1,\r\n lastPage: function () { // 在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\r\n return 1;\r\n },\r\n hasPrev: BI.emptyFn, // pages不可用时有效\r\n hasNext: BI.emptyFn // pages不可用时有效\r\n });\r\n },\r\n _init: function () {\r\n BI.DetailPager.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.currPage = BI.result(this.options, \"curr\");\r\n // 翻页太灵敏\r\n this._lock = false;\r\n this._debouce = BI.debounce(function () {\r\n self._lock = false;\r\n }, 300);\r\n this._populate();\r\n },\r\n\r\n _populate: function () {\r\n var self = this, o = this.options, view = [], dict = {};\r\n this.empty();\r\n var pages = BI.result(o, \"pages\");\r\n var curr = BI.result(this, \"currPage\");\r\n var groups = BI.result(o, \"groups\");\r\n var first = BI.result(o, \"first\");\r\n var last = BI.result(o, \"last\");\r\n var prev = BI.result(o, \"prev\");\r\n var next = BI.result(o, \"next\");\r\n\r\n if (pages === false) {\r\n groups = 0;\r\n first = false;\r\n last = false;\r\n } else {\r\n groups > pages && (groups = pages);\r\n }\r\n\r\n // 计算当前组\r\n dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups));\r\n\r\n // 当前页非首页,则输出上一页\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) {\r\n if (BI.isKey(prev)) {\r\n view.push({\r\n text: prev,\r\n value: \"prev\",\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n });\r\n } else {\r\n view.push(BI.extend({\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n }, prev));\r\n }\r\n }\r\n\r\n // 当前组非首组,则输出首页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) {\r\n view.push({\r\n text: first,\r\n value: \"first\",\r\n disabled: !(dict.index > 1 && groups !== 0)\r\n });\r\n if (dict.index > 1 && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n }\r\n\r\n // 输出当前页组\r\n dict.poor = Math.floor((groups - 1) / 2);\r\n dict.start = dict.index > 1 ? curr - dict.poor : 1;\r\n dict.end = dict.index > 1 ? (function () {\r\n var max = curr + (groups - dict.poor - 1);\r\n return max > pages ? pages : max;\r\n }()) : groups;\r\n if (dict.end - dict.start < groups - 1) { // 最后一组状态\r\n dict.start = dict.end - groups + 1;\r\n }\r\n var s = dict.start, e = dict.end;\r\n if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) {\r\n s++;\r\n e--;\r\n }\r\n for (; s <= e; s++) {\r\n if (s === curr) {\r\n view.push({\r\n text: s,\r\n value: s,\r\n selected: true\r\n });\r\n } else {\r\n view.push({\r\n text: s,\r\n value: s\r\n });\r\n }\r\n }\r\n\r\n // 总页数大于连续分页数,且当前组最大页小于总页,输出尾页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) {\r\n if (pages > groups && dict.end < pages && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n view.push({\r\n text: last,\r\n value: \"last\",\r\n disabled: !(pages > groups && dict.end < pages && groups !== 0)\r\n });\r\n }\r\n\r\n // 当前页不为尾页时,输出下一页\r\n dict.flow = !prev && groups === 0;\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) {\r\n view.push((function () {\r\n if (BI.isKey(next)) {\r\n if (pages === false) {\r\n return {text: next, value: \"next\", disabled: o.hasNext(curr) === false};\r\n }\r\n return (dict.flow && curr === pages)\r\n ?\r\n {text: next, value: \"next\", disabled: true}\r\n :\r\n {text: next, value: \"next\", disabled: !(curr !== pages && next || dict.flow)};\r\n }\r\n return BI.extend({\r\n disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)\r\n }, next);\r\n \r\n }()));\r\n }\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(view, {\r\n cls: \"page-item bi-border bi-list-item-active\",\r\n height: 23,\r\n hgap: 10\r\n }),\r\n behaviors: o.behaviors,\r\n layouts: o.layouts\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self._lock === true) {\r\n return;\r\n }\r\n self._lock = true;\r\n self._debouce();\r\n if (type === BI.Events.CLICK) {\r\n var v = self.button_group.getValue()[0];\r\n switch (v) {\r\n case \"first\":\r\n self.currPage = 1;\r\n break;\r\n case \"last\":\r\n self.currPage = pages;\r\n break;\r\n case \"prev\":\r\n self.currPage--;\r\n break;\r\n case \"next\":\r\n self.currPage++;\r\n break;\r\n default:\r\n self.currPage = v;\r\n break;\r\n }\r\n o.jump.apply(self, [{\r\n pages: pages,\r\n curr: self.currPage\r\n }]);\r\n self._populate();\r\n self.fireEvent(BI.DetailPager.EVENT_CHANGE, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.currPage;\r\n },\r\n\r\n setAllPages: function (pages) {\r\n this.options.pages = pages;\r\n },\r\n\r\n hasPrev: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasPrev(v) : v > 1;\r\n },\r\n\r\n hasNext: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasNext(v) : v < pages;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = v | 0;\r\n v = v < 1 ? 1 : v;\r\n if (o.pages === false) {\r\n var lastPage = BI.result(o, \"lastPage\"), firstPage = 1;\r\n this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, \"firstPage\")), (v < firstPage ? firstPage : v));\r\n } else {\r\n v = v > o.pages ? o.pages : v;\r\n this.currPage = v;\r\n }\r\n this._populate();\r\n },\r\n\r\n getValue: function () {\r\n var val = this.button_group.getValue()[0];\r\n switch (val) {\r\n case \"prev\":\r\n return -1;\r\n case \"next\":\r\n return 1;\r\n case \"first\":\r\n return BI.MIN;\r\n case \"last\":\r\n return BI.MAX;\r\n default :\r\n return val;\r\n }\r\n },\r\n\r\n attr: function (key, value) {\r\n BI.DetailPager.superclass.attr.apply(this, arguments);\r\n if (key === \"curr\") {\r\n this.currPage = BI.result(this.options, \"curr\");\r\n }\r\n },\r\n\r\n populate: function () {\r\n this._populate();\r\n }\r\n});\r\nBI.DetailPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DetailPager.EVENT_AFTER_POPULATE = \"EVENT_AFTER_POPULATE\";\r\nBI.shortcut(\"bi.detail_pager\", BI.DetailPager);/**\r\n * 分段控件使用的button\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.SegmentButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.SegmentButton = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-segment-button bi-list-item-select\",\r\n shadow: true,\r\n readonly: true,\r\n hgap: 5\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SegmentButton.superclass._init.apply(this, arguments);\r\n var opts = this.options, self = this;\r\n // if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) {\r\n // this.element.css({lineHeight : (opts.height - 2) + 'px'});\r\n // }\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textHeight: opts.height,\r\n whiteSpace: opts.whiteSpace,\r\n text: opts.text,\r\n value: opts.value,\r\n hgap: opts.hgap\r\n });\r\n },\r\n\r\n setSelected: function () {\r\n BI.SegmentButton.superclass.setSelected.apply(this, arguments);\r\n },\r\n\r\n setText: function (text) {\r\n BI.SegmentButton.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n destroy: function () {\r\n BI.SegmentButton.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.segment_button\", BI.SegmentButton);/**\r\n * 单选按钮组\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Segment\r\n * @extends BI.Widget\r\n */\r\nBI.Segment = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-segment\",\r\n items: [],\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.Segment.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.buttonGroup = BI.createWidget({\r\n element: this,\r\n type: \"bi.button_group\",\r\n value: o.value,\r\n items: BI.createItems(o.items, {\r\n type: \"bi.segment_button\",\r\n height: o.height - 2,\r\n whiteSpace: o.whiteSpace\r\n }),\r\n layout: [\r\n {\r\n type: \"bi.center\"\r\n }\r\n ]\r\n });\r\n this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.Segment.EVENT_CHANGE, value, obj);\r\n });\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Segment.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.buttonGroup.setValue(v);\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n this.buttonGroup.setEnabledValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.buttonGroup.getValue();\r\n }\r\n});\r\nBI.Segment.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.segment\", BI.Segment);/**\r\n * guy\r\n * 复选导航条\r\n * Created by GUY on 2015/8/25.\r\n * @class BI.MultiSelectBar\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiSelectBar = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multi-select-bar\",\r\n height: 25,\r\n text: BI.i18nText(\"BI-Select_All\"),\r\n isAllCheckedBySelectedValue: BI.emptyFn,\r\n // 手动控制选中\r\n disableSelected: true,\r\n isHalfCheckedBySelectedValue: function (selectedValues) {\r\n return selectedValues.length > 0;\r\n },\r\n halfSelected: false,\r\n iconWrapperWidth: 26\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectBar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var isSelect = o.selected === true;\r\n var isHalfSelect = !o.selected && o.halfSelected;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\",\r\n stopPropagation: true,\r\n handler: function () {\r\n self.setSelected(self.isSelected());\r\n },\r\n selected: isSelect,\r\n invisible: isHalfSelect\r\n });\r\n this.half = BI.createWidget({\r\n type: \"bi.half_icon_button\",\r\n stopPropagation: true,\r\n handler: function () {\r\n self.setSelected(true);\r\n },\r\n invisible: isSelect || !isHalfSelect\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);\r\n });\r\n this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);\r\n });\r\n this.half.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);\r\n });\r\n this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n width: o.iconWrapperWidth,\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.checkbox, this.half]\r\n }\r\n }, {\r\n el: this.text\r\n }]\r\n });\r\n },\r\n\r\n _setSelected: function (v) {\r\n this.checkbox.setSelected(!!v);\r\n },\r\n\r\n // 自己手动控制选中\r\n beforeClick: function () {\r\n var isHalf = this.isHalfSelected(), isSelected = this.isSelected();\r\n if (isHalf === true) {\r\n this.setSelected(true);\r\n } else {\r\n this.setSelected(!isSelected);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n this.checkbox.setSelected(v);\r\n this.setHalfSelected(false);\r\n },\r\n\r\n setHalfSelected: function (b) {\r\n this.halfSelected = !!b;\r\n if (b === true) {\r\n this.checkbox.setSelected(false);\r\n this.half.visible();\r\n this.checkbox.invisible();\r\n } else {\r\n this.half.invisible();\r\n this.checkbox.visible();\r\n }\r\n },\r\n\r\n isHalfSelected: function () {\r\n return !this.isSelected() && !!this.halfSelected;\r\n },\r\n\r\n isSelected: function () {\r\n return this.checkbox.isSelected();\r\n },\r\n\r\n setValue: function (selectedValues) {\r\n BI.MultiSelectBar.superclass.setValue.apply(this, arguments);\r\n var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments);\r\n this._setSelected(isAllChecked);\r\n !isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments));\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiSelectBar.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n }\r\n});\r\nBI.MultiSelectBar.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_bar\", BI.MultiSelectBar);\r\n/**\r\n * guy\r\n * 二级树\r\n * @class BI.LevelTree\r\n * @extends BI.Single\r\n */\r\nBI.LevelTree = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-level-tree\",\r\n el: {\r\n chooseType: 0\r\n },\r\n expander: {},\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.initTree(this.options.items);\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this;\r\n BI.each(nodes, function (i, node) {\r\n var extend = {layer: layer};\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_plus_group_node\"\r\n }\r\n if (i === 0 && i === nodes.length - 1) { // 根\r\n extend.type = \"bi.plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_tree_leaf_item\"\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n element: this,\r\n expander: BI.extend({\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n }, o.expander),\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n value: o.value,\r\n\r\n el: BI.extend({\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }, o.el)\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, value, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.LevelTree.EVENT_CHANGE, value, ob);\r\n }\r\n });\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (nodes) {\r\n this.tree.stroke.apply(this.tree, arguments);\r\n },\r\n\r\n populate: function (items, keyword) {\r\n items = this._formatItems(BI.Tree.transformToTreeFormat(items), 0);\r\n this.tree.populate(items, keyword);\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.LevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.level_tree\", BI.LevelTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.DisplayTree\r\n * @extends BI.TreeView\r\n */\r\nBI.DisplayTree = BI.inherit(BI.TreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-display-tree\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DisplayTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var setting = {\r\n view: {\r\n selectedMulti: false,\r\n dblClickExpand: false,\r\n showIcon: false,\r\n nameIsHTML: true,\r\n showTitle: false\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n callback: {\r\n beforeCollapse: beforeCollapse\r\n }\r\n };\r\n\r\n function beforeCollapse(treeId, treeNode) {\r\n return false;\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _dealWidthNodes: function (nodes) {\r\n nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);\r\n var self = this, o = this.options;\r\n BI.each(nodes, function (i, node) {\r\n node.isParent = node.isParent || node.parent;\r\n if (node.text == null) {\r\n if (node.count > 0) {\r\n node.text = node.value + \"(\" + BI.i18nText(\"BI-Basic_Altogether\") + node.count + BI.i18nText(\"BI-Basic_Count\") + \")\";\r\n }\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n initTree: function (nodes, setting) {\r\n var setting = setting || this._configSetting();\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n destroy: function () {\r\n BI.DisplayTree.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.DisplayTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.display_tree\", BI.DisplayTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.ListListDisplayTree\r\n * @extends BI.TreeView\r\n */\r\nBI.ListDisplayTree = BI.inherit(BI.ListTreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListDisplayTree.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-list-display-tree\"\r\n });\r\n },\r\n _init: function () {\r\n BI.ListDisplayTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var setting = {\r\n view: {\r\n selectedMulti: false,\r\n dblClickExpand: false,\r\n showIcon: false,\r\n nameIsHTML: true,\r\n showTitle: false,\r\n fontCss: getFont\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n callback: {\r\n beforeCollapse: beforeCollapse\r\n }\r\n };\r\n\r\n function beforeCollapse(treeId, treeNode) {\r\n return false;\r\n }\r\n\r\n function getFont(treeId, node) {\r\n return node.isLeaf ? {} : {color: \"#999999\"};\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _dealWidthNodes: function (nodes) {\r\n nodes = BI.ListDisplayTree.superclass._dealWidthNodes.apply(this, arguments);\r\n var self = this, o = this.options;\r\n BI.each(nodes, function (i, node) {\r\n node.isParent = node.isParent || node.parent;\r\n if (node.text == null) {\r\n if (node.count > 0) {\r\n node.text = node.value + \"(\" + BI.i18nText(\"BI-Basic_Altogether\") + node.count + BI.i18nText(\"BI-Basic_Count\") + \")\";\r\n }\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n initTree: function (nodes, setting) {\r\n var setting = setting || this._configSetting();\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n destroy: function () {\r\n BI.ListDisplayTree.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.ListDisplayTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.list_display_tree\", BI.ListDisplayTree);/**\r\n * 简单的多选树\r\n *\r\n * Created by GUY on 2016/2/16.\r\n * @class BI.SimpleTreeView\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleTreeView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-simple-tree\",\r\n itemsCreator: BI.emptyFn,\r\n items: null\r\n });\r\n },\r\n _init: function () {\r\n BI.SimpleTreeView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.structure = new BI.Tree();\r\n this.tree = BI.createWidget({\r\n type: \"bi.tree_view\",\r\n element: this,\r\n itemsCreator: function (op, callback) {\r\n var fn = function (items) {\r\n callback({\r\n items: items\r\n });\r\n self.structure.initTree(BI.Tree.transformToTreeFormat(items));\r\n };\r\n if (BI.isNotNull(o.items)) {\r\n fn(o.items);\r\n } else {\r\n o.itemsCreator(op, fn);\r\n }\r\n }\r\n });\r\n this.tree.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE, arguments);\r\n });\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this.populate();\r\n }\r\n if (BI.isNotNull(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n populate: function (items, keyword) {\r\n if (items) {\r\n this.options.items = items;\r\n }\r\n this.tree.stroke({\r\n keyword: keyword\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n v || (v = []);\r\n var self = this, map = {};\r\n var selected = [];\r\n BI.each(v, function (i, val) {\r\n var node = self.structure.search(val, \"value\");\r\n if (node) {\r\n var p = node;\r\n p = p.getParent();\r\n if (p) {\r\n if (!map[p.value]) {\r\n map[p.value] = 0;\r\n }\r\n map[p.value]++;\r\n }\r\n\r\n while (p && p.getChildrenLength() <= map[p.value]) {\r\n selected.push(p.value);\r\n p = p.getParent();\r\n if (p) {\r\n if (!map[p.value]) {\r\n map[p.value] = 0;\r\n }\r\n map[p.value]++;\r\n }\r\n }\r\n }\r\n });\r\n return BI.makeObject(v.concat(selected));\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree.setValue(this._digest(v));\r\n },\r\n\r\n _getValue: function () {\r\n var self = this, result = [], val = this.tree.getValue();\r\n var track = function (nodes) {\r\n BI.each(nodes, function (key, node) {\r\n if (BI.isEmpty(node)) {\r\n result.push(key);\r\n } else {\r\n track(node);\r\n }\r\n });\r\n };\r\n track(val);\r\n return result;\r\n },\r\n\r\n empty: function () {\r\n this.tree.empty();\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [], val = this._getValue();\r\n BI.each(val, function (i, key) {\r\n var target = self.structure.search(key, \"value\");\r\n if (target) {\r\n self.structure._traverse(target, function (node) {\r\n if (node.isLeaf()) {\r\n result.push(node.value);\r\n }\r\n });\r\n }\r\n });\r\n return result;\r\n }\r\n});\r\nBI.SimpleTreeView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_tree\", BI.SimpleTreeView);\r\n/**\r\n * 文本输入框trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.EditorTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.EditorTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-editor-trigger bi-border\",\r\n height: 24,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.EditorTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText,\r\n title: function () {\r\n return self.getValue();\r\n }\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_EMPTY, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_ERROR, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.editor\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n },\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (value) {\r\n this.editor.setValue(value);\r\n },\r\n\r\n setText: function (text) {\r\n this.editor.setState(text);\r\n }\r\n});\r\nBI.EditorTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.EditorTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.EditorTrigger.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.EditorTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.EditorTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.editor_trigger\", BI.EditorTrigger);\r\n/**\r\n * 图标按钮trigger\r\n *\r\n * Created by GUY on 2015/10/8.\r\n * @class BI.IconTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.IconTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-trigger\",\r\n extraCls: \"pull-down-font\",\r\n el: {},\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n var o = this.options;\r\n BI.IconTrigger.superclass._init.apply(this, arguments);\r\n this.iconButton = BI.createWidget(o.el, {\r\n type: \"bi.trigger_icon_button\",\r\n element: this,\r\n width: o.width,\r\n height: o.height,\r\n extraCls: o.extraCls\r\n });\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_trigger\", BI.IconTrigger);/**\r\n * 文字trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.IconTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.IconTextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"select-text-label\" + (BI.isKey(o.textCls) ? (\" \" + o.textCls) : \"\"),\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_change_button\",\r\n cls: \"icon-combo-trigger-icon\",\r\n iconCls: o.iconCls,\r\n ref: function (_ref) {\r\n self.icon = _ref;\r\n },\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n disableSelected: true\r\n },\r\n width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height)\r\n },\r\n {\r\n el: this.text,\r\n lgap: BI.isEmptyString(o.iconCls) ? 5 : 0\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setValue: function (value) {\r\n this.text.setValue(value);\r\n },\r\n\r\n setIcon: function (iconCls) {\r\n var o = this.options;\r\n this.icon.setIcon(iconCls);\r\n var iconItem = this.wrapper.attr(\"items\")[0];\r\n var textItem = this.wrapper.attr(\"items\")[1];\r\n if(BI.isNull(iconCls) || BI.isEmptyString(iconCls)) {\r\n if(iconItem.width !== 0) {\r\n iconItem.width = 0;\r\n textItem.lgap = 5;\r\n this.wrapper.resize();\r\n }\r\n }else{\r\n if(iconItem.width !== (o.iconWrapperWidth || o.height)) {\r\n iconItem.width = (o.iconWrapperWidth || o.height);\r\n textItem.lgap = 0;\r\n this.wrapper.resize();\r\n }\r\n }\r\n },\r\n\r\n setTextCls: function(cls) {\r\n var o = this.options;\r\n var oldCls = o.textCls;\r\n o.textCls = cls;\r\n this.text.element.removeClass(oldCls).addClass(cls);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_text_trigger\", BI.IconTextTrigger);/**\r\n * Created by Windy on 2017/12/12.\r\n */\r\nBI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-text-trigger bi-border\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n iconCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SelectIconTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digist(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.icon_text_trigger\",\r\n element: this,\r\n text: obj.text,\r\n textCls: obj.textCls,\r\n iconCls: obj.iconCls,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n });\r\n },\r\n\r\n _digist: function (vals, items) {\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result;\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.any(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value)) {\r\n result = {\r\n text: item.text || item.value,\r\n iconCls: item.iconCls\r\n };\r\n return true;\r\n }\r\n });\r\n\r\n if (BI.isNotNull(result)) {\r\n return {\r\n text: result.text,\r\n textCls: \"\",\r\n iconCls: result.iconCls\r\n };\r\n } else {\r\n return {\r\n text: BI.isFunction(o.text) ? o.text() : o.text,\r\n textCls: \"bi-water-mark\",\r\n iconCls: o.iconCls\r\n };\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var obj = this._digist(vals, this.options.items);\r\n this.trigger.setText(obj.text);\r\n this.trigger.setIcon(obj.iconCls);\r\n this.trigger.setTextCls(obj.textCls);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.select_icon_text_trigger\", BI.SelectIconTextTrigger);/**\r\n * 文字trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.TextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.TextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 24,\r\n textCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"select-text-label\" + (BI.isKey(o.textCls) ? (\" \" + o.textCls) : \"\"),\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n title: function () {\r\n return self.text.getText();\r\n },\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n hgap: c.hgap,\r\n readonly: o.readonly\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.text\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setTextCls: function(cls) {\r\n var o = this.options;\r\n var oldCls = o.textCls;\r\n o.textCls = cls;\r\n this.text.element.removeClass(oldCls).addClass(cls);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.text.options.tipType = v;\r\n }\r\n});\r\nBI.shortcut(\"bi.text_trigger\", BI.TextTrigger);\r\n/**\r\n * 选择字段trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.SelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-text-trigger bi-border bi-focus-shadow\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SelectTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digest(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.text_trigger\",\r\n element: this,\r\n height: o.height,\r\n readonly: o.readonly,\r\n text: obj.text,\r\n textCls: obj.textCls,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return {\r\n textCls: \"\",\r\n text: result.join(\",\")\r\n }\r\n } else {\r\n return {\r\n textCls: \"bi-water-mark\",\r\n text: BI.isFunction(o.text) ? o.text() : o.text\r\n }\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var formatValue = this._digest(vals, this.options.items);\r\n this.trigger.setTextCls(formatValue.textCls);\r\n this.trigger.setText(formatValue.text);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.trigger.setTipType(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.select_text_trigger\", BI.SelectTextTrigger);\r\n/**\r\n * 选择字段trigger小一号的\r\n *\r\n * @class BI.SmallSelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-small-select-text-trigger bi-border\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digest(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.small_text_trigger\",\r\n element: this,\r\n height: o.height - 2,\r\n text: obj.text,\r\n cls: obj.cls\r\n });\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return {\r\n cls: \"\",\r\n text: result.join(\",\")\r\n }\r\n } else {\r\n return {\r\n cls: \"bi-water-mark\",\r\n text: o.text\r\n }\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var formatValue = this._digest(vals, this.options.items);\r\n this.trigger.element.removeClass(\"bi-water-mark\").addClass(formatValue.cls);\r\n this.trigger.setText(formatValue.text);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.small_select_text_trigger\", BI.SmallSelectTextTrigger);/**\r\n * 文字trigger(右边小三角小一号的) ==\r\n *\r\n * @class BI.SmallTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SmallTextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n hgap: c.hgap\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.text\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setValue: function (value) {\r\n this.text.setValue(value);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_text_trigger\", BI.SmallTextTrigger);/**\r\n * 日期控件中的月份下拉框\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.MonthDateCombo\r\n * @extends BI.Trigger\r\n */\r\nBI.MonthDateCombo = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-month-combo\",\r\n height: 24,\r\n container: null\r\n });\r\n },\r\n _init: function () {\r\n BI.MonthDateCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_triangle_trigger\"\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.month_popup\",\r\n behaviors: o.behaviors\r\n });\r\n\r\n this.popup.on(BI.YearPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n });\r\n\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n offsetStyle: \"center\",\r\n container: o.container,\r\n element: this,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: this.popup\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.combo.hideView();\r\n self.fireEvent(BI.MonthDateCombo.EVENT_CHANGE);\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.doBehavior();\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.MonthDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.month_date_combo\", BI.MonthDateCombo);/**\r\n * 年份下拉框\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.YearDateCombo\r\n * @extends BI.Trigger\r\n */\r\nBI.YearDateCombo = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.YearDateCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-combo\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n behaviors: {},\r\n height: 24,\r\n container: null\r\n });\r\n },\r\n _init: function () {\r\n BI.YearDateCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_triangle_trigger\"\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.year_popup\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n\r\n this.popup.on(BI.YearPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.YearDateCombo.EVENT_CHANGE);\r\n });\r\n\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n offsetStyle: \"center\",\r\n element: this,\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 100,\r\n stopPropagation: false,\r\n el: this.popup\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.YearDateCombo.EVENT_CHANGE);\r\n });\r\n // BI-22551 popup未初始化传入的behavior无效\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.doBehavior();\r\n });\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.YearDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_date_combo\", BI.YearDateCombo);\r\n/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DatePicker\r\n * @extends BI.Widget\r\n */\r\nBI.DatePicker = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.DatePicker.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-picker\",\r\n height: 40,\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DatePicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._year = BI.getDate().getFullYear();\r\n this._month = BI.getDate().getMonth() + 1;\r\n this.left = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n this.left.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self._month === 1) {\r\n self.setValue({\r\n year: self.year.getValue() - 1,\r\n month: 12\r\n });\r\n } else {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue() - 1\r\n });\r\n }\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.right = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n\r\n this.right.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self._month === 12) {\r\n self.setValue({\r\n year: self.year.getValue() + 1,\r\n month: 1\r\n });\r\n } else {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue() + 1\r\n });\r\n }\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.year = BI.createWidget({\r\n type: \"bi.year_date_combo\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue()\r\n });\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n });\r\n this.month = BI.createWidget({\r\n type: \"bi.month_date_combo\",\r\n behaviors: o.behaviors\r\n });\r\n this.month.on(BI.MonthDateCombo.EVENT_CHANGE, function () {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue()\r\n });\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.left]\r\n },\r\n width: 24\r\n }, {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal\",\r\n width: 120,\r\n rgap: 10,\r\n items: [{\r\n el: this.year,\r\n lgap: 10\r\n }, this.month]\r\n }\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.right]\r\n },\r\n width: 24\r\n }]\r\n });\r\n this.setValue({\r\n year: this._year,\r\n month: this._month\r\n });\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = !(this._month === 1 && this._year === BI.parseDateTime(o.min, \"%Y-%X-%d\").getFullYear());\r\n this.left.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = !(this._month === 12 && this._year === BI.parseDateTime(o.max, \"%Y-%X-%d\").getFullYear());\r\n this.right.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.year.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.year.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (ob) {\r\n this._year = BI.parseInt(ob.year);\r\n this._month = BI.parseInt(ob.month);\r\n this.year.setValue(ob.year);\r\n this.month.setValue(ob.month);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.year.getValue(),\r\n month: this.month.getValue()\r\n };\r\n }\r\n});\r\nBI.DatePicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_picker\", BI.DatePicker);/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.YearPicker\r\n * @extends BI.Widget\r\n */\r\nBI.YearPicker = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-year-picker\",\r\n behaviors: {},\r\n height: 40,\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.YearPicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._year = BI.getDate().getFullYear();\r\n this.left = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n this.left.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue() - 1);\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.right = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n\r\n this.right.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue() + 1);\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.year = BI.createWidget({\r\n type: \"bi.year_date_combo\",\r\n min: o.min,\r\n behaviors: o.behaviors,\r\n max: o.max\r\n });\r\n this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue());\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.left]\r\n },\r\n width: 25\r\n }, {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal_float\",\r\n width: 50,\r\n items: [{\r\n el: this.year\r\n }]\r\n }\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.right]\r\n },\r\n width: 25\r\n }]\r\n });\r\n this.setValue({\r\n year: this._year\r\n });\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = !(this._year === BI.parseDateTime(o.min, \"%Y-%X-%d\").getFullYear());\r\n this.left.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = !(this._year === BI.parseDateTime(o.max, \"%Y-%X-%d\").getFullYear());\r\n this.right.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.options.min = minDate;\r\n this.year.setMinDate(minDate);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.options.max = maxDate;\r\n this.year.setMaxDate(maxDate);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n\r\n setValue: function (v) {\r\n this._year = v;\r\n this.year.setValue(v);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n getValue: function () {\r\n return this.year.getValue();\r\n }\r\n});\r\nBI.YearPicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_picker\", BI.YearPicker);\r\n/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DateCalendarPopup\r\n * @extends BI.Widget\r\n */\r\nBI.DateCalendarPopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.DateCalendarPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-calendar-popup\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: true\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n // BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可\r\n day: 1\r\n });\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.DateCalendarPopup.superclass._init.apply(this, arguments);\r\n var self = this,\r\n o = this.options;\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n this._day = this.today.getDate();\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month,\r\n day: this._day\r\n };\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"top\",\r\n logic: {\r\n dynamic: true\r\n },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this),\r\n\r\n afterCardCreated: function () {\r\n\r\n },\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedTime);\r\n }\r\n });\r\n\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n self.selectedTime = self.datePicker.getValue();\r\n self.selectedTime.day = 1;\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n });\r\n\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = self.calendar.getValue();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.calendar,\r\n left: 5,\r\n right: 5\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _checkMin: function () {\r\n var calendar = this.calendar.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMinDate(this.options.min);\r\n }\r\n },\r\n\r\n _checkMax: function () {\r\n var calendar = this.calendar.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMaxDate(this.options.max);\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n this.datePicker.setMinDate(minDate);\r\n this._checkMin();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n this.datePicker.setMaxDate(maxDate);\r\n this._checkMax();\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n this.datePicker.setValue(timeOb);\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(timeOb));\r\n this.calendar.setValue(timeOb);\r\n this.selectedTime = timeOb;\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n});\r\nBI.DateCalendarPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_calendar_popup\", BI.DateCalendarPopup);/**\r\n * 月份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.MonthPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.MonthPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-month-popup\",\r\n behaviors: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MonthPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n // 纵向排列月\r\n var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12];\r\n var items = [];\r\n items.push(month.slice(0, 2));\r\n items.push(month.slice(2, 4));\r\n items.push(month.slice(4, 6));\r\n items.push(month.slice(6, 8));\r\n items.push(month.slice(8, 10));\r\n items.push(month.slice(10, 12));\r\n items = BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 23,\r\n width: 38,\r\n value: td,\r\n text: td\r\n };\r\n });\r\n });\r\n\r\n this.month = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n behaviors: o.behaviors,\r\n items: BI.createItems(items, {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({\r\n dynamic: true\r\n }, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 25\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1,\r\n hgap: 2\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.month.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.MonthPopup.EVENT_CHANGE);\r\n }\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.month.getValue()[0];\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.parseInt(v);\r\n this.month.setValue([v]);\r\n }\r\n});\r\nBI.MonthPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.month_popup\", BI.MonthPopup);/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.YearPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _createYearCalendar: function (v) {\r\n var o = this.options, y = this._year;\r\n\r\n var calendar = BI.createWidget({\r\n type: \"bi.year_calendar\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max,\r\n logic: {\r\n dynamic: true\r\n },\r\n year: y + v * 12\r\n });\r\n calendar.setValue(this._year);\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.YearPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.selectedYear = this._year = BI.getDate().getFullYear();\r\n\r\n this.backBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 24,\r\n height: 24,\r\n value: -1\r\n });\r\n\r\n this.preBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 24,\r\n height: 24,\r\n value: 1\r\n });\r\n\r\n this.navigation = BI.createWidget({\r\n type: \"bi.navigation\",\r\n element: this,\r\n single: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n tab: {\r\n cls: \"year-popup-navigation bi-high-light bi-split-top\",\r\n height: 24,\r\n items: [this.backBtn, this.preBtn]\r\n },\r\n cardCreator: BI.bind(this._createYearCalendar, this),\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedYear);\r\n var calendar = this.getSelectedCard();\r\n calendar && self.backBtn.setEnable(!calendar.isFrontYear());\r\n calendar && self.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n });\r\n\r\n this.navigation.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedYear = this.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.YearPopup.EVENT_CHANGE, self.selectedYear);\r\n });\r\n\r\n if(BI.isKey(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkMin: function () {\r\n var calendar = this.navigation.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMinDate(this.options.min);\r\n this.backBtn.setEnable(!calendar.isFrontYear());\r\n this.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n },\r\n\r\n _checkMax: function () {\r\n var calendar = this.navigation.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMaxDate(this.options.max);\r\n this.backBtn.setEnable(!calendar.isFrontYear());\r\n this.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n this._checkMin();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n this._checkMax();\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedYear;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseInt(v);\r\n // 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的\r\n var startDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var endDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n if (BI.checkDateVoid(v, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), \"%Y-%X-%d\"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), \"%Y-%X-%d\"))[0]) {\r\n v = BI.getDate().getFullYear();\r\n this.selectedYear = \"\";\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(\"\");\r\n } else {\r\n this.selectedYear = v;\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(v);\r\n }\r\n }\r\n});\r\nBI.YearPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_popup\", BI.YearPopup);/**\r\n * 日期控件中的年份或月份trigger\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DateTriangleTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.DateTriangleTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n height: 24,\r\n iconWidth: 12,\r\n iconHeight: 12\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-triangle-trigger pull-down-ha-font cursor-pointer\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTriangleTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"right\",\r\n text: o.text,\r\n value: o.value,\r\n height: c.height\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical_adapt\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n rgap: 5\r\n }, {\r\n type: \"bi.icon_label\",\r\n width: 16\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.text.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function (v) {\r\n this.text.setText(v);\r\n },\r\n\r\n getText: function () {\r\n return this.item.getText();\r\n },\r\n\r\n getKey: function () {\r\n\r\n }\r\n});\r\nBI.shortcut(\"bi.date_triangle_trigger\", BI.DateTriangleTrigger);/**\r\n * Created by zcf on 2017/2/20.\r\n */\r\nBI.StaticDatePaneCard = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StaticDatePaneCard.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-pane\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n _init: function () {\r\n BI.StaticDatePaneCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month\r\n };\r\n\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n var value = self.datePicker.getValue();\r\n var monthDay = BI.getMonthDays(BI.getDate(value.year, value.month - 1, 1));\r\n var day = self.selectedTime.day || 0;\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n self.selectedTime = {\r\n year: value.year,\r\n month: value.month\r\n };\r\n day !== 0 && (self.selectedTime.day = day);\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n self.calendar.setValue(self.selectedTime);\r\n day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"custom\",\r\n // logic: {\r\n // dynamic: false\r\n // },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this)\r\n });\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = self.calendar.getValue();\r\n self.calendar.empty();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n this.setValue(o.selectedTime);\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.datePicker,\r\n height: 40\r\n }, this.calendar],\r\n hgap: 10\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n day: this.selectedTime.day\r\n });\r\n return calendar;\r\n },\r\n\r\n _getNewCurrentDate: function () {\r\n var today = BI.getDate();\r\n return {\r\n year: today.getFullYear(),\r\n month: today.getMonth() + 1\r\n };\r\n },\r\n\r\n _setCalenderValue: function (date) {\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));\r\n this.calendar.setValue(date);\r\n this.selectedTime = date;\r\n },\r\n\r\n _setDatePicker: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.year) || BI.isNull(timeOb.month)) {\r\n this.datePicker.setValue(this._getNewCurrentDate());\r\n } else {\r\n this.datePicker.setValue(timeOb);\r\n }\r\n },\r\n\r\n _setCalendar: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.day)) {\r\n this.calendar.empty();\r\n this._setCalenderValue(this._getNewCurrentDate());\r\n } else {\r\n this._setCalenderValue(timeOb);\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n this._setDatePicker(timeOb);\r\n this._setCalendar(timeOb);\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.static_date_pane_card\", BI.StaticDatePaneCard);BI.DynamicDatePane = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-pane\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: 30,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDatePane.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDatePane.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n }),\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue()[0];\r\n self.dateTab.setSelect(value);\r\n switch (value) {\r\n case BI.DynamicDatePane.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n break;\r\n case BI.DynamicDatePane.Dynamic:\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.switcher = this;\r\n }\r\n },\r\n height: 30\r\n }, {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n showIndex: BI.DynamicDatePane.Static,\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDatePane.Static:\r\n return {\r\n type: \"bi.static_date_pane_card\",\r\n behaviors: o.behaviors,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n case BI.DynamicDatePane.Dynamic:\r\n default:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n if(self._checkValue(self.getValue())) {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this.setValue(this.options.value);\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n var type = v.type || BI.DynamicDateCombo.Static;\r\n var value = v.value || v;\r\n this.switcher.setValue(type);\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n });\r\n } else {\r\n this.ymd.setValue(value);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.dynamic_date_pane\", BI.DynamicDatePane);\r\n\r\nBI.extend(BI.DynamicDatePane, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 290,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-time-combo bi-border bi-border-radius\",\r\n width: 200,\r\n height: 24,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimeCombo.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n var date = BI.getDate();\r\n this.storeValue = BI.isNotNull(opts.value) ? opts.value : {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate(),\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_time_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n value: opts.value\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.date_time_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n value: opts.value\r\n });\r\n self.setValue(this.storeValue);\r\n\r\n this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE, function () {\r\n self.setValue(self.storeValue);\r\n self.hidePopupView();\r\n self.fireEvent(BI.DateTimeCombo.EVENT_CANCEL);\r\n });\r\n this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE, function () {\r\n self.storeValue = self.popup.getValue();\r\n self.setValue(self.storeValue);\r\n self.hidePopupView();\r\n self.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM);\r\n });\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: this.popup,\r\n width: this.constants.popupWidth,\r\n stopPropagation: false\r\n },\r\n // DEC-4250 和复选下拉一样,点击不收起\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n triggerBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.combo,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n top: 0,\r\n right: 0\r\n }]\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.popup.setValue(v);\r\n this.trigger.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n }\r\n});\r\n\r\nBI.DateTimeCombo.EVENT_CANCEL = \"EVENT_CANCEL\";\r\nBI.DateTimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DateTimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.date_time_combo\", BI.DateTimeCombo);\r\n/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimePopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-time-popup\",\r\n width: 268,\r\n height: 374\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n this.cancelButton = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"multidate-popup-button bi-border-top bi-border-right\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Cancel\")\r\n });\r\n this.cancelButton.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE);\r\n });\r\n\r\n this.okButton = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"multidate-popup-button bi-border-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\")\r\n });\r\n this.okButton.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE);\r\n });\r\n\r\n this.dateCombo = BI.createWidget({\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: opts.behaviors,\r\n min: self.options.min,\r\n max: self.options.max\r\n });\r\n self.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);\r\n });\r\n\r\n this.dateButton = BI.createWidget({\r\n type: \"bi.grid\",\r\n items: [[this.cancelButton, this.okButton]]\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this.dateCombo\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-split-top\",\r\n items: [{\r\n type: \"bi.dynamic_date_time_select\",\r\n ref: function (_ref) {\r\n self.timeSelect = _ref;\r\n }\r\n }]\r\n },\r\n height: 50\r\n }, {\r\n el: this.dateButton,\r\n height: 30\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n setValue: function (v) {\r\n var value = v, date;\r\n if (BI.isNull(value)) {\r\n date = BI.getDate();\r\n this.dateCombo.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.timeSelect.setValue({\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n });\r\n } else {\r\n this.dateCombo.setValue({\r\n year: value.year,\r\n month: value.month,\r\n day: value.day\r\n });\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.extend({\r\n year: this.dateCombo.getValue().year,\r\n month: this.dateCombo.getValue().month,\r\n day: this.dateCombo.getValue().day\r\n }, this.timeSelect.getValue());\r\n }\r\n});\r\nBI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE = \"BUTTON_CANCEL_EVENT_CHANGE\";\r\nBI.DateTimePopup.CALENDAR_EVENT_CHANGE = \"CALENDAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_time_popup\", BI.DateTimePopup);\r\n/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimeTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-date-time-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n width: 200\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimeTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n width: o.width,\r\n hgap: c.hgap\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.text\r\n },{\r\n el: BI.createWidget(),\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _printTime: function (v) {\r\n return v < 10 ? \"0\" + v : v;\r\n },\r\n\r\n setValue: function (v) {\r\n var self = this;\r\n var value = v, dateStr;\r\n if(BI.isNull(value)) {\r\n value = BI.getDate();\r\n dateStr = BI.print(value, \"%Y-%X-%d %H:%M:%S\");\r\n } else {\r\n var date = BI.getDate(value.year, value.month - 1, value.day, value.hour, value.minute, value.second);\r\n dateStr = BI.print(date, \"%Y-%X-%d %H:%M:%S\");\r\n\r\n }\r\n this.text.setText(dateStr);\r\n this.text.setTitle(dateStr);\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.date_time_trigger\", BI.DateTimeTrigger);\r\nBI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-time-pane\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n _init: function () {\r\n BI.StaticDateTimePaneCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month\r\n };\r\n\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n var value = self.datePicker.getValue();\r\n var monthDay = BI.getMonthDays(BI.getDate(value.year, value.month - 1, 1));\r\n var day = self.selectedTime.day || 0;\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n self.selectedTime = BI.extend(self.selectedTime, {\r\n year: value.year,\r\n month: value.month\r\n });\r\n day !== 0 && (self.selectedTime.day = day);\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n self.calendar.setValue(self.selectedTime);\r\n day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"custom\",\r\n // logic: {\r\n // dynamic: false\r\n // },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this)\r\n });\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());\r\n self.calendar.empty();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n hgap: 10,\r\n items: [{\r\n el: this.datePicker,\r\n height: 40\r\n }, this.calendar, {\r\n el: {\r\n type: \"bi.dynamic_date_time_select\",\r\n cls: \"bi-split-top\",\r\n ref: function () {\r\n self.timeSelect = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,\r\n action: function () {\r\n self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n height: 40\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n this.setValue(o.selectedTime);\r\n\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n day: this.selectedTime.day\r\n });\r\n return calendar;\r\n },\r\n\r\n _getNewCurrentDate: function () {\r\n var today = BI.getDate();\r\n return {\r\n year: today.getFullYear(),\r\n month: today.getMonth() + 1\r\n };\r\n },\r\n\r\n _setCalenderValue: function (date) {\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));\r\n this.calendar.setValue(date);\r\n this.selectedTime = BI.extend({}, this.timeSelect.getValue(), date);\r\n },\r\n\r\n _setDatePicker: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.year) || BI.isNull(timeOb.month)) {\r\n this.datePicker.setValue(this._getNewCurrentDate());\r\n } else {\r\n this.datePicker.setValue(timeOb);\r\n }\r\n },\r\n\r\n _setCalendar: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.day)) {\r\n this.calendar.empty();\r\n this._setCalenderValue(this._getNewCurrentDate());\r\n } else {\r\n this._setCalenderValue(timeOb);\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n timeOb = timeOb || {};\r\n this._setDatePicker(timeOb);\r\n this._setCalendar(timeOb);\r\n this.timeSelect.setValue({\r\n hour: timeOb.hour,\r\n minute: timeOb.minute,\r\n second: timeOb.second\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.static_date_time_pane_card\", BI.StaticDateTimePaneCard);BI.DynamicDateTimePane = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-pane\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: 30,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateTimePane.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateTimePane.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n }),\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue()[0];\r\n self.dateTab.setSelect(value);\r\n switch (value) {\r\n case BI.DynamicDateTimePane.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n break;\r\n case BI.DynamicDateTimePane.Dynamic:\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.switcher = this;\r\n }\r\n },\r\n height: 30\r\n }, {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n showIndex: BI.DynamicDateTimePane.Static,\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateTimePane.Static:\r\n return {\r\n type: \"bi.static_date_time_pane_card\",\r\n behaviors: o.behaviors,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n case BI.DynamicDateTimePane.Dynamic:\r\n default:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n if(self._checkValue(self.getValue())) {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this.setValue(this.options.value);\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n var type = v.type || BI.DynamicDateTimePane.Static;\r\n var value = v.value || v;\r\n this.switcher.setValue(type);\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateTimePane.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n break;\r\n case BI.DynamicDateTimePane.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n });\r\n } else {\r\n this.ymd.setValue(value);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.dynamic_date_time_pane\", BI.DynamicDateTimePane);\r\n\r\nBI.extend(BI.DynamicDateTimePane, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * Created by roy on 15/8/14.\r\n */\r\nBI.DownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-combo\",\r\n height: 24,\r\n items: [],\r\n adjustLength: 0,\r\n direction: \"bottom\",\r\n trigger: \"click\",\r\n container: null,\r\n stopPropagation: false,\r\n el: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popupview = BI.createWidget({\r\n type: \"bi.down_list_popup\",\r\n items: o.items,\r\n chooseType: o.chooseType,\r\n value: o.value\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {\r\n self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n\r\n this.downlistcombo = BI.createWidget({\r\n element: this,\r\n type: \"bi.combo\",\r\n trigger: o.trigger,\r\n isNeedAdjustWidth: false,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n direction: o.direction,\r\n stopPropagation: o.stopPropagation,\r\n el: BI.createWidget(o.el, {\r\n type: \"bi.icon_trigger\",\r\n extraCls: o.iconCls,\r\n width: o.width,\r\n height: o.height\r\n }),\r\n popup: {\r\n el: this.popupview,\r\n stopPropagation: o.stopPropagation,\r\n maxHeight: 1000,\r\n minWidth: 140\r\n }\r\n });\r\n\r\n this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n },\r\n\r\n hideView: function () {\r\n this.downlistcombo.hideView();\r\n },\r\n\r\n showView: function (e) {\r\n this.downlistcombo.showView(e);\r\n },\r\n\r\n populate: function (items) {\r\n this.popupview.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupview.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.popupview.getValue();\r\n }\r\n});\r\nBI.DownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.down_list_combo\", BI.DownListCombo);/**\r\n * Created by roy on 15/9/6.\r\n */\r\nBI.DownListGroup = BI.inherit(BI.Widget, {\r\n constants: {\r\n iconCls: \"check-mark-ha-font\"\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-group\",\r\n items: [\r\n {\r\n el: {}\r\n }\r\n ]\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListGroup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n\r\n this.downlistgroup = BI.createWidget({\r\n element: this,\r\n type: \"bi.button_tree\",\r\n items: o.items,\r\n chooseType: 0, // 0单选,1多选\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n });\r\n this.downlistgroup.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if(type === BI.Events.CLICK) {\r\n self.fireEvent(BI.DownListGroup.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n },\r\n getValue: function () {\r\n return this.downlistgroup.getValue();\r\n },\r\n setValue: function (v) {\r\n this.downlistgroup.setValue(v);\r\n }\r\n\r\n\r\n});\r\nBI.DownListGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_group\", BI.DownListGroup);BI.DownListItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.DownListItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-item bi-list-item-active\",\r\n cls: \"\",\r\n height: 24,\r\n logic: {\r\n dynamic: true\r\n },\r\n selected: false,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n width: 36,\r\n height: o.height,\r\n items: [{\r\n el: {\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left), BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.DownListItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.DownListItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.DownListItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_item\", BI.DownListItem);BI.DownListGroupItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.DownListGroupItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-down-list-group-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n // invalid: true,\r\n iconCls1: \"dot-e-font\",\r\n iconCls2: \"pull-right-e-font\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListGroupItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n var self = this;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-group-item-text\",\r\n textAlign: \"left\",\r\n text: o.text,\r\n value: o.value,\r\n height: o.height\r\n });\r\n\r\n this.icon1 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls1,\r\n width: 36,\r\n disableSelected: true,\r\n selected: this._digest(o.value)\r\n });\r\n\r\n this.icon2 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls2,\r\n width: 24,\r\n forceNotSelected: true\r\n });\r\n\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: 24\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.icon2,\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.icon1, this.text, blank)\r\n }))));\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled()) {\r\n self.hover();\r\n }\r\n }, function () {\r\n if (self.isEnabled()) {\r\n self.dishover();\r\n }\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n var self = this, o = this.options;\r\n v = BI.isArray(v) ? v : [v];\r\n return BI.any(v, function (idx, value) {\r\n return BI.contains(o.childValues, value);\r\n });\r\n },\r\n\r\n hover: function () {\r\n BI.DownListGroupItem.superclass.hover.apply(this, arguments);\r\n this.icon1.element.addClass(\"hover\");\r\n this.icon2.element.addClass(\"hover\");\r\n\r\n },\r\n\r\n dishover: function () {\r\n BI.DownListGroupItem.superclass.dishover.apply(this, arguments);\r\n this.icon1.element.removeClass(\"hover\");\r\n this.icon2.element.removeClass(\"hover\");\r\n },\r\n\r\n doClick: function () {\r\n BI.DownListGroupItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE, this.getValue());\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.icon1.setSelected(this._digest(v));\r\n }\r\n});\r\nBI.DownListGroupItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_group_item\", BI.DownListGroupItem);/**\r\n * Created by roy on 15/9/8.\r\n * 处理popup中的item分组样式\r\n * 一个item分组中的成员大于一时,该分组设置为单选,并且默认状态第一个成员设置为已选择项\r\n */\r\nBI.DownListPopup = BI.inherit(BI.Pane, {\r\n constants: {\r\n nextIcon: \"pull-right-e-font\",\r\n height: 24,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n hgap: 0,\r\n vgap: 0,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.DownListPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-popup\",\r\n items: [],\r\n chooseType: BI.Selection.Multi\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListPopup.superclass._init.apply(this, arguments);\r\n this.singleValues = [];\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n this.items = BI.deepClone(this.options.items);\r\n var self = this, o = this.options, children = this._createChildren(this.items);\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_tree\",\r\n items: BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n ),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: this.constants.hgap,\r\n vgap: this.constants.vgap\r\n }],\r\n value: this._digest(o.value),\r\n chooseType: o.chooseType\r\n });\r\n\r\n this.popup.on(BI.ButtonTree.EVENT_CHANGE, function (value, object) {\r\n var changedValue = value;\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n changedValue = self.childValueMap[value];\r\n self.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, changedValue, self.fatherValueMap[value]);\r\n } else {\r\n self.fireEvent(BI.DownListPopup.EVENT_CHANGE, changedValue, object);\r\n }\r\n\r\n\r\n if (!BI.contains(self.singleValues, changedValue)) {\r\n var item = self.getValue();\r\n var result = [];\r\n BI.each(item, function (i, valueObject) {\r\n if (valueObject.value != changedValue) {\r\n result.push(valueObject);\r\n }\r\n });\r\n self.setValue(result);\r\n }\r\n\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.popup],\r\n vgap: 5\r\n });\r\n\r\n },\r\n _createChildren: function (items) {\r\n var self = this, result = [];\r\n // 不能修改populate进来的item的引用\r\n BI.each(items, function (i, it) {\r\n var item_done = {\r\n type: \"bi.down_list_group\",\r\n items: []\r\n };\r\n\r\n BI.each(it, function (i, item) {\r\n if (BI.isNotEmptyArray(item.children) && !BI.isEmpty(item.el)) {\r\n item.type = \"bi.combo_group\";\r\n // popup未初始化返回的是options中的value, 在经过buttontree的getValue concat之后,无法区分值来自options\r\n // 还是item自身, 这边控制defaultInit为true来避免这个问题\r\n item.isDefaultInit = true;\r\n item.cls = \"down-list-group\";\r\n item.trigger = \"hover\";\r\n item.isNeedAdjustWidth = false;\r\n item.el.title = item.el.title || item.el.text;\r\n item.el.type = \"bi.down_list_group_item\";\r\n item.el.logic = {\r\n dynamic: true\r\n };\r\n item.el.height = self.constants.height;\r\n item.el.iconCls2 = self.constants.nextIcon;\r\n item.popup = {\r\n lgap: 1,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n\r\n },\r\n innerVGap: 5,\r\n maxHeight: 378\r\n };\r\n item.el.childValues = [];\r\n BI.each(item.children, function (i, child) {\r\n var fatherValue = BI.deepClone(item.el.value);\r\n var childValue = BI.deepClone(child.value);\r\n self.singleValues.push(child.value);\r\n child.type = \"bi.down_list_item\";\r\n child.extraCls = \" child-down-list-item\";\r\n child.title = child.title || child.text;\r\n child.textRgap = 10;\r\n child.isNeedAdjustWidth = false;\r\n child.logic = {\r\n dynamic: true\r\n };\r\n child.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n child.value = self._createChildValue(fatherValue, childValue);\r\n item.el.childValues.push(child.value);\r\n });\r\n } else {\r\n item.type = \"bi.down_list_item\";\r\n item.title = item.title || item.text;\r\n item.textRgap = 10;\r\n item.isNeedAdjustWidth = false;\r\n item.logic = {\r\n dynamic: true\r\n };\r\n }\r\n var el_done = {};\r\n el_done.el = item;\r\n item_done.items.push(el_done);\r\n });\r\n if (self._isGroup(item_done.items)) {\r\n BI.each(item_done.items, function (i, item) {\r\n self.singleValues.push(item.el.value);\r\n });\r\n }\r\n\r\n result.push(item_done);\r\n if (self._needSpliter(i, items.length)) {\r\n var spliter_container = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-down-list-spliter bi-split-top cursor-pointer\",\r\n height: 0\r\n }\r\n\r\n }],\r\n cls: \"bi-down-list-spliter-container cursor-pointer\",\r\n vgap: 5,\r\n lgap: 10,\r\n rgap: 0\r\n });\r\n result.push(spliter_container);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n _isGroup: function (i) {\r\n return i.length > 1;\r\n },\r\n\r\n _needSpliter: function (i, itemLength) {\r\n return i < itemLength - 1;\r\n },\r\n\r\n _createChildValue: function (fatherValue, childValue) {\r\n return fatherValue + \"_\" + childValue;\r\n },\r\n\r\n _digest: function (valueItem) {\r\n var self = this;\r\n var valueArray = [];\r\n BI.each(valueItem, function (i, item) {\r\n var value;\r\n if (BI.isNotNull(item.childValue)) {\r\n value = self._createChildValue(item.value, item.childValue);\r\n } else {\r\n value = item.value;\r\n }\r\n valueArray.push(value);\r\n }\r\n );\r\n return valueArray;\r\n },\r\n\r\n _checkValues: function (values) {\r\n var value = [];\r\n BI.each(this.items, function (idx, itemGroup) {\r\n BI.each(itemGroup, function (id, item) {\r\n if(BI.isNotNull(item.children)) {\r\n var childValues = BI.map(item.children, \"value\");\r\n var v = joinValue(childValues, values[idx]);\r\n if(BI.isNotEmptyString(v)) {\r\n value.push(v);\r\n }\r\n }else{\r\n if(item.value === values[idx][0]) {\r\n value.push(values[idx][0]);\r\n }\r\n }\r\n });\r\n });\r\n return value;\r\n\r\n function joinValue (sources, targets) {\r\n var value = \"\";\r\n BI.some(sources, function (idx, s) {\r\n return BI.some(targets, function (id, t) {\r\n if(s === t) {\r\n value = s;\r\n return true;\r\n }\r\n });\r\n });\r\n return value;\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n BI.DownListPopup.superclass.populate.apply(this, arguments);\r\n this.items = BI.deepClone(items);\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n this.singleValues = [];\r\n var children = this._createChildren(this.items);\r\n var popupItem = BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n );\r\n this.popup.populate(popupItem);\r\n },\r\n\r\n setValue: function (valueItem) {\r\n this.popup.setValue(this._digest(valueItem));\r\n },\r\n\r\n _getValue: function () {\r\n var v = [];\r\n BI.each(this.popup.getAllButtons(), function (i, item) {\r\n i % 2 === 0 && v.push(item.getValue());\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [];\r\n var values = this._checkValues(this._getValue());\r\n BI.each(values, function (i, value) {\r\n var valueItem = {};\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n var fartherValue = self.fatherValueMap[value];\r\n valueItem.childValue = self.childValueMap[value];\r\n valueItem.value = fartherValue;\r\n } else {\r\n valueItem.value = value;\r\n }\r\n result.push(valueItem);\r\n });\r\n return result;\r\n }\r\n\r\n\r\n});\r\n\r\nBI.DownListPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListPopup.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.shortcut(\"bi.down_list_popup\", BI.DownListPopup);!(function () {\r\n BI.DynamicDateHelper = {};\r\n BI.extend(BI.DynamicDateHelper, {\r\n getCalculation: function (obj) {\r\n var date = BI.getDate();\r\n\r\n return this.getCalculationByDate(date, obj);\r\n },\r\n\r\n getCalculationByDate: function (date, obj) {\r\n if (BI.isNotNull(obj.year)) {\r\n date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());\r\n }\r\n if (BI.isNotNull(obj.quarter)) {\r\n date = BI.getOffsetQuarter(date, BI.parseInt(obj.quarter));\r\n }\r\n if (BI.isNotNull(obj.month)) {\r\n date = BI.getOffsetMonth(date, BI.parseInt(obj.month));\r\n }\r\n if (BI.isNotNull(obj.week)) {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.week) * 7);\r\n }\r\n if (BI.isNotNull(obj.day)) {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.day));\r\n }\r\n if (BI.isNotNull(obj.workDay)) {\r\n // 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算\r\n if(BI.isNotNull(BI.holidays)) {\r\n var count = Math.abs(obj.workDay);\r\n for (var i = 0; i < count; i++) {\r\n date = BI.getOffsetDate(date, obj.workDay < 0 ? -1 : 1);\r\n if(BI.isNotNull(BI.holidays[BI.print(date, \"%Y-%X-%d\")])) {\r\n i--;\r\n }\r\n }\r\n } else {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.workDay));\r\n }\r\n }\r\n if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {\r\n date = this.getBeginDate(date, obj);\r\n }\r\n\r\n return BI.getDate(date.getFullYear(), date.getMonth(), date.getDate());\r\n },\r\n\r\n getBeginDate: function (date, obj) {\r\n if (BI.isNotNull(obj.day)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), date.getMonth(), 1) : BI.getDate(date.getFullYear(), date.getMonth(), (BI.getLastDateOfMonth(date)).getDate());\r\n }\r\n if (BI.isNotNull(obj.week)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getWeekStartDate(date) : BI.getWeekEndDate(date);\r\n }\r\n if (BI.isNotNull(obj.month)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), date.getMonth(), 1) : BI.getDate(date.getFullYear(), date.getMonth(), (BI.getLastDateOfMonth(date)).getDate());\r\n }\r\n if (BI.isNotNull(obj.quarter)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getQuarterStartDate(date) : BI.getQuarterEndDate(date);\r\n }\r\n if (BI.isNotNull(obj.year)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), 0, 1) : BI.getDate(date.getFullYear(), 11, 31);\r\n }\r\n return date;\r\n }\r\n });\r\n})();\r\nBI.DynamicDateCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n this.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 12,\r\n lgap: 10\r\n },\r\n tgap: 10,\r\n bgap: 5\r\n }, {\r\n type: \"bi.button_group\",\r\n ref: function () {\r\n self.checkgroup = this;\r\n },\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n lgap: 4,\r\n value: [BI.DynamicDateCard.TYPE.YEAR],\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year\"),\r\n value: BI.DynamicDateCard.TYPE.YEAR\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Single_Quarter\"),\r\n value: BI.DynamicDateCard.TYPE.QUARTER\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month\"),\r\n value: BI.DynamicDateCard.TYPE.MONTH\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week\"),\r\n value: BI.DynamicDateCard.TYPE.WEEK\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Day\"),\r\n value: BI.DynamicDateCard.TYPE.DAY\r\n }], {\r\n type: \"bi.multi_select_item\",\r\n logic: {\r\n dynamic: true\r\n }\r\n }),\r\n layouts: [{\r\n type: \"bi.left\",\r\n rgap: 4\r\n }],\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = self.checkgroup.getValue();\r\n if(value.length !== 0) {\r\n self.workDayBox.setSelected(false);\r\n }\r\n\r\n var plainValue = {};\r\n BI.each(self.resultPane.getAllButtons(), function (idx, button) {\r\n var value = button.getValue();\r\n if(BI.isNotNull(value.dateType)) {\r\n plainValue[value.dateType] = {\r\n value: value.value,\r\n offset: value.offset\r\n };\r\n }\r\n });\r\n self.resultPane.populate(self._getParamJson(BI.map(self.checkgroup.getValue(), function (idx, v) {\r\n var obj = {\r\n dateType: v\r\n };\r\n if(BI.has(plainValue, v)) {\r\n obj.value = plainValue[v].value;\r\n obj.offset = plainValue[v].offset;\r\n }\r\n return obj;\r\n })));\r\n self.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.vertical_adapt\",\r\n lgap: 2,\r\n items: [{\r\n el: {\r\n type: \"bi.multi_select_item\",\r\n ref: function () {\r\n self.workDayBox = this;\r\n },\r\n logic: {\r\n dynamic: true\r\n },\r\n text: BI.i18nText(\"BI-Basic_Work_Day\"),\r\n value: BI.DynamicDateCard.TYPE.WORK_DAY,\r\n listeners: [{\r\n eventName: BI.MultiSelectItem.EVENT_CHANGE,\r\n action: function () {\r\n if(this.isSelected()) {\r\n self.checkgroup.setValue();\r\n }\r\n self.resultPane.populate(this.isSelected() ? self._getParamJson([{\r\n dateType: BI.DynamicDateCard.TYPE.WORK_DAY\r\n }]) : []);\r\n self.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }\r\n }],\r\n ref: function () {\r\n self.workDay = this;\r\n }\r\n }, {\r\n type: \"bi.button_group\",\r\n items: this._getParamJson([{\r\n dateType: BI.DynamicDateCard.TYPE.YEAR\r\n }]),\r\n ref: function () {\r\n self.resultPane = this;\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n bgap: 10,\r\n hgap: 10\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _getParamJson: function (values, positionValue) {\r\n var self = this;\r\n var items = BI.map(values, function (idx, value) {\r\n return {\r\n el: {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: value.dateType,\r\n value: value.value,\r\n offset: value.offset,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n tgap: idx === 0 ? 5 : 0\r\n };\r\n });\r\n\r\n if(values.length === 1 && values[0].dateType === BI.DynamicDateCard.TYPE.DAY) {\r\n var comboItems = this._getText(BI.DynamicDateCard.TYPE.MONTH);\r\n comboItems[0].text = BI.i18nText(\"BI-Basic_Empty\");\r\n items.push({\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n items: comboItems,\r\n container: null,\r\n value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.position = this.getValue()[0];\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n });\r\n }else{\r\n if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {\r\n items.push({\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n container: null,\r\n items: this._getText(BI.last(values).dateType),\r\n value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.position = this.getValue()[0];\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n });\r\n\r\n }\r\n }\r\n\r\n return items;\r\n },\r\n\r\n _getText: function (lastValue) {\r\n switch (lastValue) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Year_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Year_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Quarter_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Quarter_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n default:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n }\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n this.position = v.position || BI.DynamicDateCard.OFFSET.CURRENT;\r\n var values = [];\r\n var valuesItems = [];\r\n if(BI.isNotNull(v.year)) {\r\n values.push(BI.DynamicDateCard.TYPE.YEAR);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n }\r\n if(BI.isNotNull(v.quarter)) {\r\n values.push(BI.DynamicDateCard.TYPE.QUARTER);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));\r\n }\r\n if(BI.isNotNull(v.month)) {\r\n values.push(BI.DynamicDateCard.TYPE.MONTH);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));\r\n }\r\n if(BI.isNotNull(v.week)) {\r\n values.push(BI.DynamicDateCard.TYPE.WEEK);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK, v.week));\r\n }\r\n if(BI.isNotNull(v.day)) {\r\n values.push(BI.DynamicDateCard.TYPE.DAY);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.DAY, v.day));\r\n }\r\n if(BI.isNotNull(v.workDay)) {\r\n values.push(BI.DynamicDateCard.TYPE.WORK_DAY);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY, v.workDay));\r\n }\r\n this.checkgroup.setValue(values);\r\n this.workDayBox.setSelected(BI.isNotNull(v.workDay));\r\n this.resultPane.populate(this._getParamJson(valuesItems, v.position));\r\n },\r\n\r\n getValue: function () {\r\n var self = this;\r\n var valueMap = {};\r\n var selectValues = this.checkgroup.getValue();\r\n var buttons = this.resultPane.getAllButtons();\r\n if(selectValues.length !== 0) {\r\n BI.each(buttons, function (idx, button) {\r\n var value = button.getValue();\r\n switch (value.dateType) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n valueMap.year = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n valueMap.quarter = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n valueMap.month = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n valueMap.week = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.DAY:\r\n valueMap.day = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n default:\r\n break;\r\n }\r\n if(BI.isNull(value.dateType)) {\r\n valueMap.position = self.position || BI.DynamicDateCard.OFFSET.CURRENT;\r\n }\r\n });\r\n }\r\n if(this.workDayBox.isSelected()) {\r\n var value = buttons[0].getValue();\r\n valueMap.workDay = (value.offset === 0 ? -value.value : value.value);\r\n }\r\n return valueMap;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.dynamic_date_card\", BI.DynamicDateCard);\r\n\r\nBI.extend(BI.DynamicDateCard, {\r\n TYPE: {\r\n YEAR: 1,\r\n QUARTER: 2,\r\n MONTH: 3,\r\n WEEK: 4,\r\n DAY: 5,\r\n WORK_DAY: 6\r\n },\r\n OFFSET: {\r\n CURRENT: 1,\r\n BEGIN: 2,\r\n END: 3\r\n }\r\n\r\n});BI.DynamicDateCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 259,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius\",\r\n height: 22,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\",\r\n format: \"\",\r\n allowEdit: true\r\n },\r\n\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n var date = BI.getDate();\r\n this.storeValue = opts.value;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: opts.height\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n destroyWhenHide: true,\r\n el: {\r\n type: \"bi.dynamic_date_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n format: opts.format,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n height: opts.height,\r\n value: opts.value,\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTrigger.EVENT_KEY_DOWN,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_STOP,\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_ERROR,\r\n action: function () {\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n }\r\n };\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_VALID);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_CONFIRM,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: {\r\n type: \"bi.dynamic_date_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n }\r\n });\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n var value = self.popup.getValue();\r\n if(self._checkValue(value)) {\r\n self.setValue(value);\r\n }\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n stopPropagation: false\r\n },\r\n // DEC-4250 和复选下拉一样,点击triggerBtn不默认收起\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.popup.setMinDate(opts.minDate);\r\n self.popup.setMaxDate(opts.maxDate);\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.triggerBtn = this;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }],\r\n ref: function (_ref) {\r\n self.comboWrapper = _ref;\r\n }\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this._checkDynamicValue(this.storeValue);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var o = this.options;\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = o.height;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n _defaultState: function () {\r\n\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n o.minDate = minDate;\r\n this.trigger.setMinDate(minDate);\r\n this.popup && this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n o.maxDate = maxDate;\r\n this.trigger.setMaxDate(maxDate);\r\n this.popup && this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n }\r\n});\r\n\r\nBI.DynamicDateCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicDateCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.dynamic_date_combo\", BI.DynamicDateCombo);\r\n\r\nBI.extend(BI.DynamicDateCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicDateParamItem = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-param-item\",\r\n dateType: BI.DynamicDateCard.TYPE.YEAR,\r\n value: 0,\r\n offset: 0,\r\n height: 24\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.sign_editor\",\r\n cls: \"bi-border\",\r\n height: 22,\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v);\r\n },\r\n value: o.value,\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n errorText: function (v) {\r\n if(BI.isEmptyString(v)) {\r\n return BI.i18nText(\"BI-Basic_Please_Input_Content\");\r\n }\r\n return BI.i18nText(\"BI-Please_Input_Natural_Number\");\r\n },\r\n allowBlank: false,\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n width: 60\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n height: 24,\r\n text: this._getText()\r\n },\r\n width: o.dateType === BI.DynamicDateCard.TYPE.WORK_DAY ? 60 : 20\r\n }, {\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n items: [{\r\n text: BI.i18nText(\"BI-Basic_Front\"),\r\n value: 0\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Behind\"),\r\n value: 1\r\n }],\r\n ref: function () {\r\n self.offsetCombo = this;\r\n },\r\n container: null,\r\n value: o.offset,\r\n listeners: [{\r\n eventName: BI.TextValueCombo.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _getText: function () {\r\n var text = \"\";\r\n switch (this.options.dateType) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n text = BI.i18nText(\"BI-Basic_Year\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n text = BI.i18nText(\"BI-Basic_Single_Quarter\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n text = BI.i18nText(\"BI-Basic_Month\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n text = BI.i18nText(\"BI-Basic_Week\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.DAY:\r\n text = BI.i18nText(\"BI-Basic_Day\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.WORK_DAY:\r\n default:\r\n text = BI.i18nText(\"BI-Basic_Work_Day\");\r\n break;\r\n }\r\n return text;\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n v.value = v.value || 0;\r\n v.offset = v.offset || 0;\r\n this.editor.setValue(v.value);\r\n this.offsetCombo.setValue(v.offset);\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n dateType: this.options.dateType,\r\n value: this.editor.getValue(),\r\n offset: this.offsetCombo.getValue()[0]\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicDateParamItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_param_item\", BI.DynamicDateParamItem);\r\nBI.DynamicDatePopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-popup\",\r\n width: 248,\r\n height: 344\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDatePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicDateCombo.Static};\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n textHeight: c.buttonHeight - 1,\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Multi_Date_Today\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.DateCalendarPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicDateCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicDateCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%X-%d\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.ymd.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.ymd.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n } else {\r\n this.ymd.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n }\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.DynamicDatePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_popup\", BI.DynamicDatePopup);BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2,\r\n yearLength: 4,\r\n yearMonthLength: 6,\r\n yearFullMonthLength: 7,\r\n compareFormat: \"%Y-%X-%d\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-date-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n format: \"\", // 显示的日期格式化方式\r\n allowEdit: true, // 是否允许编辑\r\n watermark: \"\"\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.storeTriggerValue = \"\";\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n var formatStr = self._getStandardDateStr(v);\r\n var date = formatStr.match(/\\d+/g);\r\n !BI.isKey(o.format) && self._autoAppend(v, date);\r\n return self._dateCheck(formatStr) && BI.checkDateLegal(formatStr) && self._checkVoid({\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n });\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function () {\r\n var str = \"\";\r\n if (!BI.isKey(o.format)) {\r\n str = self.editor.isEditing() ? BI.i18nText(\"BI-Date_Trigger_Error_Text\") : BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n return str;\r\n },\r\n title: BI.bind(this._getTitle, this)\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_VALID);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var formatStr = self._getStandardDateStr(value);\r\n var date = formatStr.match(/\\d+/g);\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n }\r\n };\r\n }\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (self.editor.isValid()) {\r\n self.editor.blur();\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: BI.bind(this._getTitle, this)\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, this._getFormatString());\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n return \"\";\r\n }\r\n return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());\r\n }\r\n },\r\n\r\n _getStandardDateStr: function (v) {\r\n var c = this._const;\r\n var result = [0, 1, 2];\r\n var formatArray = this._getFormatString().match(/%./g);\r\n BI.each(formatArray, function (idx, v) {\r\n switch (v) {\r\n case \"%Y\":\r\n case \"%y\":\r\n result[0] = idx;\r\n break;\r\n case \"%X\":\r\n case \"%x\":\r\n result[1] = idx;\r\n break;\r\n case \"%d\":\r\n case \"%e\":\r\n default:\r\n result[2] = idx;\r\n break;\r\n }\r\n });\r\n // 这边不能直接用\\d+去切日期, 因为format格式可能是20190607这样的没有分割符的 = =\r\n // 先看一下是否是合法的, 如果合法就变成标准格式的走原来的流程, 不合法不关心\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n if(BI.print(date, this._getFormatString()) === v) {\r\n v = BI.print(date, c.compareFormat);\r\n result = [0, 1, 2];\r\n }\r\n var dateArray = v.match(/\\d+/g);\r\n var newArray = [];\r\n BI.each(dateArray, function (idx) {\r\n newArray[idx] = dateArray[result[idx]];\r\n });\r\n // 这边之所以不直接返回join结果是因为年的格式可能只有2位,所以需要format一下\r\n if(newArray.length === result.length && newArray[0].length === 2) {\r\n return BI.print(BI.parseDateTime(newArray.join(\"-\"), c.compareFormat), c.compareFormat);\r\n }\r\n // 这边format成-20-也没关系, 反正都是不合法的\r\n return newArray.join(\"-\");\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.compareFormat;\r\n },\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0];\r\n },\r\n _autoAppend: function (v, dateObj) {\r\n if (BI.isNotNull(dateObj) && BI.checkDateLegal(v)) {\r\n switch (v.length) {\r\n case this._const.yearLength:\r\n if (this._yearCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n case this._const.yearMonthLength:\r\n case this._const.yearFullMonthLength:\r\n var splitMonth = v.split(\"-\")[1];\r\n if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, this._getFormatString()), this._const.compareFormat);\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _monthCheck: function (v) {\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n var dateStr = BI.print(date, this._const.compareFormat);\r\n return (date.getMonth() >= 0 && (BI.print(BI.parseDateTime(v, \"%Y-%X\"), \"%Y-%X\") === v ||\r\n BI.print(BI.parseDateTime(v, \"%Y-%x\"), \"%Y-%x\") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;\r\n },\r\n\r\n _setInnerValue: function (date) {\r\n var dateStr = BI.print(date, this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n var endText = \"\";\r\n if(BI.isNotNull(obj.year)) {\r\n if(BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Year\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.quarter)) {\r\n if(BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Single_Quarter\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.month)) {\r\n if(BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.week)) {\r\n if(BI.parseInt(obj.week) !== 0) {\r\n value += Math.abs(obj.week) + BI.i18nText(\"BI-Basic_Week\") + (obj.week < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Week\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.day)) {\r\n if(BI.parseInt(obj.day) !== 0) {\r\n value += Math.abs(obj.day) + BI.i18nText(\"BI-Basic_Day\") + (obj.day < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position) : \"\";\r\n }\r\n if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {\r\n value += Math.abs(obj.workDay) + BI.i18nText(\"BI-Basic_Work_Day\") + (obj.workDay < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value + endText;\r\n\r\n function getPositionText (baseText, position) {\r\n switch (position) {\r\n case BI.DynamicDateCard.OFFSET.BEGIN:\r\n return baseText + BI.i18nText(\"BI-Basic_Begin_Start\");\r\n case BI.DynamicDateCard.OFFSET.END:\r\n return baseText + BI.i18nText(\"BI-Basic_End_Stop\");\r\n case BI.DynamicDateCard.OFFSET.CURRENT:\r\n default:\r\n return BI.i18nText(\"BI-Basic_Current_Day\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value, self = this;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n this.editor.setState(\"\");\r\n this.editor.setValue(\"\");\r\n } else {\r\n var dateStr = BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n }\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\n\r\nBI.DynamicDateTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicDateTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicDateTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.DynamicDateTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_date_trigger\", BI.DynamicDateTrigger);\r\nBI.DynamicDateTimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 259,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius\",\r\n height: 22,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\",\r\n format: \"\",\r\n allowEdit: true\r\n },\r\n\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n var date = BI.getDate();\r\n this.storeValue = opts.value;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: opts.height\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n destroyWhenHide: true,\r\n container: opts.container,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: {\r\n type: \"bi.dynamic_date_time_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n format: opts.format,\r\n height: opts.height,\r\n value: opts.value,\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,\r\n action: function () {\r\n self.combo.toggle();\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,\r\n action: function () {\r\n self.storeValue = {\r\n type: BI.DynamicDateTimeCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n }\r\n };\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_CONFIRM,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: {\r\n type: \"bi.dynamic_date_time_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({\r\n type: BI.DynamicDateTimeCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate(),\r\n hour: 0,\r\n minute: 0,\r\n second: 0\r\n }\r\n });\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n var value = self.popup.getValue();\r\n if(self._checkValue(value)) {\r\n self.setValue(value);\r\n }\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n stopPropagation: false\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.popup.setMinDate(opts.minDate);\r\n self.popup.setMaxDate(opts.maxDate);\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n // DEC-4250 和复选下拉一样,点击不收起\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n }\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.triggerBtn = this;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }],\r\n ref: function (_ref) {\r\n self.comboWrapper = _ref;\r\n }\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this._checkDynamicValue(this.storeValue);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var o = this.options;\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateTimeCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = o.height;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n o.minDate = minDate;\r\n this.trigger.setMinDate(minDate);\r\n this.popup && this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n o.maxDate = maxDate;\r\n this.trigger.setMaxDate(maxDate);\r\n this.popup && this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n isValid: function () {\r\n return this.trigger.isValid();\r\n }\r\n});\r\n\r\nBI.DynamicDateTimeCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicDateTimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTimeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTimeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimeCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTimeCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.dynamic_date_time_combo\", BI.DynamicDateTimeCombo);\r\n\r\nBI.extend(BI.DynamicDateTimeCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-time-popup\",\r\n width: 248,\r\n height: 385\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTimePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicDateCombo.Static};\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Multi_Date_Today\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.dynamic_date_time_select\",\r\n cls: \"bi-split-top\",\r\n ref: function () {\r\n self.timeSelect = this;\r\n }\r\n },\r\n height: 40\r\n }]\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicDateCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n self.timeSelect.setValue();\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicDateCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%X-%d\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.ymd.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.ymd.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.timeSelect.setValue();\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n } else {\r\n this.ymd.setValue(value);\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n }\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var type = this.dateTab.getSelect();\r\n return {\r\n type: type,\r\n value: type === BI.DynamicDateTimeCombo.Static ? BI.extend(this.ymd.getValue(), this.timeSelect.getValue()) : this.dynamicPane.getValue()\r\n };\r\n }\r\n});\r\nBI.DynamicDateTimePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_time_popup\", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-date-time-select\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n type: \"bi.vertical_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.hour = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 24;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-23\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkHour(value);\r\n this.setValue(self._formatValueToDoubleDigit(value));\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.SignEditor.EVENT_CHANGE,\r\n action: function () {\r\n var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR);\r\n this.setValue(value);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }\r\n }, {\r\n type: \"bi.label\",\r\n text: \":\",\r\n width: 20\r\n }, {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.minute = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-59\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkMinute(value);\r\n this.setValue(self._formatValueToDoubleDigit(value), BI.DynamicDateTimeSelect.MINUTE);\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.SignEditor.EVENT_CHANGE,\r\n action: function () {\r\n var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE);\r\n this.setValue(value);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }, {\r\n type: \"bi.label\",\r\n text: \":\",\r\n width: 20\r\n }, {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.second = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-59\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkSecond(value);\r\n this.setValue(self._formatValueToDoubleDigit(value));\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _checkBorder: function (v) {\r\n v = v || {};\r\n this._checkHour(v.hour);\r\n this._checkMinute(v.minute);\r\n this._checkSecond(v.second);\r\n },\r\n\r\n _checkHour: function (value) {\r\n this.hour.setDownEnable(BI.parseInt(value) > 0);\r\n this.hour.setUpEnable(BI.parseInt(value) < 23);\r\n },\r\n\r\n _checkMinute: function (value) {\r\n this.minute.setDownEnable(BI.parseInt(value) > 0);\r\n this.minute.setUpEnable(BI.parseInt(value) < 59);\r\n },\r\n\r\n _checkSecond: function (value) {\r\n this.second.setDownEnable(BI.parseInt(value) > 0);\r\n this.second.setUpEnable(BI.parseInt(value) < 59);\r\n },\r\n\r\n _autoSwitch: function (v, type) {\r\n var limit = 0;\r\n var value = v + \"\";\r\n switch (type) {\r\n case BI.DynamicDateTimeSelect.HOUR:\r\n limit = 2;\r\n break;\r\n case BI.DynamicDateTimeSelect.MINUTE:\r\n limit = 5;\r\n break;\r\n default:\r\n break;\r\n }\r\n if(value.length === 1 && BI.parseInt(value) > limit) {\r\n value = \"0\" + value;\r\n }\r\n if (value.length === 2) {\r\n switch (type) {\r\n case BI.DynamicDateTimeSelect.HOUR:\r\n this.hour.isEditing() && this.minute.focus();\r\n break;\r\n case BI.DynamicDateTimeSelect.MINUTE:\r\n this.minute.isEditing() && this.second.focus();\r\n break;\r\n case BI.DynamicDateTimeSelect.SECOND:\r\n default:\r\n break;\r\n }\r\n }\r\n return value;\r\n },\r\n\r\n _formatValueToDoubleDigit: function (v) {\r\n if(BI.isNull(v) || BI.isEmptyString(v)) {\r\n v = 0;\r\n }\r\n var value = BI.parseInt(v);\r\n if(value < 10) {\r\n value = \"0\" + value;\r\n }\r\n return value;\r\n },\r\n\r\n _assertValue: function (v) {\r\n v = v || {};\r\n v.hour = this._formatValueToDoubleDigit(v.hour) || \"00\";\r\n v.minute = this._formatValueToDoubleDigit(v.minute) || \"00\";\r\n v.second = this._formatValueToDoubleDigit(v.second) || \"00\";\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n hour: BI.parseInt(this.hour.getValue()),\r\n minute: BI.parseInt(this.minute.getValue()),\r\n second: BI.parseInt(this.second.getValue())\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = this._assertValue(v);\r\n this.hour.setValue(v.hour);\r\n this.minute.setValue(v.minute);\r\n this.second.setValue(v.second);\r\n this._checkBorder(v);\r\n }\r\n\r\n});\r\nBI.DynamicDateTimeSelect.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.dynamic_date_time_select\", BI.DynamicDateTimeSelect);\r\n\r\nBI.extend(BI.DynamicDateTimeSelect, {\r\n HOUR: 1,\r\n MINUTE: 2,\r\n SECOND: 3\r\n});BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2,\r\n yearLength: 4,\r\n yearMonthLength: 6,\r\n yearFullMonthLength: 7,\r\n compareFormat: \"%Y-%X-%d %H:%M:%S\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-date-time-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n format: \"\", // 显示的日期格式化方式\r\n allowEdit: true, // 是否允许编辑\r\n watermark: \"\"\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.storeTriggerValue = \"\";\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n var formatStr = self._getStandardDateStr(v);\r\n var date = formatStr.match(/\\d+/g);\r\n !BI.isKey(o.format) && self._autoAppend(v, date);\r\n return self._dateCheck(formatStr) && BI.checkDateLegal(formatStr) && self._checkVoid({\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n });\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function () {\r\n var str = \"\";\r\n if (!BI.isKey(o.format)) {\r\n str = self.editor.isEditing() ? BI.i18nText(\"BI-Basic_Date_Time_Error_Text\") : BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n return str;\r\n },\r\n title: BI.bind(this._getTitle, this)\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var formatStr = self._getStandardDateStr(value);\r\n var date = formatStr.match(/\\d+/g);\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0,\r\n hour: date[3] | 0,\r\n minute: date[4] | 0,\r\n second: date[5] | 0\r\n }\r\n };\r\n }\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: BI.bind(this._getTitle, this)\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, this._getFormatString());\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n return \"\";\r\n }\r\n return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,\r\n value.second || 0), this._getFormatString());\r\n }\r\n },\r\n\r\n _getStandardDateStr: function (v) {\r\n var c = this._const;\r\n var result = [];\r\n var hasSecond = false;\r\n var formatArray = this._getFormatString().match(/%./g);\r\n BI.each(formatArray, function (idx, v) {\r\n switch (v) {\r\n case \"%Y\":\r\n case \"%y\":\r\n result[0] = idx;\r\n break;\r\n case \"%X\":\r\n case \"%x\":\r\n result[1] = idx;\r\n break;\r\n case \"%d\":\r\n case \"%e\":\r\n result[2] = idx;\r\n break;\r\n case \"%S\":\r\n hasSecond = true;\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n // 这边不能直接用\\d+去切日期, 因为format格式可能是20190607这样的没有分割符的 = =\r\n // 先看一下是否是合法的, 如果合法就变成标准格式的走原来的流程, 不合法不关心\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n if(BI.print(date, this._getFormatString()) === v) {\r\n v = BI.print(date, c.compareFormat);\r\n result = [0, 1, 2];\r\n }\r\n var dateArray = v.match(/\\d+/g) || [];\r\n var newArray = [];\r\n // 处理乱序的年月日\r\n BI.each(dateArray.slice(0, 3), function (idx) {\r\n newArray[idx] = dateArray[result[idx]];\r\n });\r\n // 拼接时分秒和pm\r\n var suffixArray = dateArray.slice(3);\r\n // 时分秒补0\r\n BI.each(suffixArray, function (idx, v) {\r\n BI.isNumeric(v) && v.length === 1 && (suffixArray[idx] = \"0\" + v);\r\n });\r\n // hh:mm\r\n if(suffixArray.length === 2 && !hasSecond) {\r\n suffixArray.push(\"00\");\r\n }\r\n var suffixString = suffixArray.join(\":\");\r\n var dateString = newArray.slice(0, 3).join(\"-\");\r\n if (BI.isNotEmptyString(suffixString)) {\r\n dateString += \" \" + suffixString;\r\n }\r\n return dateString;\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.compareFormat;\r\n },\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d %H:%M:%S\"), \"%Y-%x-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e %H:%M:%S\"), \"%Y-%x-%e %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e %H:%M:%S\"), \"%Y-%X-%e %H:%M:%S\") === date ||\r\n\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0];\r\n },\r\n _autoAppend: function (v, dateObj) {\r\n if (BI.isNotNull(dateObj) && BI.checkDateLegal(v)) {\r\n switch (v.length) {\r\n case this._const.yearLength:\r\n if (this._yearCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n case this._const.yearMonthLength:\r\n case this._const.yearFullMonthLength:\r\n var splitMonth = v.split(\"-\")[1];\r\n if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _monthCheck: function (v) {\r\n var date = BI.parseDateTime(v, \"%Y-%X-%d\");\r\n var dateStr = BI.print(date, \"%Y-%X-%d\");\r\n return (date.getMonth() > 0 && (BI.print(BI.parseDateTime(v, \"%Y-%X\"), \"%Y-%X\") === v ||\r\n BI.print(BI.parseDateTime(v, \"%Y-%x\"), \"%Y-%x\") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;\r\n },\r\n\r\n _setInnerValue: function (date) {\r\n var dateStr = BI.print(date, this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n var endText = \"\";\r\n if(BI.isNotNull(obj.year)) {\r\n if(BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Year\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.quarter)) {\r\n if(BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Single_Quarter\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.month)) {\r\n if(BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.week)) {\r\n if(BI.parseInt(obj.week) !== 0) {\r\n value += Math.abs(obj.week) + BI.i18nText(\"BI-Basic_Week\") + (obj.week < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Week\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.day)) {\r\n if(BI.parseInt(obj.day) !== 0) {\r\n value += Math.abs(obj.day) + BI.i18nText(\"BI-Basic_Day\") + (obj.day < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position) : \"\";\r\n }\r\n if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {\r\n value += Math.abs(obj.workDay) + BI.i18nText(\"BI-Basic_Work_Day\") + (obj.workDay < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value + endText;\r\n\r\n function getPositionText (baseText, position) {\r\n switch (position) {\r\n case BI.DynamicDateCard.OFFSET.BEGIN:\r\n return baseText + BI.i18nText(\"BI-Basic_Begin_Start\");\r\n case BI.DynamicDateCard.OFFSET.END:\r\n return baseText + BI.i18nText(\"BI-Basic_End_Stop\");\r\n case BI.DynamicDateCard.OFFSET.CURRENT:\r\n default:\r\n return BI.i18nText(\"BI-Basic_Current_Day\");\r\n }\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value, self = this;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n this.editor.setState(\"\");\r\n this.editor.setValue(\"\");\r\n } else {\r\n var dateStr = BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,\r\n value.second || 0), this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n\r\n});\r\n\r\nBI.DynamicDateTimeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTimeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTimeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicDateTimeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicDateTimeTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTimeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimeTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTimeTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.DynamicDateTimeTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_date_time_trigger\", BI.DynamicDateTimeTrigger);/**\r\n * Created by roy on 15/9/14.\r\n */\r\nBI.SearchEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-search-editor bi-border bi-focus-shadow\",\r\n height: 24,\r\n errorText: \"\",\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SearchEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n hgap: 1,\r\n errorText: o.errorText,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n value: o.value\r\n });\r\n this.clear = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n stopEvent: true,\r\n cls: \"close-font\"\r\n });\r\n this.clear.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(\"\");\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT);\r\n // 从有内容到无内容的清空也是一次change\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.SearchEditor.EVENT_CLEAR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: \"search-font\"\r\n },\r\n width: 24\r\n },\r\n {\r\n el: self.editor\r\n },\r\n {\r\n el: this.clear,\r\n width: 24\r\n }\r\n ]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.SearchEditor.EVENT_EMPTY);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_STOP);\r\n });\r\n\r\n this.clear.invisible();\r\n },\r\n\r\n _checkClear: function () {\r\n if (!this.getValue()) {\r\n this.clear.invisible();\r\n } else {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isValid()) {\r\n return this.editor.getValue();\r\n }\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n if (BI.isKey(v)) {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n});\r\nBI.SearchEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SearchEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SearchEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SearchEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SearchEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SearchEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\nBI.SearchEditor.EVENT_CLEAR = \"EVENT_CLEAR\";\r\n\r\nBI.SearchEditor.EVENT_START = \"EVENT_START\";\r\nBI.SearchEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SearchEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SearchEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SearchEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SearchEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SearchEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SearchEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.SearchEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.shortcut(\"bi.search_editor\", BI.SearchEditor);/**\r\n * 小号搜索框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallSearchEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.SmallSearchEditor = BI.inherit(BI.SearchEditor, {\r\n _defaultConfig: function () {\r\n var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-small-search-editor\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallSearchEditor.superclass._init.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_search_editor\", BI.SmallSearchEditor);/**\r\n * guy\r\n * @class BI.TextEditor\r\n * @extends BI.Single\r\n */\r\nBI.TextEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-text-editor bi-border bi-focus-shadow\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({height: o.height - 2});\r\n }\r\n if (BI.isNumber(o.width)) {\r\n this.element.css({width: o.width - 2});\r\n }\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height - 2,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n title: o.title,\r\n tipType: o.tipType,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_STOP);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_EMPTY);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n }\r\n});\r\nBI.TextEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TextEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TextEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TextEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.TextEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.TextEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.TextEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.TextEditor.EVENT_START = \"EVENT_START\";\r\nBI.TextEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.TextEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TextEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TextEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.TextEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.TextEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.TextEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.TextEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.TextEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.TextEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.text_editor\", BI.TextEditor);/**\r\n * 小号搜索框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallTextEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.SmallTextEditor = BI.inherit(BI.TextEditor, {\r\n _defaultConfig: function () {\r\n var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-small-text-editor\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextEditor.superclass._init.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_text_editor\", BI.SmallTextEditor);/**\r\n * Created by zcf on 2016/9/26.\r\n */\r\nBI.IntervalSlider = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 58,\r\n EDITOR_R_GAP: 60,\r\n EDITOR_HEIGHT: 30,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-interval-slider bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n },\r\n\r\n render: function () {\r\n\r\n var self = this;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.valueOne = \"\";\r\n this.valueTwo = \"\";\r\n this.calculation = new BI.AccurateCalculationModel();\r\n\r\n // this.backgroundTrack = BI.createWidget({\r\n // type: \"bi.layout\",\r\n // cls: \"background-track\",\r\n // height: c.TRACK_HEIGHT\r\n // });\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.labelOne = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: this.options.unit,\r\n allowBlank: false,\r\n width: c.EDITOR_WIDTH,\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.labelOne.element.hover(function () {\r\n self.labelOne.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.labelOne.element.removeClass(\"bi-border\");\r\n });\r\n this.labelOne.on(BI.Editor.EVENT_CONFIRM, function () {\r\n var oldValueOne = self.valueOne;\r\n var v = BI.parseFloat(this.getValue());\r\n self.valueOne = v;\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 分成1000份\r\n self._setSliderOnePosition(significantPercent);\r\n self._setBlueTrack();\r\n self._checkLabelPosition(oldValueOne, self.valueTwo, self.valueOne, self.valueTwo);\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n });\r\n\r\n this.labelTwo = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: this.options.unit,\r\n allowBlank: false,\r\n width: c.EDITOR_WIDTH,\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.labelTwo.element.hover(function () {\r\n self.labelTwo.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.labelTwo.element.removeClass(\"bi-border\");\r\n });\r\n this.labelTwo.on(BI.Editor.EVENT_CONFIRM, function () {\r\n var oldValueTwo = self.valueTwo;\r\n var v = BI.parseFloat(this.getValue());\r\n self.valueTwo = v;\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderTwoPosition(significantPercent);\r\n self._setBlueTrack();\r\n self._checkLabelPosition(self.valueOne, oldValueTwo, self.valueOne, self.valueTwo);\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n });\r\n\r\n this.sliderOne = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this.sliderTwo = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.sliderOne, true);\r\n this._draggable(this.sliderTwo, false);\r\n this._setVisible(false);\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: 7,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 23,\r\n left: 0,\r\n width: \"100%\"\r\n },\r\n this._createLabelWrapper(),\r\n this._createSliderWrapper()\r\n ]\r\n };\r\n },\r\n\r\n _rePosBySizeAfterMove: function (size, isLeft) {\r\n var o = this.options;\r\n var percent = size * 100 / (this._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n var v = this._getValueByPercent(significantPercent);\r\n v = this._assertValue(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n var oldValueOne = this.valueOne, oldValueTwo = this.valueTwo;\r\n if(isLeft) {\r\n this._setSliderOnePosition(significantPercent);\r\n this.labelOne.setValue(v);\r\n this.valueOne = v;\r\n this._checkLabelPosition(oldValueOne, oldValueTwo, v, this.valueTwo);\r\n }else{\r\n this._setSliderTwoPosition(significantPercent);\r\n this.labelTwo.setValue(v);\r\n this.valueTwo = v;\r\n this._checkLabelPosition(oldValueOne, oldValueTwo, this.valueOne, v);\r\n }\r\n this._setBlueTrack();\r\n },\r\n\r\n _rePosBySizeAfterStop: function (size, isLeft) {\r\n var percent = size * 100 / (this._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n isLeft ? this._setSliderOnePosition(significantPercent) : this._setSliderTwoPosition(significantPercent);\r\n },\r\n\r\n _draggable: function (widget, isLeft) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n self._rePosBySizeAfterMove(size, isLeft);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n self._rePosBySizeAfterStop(size, isLeft);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createLabelWrapper: function () {\r\n var c = this._constant;\r\n return {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.labelOne,\r\n top: 0,\r\n left: \"0%\"\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.labelTwo,\r\n top: 0,\r\n left: \"100%\"\r\n }]\r\n }],\r\n rgap: c.EDITOR_R_GAP,\r\n height: c.SLIDER_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n };\r\n },\r\n\r\n _createSliderWrapper: function () {\r\n var c = this._constant;\r\n return {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.sliderOne,\r\n top: 0,\r\n left: \"0%\"\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.sliderTwo,\r\n top: 0,\r\n left: \"100%\"\r\n }]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n },\r\n top: 20,\r\n left: 0,\r\n width: \"100%\"\r\n };\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n var o = this.options;\r\n var valid = false;\r\n // 像90.这样的既不属于整数又不属于小数,是不合法的值\r\n var dotText = (v + \"\").split(\".\")[1];\r\n if (BI.isEmptyString(dotText)) {\r\n }else{\r\n if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {\r\n // 虽然规定了所填写的小数位数,但是我们认为所有的整数都是满足设置的小数位数的\r\n // 100等价于100.0 100.00 100.000\r\n if(o.digit === false || BI.isInteger(v)) {\r\n valid = true;\r\n }else{\r\n dotText = dotText || \"\";\r\n valid = (dotText.length === o.digit);\r\n }\r\n }\r\n }\r\n return valid;\r\n },\r\n\r\n _checkOverlap: function () {\r\n var labelOneLeft = this.labelOne.element[0].offsetLeft;\r\n var labelTwoLeft = this.labelTwo.element[0].offsetLeft;\r\n if (labelOneLeft <= labelTwoLeft) {\r\n if ((labelTwoLeft - labelOneLeft) < 90) {\r\n this.labelTwo.element.css({top: 40});\r\n } else {\r\n this.labelTwo.element.css({top: 0});\r\n }\r\n } else {\r\n if ((labelOneLeft - labelTwoLeft) < 90) {\r\n this.labelTwo.element.css({top: 40});\r\n } else {\r\n this.labelTwo.element.css({top: 0});\r\n }\r\n }\r\n },\r\n\r\n _checkLabelPosition: function (oldValueOne, oldValueTwo, valueOne, valueTwo, isLeft) {\r\n oldValueOne = BI.parseFloat(oldValueOne);\r\n oldValueTwo = BI.parseFloat(oldValueTwo);\r\n valueOne = BI.parseFloat(valueOne);\r\n valueTwo = BI.parseFloat(valueTwo);\r\n if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) {\r\n var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left);\r\n this._resetLabelPosition(!isSliderOneLeft);\r\n }\r\n },\r\n\r\n _resetLabelPosition: function(needReverse) {\r\n this.labelOne.element.css({left: needReverse ? \"100%\" : \"0%\"});\r\n this.labelTwo.element.css({left: needReverse ? \"0%\" : \"100%\"});\r\n },\r\n\r\n _setSliderOnePosition: function (percent) {\r\n this.sliderOne.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderTwoPosition: function (percent) {\r\n this.sliderTwo.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrackLeft: function (percent) {\r\n this.blueTrack.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrackWidth: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrack: function () {\r\n var percentOne = this._getPercentByValue(this.labelOne.getValue());\r\n var percentTwo = this._getPercentByValue(this.labelTwo.getValue());\r\n if (percentOne <= percentTwo) {\r\n this._setBlueTrackLeft(percentOne);\r\n this._setBlueTrackWidth(percentTwo - percentOne);\r\n } else {\r\n this._setBlueTrackLeft(percentTwo);\r\n this._setBlueTrackWidth(percentOne - percentTwo);\r\n }\r\n },\r\n\r\n _setAllPosition: function (one, two) {\r\n this._setSliderOnePosition(one);\r\n this._setSliderTwoPosition(two);\r\n this._setBlueTrack();\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.sliderOne.setVisible(visible);\r\n this.sliderTwo.setVisible(visible);\r\n this.labelOne.setVisible(visible);\r\n this.labelTwo.setVisible(visible);\r\n },\r\n\r\n _setErrorText: function () {\r\n var errorText = BI.i18nText(\"BI-Basic_Please_Enter_Number_Between\", this.min, this.max);\r\n this.labelOne.setErrorText(errorText);\r\n this.labelTwo.setErrorText(errorText);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n // 其中取max-min后保留4为有效数字后的值的小数位数为最终value的精度\r\n _getValueByPercent: function (percent) {// return (((max-min)*percent)/100+min)\r\n var sub = this.calculation.accurateSubtraction(this.max, this.min);\r\n var mul = this.calculation.accurateMultiplication(sub, percent);\r\n var div = this.calculation.accurateDivisionTenExponent(mul, 2);\r\n if(this.precision < 0) {\r\n var value = BI.parseFloat(this.calculation.accurateAddition(div, this.min));\r\n var reduceValue = Math.round(this.calculation.accurateDivisionTenExponent(value, -this.precision));\r\n return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision));\r\n }\r\n return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision));\r\n\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setDraggableEnable: function (enable) {\r\n this.sliderOne.setEnable(enable);\r\n this.sliderTwo.setEnable(enable);\r\n },\r\n\r\n _getPrecision: function () {\r\n // 计算每一份值的精度(最大值和最小值的差值保留4为有效数字后的精度)\r\n // 如果差值的整数位数大于4,toPrecision(4)得到的是科学计数法123456 => 1.235e+5\r\n // 返回非负值: 保留的小数位数\r\n // 返回负值: 保留的10^n精度中的n\r\n var sub = this.calculation.accurateSubtraction(this.max, this.min);\r\n var pre = sub.toPrecision(4);\r\n // 科学计数法\r\n var eIndex = pre.indexOf(\"e\");\r\n var arr = [];\r\n if(eIndex > -1) {\r\n arr = pre.split(\"e\");\r\n var decimalPartLength = BI.size(arr[0].split(\".\")[1]);\r\n var sciencePartLength = BI.parseInt(arr[1].substring(1));\r\n return decimalPartLength - sciencePartLength;\r\n }\r\n arr = pre.split(\".\");\r\n return arr.length > 1 ? arr[1].length : 0;\r\n\r\n },\r\n\r\n _assertValue: function (value) {\r\n if(value <= this.min) {\r\n return this.min;\r\n }\r\n if(value >= this.max) {\r\n return this.max;\r\n }\r\n return value;\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.IntervalSlider.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (this.valueOne <= this.valueTwo) {\r\n return {min: this.valueOne, max: this.valueTwo};\r\n }\r\n return {min: this.valueTwo, max: this.valueOne};\r\n\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n this.valueOne = minNumber;\r\n this.valueTwo = maxNumber;\r\n this.precision = this._getPrecision();\r\n this._setDraggableEnable(true);\r\n }\r\n if (maxNumber === minNumber) {\r\n this._setDraggableEnable(false);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n var valueOne = BI.parseFloat(v.min);\r\n var valueTwo = BI.parseFloat(v.max);\r\n valueOne = o.digit === false ? valueOne : BI.parseFloat(valueOne.toFixed(o.digit));\r\n valueTwo = o.digit === false ? valueTwo : BI.parseFloat(valueTwo.toFixed(o.digit));\r\n if (!isNaN(valueOne) && !isNaN(valueTwo)) {\r\n if (this._checkValidation(valueOne)) {\r\n this.valueOne = (this.valueOne <= this.valueTwo ? valueOne : valueTwo);\r\n }\r\n if (this._checkValidation(valueTwo)) {\r\n this.valueTwo = (this.valueOne <= this.valueTwo ? valueTwo : valueOne);\r\n }\r\n if (valueOne < this.min) {\r\n this.valueOne = this.min;\r\n }\r\n if (valueTwo > this.max) {\r\n this.valueTwo = this.max;\r\n }\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.valueOne = \"\";\r\n this.valueTwo = \"\";\r\n this.min = NaN;\r\n this.max = NaN;\r\n this._setBlueTrackWidth(0);\r\n },\r\n\r\n populate: function () {\r\n var o = this.options;\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this.enable = true;\r\n this._setVisible(true);\r\n this._setErrorText();\r\n if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) {\r\n this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit));\r\n this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit));\r\n this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo));\r\n } else {\r\n this.labelOne.setValue(this.min);\r\n this.labelTwo.setValue(this.max);\r\n this._setAllPosition(0, 100);\r\n }\r\n this._resetLabelPosition(this.valueOne > this.valueTwo);\r\n }\r\n }\r\n});\r\nBI.IntervalSlider.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.interval_slider\", BI.IntervalSlider);/**\r\n * Created by zcf on 2017/3/1.\r\n * 万恶的IEEE-754\r\n * 使用字符串精确计算含小数加法、减法、乘法和10的指数倍除法,支持负数\r\n */\r\nBI.AccurateCalculationModel = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AccurateCalculationModel.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _getMagnitude: function (n) {\r\n var magnitude = \"1\";\r\n for (var i = 0; i < n; i++) {\r\n magnitude += \"0\";\r\n }\r\n return BI.parseInt(magnitude);\r\n },\r\n\r\n _formatDecimal: function (stringNumber1, stringNumber2) {\r\n if (stringNumber1.numDecimalLength === stringNumber2.numDecimalLength) {\r\n return;\r\n }\r\n var magnitudeDiff = stringNumber1.numDecimalLength - stringNumber2.numDecimalLength;\r\n if (magnitudeDiff > 0) {\r\n var needAddZero = stringNumber2;\r\n } else {\r\n var needAddZero = stringNumber1;\r\n magnitudeDiff = (0 - magnitudeDiff);\r\n }\r\n for (var i = 0; i < magnitudeDiff; i++) {\r\n if (needAddZero.numDecimal === \"0\" && i === 0) {\r\n continue;\r\n }\r\n needAddZero.numDecimal += \"0\";\r\n }\r\n },\r\n\r\n _stringNumberFactory: function (num) {\r\n var strNum = num.toString();\r\n var numStrArray = strNum.split(\".\");\r\n var numInteger = numStrArray[0];\r\n if (numStrArray.length === 1) {\r\n var numDecimal = \"0\";\r\n var numDecimalLength = 0;\r\n } else {\r\n var numDecimal = numStrArray[1];\r\n var numDecimalLength = numStrArray[1].length;\r\n }\r\n return {\r\n numInteger: numInteger,\r\n numDecimal: numDecimal,\r\n numDecimalLength: numDecimalLength\r\n };\r\n },\r\n\r\n _accurateSubtraction: function (num1, num2) {// num1-num2 && num1>num2\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) - BI.parseInt(stringNumber2.numInteger);\r\n // 小数部分\r\n this._formatDecimal(stringNumber1, stringNumber2);\r\n var decimalMaxLength = getDecimalMaxLength(stringNumber1, stringNumber2);\r\n\r\n if (BI.parseInt(stringNumber1.numDecimal) >= BI.parseInt(stringNumber2.numDecimal)) {\r\n var decimalResultTemp = (BI.parseInt(stringNumber1.numDecimal) - BI.parseInt(stringNumber2.numDecimal)).toString();\r\n var decimalResult = addZero(decimalResultTemp, decimalMaxLength);\r\n } else {// 否则借位\r\n integerResult--;\r\n var borrow = this._getMagnitude(decimalMaxLength);\r\n var decimalResultTemp = (borrow + BI.parseInt(stringNumber1.numDecimal) - BI.parseInt(stringNumber2.numDecimal)).toString();\r\n var decimalResult = addZero(decimalResultTemp, decimalMaxLength);\r\n }\r\n var result = integerResult + \".\" + decimalResult;\r\n return BI.parseFloat(result);\r\n\r\n function getDecimalMaxLength (num1, num2) {\r\n if (num1.numDecimal.length >= num2.numDecimal.length) {\r\n return num1.numDecimal.length;\r\n }\r\n return num2.numDecimal.length;\r\n }\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n _accurateAddition: function (num1, num2) {// 加法结合律\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) + BI.parseInt(stringNumber2.numInteger);\r\n // 小数部分\r\n this._formatDecimal(stringNumber1, stringNumber2);\r\n\r\n var decimalResult = (BI.parseInt(stringNumber1.numDecimal) + BI.parseInt(stringNumber2.numDecimal)).toString();\r\n\r\n if (decimalResult !== \"0\") {\r\n if (decimalResult.length <= stringNumber1.numDecimal.length) {\r\n decimalResult = addZero(decimalResult, stringNumber1.numDecimal.length);\r\n } else {\r\n integerResult++;// 进一\r\n decimalResult = decimalResult.slice(1);\r\n }\r\n }\r\n var result = integerResult + \".\" + decimalResult;\r\n return BI.parseFloat(result);\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n _accurateMultiplication: function (num1, num2) {// 乘法分配律\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) * BI.parseInt(stringNumber2.numInteger);\r\n // num1的小数和num2的整数\r\n var dec1Int2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numDecimal) * BI.parseInt(stringNumber2.numInteger), stringNumber1.numDecimalLength);\r\n // num1的整数和num2的小数\r\n var int1dec2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numInteger) * BI.parseInt(stringNumber2.numDecimal), stringNumber2.numDecimalLength);\r\n // 小数*小数\r\n var dec1dec2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numDecimal) * BI.parseInt(stringNumber2.numDecimal), (stringNumber1.numDecimalLength + stringNumber2.numDecimalLength));\r\n\r\n return this._accurateAddition(this._accurateAddition(this._accurateAddition(integerResult, dec1Int2), int1dec2), dec1dec2);\r\n },\r\n\r\n _accurateDivisionTenExponent: function (num, n) {// num/10^n && n>0\r\n var stringNumber = this._stringNumberFactory(num);\r\n if (stringNumber.numInteger.length > n) {\r\n var integerResult = stringNumber.numInteger.slice(0, (stringNumber.numInteger.length - n));\r\n var partDecimalResult = stringNumber.numInteger.slice(-n);\r\n } else {\r\n var integerResult = \"0\";\r\n var partDecimalResult = addZero(stringNumber.numInteger, n);\r\n }\r\n var result = integerResult + \".\" + partDecimalResult + stringNumber.numDecimal;\r\n return BI.parseFloat(result);\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n accurateSubtraction: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n if (num1 >= num2) {\r\n return this._accurateSubtraction(num1, num2);\r\n }\r\n return -this._accurateSubtraction(num2, num1);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return this._accurateAddition(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return -this._accurateAddition(-num1, num2);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n if (num1 >= num2) {\r\n return this._accurateSubtraction(-num2, -num1);\r\n }\r\n return this._accurateSubtraction(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateAddition: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n return this._accurateAddition(num1, num2);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return this.accurateSubtraction(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return this.accurateSubtraction(num2, -num1);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n return -this._accurateAddition(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateMultiplication: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n return this._accurateMultiplication(num1, num2);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return -this._accurateMultiplication(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return -this._accurateMultiplication(-num1, num2);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n return this._accurateMultiplication(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateDivisionTenExponent: function (num1, n) {\r\n if (num1 >= 0) {\r\n return this._accurateDivisionTenExponent(num1, n);\r\n }\r\n return -this._accurateDivisionTenExponent(-num1, n);\r\n }\r\n});/**\r\n * Created by roy on 15/8/14.\r\n */\r\nBI.DownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-down-list-combo\",\r\n height: 24,\r\n items: [],\r\n adjustLength: 0,\r\n direction: \"bottom\",\r\n trigger: \"click\",\r\n container: null,\r\n stopPropagation: false,\r\n el: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popupview = BI.createWidget({\r\n type: \"bi.multi_layer_down_list_popup\",\r\n items: o.items,\r\n chooseType: o.chooseType,\r\n value: o.value\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {\r\n self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n\r\n this.downlistcombo = BI.createWidget({\r\n element: this,\r\n type: \"bi.combo\",\r\n trigger: o.trigger,\r\n isNeedAdjustWidth: false,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n direction: o.direction,\r\n stopPropagation: o.stopPropagation,\r\n el: BI.createWidget(o.el, {\r\n type: \"bi.icon_trigger\",\r\n extraCls: o.iconCls ? o.iconCls : \"pull-down-font\",\r\n width: o.width,\r\n height: o.height\r\n }),\r\n popup: {\r\n el: this.popupview,\r\n stopPropagation: o.stopPropagation,\r\n maxHeight: 1000\r\n }\r\n });\r\n\r\n this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n },\r\n\r\n hideView: function () {\r\n this.downlistcombo.hideView();\r\n },\r\n\r\n showView: function (e) {\r\n this.downlistcombo.showView(e);\r\n },\r\n\r\n populate: function (items) {\r\n this.popupview.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupview.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.popupview.getValue();\r\n }\r\n});\r\nBI.DownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_layer_down_list_combo\", BI.DownListCombo);/**\r\n * Created by roy on 15/9/8.\r\n * 处理popup中的item分组样式\r\n * 一个item分组中的成员大于一时,该分组设置为单选,并且默认状态第一个成员设置为已选择项\r\n */\r\nBI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {\r\n constants: {\r\n nextIcon: \"pull-right-e-font\",\r\n height: 25,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n hgap: 0,\r\n vgap: 0,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-popup\",\r\n items: [],\r\n chooseType: BI.Selection.Multi\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerDownListPopup.superclass._init.apply(this, arguments);\r\n this.singleValues = [];\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n var self = this, o = this.options, children = this._createPopupItems(o.items);\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_tree\",\r\n items: BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n ),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: this.constants.hgap,\r\n vgap: this.constants.vgap\r\n }],\r\n value: this._digest(o.value),\r\n chooseType: o.chooseType\r\n });\r\n\r\n this.popup.on(BI.ButtonTree.EVENT_CHANGE, function (value, object) {\r\n var changedValue = value;\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n changedValue = self.childValueMap[value];\r\n var fatherValue = self.fatherValueMap[value];\r\n var fatherArrayValue = (fatherValue + \"\").split(\"_\");\r\n self.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, changedValue, fatherArrayValue.length > 1 ? fatherArrayValue : fatherValue);\r\n } else {\r\n self.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE, changedValue, object);\r\n }\r\n\r\n\r\n if (!BI.contains(self.singleValues, changedValue)) {\r\n var item = self.getValue();\r\n var result = [];\r\n BI.each(item, function (i, valueObject) {\r\n if (valueObject.value != changedValue) {\r\n result.push(valueObject);\r\n }\r\n });\r\n self.setValue(result);\r\n }\r\n\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.popup],\r\n vgap: 5\r\n });\r\n\r\n },\r\n _createPopupItems: function (items) {\r\n var self = this, result = [];\r\n BI.each(items, function (i, it) {\r\n var item_done = {\r\n type: \"bi.down_list_group\",\r\n items: []\r\n };\r\n\r\n BI.each(it, function (i, item) {\r\n if (BI.isNotEmptyArray(item.children) && !BI.isEmpty(item.el)) {\r\n item.type = \"bi.combo_group\";\r\n item.cls = \"down-list-group\";\r\n item.trigger = \"hover\";\r\n item.isNeedAdjustWidth = false;\r\n item.el.title = item.el.title || item.el.text;\r\n item.el.type = \"bi.down_list_group_item\";\r\n item.el.logic = {\r\n dynamic: true\r\n };\r\n item.el.height = self.constants.height;\r\n item.el.iconCls2 = self.constants.nextIcon;\r\n item.popup = {\r\n lgap: 1,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n\r\n },\r\n innerVGap: 5\r\n };\r\n item.el.childValues = [];\r\n BI.each(item.children, function (i, child) {\r\n child = child.el ? BI.extend(child.el, {children: child.children}) : child;\r\n var fatherValue = BI.deepClone(item.el.value);\r\n var childValue = BI.deepClone(child.value);\r\n self.singleValues.push(child.value);\r\n child.type = \"bi.down_list_item\";\r\n child.extraCls = \" child-down-list-item\";\r\n child.title = child.title || child.text;\r\n child.textRgap = 10;\r\n child.isNeedAdjustWidth = false;\r\n child.logic = {\r\n dynamic: true\r\n };\r\n child.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n child.value = self._createChildValue(fatherValue, childValue);\r\n item.el.childValues.push(child.value);\r\n if (BI.isNotEmptyArray(child.children)) {\r\n child.type = \"bi.down_list_group_item\";\r\n self._createChildren(child);\r\n child.height = self.constants.height;\r\n child.iconCls2 = self.constants.nextIcon;\r\n item.el.childValues = BI.concat(item.el.childValues, child.childValues);\r\n }\r\n });\r\n } else {\r\n item.type = \"bi.down_list_item\";\r\n item.title = item.title || item.text;\r\n item.textRgap = 10;\r\n item.isNeedAdjustWidth = false;\r\n item.logic = {\r\n dynamic: true\r\n };\r\n }\r\n var el_done = {};\r\n el_done.el = item;\r\n item_done.items.push(el_done);\r\n });\r\n if (self._isGroup(item_done.items)) {\r\n BI.each(item_done.items, function (i, item) {\r\n self.singleValues.push(item.el.value);\r\n });\r\n }\r\n\r\n result.push(item_done);\r\n if (self._needSpliter(i, items.length)) {\r\n var spliter_container = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-down-list-spliter bi-border-top cursor-pointer\",\r\n height: 0\r\n }\r\n\r\n }],\r\n cls: \"bi-down-list-spliter-container cursor-pointer\",\r\n vgap: 5,\r\n lgap: 10\r\n });\r\n result.push(spliter_container);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n _createChildren: function (child) {\r\n var self = this;\r\n child.childValues = [];\r\n BI.each(child.children, function (i, c) {\r\n var fatherValue = BI.deepClone(child.value);\r\n var childValue = BI.deepClone(c.value);\r\n c.type = \"bi.down_list_item\";\r\n c.title = c.title || c.text;\r\n c.textRgap = 10;\r\n c.isNeedAdjustWidth = false;\r\n c.logic = {\r\n dynamic: true\r\n };\r\n c.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n c.value = self._createChildValue(fatherValue, childValue);\r\n child.childValues.push(c.value);\r\n });\r\n },\r\n\r\n _isGroup: function (i) {\r\n return i.length > 1;\r\n },\r\n\r\n _needSpliter: function (i, itemLength) {\r\n return i < itemLength - 1;\r\n },\r\n\r\n _createChildValue: function (fatherValue, childValue) {\r\n var fValue = fatherValue;\r\n if(BI.isArray(fatherValue)) {\r\n fValue = fatherValue.join(\"_\");\r\n }\r\n return fValue + \"_\" + childValue;\r\n },\r\n\r\n _digest: function (valueItem) {\r\n var self = this;\r\n var valueArray = [];\r\n BI.each(valueItem, function (i, item) {\r\n var value;\r\n if (BI.isNotNull(item.childValue)) {\r\n value = self._createChildValue(item.value, item.childValue);\r\n } else {\r\n value = item.value;\r\n }\r\n valueArray.push(value);\r\n }\r\n );\r\n return valueArray;\r\n },\r\n\r\n _checkValues: function (values) {\r\n var self = this, o = this.options;\r\n var value = [];\r\n BI.each(o.items, function (idx, itemGroup) {\r\n BI.each(itemGroup, function (id, item) {\r\n if(BI.isNotNull(item.children)) {\r\n var childValues = getChildrenValue(item);\r\n var v = joinValue(childValues, values[idx]);\r\n if(BI.isNotEmptyString(v)) {\r\n value.push(v);\r\n }\r\n }else{\r\n if(item.value === values[idx][0]) {\r\n value.push(values[idx][0]);\r\n }\r\n }\r\n });\r\n });\r\n return value;\r\n\r\n function joinValue (sources, targets) {\r\n var value = \"\";\r\n BI.some(sources, function (idx, s) {\r\n return BI.some(targets, function (id, t) {\r\n if(s === t) {\r\n value = s;\r\n return true;\r\n }\r\n });\r\n });\r\n return value;\r\n }\r\n\r\n function getChildrenValue (item) {\r\n var children = [];\r\n if(BI.isNotNull(item.children)) {\r\n BI.each(item.children, function (idx, child) {\r\n children = BI.concat(children, getChildrenValue(child));\r\n });\r\n } else {\r\n children.push(item.value);\r\n }\r\n return children;\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n BI.MultiLayerDownListPopup.superclass.populate.apply(this, arguments);\r\n var self = this;\r\n self.childValueMap = {};\r\n self.fatherValueMap = {};\r\n self.singleValues = [];\r\n var children = self._createPopupItems(items);\r\n var popupItem = BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n );\r\n self.popup.populate(popupItem);\r\n },\r\n\r\n setValue: function (valueItem) {\r\n this.popup.setValue(this._digest(valueItem));\r\n },\r\n\r\n _getValue: function () {\r\n var v = [];\r\n BI.each(this.popup.getAllButtons(), function (i, item) {\r\n i % 2 === 0 && v.push(item.getValue());\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [];\r\n var values = this._checkValues(this._getValue());\r\n BI.each(values, function (i, value) {\r\n var valueItem = {};\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n var fartherValue = self.fatherValueMap[value];\r\n valueItem.childValue = self.childValueMap[value];\r\n var fatherArrayValue = (fartherValue + \"\").split(\"_\");\r\n valueItem.value = fatherArrayValue.length > 1 ? fatherArrayValue : fartherValue;\r\n } else {\r\n valueItem.value = value;\r\n }\r\n result.push(valueItem);\r\n });\r\n return result;\r\n }\r\n\r\n\r\n});\r\n\r\nBI.MultiLayerDownListPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.shortcut(\"bi.multi_layer_down_list_popup\", BI.MultiLayerDownListPopup);/**\r\n * @class BI.MultiLayerSelectTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-tree-combo\",\r\n isDefaultInit: false,\r\n height: 24,\r\n text: \"\",\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: false,\r\n allowSearchValue: false,\r\n allowInsertValue: false\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();\r\n\r\n return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n _getBaseConfig: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n destroyWhenHide: o.destroyWhenHide,\r\n adjustLength: 2,\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.multilayer_select_tree_popup\",\r\n isDefaultInit: o.isDefaultInit,\r\n itemsCreator: o.itemsCreator,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.trigger && self.trigger.getSearcher().setAdapter(_ref);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE);\r\n }\r\n }],\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n maxHeight: 400,\r\n minHeight: 240\r\n }\r\n };\r\n },\r\n\r\n _getSearchConfig: function() {\r\n var self = this, o = this.options;\r\n return {\r\n el: {\r\n type: \"bi.multilayer_select_tree_trigger\",\r\n container: o.container,\r\n allowInsertValue: o.allowInsertValue,\r\n allowSearchValue: o.allowSearchValue,\r\n allowEdit: o.allowEdit,\r\n cls: \"multilayer-select-tree-trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,\r\n action: function () {\r\n var value = self.trigger.getSearcher().getKeyword();\r\n self.combo.setValue([value]);\r\n self.combo.hideView();\r\n }\r\n }]\r\n },\r\n toggle: !o.allowEdit,\r\n hideChecker: function (e) {\r\n // 新增传配置container后对应hideChecker的修改\r\n // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿\r\n // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以\r\n // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪\r\n return (o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0;\r\n\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n\r\n _getSyncConfig: function () {\r\n var o = this.options;\r\n var baseConfig = this._getBaseConfig();\r\n return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {\r\n el: {\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }\r\n });\r\n },\r\n\r\n _getAsyncConfig: function () {\r\n var config = this._getBaseConfig();\r\n return BI.extend(config, this._getSearchConfig());\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_select_tree_combo\", BI.MultiLayerSelectTreeCombo);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSelectTreeInsertSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSelectTreeInsertSearchPane = BI.inherit(BI.Widget, {\r\n\r\n props: function() {\r\n return {\r\n baseCls: \"bi-multilayer-select-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\"\r\n };\r\n },\r\n\r\n render: function() {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_select_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n });\r\n },\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectLevelTree.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n return {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: 24,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n ref: function (_ref) {\r\n self.addNotMatchTip = _ref;\r\n },\r\n handler: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n }, this.tree]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var showTip = BI.isEmptyArray(this.tree.getAllLeaves());\r\n this.addNotMatchTip.setVisible(showTip);\r\n showTip && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_select_tree_insert_search_pane\", BI.MultiLayerSelectTreeInsertSearchPane);/**\r\n * guy\r\n * 二级树\r\n * @class BI.MultiLayerSelectLevelTree\r\n * @extends BI.Pane\r\n */\r\nBI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-level-tree\",\r\n isDefaultInit: false,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n value: \"\",\r\n scrollable: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.storeValue = o.value;\r\n\r\n this.initTree(this.options.items);\r\n\r\n this.check();\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this, o = this.options;\r\n var keyword = o.keywordGetter();\r\n BI.each(nodes, function (i, node) {\r\n var extend = {};\r\n node.layer = layer;\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n node.keyword = node.keyword || keyword;\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.multilayer_select_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_select_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_select_tree_first_plus_group_node\";\r\n }\r\n if (i === 0 && i === nodes.length - 1 && !pNode) { // 根\r\n extend.type = \"bi.multilayer_select_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.multilayer_single_tree_mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_tree_leaf_item\";\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n node.id = node.id || BI.UUID();\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n var hasNext = false;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n cls: \"tree-view display-table\",\r\n expander: {\r\n type: \"bi.select_tree_expander\",\r\n isDefaultInit: o.isDefaultInit,\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n itemsCreator: function (op, callback) {\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loading();\r\n });\r\n o.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n (op.times === 1 && !op.node) && self._populate(ob.items);\r\n callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));\r\n self.setValue(self.storeValue);\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loaded();\r\n });\r\n });\r\n },\r\n value: o.value,\r\n\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: o.itemsCreator !== BI.emptyFn,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: o.chooseType,\r\n behaviors: o.behaviors,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n }\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, value) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.setValue(value);\r\n self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n scrollable: o.scrollable,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n _populate: function () {\r\n BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n this._populate(nodes);\r\n BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));\r\n },\r\n\r\n setValue: function (v) {\r\n // getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了\r\n if(this.options.chooseType === BI.Selection.None) {\r\n } else {\r\n this.storeValue = v;\r\n this.tree.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.isArray(this.storeValue) ?\r\n this.storeValue : BI.isNull(this.storeValue) ?\r\n [] : [this.storeValue];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.MultiLayerSelectLevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multilayer_select_level_tree\", BI.MultiLayerSelectLevelTree);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSelectTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiLayerSelectTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_select_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n onLoaded: function () {\r\n self.tree.check();\r\n o.onLoaded();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_select_tree_popup\", BI.MultiLayerSelectTreePopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: function() {\r\n return {\r\n extraCls: \"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow bi-border-radius\",\r\n height: 24,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n itemsCreator: BI.emptyFn,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowSearchValue: false\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n this._initData();\r\n }\r\n var content = {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n masker: BI.isNotNull(o.container) ? {\r\n offset: {},\r\n container: o.container\r\n } : {\r\n offset: {}\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\",\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.StateEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING);\r\n }\r\n }]\r\n },\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multilayer_select_tree_insert_search_pane\" : \"bi.multilayer_select_tree_popup\",\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n cls: \"bi-card\",\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.options.text = self.getSearcher().getKeyword();\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n callback(self._getSearchItems(keyword));\r\n o.allowInsertValue && self.popup.setKeyword(keyword);\r\n } else {\r\n callback();\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n\r\n return o.allowEdit ? content : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: content,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _initData: function() {\r\n var o = this.options;\r\n this.tree = new BI.Tree();\r\n this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));\r\n this.tree.initTree(this.nodes);\r\n },\r\n\r\n _getSearchItems: function(keyword) {\r\n var self = this, o = this.options;\r\n // 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索\r\n var items = [];\r\n this.tree.traverse(function (node) {\r\n var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);\r\n if(find.find.length > 0 || find.match.length > 0) {\r\n items.push(node);\r\n return true;\r\n }\r\n });\r\n return this._fillTreeStructure4Search(items, \"id\");\r\n },\r\n\r\n _createJson: function(node, open) {\r\n return {\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n isParent: BI.isNotEmptyArray(node.children),\r\n open: open\r\n }\r\n },\r\n\r\n _getChildren: function(node) {\r\n var self = this;\r\n node.children = node.children || [];\r\n var nodes = [];\r\n BI.each(node.children, function (idx, child) {\r\n var children = self._getChildren(child);\r\n nodes = nodes.concat(children);\r\n });\r\n return node.children.concat(nodes);\r\n },\r\n\r\n // 将搜索到的节点进行补充,构造成一棵完整的树\r\n _fillTreeStructure4Search: function (leaves) {\r\n var self = this;\r\n var result = [];\r\n var queue = [];\r\n BI.each(leaves, function (idx, node) {\r\n queue.push({pId: node.pId});\r\n result.push(node);\r\n result = result.concat(self._getChildren(node));\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.pop();\r\n var pNode = this.tree.search(this.tree.getRoot(), node.pId, \"id\");\r\n if (pNode != null) {\r\n pNode.open = true;\r\n queue.push({pId: pNode.pId});\r\n result.push(pNode);\r\n }\r\n }\r\n return BI.uniqBy(BI.map(result, function (idx, node) {\r\n return self._createJson(node, node.open);\r\n }), \"id\");\r\n },\r\n\r\n _digest: function (v) {\r\n var o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n var result = BI.find(o.items, function (i, item) {\r\n return item.value === v;\r\n });\r\n return BI.isNotNull(result) ? result.text : o.text;\r\n }\r\n return o.valueFormatter(v);\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._initData(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setState(this._digest(v[0]));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.shortcut(\"bi.multilayer_select_tree_trigger\", BI.MultiLayerSelectTreeTrigger);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_first_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_first_plus_group_node\", BI.MultiLayerSelectTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_last_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_last_plus_group_node\", BI.MultiLayerSelectTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_mid_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_mid_plus_group_node\", BI.MultiLayerSelectTreeMidPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreePlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_plus_group_node\", BI.MultiLayerSelectTreePlusGroupNode);/**\r\n * 多层级下拉单选树\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-single-tree-combo\",\r\n isDefaultInit: false,\r\n height: 24,\r\n text: \"\",\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: false,\r\n allowSearchValue: false,\r\n allowInsertValue: false\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();\r\n\r\n return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n _getBaseConfig: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n destroyWhenHide: o.destroyWhenHide,\r\n adjustLength: 2,\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.multilayer_single_tree_popup\",\r\n isDefaultInit: o.isDefaultInit,\r\n itemsCreator: o.itemsCreator,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.trigger && self.trigger.getSearcher().setAdapter(_ref);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE);\r\n }\r\n }],\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n maxHeight: 400,\r\n minHeight: 240\r\n }\r\n };\r\n },\r\n\r\n _getSearchConfig: function() {\r\n var self = this, o = this.options;\r\n return {\r\n el: {\r\n type: \"bi.multilayer_single_tree_trigger\",\r\n container: o.container,\r\n allowInsertValue: o.allowInsertValue,\r\n allowSearchValue: o.allowSearchValue,\r\n allowEdit: o.allowEdit,\r\n cls: \"multilayer-single-tree-trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n watermark: o.watermark,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,\r\n action: function () {\r\n var value = self.trigger.getSearcher().getKeyword();\r\n self.combo.setValue([value]);\r\n self.combo.hideView();\r\n }\r\n }]\r\n },\r\n toggle: !o.allowEdit,\r\n hideChecker: function (e) {\r\n // 新增传配置container后对应hideChecker的修改\r\n // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿\r\n // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以\r\n // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪\r\n return (o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n\r\n _getSyncConfig: function () {\r\n var o = this.options;\r\n var baseConfig = this._getBaseConfig();\r\n return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {\r\n el: {\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }\r\n });\r\n },\r\n\r\n _getAsyncConfig: function () {\r\n var config = this._getBaseConfig();\r\n return BI.extend(config, this._getSearchConfig());\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_single_tree_combo\", BI.MultiLayerSingleTreeCombo);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreeInsertSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSingleTreeInsertSearchPane = BI.inherit(BI.Widget, {\r\n\r\n props: function() {\r\n return {\r\n baseCls: \"bi-multilayer-single-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\"\r\n };\r\n },\r\n\r\n render: function() {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_select_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n });\r\n },\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectLevelTree.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n return {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: 24,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n ref: function (_ref) {\r\n self.addNotMatchTip = _ref;\r\n },\r\n handler: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n }, this.tree]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var showTip = BI.isEmptyArray(this.tree.getAllLeaves());\r\n this.addNotMatchTip.setVisible(showTip);\r\n showTip && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_single_tree_insert_search_pane\", BI.MultiLayerSingleTreeInsertSearchPane);/**\r\n * guy\r\n * 二级树\r\n * @class BI.MultiLayerSingleLevelTree\r\n * @extends BI.Single\r\n */\r\nBI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-single-level-tree\",\r\n isDefaultInit: false,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n chooseType: BI.Selection.Single,\r\n scrollable: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.storeValue = o.value;\r\n\r\n this.initTree(this.options.items);\r\n\r\n this.check();\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this, o = this.options;\r\n var keyword = o.keywordGetter();\r\n BI.each(nodes, function (i, node) {\r\n var extend = {};\r\n node.layer = layer;\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n node.keyword = node.keyword || keyword;\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.multilayer_single_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_plus_group_node\";\r\n }\r\n if (i === 0 && i === nodes.length - 1 && !pNode) { // 根\r\n extend.type = \"bi.multilayer_single_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.multilayer_single_tree_mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_tree_leaf_item\";\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n node.id = node.id || BI.UUID();\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n var hasNext = false;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n cls: \"tree-view display-table\",\r\n expander: {\r\n isDefaultInit: o.isDefaultInit,\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n value: o.value,\r\n itemsCreator: function (op, callback) {\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loading();\r\n });\r\n o.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n (op.times === 1 && !op.node) && self._populate(ob.items);\r\n callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));\r\n self.setValue(self.storeValue);\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loaded();\r\n });\r\n });\r\n },\r\n\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: o.itemsCreator !== BI.emptyFn,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: o.chooseType,\r\n behaviors: o.behaviors,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n }\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.setValue(v);\r\n self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n scrollable: o.scrollable,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n _populate: function () {\r\n BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n this._populate(nodes);\r\n BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));\r\n },\r\n\r\n setValue: function (v) {\r\n // getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了\r\n if(this.options.chooseType === BI.Selection.None) {\r\n } else {\r\n this.storeValue = v;\r\n this.tree.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.isArray(this.storeValue) ?\r\n this.storeValue : BI.isNull(this.storeValue) ?\r\n [] : [this.storeValue];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.MultiLayerSingleLevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multilayer_single_level_tree\", BI.MultiLayerSingleLevelTree);\r\n/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-singletree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiLayerSingleTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_single_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n onLoaded: function () {\r\n self.tree.check();\r\n o.onLoaded();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_single_tree_popup\", BI.MultiLayerSingleTreePopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: function() {\r\n return {\r\n extraCls: \"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow bi-border-radius\",\r\n height: 24,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n itemsCreator: BI.emptyFn,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowSearchValue: false\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n this._initData();\r\n }\r\n var content = {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n masker: BI.isNotNull(o.container) ? {\r\n offset: {},\r\n container: o.container\r\n } : {\r\n offset: {}\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\",\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.StateEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING);\r\n }\r\n }]\r\n },\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multilayer_single_tree_insert_search_pane\" : \"bi.multilayer_single_tree_popup\",\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n cls: \"bi-card\",\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.options.text = self.getSearcher().getKeyword();\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n callback(self._getSearchItems(keyword));\r\n o.allowInsertValue && self.popup.setKeyword(keyword);\r\n } else {\r\n callback();\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n\r\n return o.allowEdit ? content : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: content,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _initData: function() {\r\n var o = this.options;\r\n this.tree = new BI.Tree();\r\n this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));\r\n this.tree.initTree(this.nodes);\r\n },\r\n\r\n _getSearchItems: function(keyword) {\r\n var self = this, o = this.options;\r\n // 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索\r\n var items = [];\r\n this.tree.traverse(function (node) {\r\n var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);\r\n if(find.find.length > 0 || find.match.length > 0) {\r\n items.push(node);\r\n return true;\r\n }\r\n });\r\n return this._fillTreeStructure4Search(items, \"id\");\r\n },\r\n\r\n _createJson: function(node, open) {\r\n return {\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n isParent: BI.isNotEmptyArray(node.children),\r\n open: open\r\n }\r\n },\r\n\r\n _getChildren: function(node) {\r\n var self = this;\r\n node.children = node.children || [];\r\n var nodes = [];\r\n BI.each(node.children, function (idx, child) {\r\n var children = self._getChildren(child);\r\n nodes = nodes.concat(children);\r\n });\r\n return node.children.concat(nodes);\r\n },\r\n\r\n // 将搜索到的节点进行补充,构造成一棵完整的树\r\n _fillTreeStructure4Search: function (leaves) {\r\n var self = this;\r\n var result = [];\r\n var queue = [];\r\n BI.each(leaves, function (idx, node) {\r\n queue.push({pId: node.pId});\r\n result.push(node);\r\n result = result.concat(self._getChildren(node));\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.pop();\r\n var pNode = this.tree.search(this.tree.getRoot(), node.pId, \"id\");\r\n if (pNode != null) {\r\n pNode.open = true;\r\n queue.push({pId: pNode.pId});\r\n result.push(pNode);\r\n }\r\n }\r\n return BI.uniqBy(BI.map(result, function (idx, node) {\r\n return self._createJson(node, node.open);\r\n }), \"id\");\r\n },\r\n\r\n _digest: function (v) {\r\n var o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n var result = BI.find(o.items, function (i, item) {\r\n return item.value === v;\r\n });\r\n return BI.isNotNull(result) ? result.text : o.text;\r\n }\r\n return o.valueFormatter(v);\r\n\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._initData();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setState(this._digest(v[0]));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\nBI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.shortcut(\"bi.multilayer_single_tree_trigger\", BI.MultiLayerSingleTreeTrigger);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-first-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.first_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n isLastNode: o.isLastNode,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_first_plus_group_node\", BI.MultiLayerSingleTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-last-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.last_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_last_plus_group_node\", BI.MultiLayerSingleTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-mid-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.mid_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_mid_plus_group_node\", BI.MultiLayerSingleTreeMidPlusGroupNode);/**\r\n *@desc 根节点,既是第一个又是最后一个\r\n *@author dailer\r\n *@date 2018/09/16\r\n */\r\nBI.MultiLayerSingleTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n isLastNode: o.isLastNode,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_plus_group_node\", BI.MultiLayerSingleTreePlusGroupNode);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeFirstTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.first_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_first_tree_leaf_item\", BI.MultiLayerSingleTreeFirstTreeLeafItem);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeLastTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.last_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_last_tree_leaf_item\", BI.MultiLayerSingleTreeLastTreeLeafItem);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeMidTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.mid_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_mid_tree_leaf_item\", BI.MultiLayerSingleTreeMidTreeLeafItem);/**\r\n *\r\n * @class BI.MultiSelectCheckPane\r\n * @extends BI.Widget\r\n */\r\nBI.MultiSelectCheckPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 12,\r\n lgap: 10,\r\n tgap: 10,\r\n bgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-pane bi-background\",\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n onClickContinueSelect: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckPane.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.storeValue = opts.value || {};\r\n this.display = BI.createWidget({\r\n type: \"bi.display_selected_list\",\r\n items: opts.items,\r\n itemsCreator: function (op, callback) {\r\n op = BI.extend(op || {}, {\r\n selectedValues: self.storeValue.value\r\n });\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n callback({\r\n items: BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt\r\n };\r\n })\r\n });\r\n return;\r\n }\r\n opts.itemsCreator(op, callback);\r\n }\r\n });\r\n\r\n this.continueSelect = BI.createWidget({\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Continue_Select\"),\r\n cls: \"multi-select-check-selected bi-high-light\"\r\n });\r\n\r\n this.continueSelect.on(BI.TextButton.EVENT_CHANGE, function () {\r\n opts.onClickContinueSelect();\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n height: this.constants.height,\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n cls: \"multi-select-continue-select\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Selected_Data\")\r\n },\r\n lgap: this.constants.lgap\r\n },\r\n {\r\n el: this.continueSelect,\r\n lgap: this.constants.lgap\r\n }]\r\n },\r\n tgap: this.constants.tgap\r\n }, {\r\n height: \"fill\",\r\n el: this.display,\r\n tgap: this.constants.bgap\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n },\r\n\r\n empty: function () {\r\n this.display.empty();\r\n },\r\n\r\n populate: function () {\r\n this.display.populate.apply(this.display, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multi_select_check_pane\", BI.MultiSelectCheckPane);/**\r\n *\r\n *\r\n * 查看已选弹出层的展示面板\r\n * @class BI.DisplaySelectedList\r\n * @extends BI.Widget\r\n */\r\nBI.DisplaySelectedList = BI.inherit(BI.Pane, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-display-list\",\r\n itemsCreator: BI.emptyFn,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DisplaySelectedList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.hasNext = false;\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.list_pane\",\r\n element: this,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n items: this._createItems(opts.items),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n lgap: 10\r\n }]\r\n },\r\n itemsCreator: function (options, callback) {\r\n\r\n opts.itemsCreator(options, function (ob) {\r\n self.hasNext = !!ob.hasNext;\r\n callback(self._createItems(ob.items));\r\n });\r\n },\r\n hasNext: function () {\r\n return self.hasNext;\r\n }\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.icon_text_item\",\r\n cls: \"cursor-default check-font icon-size-12 display-list-item bi-tips\",\r\n once: true,\r\n invalid: true,\r\n selected: true,\r\n height: this.constants.height,\r\n logic: {\r\n dynamic: true\r\n }\r\n });\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n if (arguments.length === 0) {\r\n this.button_group.populate();\r\n } else {\r\n this.button_group.populate(this._createItems(items));\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.display_selected_list\", BI.DisplaySelectedList);/**\r\n *\r\n * @class BI.MultiSelectCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = o.value || {};\r\n\r\n this._assertValue(this.storeValue);\r\n\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: this.storeValue\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 && self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: this.storeValue\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_combo\", BI.MultiSelectCombo);/**\r\n *\r\n * @class BI.MultiSelectNoBarCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo-no-bar\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_no_bar_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function (op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.storeValue));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _stopEditing: function () {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest(items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n\r\n function adjust() {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectNoBarCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectNoBarCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectNoBarCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectNoBarCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectNoBarCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectNoBarCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_no_bar_combo\", BI.MultiSelectNoBarCombo);/**\r\n *\r\n * @class BI.MultiSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectInsertCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = o.value || {};\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_insert_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: o.value\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {\r\n if (!this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n self._stopEditing();\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n container: o.container,\r\n popup: {\r\n type: \"bi.multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _addItem: function (assertShowValue) {\r\n var self = this;\r\n var keyword = this.trigger.getSearcher().getKeyword();\r\n this._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n // 如果在不选的状态下直接把该值添加进来\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n // value更新的时候assist也需要更新\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_combo\", BI.MultiSelectInsertCombo);/**\r\n *\r\n * @class BI.MultiSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-combo-no-bar\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_insert_trigger\",\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {\r\n if (!this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n self._stopEditing();\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_no_bar_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.storeValue));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _addItem: function (assertShowValue) {\r\n var self = this;\r\n var keyword = this.trigger.getSearcher().getKeyword();\r\n this._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n // 如果在不选的状态下直接把该值添加进来\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertNoBarCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_no_bar_combo\", BI.MultiSelectInsertNoBarCombo);/**\r\n *\r\n * 复选下拉框\r\n * @class BI.MultiSelectInsertTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border bi-border-radius\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.multi_select_insert_searcher\",\r\n height: o.height,\r\n text: o.text,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS);\r\n });\r\n\r\n this.wrapNumberCounter = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n\r\n this.wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: this.wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n /**\r\n * 重新调整numberCounter的空白占位符\r\n */\r\n refreshPlaceHolderWidth: function(width) {\r\n this.wrapper.attr(\"items\")[1].width = width;\r\n this.wrapper.resize();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.MultiSelectInsertTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectInsertTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectInsertTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectInsertTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.MultiSelectInsertTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiSelectInsertTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_trigger\", BI.MultiSelectInsertTrigger);/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.MultiSelectLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n logic: opts.logic,\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n },\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({\r\n scrolly: true,\r\n vgap: 5\r\n }, opts.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)\r\n }))));\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h - 10);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_loader\", BI.MultiSelectLoader);/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.MultiSelectNoBarLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget(BI.extend({\r\n type: \"bi.list_pane\",\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n }, opts.el));\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.button_group],\r\n vgap: 5\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n cls: \"bi-list-item-active\",\r\n logic: this.options.logic,\r\n height: 24,\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue.value);\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: BI.Selection.Multi,\r\n value: this.button_group.getValue()\r\n };\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.element.css({\"max-height\": h + \"px\"});\r\n },\r\n\r\n resetWidth: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectNoBarLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_no_bar_loader\", BI.MultiSelectNoBarLoader);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.MultiSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiSelectPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_select_popup_view\", BI.MultiSelectPopupView);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_no_bar_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectNoBarPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_select_no_bar_popup_view\", BI.MultiSelectNoBarPopupView);/**\r\n *\r\n * 复选下拉框\r\n * @class BI.MultiSelectTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.MultiSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border bi-border-radius\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.multi_select_searcher\",\r\n height: o.height,\r\n text: o.text,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS);\r\n });\r\n\r\n this.wrapNumberCounter = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n\r\n this.wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: this.wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n /**\r\n * 重新调整numberCounter的空白占位符\r\n */\r\n refreshPlaceHolderWidth: function(width) {\r\n this.wrapper.attr(\"items\")[1].width = width;\r\n this.wrapper.resize();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.MultiSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.MultiSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.MultiSelectTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\n\r\nBI.shortcut(\"bi.multi_select_trigger\", BI.MultiSelectTrigger);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiSelectSearchInsertPane\r\n * @extends Widget\r\n */\r\n\r\nBI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchInsertPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.addNotMatchTip = BI.createWidget({\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n handler: function () {\r\n self.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_search_loader\",\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.vertical\",\r\n items: [this.tooltipClick, this.addNotMatchTip],\r\n height: this.constants.height\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isMatchTipVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n this.tooltipClick.setVisible(isMatchTipVisible);\r\n this.addNotMatchTip.setVisible(!isMatchTipVisible);\r\n !isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_select_search_insert_pane\", BI.MultiSelectSearchInsertPane);/**\r\n * 多选加载数据搜索loader面板\r\n * Created by guy on 15/11/4.\r\n * @class BI.MultiSelectSearchLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-loader\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n this.storeValue = BI.deepClone(opts.value);\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n },\r\n element: this,\r\n logic: {\r\n dynamic: false\r\n },\r\n value: opts.value,\r\n el: {\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n var keyword = ob.keyword = opts.keywordGetter();\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = self._filterValues(self.storeValue);\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), keyword);\r\n if (op.times === 1 && self.storeValue) {\r\n self.setValue(self.storeValue);\r\n }\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _filterValues: function (src) {\r\n var o = this.options;\r\n var keyword = o.keywordGetter();\r\n var values = BI.deepClone(src.value) || [];\r\n var newValues = BI.map(values, function (i, v) {\r\n return {\r\n text: o.valueFormatter(v) || v,\r\n value: v\r\n };\r\n });\r\n if (BI.isKey(keyword)) {\r\n var search = BI.Func.getSearchResult(newValues, keyword);\r\n values = search.match.concat(search.find);\r\n }\r\n return BI.map(values, function (i, v) {\r\n return {\r\n text: v.text,\r\n title: v.text,\r\n value: v.value,\r\n selected: src.type === BI.Selection.All\r\n };\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了\r\n this.storeValue = BI.deepClone(v);\r\n this.button_group.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_search_loader\", BI.MultiSelectSearchLoader);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiSelectSearchPane\r\n * @extends Widget\r\n */\r\n\r\nBI.MultiSelectSearchPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_search_loader\",\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.tooltipClick,\r\n height: 0\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n this.tooltipClick.setVisible(false);\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n if (isVisible !== this.tooltipClick.isVisible()) {\r\n this.tooltipClick.setVisible(isVisible);\r\n this.resizer.attr(\"items\")[0].height = (isVisible ? this.constants.height : 0);\r\n this.resizer.resize();\r\n }\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multi_select_search_pane\", BI.MultiSelectSearchPane);/**\r\n * 查看已选按钮\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectCheckSelectedButton\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-selected-button\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckSelectedButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.text_button\",\r\n element: this,\r\n hgap: 4,\r\n text: \"0\",\r\n textAlign: \"center\",\r\n textHeight: 16,\r\n cls: \"bi-high-light-background count-tip\"\r\n });\r\n this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.numberCounter.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.numberCounter.element.hover(function () {\r\n self.numberCounter.setTag(self.numberCounter.getText());\r\n self.numberCounter.setText(BI.i18nText(\"BI-Check_Selected\"));\r\n }, function () {\r\n self.numberCounter.setText(self.numberCounter.getTag());\r\n });\r\n this.setVisible(false);\r\n if(BI.isNotNull(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _populate: function (ob) {\r\n var self = this, o = this.options;\r\n if (ob.type === BI.Selection.All) {\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n var length = res.count - ob.value.length;\r\n BI.nextTick(function () {\r\n self.numberCounter.setText(length);\r\n self.setVisible(length > 0);\r\n });\r\n });\r\n return;\r\n }\r\n BI.nextTick(function () {\r\n self.numberCounter.setText(ob.value.length);\r\n self.setVisible(ob.value.length > 0);\r\n });\r\n },\r\n\r\n _assertValue: function (ob) {\r\n ob || (ob = {});\r\n ob.type || (ob.type = BI.Selection.Multi);\r\n ob.value || (ob.value = []);\r\n return ob;\r\n },\r\n\r\n setValue: function (ob) {\r\n ob = this._assertValue(ob);\r\n this.options.value = ob;\r\n this._populate(ob);\r\n },\r\n\r\n populate: function () {\r\n this._populate(this._assertValue(this.options.value));\r\n },\r\n\r\n getValue: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectCheckSelectedButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_check_selected_button\", BI.MultiSelectCheckSelectedButton);/**\r\n * 多选输入框\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectEditor\r\n * @extends Widget\r\n */\r\nBI.MultiSelectEditor = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-editor\",\r\n el: {},\r\n watermark: BI.i18nText(\"BI-Basic_Search\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.state_editor\",\r\n element: this,\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n value: o.value,\r\n defaultText: o.text,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n });\r\n\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.StateEditor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_BLUR);\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setState: function (state) {\r\n this.editor.setState(state);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.editor.setTipType(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.editor.getState();\r\n if (BI.isArray(v) && v.length > 0) {\r\n return v[v.length - 1];\r\n }\r\n return \"\";\r\n\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n populate: function (items) {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_select_editor\", BI.MultiSelectEditor);\r\n/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectInsertSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n watermark: o.watermark,\r\n height: o.height,\r\n text: o.text,\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM);\r\n }\r\n }]\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiSelectInsertSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectInsertSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectInsertSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectInsertSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertSearcher.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiSelectInsertSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.shortcut(\"bi.multi_select_insert_searcher\", BI.MultiSelectInsertSearcher);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.shortcut(\"bi.multi_select_searcher\", BI.MultiSelectSearcher);/**\r\n * 查看已选switcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectCheckSelectedSwitcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-selected-switcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.button = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_check_selected_button\",\r\n itemsCreator: o.itemsCreator,\r\n value: o.value\r\n });\r\n this.button.on(BI.Events.VIEW, function () {\r\n self.fireEvent(BI.Events.VIEW, arguments);\r\n });\r\n this.switcher = BI.createWidget({\r\n type: \"bi.switcher\",\r\n toggle: false,\r\n element: this,\r\n el: this.button,\r\n popup: BI.extend({\r\n type: \"bi.multi_select_check_pane\",\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: o.itemsCreator,\r\n onClickContinueSelect: function () {\r\n self.switcher.hideView();\r\n },\r\n ref: function (_ref) {\r\n self.checkPane = _ref;\r\n },\r\n value: o.value\r\n }, o.popup),\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE);\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW, function () {\r\n var me = this;\r\n BI.nextTick(function () {\r\n me.populate();\r\n });\r\n });\r\n },\r\n\r\n adjustView: function () {\r\n this.switcher.adjustView();\r\n },\r\n\r\n hideView: function () {\r\n this.switcher.empty();\r\n this.switcher.hideView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.switcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (v) {\r\n this.switcher.setValue(v);\r\n },\r\n\r\n // 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数\r\n updateSelectedValue: function (v) {\r\n this.checkPane.setValue(v);\r\n },\r\n\r\n setButtonChecked: function (v) {\r\n this.button.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n\r\n },\r\n\r\n populate: function (items) {\r\n this.switcher.populate.apply(this.switcher, arguments);\r\n },\r\n\r\n populateSwitcher: function () {\r\n this.button.populate.apply(this.button, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.multi_select_check_selected_switcher\", BI.MultiSelectCheckSelectedSwitcher);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectInsertList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectInsertList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = o.value || {};\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: true\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: o.value\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keywords = [self.trigger.getKeyword()];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n var keyword = self.trigger.getKeyword();\r\n if (!self.trigger.hasMatched()) {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self.adapter.populate();\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n self._showAdapter();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeywords();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }],\r\n value: o.value\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 30,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,\r\n keywords: [self.trigger.getKeyword()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n callback();\r\n });\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_insert_list\", BI.MultiSelectInsertList);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectInsertNoBarList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_no_bar_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: false\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keywords = [self.trigger.getKeyword()];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n var keyword = self.trigger.getKeyword();\r\n if (!self.trigger.hasMatched()) {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self.adapter.populate();\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeywords();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }],\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 30,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,\r\n keywords: [self.trigger.getKeyword()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n callback();\r\n });\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertNoBarList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertNoBarList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_insert_no_bar_list\", BI.MultiSelectInsertNoBarList);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectList = BI.inherit(BI.Widget, {\r\n _constant: {\r\n EDITOR_HEIGHT: 24\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = {};\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: false\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {}\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keywords = [self.trigger.getKeyword()];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeyword();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: this._constant.EDITOR_HEIGHT\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: this._constant.EDITOR_HEIGHT,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n }\r\n\r\n function adjust () {\r\n if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: []\r\n };\r\n } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.All,\r\n value: []\r\n };\r\n }\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_list\", BI.MultiSelectList);/**\r\n * Created by zcf_1 on 2017/5/11.\r\n */\r\nBI.MultiSelectTree = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_HEIGHT: 24\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-tree\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectTree.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = {value: {}};\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_tree_popup\",\r\n itemsCreator: o.itemsCreator\r\n });\r\n this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE, function () {\r\n if (self.searcher.isSearching()) {\r\n self.storeValue = {value: self.searcherPane.getValue()};\r\n } else {\r\n self.storeValue = {value: self.adapter.getValue()};\r\n }\r\n self.setSelectedValue(self.storeValue.value);\r\n self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE);\r\n });\r\n\r\n // 搜索中的时候用的是parttree,同adapter中的synctree不一样\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_tree_search_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n keywordGetter: function () {\r\n return self.searcher.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.searcher.getKeyword();\r\n o.itemsCreator(op, callback);\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.searcher.getKeyword()\r\n });\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n // self.storeValue = {value: self.adapter.getValue()};\r\n // self.searcherPane.setSelectedValue(self.storeValue.value);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n // self.storeValue = {value: self.searcherPane.getValue()};\r\n // self.adapter.setSelectedValue(self.storeValue.value);\r\n BI.nextTick(function () {\r\n self.adapter.populate();\r\n });\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n if (self.searcher.isSearching()) {\r\n self.storeValue = {value: self.searcherPane.getValue()};\r\n } else {\r\n self.storeValue = {value: self.adapter.getValue()};\r\n }\r\n self.setSelectedValue(self.storeValue.value);\r\n self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n self._showAdapter();\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.searcher,\r\n height: this._constant.EDITOR_HEIGHT\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: this._constant.EDITOR_HEIGHT,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n resize: function () {\r\n\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.adapter.setSelectedValue(v);\r\n this.searcherPane.setSelectedValue(v);\r\n this.searcher.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.adapter.setValue(v);\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n updateValue: function (v) {\r\n this.adapter.updateValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue.value;\r\n },\r\n\r\n populate: function () {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n }\r\n});\r\nBI.MultiSelectTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_tree\", BI.MultiSelectTree);/**\r\n * Created by zcf on 2016/12/21.\r\n */\r\nBI.MultiSelectTreePopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectTreePopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popup = BI.createWidget({\r\n type: \"bi.async_tree\",\r\n element: this,\r\n itemsCreator: o.itemsCreator\r\n });\r\n this.popup.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n self.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT);\r\n });\r\n this.popup.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n hasChecked: function () {\r\n return this.popup.hasChecked();\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.popup.setValue(v);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.popup.setSelectedValue(v);\r\n },\r\n\r\n updateValue: function (v) {\r\n this.popup.updateValue(v);\r\n this.popup.refresh();\r\n },\r\n\r\n populate: function (config) {\r\n this.popup.stroke(config);\r\n }\r\n\r\n});\r\nBI.MultiSelectTreePopup.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\nBI.MultiSelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_tree_popup\", BI.MultiSelectTreePopup);/**\r\n *\r\n * @class BI.MultiTreeCheckPane\r\n * @extends BI.Pane\r\n */\r\nBI.MultiTreeCheckPane = BI.inherit(BI.Pane, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-check-pane bi-background\",\r\n onClickContinueSelect: BI.emptyFn,\r\n el: {\r\n type: \"bi.display_tree\"\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCheckPane.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.selectedValues = {};\r\n\r\n var continueSelect = BI.createWidget({\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Continue_Select\"),\r\n cls: \"multi-tree-check-selected\"\r\n });\r\n continueSelect.on(BI.TextButton.EVENT_CHANGE, function () {\r\n opts.onClickContinueSelect();\r\n BI.nextTick(function () {\r\n self.empty();\r\n });\r\n });\r\n\r\n var backToPopup = BI.createWidget({\r\n type: \"bi.left\",\r\n cls: \"multi-tree-continue-select\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Selected_Data\")\r\n },\r\n lgap: this.constants.lgap,\r\n tgap: this.constants.tgap\r\n },\r\n {\r\n el: continueSelect,\r\n lgap: this.constants.lgap,\r\n tgap: this.constants.tgap\r\n }]\r\n });\r\n\r\n this.display = BI.createWidget(opts.el, {\r\n type: \"bi.display_tree\",\r\n cls: \"bi-multi-tree-display\",\r\n itemsCreator: function (op, callback) {\r\n op.type = BI.TreeView.REQ_TYPE_GET_SELECTED_DATA;\r\n opts.itemsCreator(op, callback);\r\n },\r\n value: (opts.value || {}).value\r\n });\r\n\r\n this.display.on(BI.Events.AFTERINIT, function () {\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n });\r\n\r\n this.display.on(BI.TreeView.EVENT_INIT, function () {\r\n backToPopup.setVisible(false);\r\n });\r\n\r\n this.display.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n backToPopup.setVisible(true);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n height: this.constants.height,\r\n el: backToPopup\r\n }, {\r\n height: \"fill\",\r\n el: this.display\r\n }]\r\n });\r\n\r\n },\r\n\r\n empty: function () {\r\n this.display.empty();\r\n },\r\n\r\n populate: function (configs) {\r\n this.display.stroke(configs);\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.display.setSelectedValue(v.value);\r\n },\r\n\r\n getValue: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK = \"EVENT_CONTINUE_CLICK\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_tree_check_pane\", BI.MultiTreeCheckPane);/**\r\n *\r\n * @class BI.MultiTreeCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || {}};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n text: o.text,\r\n watermark: o.watermark,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_tree_searcher\",\r\n itemsCreator: o.itemsCreator\r\n },\r\n value: {value: o.value || {}}\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : {}\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: {}};\r\n }\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n value: {value: o.value || {}}\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.combo.setValue({\r\n value: v || {}\r\n });\r\n this.numberCounter.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_tree_combo\", BI.MultiTreeCombo);/**\r\n * 可以往当前选中节点下添加新值的下拉树\r\n * @class BI.MultiTreeInsertCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeInsertCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-insert-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeInsertCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || {}};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_tree_searcher\",\r\n text: o.text,\r\n watermark: o.watermark,\r\n itemsCreator: o.itemsCreator,\r\n popup: {\r\n type: \"bi.multi_tree_search_insert_pane\",\r\n listeners: [{\r\n eventName: BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.storeValue.value[self.trigger.getSearcher().getKeyword()] = {};\r\n self._assertShowValue();\r\n // setValue以更新paras.value, 之后从search popup中拿到的就能有add的值了\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self._stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n value: {value: o.value || {}}\r\n\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : {}\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: {}};\r\n }\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n itemsCreator: o.itemsCreator,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n valueFormatter: o.valueFormatter,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _assertShowValue: function () {\r\n this.trigger.getSearcher().setState(this.storeValue);\r\n this.numberCounter.setButtonChecked(this.storeValue);\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.combo.setValue({\r\n value: v || {}\r\n });\r\n this.numberCounter.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_tree_insert_combo\", BI.MultiTreeInsertCombo);/**\r\n * 选中节点不影响父子节点状态的下拉树\r\n * @class BI.MultiTreeListCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeListCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-list-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true,\r\n allowInsertValue: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeListCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || []};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n watermark: o.watermark,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_list_tree_searcher\",\r\n itemsCreator: o.itemsCreator,\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multi_tree_search_insert_pane\" : \"bi.multi_tree_search_pane\",\r\n el: {\r\n type: \"bi.list_part_tree\"\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.storeValue.value.unshift([self.trigger.getSearcher().getKeyword()]);\r\n self._assertShowValue();\r\n // setValue以更新paras.value, 之后从search popup中拿到的就能有add的值了\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self._stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n switcher: {\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\",\r\n el: {\r\n type: \"bi.list_display_tree\"\r\n },\r\n itemsCreator: o.itemsCreator\r\n }\r\n },\r\n value: {value: o.value || {}}\r\n\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n el: {\r\n type: \"bi.list_async_tree\"\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : []\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self.trigger.stopEditing();\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: []};\r\n }\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n itemsCreator: o.itemsCreator,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _assertShowValue: function () {\r\n this.trigger.getSearcher().setState(this.storeValue);\r\n this.numberCounter.setButtonChecked(this.storeValue);\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || [];\r\n this.combo.setValue({\r\n value: v || []\r\n });\r\n this.numberCounter.setValue({\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeListCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeListCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeListCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeListCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeListCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeListCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_tree_list_combo\", BI.MultiTreeListCombo);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiTreePopup\r\n * @extends BI.Pane\r\n */\r\nBI.MultiTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-popup\",\r\n maxWidth: \"auto\",\r\n minWidth: 140,\r\n maxHeight: 400,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.async_tree\"\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options, v = opts.value;\r\n\r\n this.selectedValues = {};\r\n\r\n this.tree = BI.createWidget(opts.el, {\r\n type: \"bi.async_tree\",\r\n height: 400,\r\n cls: \"popup-view-tree\",\r\n itemsCreator: opts.itemsCreator,\r\n onLoaded: opts.onLoaded,\r\n value: v.value || {}\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n element: this,\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.tree\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n\r\n this.tree.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.tree.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n self.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT);\r\n });\r\n\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.tree.setSelectedValue(v.value);\r\n },\r\n\r\n populate: function (config) {\r\n this.tree.stroke(config);\r\n },\r\n\r\n hasChecked: function () {\r\n return this.tree.hasChecked();\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiTreePopup.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreePopup.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\nBI.MultiTreePopup.EVENT_AFTERINIT = \"EVENT_AFTERINIT\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_tree_popup_view\", BI.MultiTreePopup);/**\r\n * 查看已选按钮\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiTreeCheckSelectedButton\r\n * @extends BI.Single\r\n */\r\nBI.MultiTreeCheckSelectedButton = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-check-selected-button\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCheckSelectedButton.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.indicator = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"check-font trigger-check-selected icon-size-12\",\r\n width: 15,\r\n height: 15,\r\n stopPropagation: true\r\n });\r\n\r\n this.checkSelected = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"trigger-check-selected\",\r\n invisible: true,\r\n hgap: 4,\r\n text: BI.i18nText(\"BI-Check_Selected\"),\r\n textAlign: \"center\",\r\n textHeight: 15\r\n });\r\n this.checkSelected.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.checkSelected.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.horizontal\",\r\n element: this,\r\n items: [this.indicator, this.checkSelected]\r\n });\r\n\r\n this.element.hover(function () {\r\n self.indicator.setVisible(false);\r\n self.checkSelected.setVisible(true);\r\n }, function () {\r\n self.indicator.setVisible(true);\r\n self.checkSelected.setVisible(false);\r\n });\r\n this.setVisible(false);\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n var show = BI.size(v.value) > 0;\r\n this.setVisible(show);\r\n }\r\n});\r\n\r\nBI.MultiTreeCheckSelectedButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_tree_check_selected_button\", BI.MultiTreeCheckSelectedButton);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiTreeSearchInsertPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiTreeSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-multi-tree-search-insert-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n el: {\r\n type: \"bi.part_tree\"\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n ref: function (_ref) {\r\n self.addTip = _ref;\r\n },\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n handler: function () {\r\n self.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM, opts.keywordGetter());\r\n }\r\n },\r\n top: 5,\r\n left: 0,\r\n right: 0\r\n }, {\r\n el: BI.extend({\r\n type: \"bi.part_tree\",\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n itemsCreator: function (op, callback) {\r\n op.keyword = opts.keywordGetter();\r\n opts.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(opts.keywordGetter(), res.items);\r\n });\r\n },\r\n ref: function (_ref) {\r\n self.partTree = _ref;\r\n },\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.TreeView.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE);\r\n }\r\n }]\r\n }, opts.el),\r\n left: 0,\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword, nodes) {\r\n var isAddTipVisible = BI.isEmptyArray(nodes);\r\n this.addTip.setVisible(isAddTipVisible);\r\n this.partTree.setVisible(!isAddTipVisible);\r\n isAddTipVisible && this.addTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n hasChecked: function () {\r\n return this.partTree.hasChecked();\r\n },\r\n\r\n setValue: function (v) {\r\n this.setSelectedValue(v.value);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.partTree.setSelectedValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.partTree.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.partTree.empty();\r\n },\r\n\r\n populate: function (op) {\r\n this.partTree.stroke.apply(this.partTree, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\nBI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_tree_search_insert_pane\", BI.MultiTreeSearchInsertPane);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiTreeSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiTreeSearchPane = BI.inherit(BI.Pane, {\r\n\r\n props: {\r\n baseCls: \"bi-multi-tree-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n\r\n return BI.extend({\r\n type: \"bi.part_tree\",\r\n element: this,\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n itemsCreator: function (op, callback) {\r\n op.keyword = opts.keywordGetter();\r\n opts.itemsCreator(op, callback);\r\n },\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.TreeView.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.partTree = _ref;\r\n }\r\n }, opts.el);\r\n },\r\n\r\n hasChecked: function () {\r\n return this.partTree.hasChecked();\r\n },\r\n\r\n setValue: function (v) {\r\n this.setSelectedValue(v.value);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.partTree.setSelectedValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.partTree.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.partTree.empty();\r\n },\r\n\r\n populate: function (op) {\r\n this.partTree.stroke.apply(this.partTree, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreeSearchPane.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\nBI.shortcut(\"bi.multi_tree_search_pane\", BI.MultiTreeSearchPane);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiListTreeSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiListTreeSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n popup: {},\r\n\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiListTreeSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n el: {\r\n type: \"bi.simple_state_editor\",\r\n height: o.height\r\n }\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.editor.getValue()\r\n });\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_tree_search_pane\",\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE, arguments);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n var count = 0;\r\n if (BI.isNumber(ob)) {\r\n this.editor.setState(ob);\r\n } else if (BI.size(ob.value) === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n var text = \"\";\r\n BI.each(ob.value, function (idx, path) {\r\n var childValue = BI.last(path);\r\n text += (o.valueFormatter(childValue + \"\") || childValue) + \"; \";\r\n count++;\r\n });\r\n\r\n if (count > 20) {\r\n this.editor.setState(BI.Selection.Multi);\r\n } else {\r\n this.editor.setState(text);\r\n }\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiListTreeSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiListTreeSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiListTreeSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiListTreeSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_list_tree_searcher\", BI.MultiListTreeSearcher);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiTreeSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiTreeSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n popup: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.multi_select_editor\",\r\n watermark: o.watermark,\r\n height: o.height,\r\n el: {\r\n type: \"bi.simple_state_editor\",\r\n text: o.text,\r\n height: o.height\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.editor.getValue()\r\n });\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_tree_search_pane\",\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = {});\r\n var count = 0;\r\n if (BI.isNumber(ob)) {\r\n this.editor.setState(ob);\r\n } else if (BI.size(ob.value) === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n var text = \"\";\r\n BI.each(ob.value, function (name, children) {\r\n var childNodes = getChildrenNode(children);\r\n text += (o.valueFormatter(name + \"\") || name) + (childNodes === \"\" ? \"\" : (\":\" + childNodes)) + \"; \";\r\n if (childNodes === \"\") {\r\n count++;\r\n }\r\n });\r\n\r\n if (count > 20) {\r\n this.editor.setState(BI.Selection.Multi);\r\n } else {\r\n this.editor.setState(text);\r\n }\r\n }\r\n\r\n function getChildrenNode (ob) {\r\n var text = \"\";\r\n var index = 0, size = BI.size(ob);\r\n BI.each(ob, function (name, children) {\r\n index++;\r\n var childNodes = getChildrenNode(children);\r\n text += (o.valueFormatter(name + \"\") || name) + (childNodes === \"\" ? \"\" : (\":\" + childNodes)) + (index === size ? \"\" : \",\");\r\n if (childNodes === \"\") {\r\n count++;\r\n }\r\n });\r\n return text;\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiTreeSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiTreeSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiTreeSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_tree_searcher\", BI.MultiTreeSearcher);/**\r\n * Created by windy on 2017/3/13.\r\n * 数值微调器\r\n */\r\nBI.NumberEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-number-editor bi-border bi-focus-shadow\",\r\n validationChecker: function () {\r\n return true;\r\n },\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n value: 0,\r\n allowBlank: false,\r\n errorText: \"\",\r\n step: 1\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.NumberEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height - 2,\r\n allowBlank: o.allowBlank,\r\n value: o.valueFormatter(o.value),\r\n validationChecker: o.validationChecker,\r\n errorText: o.errorText\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_ERROR, function () {\r\n o.value = BI.parseFloat(this.getLastValidValue());\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_VALID, function () {\r\n o.value = BI.parseFloat(this.getValue());\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n this.topBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n forceNotSelected: true,\r\n trigger: \"lclick,\",\r\n cls: \"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12\"\r\n });\r\n this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self._finetuning(o.step);\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n this.bottomBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n trigger: \"lclick,\",\r\n forceNotSelected: true,\r\n cls: \"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12\"\r\n });\r\n this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self._finetuning(-o.step);\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n height: o.height - 2,\r\n element: this,\r\n items: [this.editor, {\r\n el: {\r\n type: \"bi.grid\",\r\n columns: 1,\r\n rows: 2,\r\n items: [{\r\n column: 0,\r\n row: 0,\r\n el: this.topBtn\r\n }, {\r\n column: 0,\r\n row: 1,\r\n el: this.bottomBtn\r\n }]\r\n },\r\n width: 23\r\n }]\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n // 微调\r\n _finetuning: function (add) {\r\n var v = BI.parseFloat(this.getValue());\r\n this.setValue(BI.add(v, add));\r\n },\r\n\r\n setUpEnable: function (v) {\r\n this.topBtn.setEnable(!!v);\r\n },\r\n\r\n setDownEnable: function (v) {\r\n this.bottomBtn.setEnable(!!v);\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n o.value = v;\r\n this.editor.setValue(o.valueFormatter(v));\r\n }\r\n\r\n});\r\nBI.NumberEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.NumberEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.number_editor\", BI.NumberEditor);// 小于号的值为:0,小于等于号的值为:1\r\n// closeMIn:最小值的符号,closeMax:最大值的符号\r\n/**\r\n * Created by roy on 15/9/17.\r\n *\r\n */\r\nBI.NumberInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n typeError: \"typeBubble\",\r\n numberError: \"numberBubble\",\r\n signalError: \"signalBubble\",\r\n editorWidth: 114,\r\n columns: 5,\r\n width: 24,\r\n rows: 1,\r\n numberErrorCls: \"number-error\",\r\n border: 1,\r\n less: 0,\r\n less_equal: 1,\r\n numTip: \"\",\r\n adjustYOffset: 2\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-number-interval\" + ((BI.isIE() && BI.getIEVersion() < 10) ? \" hack\" : \"\"),\r\n height: 24,\r\n validation: \"valid\",\r\n closeMin: true,\r\n allowBlank: true,\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\")\r\n });\r\n },\r\n _init: function () {\r\n var self = this, c = this.constants, o = this.options;\r\n BI.NumberInterval.superclass._init.apply(this, arguments);\r\n this.smallEditor = BI.createWidget({\r\n type: \"bi.number_interval_single_editor\",\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.min,\r\n level: \"warning\",\r\n tipType: \"success\",\r\n title: function () {\r\n return self.smallEditor && self.smallEditor.getValue();\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n validationChecker: function (v) {\r\n if (!BI.isNumeric(v)) {\r\n self.smallEditorBubbleType = c.typeError;\r\n return false;\r\n }\r\n return true;\r\n },\r\n cls: \"number-interval-small-editor bi-border\"\r\n });\r\n\r\n this.smallTip = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.numTip,\r\n height: o.height - 2,\r\n invisible: true\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.smallEditor.element,\r\n items: [{\r\n el: this.smallTip,\r\n top: 0,\r\n right: 5\r\n }]\r\n });\r\n\r\n this.bigEditor = BI.createWidget({\r\n type: \"bi.number_interval_single_editor\",\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.max,\r\n title: function () {\r\n return self.bigEditor && self.bigEditor.getValue();\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n validationChecker: function (v) {\r\n if (!BI.isNumeric(v)) {\r\n self.bigEditorBubbleType = c.typeError;\r\n return false;\r\n }\r\n return true;\r\n },\r\n cls: \"number-interval-big-editor bi-border\"\r\n });\r\n\r\n this.bigTip = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.numTip,\r\n height: o.height - 2,\r\n invisible: true\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.bigEditor.element,\r\n items: [{\r\n el: this.bigTip,\r\n top: 0,\r\n right: 5\r\n }]\r\n });\r\n this.smallCombo = BI.createWidget({\r\n type: \"bi.icon_combo\",\r\n cls: \"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right\",\r\n height: o.height - 2,\r\n items: [{\r\n text: \"(\" + BI.i18nText(\"BI-Less_Than\") + \")\",\r\n iconCls: \"less-font\",\r\n value: 0\r\n }, {\r\n text: \"(\" + BI.i18nText(\"BI-Less_And_Equal\") + \")\",\r\n value: 1,\r\n iconCls: \"less-equal-font\"\r\n }]\r\n });\r\n if (o.closeMin === true) {\r\n this.smallCombo.setValue(1);\r\n } else {\r\n this.smallCombo.setValue(0);\r\n }\r\n this.bigCombo = BI.createWidget({\r\n type: \"bi.icon_combo\",\r\n cls: \"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left\",\r\n height: o.height - 2,\r\n items: [{\r\n text: \"(\" + BI.i18nText(\"BI-Less_Than\") + \")\",\r\n iconCls: \"less-font\",\r\n value: 0\r\n }, {\r\n text: \"(\" + BI.i18nText(\"BI-Less_And_Equal\") + \")\",\r\n value: 1,\r\n iconCls: \"less-equal-font\"\r\n }]\r\n });\r\n if (o.closeMax === true) {\r\n this.bigCombo.setValue(1);\r\n } else {\r\n this.bigCombo.setValue(0);\r\n }\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Basic_Value\"),\r\n textHeight: o.height - c.border * 2,\r\n width: c.width - c.border * 2,\r\n height: o.height - c.border * 2,\r\n level: \"warning\",\r\n tipType: \"warning\"\r\n });\r\n this.left = BI.createWidget({\r\n type: \"bi.htape\",\r\n items: [{\r\n el: self.smallEditor\r\n }, {\r\n el: self.smallCombo,\r\n width: c.width - c.border\r\n }]\r\n\r\n });\r\n this.right = BI.createWidget({\r\n type: \"bi.htape\",\r\n items: [{\r\n el: self.bigCombo,\r\n width: c.width - c.border\r\n }, {\r\n el: self.bigEditor,\r\n // BI-23883 间距考虑边框\r\n lgap: 1\r\n }]\r\n });\r\n\r\n\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n hgap: 15,\r\n height: o.height,\r\n items: [\r\n {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: -15,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: 0,\r\n right: -15,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }\r\n ]\r\n });\r\n\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.horizontal_auto\",\r\n items: [\r\n self.label\r\n ]\r\n });\r\n\r\n\r\n self._setValidEvent(self.bigEditor, c.bigEditor);\r\n self._setValidEvent(self.smallEditor, c.smallEditor);\r\n self._setErrorEvent(self.bigEditor, c.bigEditor);\r\n self._setErrorEvent(self.smallEditor, c.smallEditor);\r\n self._setBlurEvent(self.bigEditor);\r\n self._setBlurEvent(self.smallEditor);\r\n self._setFocusEvent(self.bigEditor);\r\n self._setFocusEvent(self.smallEditor);\r\n self._setComboValueChangedEvent(self.bigCombo);\r\n self._setComboValueChangedEvent(self.smallCombo);\r\n self._setEditorValueChangedEvent(self.bigEditor);\r\n self._setEditorValueChangedEvent(self.smallEditor);\r\n\r\n self._checkValidation();\r\n },\r\n\r\n _checkValidation: function () {\r\n var self = this, c = this.constants, o = this.options;\r\n self._setTitle(\"\");\r\n BI.Bubbles.hide(c.typeError);\r\n BI.Bubbles.hide(c.numberError);\r\n BI.Bubbles.hide(c.signalError);\r\n if (!self.smallEditor.isValid() || !self.bigEditor.isValid()) {\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.typeError;\r\n }\r\n if (BI.isEmptyString(self.smallEditor.getValue()) || BI.isEmptyString(self.bigEditor.getValue())) {\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n }\r\n var smallValue = parseFloat(self.smallEditor.getValue()), bigValue = parseFloat(self.bigEditor.getValue()),\r\n bigComboValue = self.bigCombo.getValue(), smallComboValue = self.smallCombo.getValue();\r\n if (bigComboValue[0] === c.less_equal && smallComboValue[0] === c.less_equal) {\r\n if (smallValue > bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.numberError;\r\n }\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n\r\n }\r\n if (smallValue > bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.numberError;\r\n } else if (smallValue === bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.signalError;\r\n }\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n\r\n\r\n\r\n\r\n\r\n },\r\n\r\n _setTitle: function (v) {\r\n this.label.setTitle(v);\r\n },\r\n\r\n _setFocusEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {\r\n self._setTitle(\"\");\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n default :\r\n return;\r\n }\r\n\r\n });\r\n },\r\n _setBlurEvent: function (w) {\r\n var c = this.constants, self = this;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {\r\n BI.Bubbles.hide(c.typeError);\r\n BI.Bubbles.hide(c.numberError);\r\n BI.Bubbles.hide(c.signalError);\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Input_Data\"));\r\n break;\r\n case c.numberError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Number_Value\"));\r\n break;\r\n case c.signalError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"));\r\n break;\r\n default:\r\n self._setTitle(\"\");\r\n }\r\n });\r\n },\r\n\r\n _setErrorEvent: function (w) {\r\n var c = this.constants, self = this;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {\r\n self._checkValidation();\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n });\r\n },\r\n\r\n\r\n _setValidEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {\r\n switch (self._checkValidation()) {\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n default:\r\n self.fireEvent(BI.NumberInterval.EVENT_VALID);\r\n }\r\n });\r\n },\r\n\r\n\r\n _setEditorValueChangedEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n default :\r\n break;\r\n }\r\n self.fireEvent(BI.NumberInterval.EVENT_CHANGE);\r\n });\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);\r\n });\r\n },\r\n\r\n _setComboValueChangedEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.IconCombo.EVENT_CHANGE, function () {\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Input_Data\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.numberError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Number_Value\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.signalError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n default :\r\n self.fireEvent(BI.NumberInterval.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);\r\n self.fireEvent(BI.NumberInterval.EVENT_VALID);\r\n }\r\n });\r\n },\r\n\r\n isStateValid: function () {\r\n return this.options.validation === \"valid\";\r\n },\r\n\r\n setMinEnable: function (b) {\r\n this.smallEditor.setEnable(b);\r\n },\r\n\r\n setCloseMinEnable: function (b) {\r\n this.smallCombo.setEnable(b);\r\n },\r\n\r\n setMaxEnable: function (b) {\r\n this.bigEditor.setEnable(b);\r\n },\r\n\r\n setCloseMaxEnable: function (b) {\r\n this.bigCombo.setEnable(b);\r\n },\r\n\r\n showNumTip: function () {\r\n this.smallTip.setVisible(true);\r\n this.bigTip.setVisible(true);\r\n },\r\n\r\n hideNumTip: function () {\r\n this.smallTip.setVisible(false);\r\n this.bigTip.setVisible(false);\r\n },\r\n\r\n setNumTip: function (numTip) {\r\n this.smallTip.setText(numTip);\r\n this.bigTip.setText(numTip);\r\n },\r\n\r\n getNumTip: function () {\r\n return this.smallTip.getText();\r\n },\r\n\r\n setValue: function (data) {\r\n data = data || {};\r\n var self = this, combo_value;\r\n if (BI.isNumeric(data.min) || BI.isEmptyString(data.min)) {\r\n self.smallEditor.setValue(data.min);\r\n }\r\n\r\n if (!BI.isNotNull(data.min)) {\r\n self.smallEditor.setValue(\"\");\r\n }\r\n\r\n if (BI.isNumeric(data.max) || BI.isEmptyString(data.max)) {\r\n self.bigEditor.setValue(data.max);\r\n }\r\n\r\n if (!BI.isNotNull(data.max)) {\r\n self.bigEditor.setValue(\"\");\r\n }\r\n\r\n if (!BI.isNull(data.closeMin)) {\r\n if (data.closeMin === true) {\r\n combo_value = 1;\r\n } else {\r\n combo_value = 0;\r\n }\r\n self.smallCombo.setValue(combo_value);\r\n }\r\n\r\n if (!BI.isNull(data.closeMax)) {\r\n if (data.closeMax === true) {\r\n combo_value = 1;\r\n } else {\r\n combo_value = 0;\r\n }\r\n self.bigCombo.setValue(combo_value);\r\n }\r\n\r\n this._checkValidation();\r\n },\r\n\r\n\r\n getValue: function () {\r\n var self = this, value = {}, minComboValue = self.smallCombo.getValue(), maxComboValue = self.bigCombo.getValue();\r\n value.min = self.smallEditor.getValue();\r\n value.max = self.bigEditor.getValue();\r\n if (minComboValue[0] === 0) {\r\n value.closeMin = false;\r\n } else {\r\n value.closeMin = true;\r\n }\r\n\r\n if (maxComboValue[0] === 0) {\r\n value.closeMax = false;\r\n } else {\r\n value.closeMax = true;\r\n }\r\n return value;\r\n },\r\n\r\n destroyed: function () {\r\n var c = this.constants;\r\n BI.Bubbles.remove(c.typeError);\r\n BI.Bubbles.remove(c.numberError);\r\n BI.Bubbles.remove(c.signalError);\r\n }\r\n});\r\nBI.NumberInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.NumberInterval.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.NumberInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.NumberInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.number_interval\", BI.NumberInterval);BI.NumberIntervalSingleEidtor = BI.inherit(BI.Single, {\r\n props: {\r\n baseCls: \"bi-number-interval-single-editor\",\r\n tipType: \"success\",\r\n title: \"\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.editor\",\r\n ref: function (_ref) {\r\n self.editor = _ref;\r\n },\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.value,\r\n quitChecker: o.quitChecker,\r\n validationChecker: o.validationChecker,\r\n listeners: [{\r\n eventName: BI.Editor.EVENT_ERROR,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CHANGE_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n return this.editor.setValue(v);\r\n }\r\n});\r\n\r\nBI.NumberIntervalSingleEidtor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.NumberIntervalSingleEidtor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.NumberIntervalSingleEidtor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.NumberIntervalSingleEidtor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.number_interval_single_editor\", BI.NumberIntervalSingleEidtor);/**\r\n *\r\n * @class BI.SearchMultiTextValueCombo\r\n * @extends BI.Single\r\n */\r\nBI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo bi-search-multi-text-value-combo\",\r\n height: 24,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n self._updateAllValue();\r\n self._checkError();\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.trigger.getCounter().setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = BI.deepClone(o.value || {});\r\n this._updateAllValue();\r\n\r\n this._assertValue(this.storeValue);\r\n this._checkError();\r\n\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.search_multi_select_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n allValueGetter: function () {\r\n return self.allValue;\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n self._itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n value: this.storeValue,\r\n warningTitle: o.warningTitle\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self._populate();\r\n self._setStartValue(\"\");\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n this.getCounter().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.search_multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: BI.bind(self._itemsCreator, this),\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getCounter().adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self._populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n /**\r\n * 在存在标红的情况,如果popover没有发生改变就确认需要同步trigger的值,否则对外value值和trigger样式不统一\r\n */\r\n assertShowValue();\r\n self.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.trigger.getCounter().hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this._checkError();\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n var o = this.options;\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n BI.remove(val.value, function (idx, value) {\r\n return !BI.contains(BI.map(o.items, \"value\"), value);\r\n });\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n\r\n }\r\n\r\n function adjust () {\r\n if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: []\r\n };\r\n } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.All,\r\n value: []\r\n };\r\n }\r\n self._updateAllValue();\r\n self._checkError();\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n _getItemsByTimes: function (items, times) {\r\n var res = [];\r\n for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) {\r\n res.push(items[i]);\r\n }\r\n return res;\r\n },\r\n\r\n _hasNextByTimes: function (items, times) {\r\n return times * 100 < items.length;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n var items = o.items;\r\n var keywords = (options.keywords || []).slice();\r\n if (options.keyword) {\r\n keywords.push(options.keyword);\r\n }\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n items = search.match.concat(search.find);\r\n });\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n items = BI.filter(items, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type == BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: items\r\n });\r\n return;\r\n }\r\n if (options.type == BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: items.length});\r\n return;\r\n }\r\n callback({\r\n items: self._getItemsByTimes(items, options.times),\r\n hasNext: self._hasNextByTimes(items, options.times)\r\n });\r\n },\r\n\r\n _checkError: function () {\r\n var v = this.storeValue.value || [];\r\n if(BI.isNotEmptyArray(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.allValue, function (idx, value) {\r\n return !BI.contains(v, value);\r\n });\r\n if (BI.isNull(result)) {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"success\"));\r\n this.element.removeClass(\"combo-error\");\r\n } else {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"warning\"));\r\n this.element.addClass(\"combo-error\");\r\n }\r\n } else {\r\n if(v.length === this.allValue.length){\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"success\"));\r\n this.element.removeClass(\"combo-error\");\r\n }else {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"warning\"));\r\n this.element.addClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n _updateAllValue: function () {\r\n this.storeValue = this.storeValue || {};\r\n this.allValue = BI.deepClone(this.storeValue.value || []);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = BI.deepClone(v || {});\r\n this._updateAllValue();\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this._checkError();\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n _populate: function () {\r\n this._count = null;\r\n this.combo.populate();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._populate();\r\n }\r\n});\r\n\r\nBI.extend(BI.SearchMultiTextValueCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SearchMultiTextValueCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.search_multi_text_value_combo\", BI.SearchMultiTextValueCombo);\r\nBI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.search_multi_select_searcher\",\r\n height: o.height,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n allValueGetter: o.allValueGetter,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.numberCounter = BI.createWidget(o.switcher, {\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: o.itemsCreator,\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK);\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW);\r\n });\r\n\r\n var wrapNumberCounter = BI.createWidget({\r\n type: \"bi.right_vertical_adapt\",\r\n hgap: 4,\r\n items: [{\r\n el: this.numberCounter\r\n }]\r\n });\r\n\r\n var wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n wrapper.attr(\"items\")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);\r\n wrapper.resize();\r\n });\r\n });\r\n\r\n this.element.click(function (e) {\r\n if (self.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n },\r\n\r\n getCounter: function () {\r\n return this.numberCounter;\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n this.numberCounter.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n this.numberCounter.setValue(ob);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.searcher.setTipType(v);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.SearchMultiSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SearchMultiSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchMultiSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchMultiSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.search_multi_select_trigger\", BI.SearchMultiSelectTrigger);\r\n/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.SearchMultiSelectLoader\r\n * @extends Widget\r\n */\r\nBI.SearchMultiSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n element: this,\r\n logic: opts.logic,\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_multi_select_loader\", BI.SearchMultiSelectLoader);BI.SearchMultiSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.search_multi_select_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.search_multi_select_popup_view\", BI.SearchMultiSelectPopupView);BI.SearchMultiSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if(BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (obj) {\r\n var o = this.options;\r\n var ob = {};\r\n ob.type = obj.type;\r\n ob.value = o.allValueGetter() || [];\r\n ob.assist = obj.assist;\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n setTipType: function (v) {\r\n this.editor.setTipType(v);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.SearchMultiSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.SearchMultiSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchMultiSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchMultiSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.search_multi_select_searcher\", BI.SearchMultiSelectSearcher);\r\n/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-first-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.first_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_first_plus_group_node\", BI.SelectTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-last-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.last_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_last_plus_group_node\", BI.SelectTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-mid-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.mid_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_mid_plus_group_node\", BI.SelectTreeMidPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreePlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_plus_group_node\", BI.SelectTreePlusGroupNode);/**\r\n * @class BI.SelectTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.SelectTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-tree-combo\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreeCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.select_level_tree\",\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup\r\n }\r\n });\r\n\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.popup.on(BI.SingleTreePopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\n\r\nBI.shortcut(\"bi.select_tree_combo\", BI.SelectTreeCombo);/**\r\n * @class BI.SelectTreeExpander\r\n * @extends BI.Widget\r\n */\r\nBI.SelectTreeExpander = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-tree-expander\",\r\n trigger: \"\",\r\n toggle: true,\r\n direction: \"bottom\",\r\n isDefaultInit: true,\r\n el: {},\r\n popup: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreeExpander.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget(o.el);\r\n this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.expander.setValue([]);\r\n }\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.expander = BI.createWidget({\r\n type: \"bi.expander\",\r\n element: this,\r\n trigger: o.trigger,\r\n toggle: o.toggle,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n el: this.trigger,\r\n popup: o.popup\r\n });\r\n this.expander.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.trigger.setSelected(false);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.expander.getAllLeaves();\r\n },\r\n\r\n setValue: function (v) {\r\n if (BI.contains(v, this.trigger.getValue())) {\r\n this.trigger.setSelected(true);\r\n this.expander.setValue([]);\r\n } else {\r\n this.trigger.setSelected(false);\r\n this.expander.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (this.trigger.isSelected()) {\r\n return [this.trigger.getValue()];\r\n }\r\n return this.expander.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.expander.populate(items);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_expander\", BI.SelectTreeExpander);/**\r\n * @class BI.SelectTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SelectTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-level-tree\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this;\r\n BI.each(nodes, function (i, node) {\r\n var extend = {layer: layer};\r\n node.id = node.id || BI.UUID();\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.select_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.select_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.select_tree_first_plus_group_node\"\r\n }\r\n if (i === 0 && i === nodes.length - 1) { // 根\r\n extend.type = \"bi.select_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_tree_leaf_item\"\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.level_tree\",\r\n expander: {\r\n type: \"bi.select_tree_expander\",\r\n isDefaultInit: true\r\n },\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(o.items), 0),\r\n value: o.value,\r\n chooseType: BI.Selection.Single\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.LevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SelectTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.check();\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n BI.SelectTreePopup.superclass.populate.apply(this, arguments);\r\n this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(items)));\r\n }\r\n});\r\n\r\nBI.SelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.select_level_tree\", BI.SelectTreePopup);/**\r\n * 单选加载数据搜索loader面板\r\n * Created by guy on 15/11/4.\r\n * @class BI.SingleSelectSearchLoader\r\n * @extends Widget\r\n */\r\nBI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-loader\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.single_select_list\",\r\n allowNoSelect: opts.allowNoSelect,\r\n element: this,\r\n logic: {\r\n dynamic: false\r\n },\r\n value: opts.value,\r\n el: {\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: [self.storeValue]\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n var keyword = ob.keyword = opts.keywordGetter();\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && BI.isNotNull(self.storeValue)) {\r\n var json = self._filterValues(self.storeValue);\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n self.setValue(self.storeValue);\r\n }\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SingleSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: this.options.allowNoSelect ? \"bi.single_select_item\" : \"bi.single_select_combo_item\",\r\n cls: \"bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 25,\r\n selected: false\r\n });\r\n },\r\n\r\n _filterValues: function (src) {\r\n var o = this.options;\r\n var keyword = o.keywordGetter();\r\n var values = src || [];\r\n var newValues = BI.map(BI.isArray(values) ? values : [values], function (i, v) {\r\n return {\r\n text: o.valueFormatter(v) || v,\r\n value: v\r\n };\r\n });\r\n if (BI.isKey(keyword)) {\r\n var search = BI.Func.getSearchResult(newValues, keyword);\r\n values = search.match.concat(search.find);\r\n }\r\n return BI.map(values, function (i, v) {\r\n return {\r\n text: v.text,\r\n title: v.text,\r\n value: v.value,\r\n selected: false\r\n };\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了\r\n this.storeValue = v;\r\n this.button_group.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_search_loader\", BI.SingleSelectSearchLoader);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.SingleSelectSearchInsertPane\r\n * @extends Widget\r\n */\r\n\r\nBI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-pane bi-card\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.addNotMatchTip = BI.createWidget({\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n handler: function () {\r\n self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_search_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.vertical\",\r\n items: [this.tooltipClick, this.addNotMatchTip],\r\n height: this.constants.height\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isMatchTipVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n this.tooltipClick.setVisible(isMatchTipVisible);\r\n this.addNotMatchTip.setVisible(!isMatchTipVisible);\r\n !isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.single_select_search_insert_pane\", BI.SingleSelectSearchInsertPane);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.SingleSelectSearchPane\r\n * @extends Widget\r\n */\r\n\r\nBI.SingleSelectSearchPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-pane bi-card\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_search_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.tooltipClick,\r\n height: 0\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n this.tooltipClick.setVisible(false);\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n if (isVisible !== this.tooltipClick.isVisible()) {\r\n this.tooltipClick.setVisible(isVisible);\r\n this.resizer.attr(\"items\")[0].height = (isVisible ? this.constants.height : 0);\r\n this.resizer.resize();\r\n }\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.single_select_search_pane\", BI.SingleSelectSearchPane);/**\r\n *\r\n * @class BI.SingleSelectCombo\r\n * @extends BI.Single\r\n */\r\nBI.SingleSelectCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-combo\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n };\r\n this.storeValue = o.value;\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_select_trigger\",\r\n height: o.height,\r\n // adapter: this.popup,\r\n allowNoSelect: o.allowNoSelect,\r\n allowEdit: o.allowEdit,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(self.getValue());\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n text: o.text,\r\n value: this.storeValue\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {\r\n self._setStartValue();\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue();\r\n }\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue();\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n toggle: false,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.single_select_popup_view\",\r\n allowNoSelect: o.allowNoSelect,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.SingleSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM);\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n },\r\n value: o.value\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"single-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {},\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n o.itemsCreator({\r\n type: BI.SingleSelectCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n\r\n }\r\n\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n populate: function () {\r\n this._count = null;\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectCombo, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.SingleSelectCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.single_select_combo\", BI.SingleSelectCombo);\r\n/**\r\n *\r\n * @class BI.SingleSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.SingleSelectInsertCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-combo\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n };\r\n this.storeValue = o.value;\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_select_trigger\",\r\n height: o.height,\r\n allowNoSelect: o.allowNoSelect,\r\n allowEdit: o.allowEdit,\r\n // adapter: this.popup,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(self.getValue());\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n text: o.text,\r\n value: this.storeValue,\r\n searcher: {\r\n popup: {\r\n type: \"bi.single_select_search_insert_pane\",\r\n listeners: [{\r\n eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n if (!self.trigger.getSearcher().hasMatched()) {\r\n self.storeValue = self.trigger.getSearcher().getKeyword();\r\n assertShowValue();\r\n self._defaultState();\r\n }\r\n }\r\n }]\r\n }\r\n }\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {\r\n self._setStartValue();\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self.storeValue = keyword;\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue();\r\n }\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue();\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n toggle: false,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.single_select_popup_view\",\r\n allowNoSelect: o.allowNoSelect,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.SingleSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n },\r\n value: o.value\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"single-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectInsertCombo, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.SingleSelectInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.single_select_insert_combo\", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-radio-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectComboItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.radio = BI.createWidget({\r\n type: \"bi.radio\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.radio],\r\n width: 26\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);\r\n this.radio.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);\r\n this.radio.setSelected(v);\r\n\r\n }\r\n});\r\nBI.SingleSelectComboItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_combo_item\", BI.SingleSelectComboItem);/**\r\n * 选择列表\r\n *\r\n * Created by GUY on 2015/11/1.\r\n * @class BI.SingleSelectList\r\n * @extends BI.Widget\r\n */\r\nBI.SingleSelectList = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-list\",\r\n direction: BI.Direction.Top, // toolbar的位置\r\n logic: {\r\n dynamic: true\r\n },\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.list_pane\"\r\n },\r\n allowNoSelect: false\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.list = BI.createWidget(o.el, {\r\n type: \"bi.list_pane\",\r\n items: o.items,\r\n itemsCreator: function (op, callback) {\r\n op.times === 1 && self.toolbar && self.toolbar.setVisible(false);\r\n o.itemsCreator(op, function (items) {\r\n callback.apply(self, arguments);\r\n if (op.times === 1) {\r\n self.toolbar && self.toolbar.setVisible(items && items.length > 0);\r\n self.toolbar && self.toolbar.setEnable(items && items.length > 0);\r\n }\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n hasNext: o.hasNext,\r\n value: o.value\r\n });\r\n\r\n this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SingleSelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {\r\n type: \"bi.single_select_item\",\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n forceNotSelected: true,\r\n text: BI.i18nText(\"BI-Basic_No_Select\"),\r\n ref: function (_ref) {\r\n self.toolbar = _ref;\r\n },\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.list.setValue();\r\n self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n }, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)\r\n }))));\r\n\r\n },\r\n\r\n hasPrev: function () {\r\n return this.list.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.list.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.list.prependItems.apply(this.list, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.list.addItems.apply(this.list, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue([v]);\r\n },\r\n\r\n getValue: function () {\r\n return this.list.getValue()[0];\r\n },\r\n\r\n empty: function () {\r\n this.list.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.list.populate.apply(this.list, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.list.resetHeight ? this.list.resetHeight(h) :\r\n this.list.element.css({\"max-height\": h + \"px\"});\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.list.setNotSelectedValue.apply(this.list, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.list.getNotSelectedValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.list.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.list.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.list.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.list.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.list.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.list.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.list.getNodeByValue(value);\r\n }\r\n});\r\nBI.SingleSelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_list\", BI.SingleSelectList);/**\r\n * 单选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.SingleSelectLoader\r\n * @extends Widget\r\n */\r\nBI.SingleSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n allowNoSelect: false,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n this.storeValue = opts.value;\r\n this.button_group = BI.createWidget({\r\n type: \"bi.single_select_list\",\r\n allowNoSelect: opts.allowNoSelect,\r\n logic: opts.logic,\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n BI.isNotNull(self.storeValue) && (op = BI.extend(op || {}, {\r\n selectedValues: [self.storeValue]\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && BI.isNotNull(self.storeValue)) {\r\n var json = BI.map([self.storeValue], function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: true\r\n };\r\n });\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue = startValue);\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.button_group],\r\n vgap: 5\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SingleSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: this.options.allowNoSelect ? \"bi.single_select_item\" : \"bi.single_select_combo_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: false\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n _assertValue: function (val) {},\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_loader\", BI.SingleSelectLoader);\r\n/**\r\n * 带加载的单选下拉面板\r\n * @class BI.SingleSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.SingleSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-popup-view\",\r\n allowNoSelect: false,\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_loader\",\r\n allowNoSelect: opts.allowNoSelect,\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\n\r\nBI.shortcut(\"bi.single_select_popup_view\", BI.SingleSelectPopupView);/**\r\n *\r\n * 单选下拉框\r\n * @class BI.SingleSelectTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.SingleSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-trigger bi-border bi-border-radius\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.single_select_searcher\",\r\n allowNoSelect: o.allowNoSelect,\r\n text: o.text,\r\n height: o.height,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR, arguments);\r\n });\r\n\r\n var wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (v) {\r\n this.searcher.setValue(v);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.SingleSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.SingleSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.SingleSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SingleSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SingleSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.SingleSelectTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\n\r\nBI.shortcut(\"bi.single_select_trigger\", BI.SingleSelectTrigger);/**\r\n * @author: Teller\r\n * @createdAt: 2018/3/28\r\n * @Description\r\n*/\r\nBI.SingleSelectInsertList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectInsertList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.single_select_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n cls: \"popup-single-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: true\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: o.value\r\n });\r\n this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.single_select_search_pane\",\r\n allowNoSelect: o.allowNoSelect,\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keywords = [self.trigger.getKeyword()];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue();\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue();\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n self.storeValue = keyword;\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeyword();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue();\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 24,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function () {},\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n if (!this._allData) {\r\n o.itemsCreator({\r\n type: BI.SingleSelectInsertList.REQ_GET_ALL_DATA\r\n }, function (ob) {\r\n self._allData = BI.map(ob.items, \"value\");\r\n digest(self._allData);\r\n });\r\n } else {\r\n digest(this._allData);\r\n }\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Single ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this._count = null;\r\n this._allData = null;\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectInsertList, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectInsertList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_insert_list\", BI.SingleSelectInsertList);\r\n/**\r\n * 单选输入框\r\n * Created by guy on 15/11/3.\r\n * @class BI.SingleSelectEditor\r\n * @extends Widget\r\n */\r\nBI.SingleSelectEditor = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-editor\",\r\n el: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.state_editor\",\r\n element: this,\r\n height: o.height,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowBlank: true,\r\n value: o.value,\r\n defaultText: o.text,\r\n text: o.text,\r\n });\r\n\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.StateEditor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_BLUR);\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setState: function (state) {\r\n this.editor.setState(state);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.editor.getState();\r\n if (BI.isArray(v) && v.length > 0) {\r\n return v[v.length - 1];\r\n }\r\n return \"\";\r\n\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n populate: function (items) {\r\n\r\n }\r\n});\r\n\r\nBI.SingleSelectEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.single_select_editor\", BI.SingleSelectEditor);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.SingleSelectSearcher\r\n * @extends Widget\r\n */\r\nBI.SingleSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n allowNoSelect: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.single_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n listeners: [{\r\n eventName: BI.SingleSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.SingleSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.single_select_search_pane\",\r\n allowNoSelect: o.allowNoSelect,\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n\r\n if(BI.isNotNull(o.value)){\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n if (BI.isNull(v)) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n this.editor.setState(o.valueFormatter(v + \"\") || (v + \"\"));\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.SingleSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.SingleSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SingleSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.single_select_searcher\", BI.SingleSelectSearcher);\r\nBI.SignTextEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-sign-initial-editor\",\r\n validationChecker: BI.emptyFn,\r\n text: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SignTextEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: 4,\r\n vgap: 2,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n allowBlank: false\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"sign-editor-text\",\r\n title: function () {\r\n return self.getValue();\r\n },\r\n textAlign: o.textAlign,\r\n height: o.height,\r\n hgap: 4,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.selectAll();\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n BI.nextTick(BI.bind(function () {\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n var v = this.editor.getValue();\r\n v = (BI.isEmpty(v) || v == o.text) ? o.text : v + o.text;\r\n this.text.setValue(v);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n }, this));\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n this._showHint();\r\n v = (BI.isEmpty(v) || v == o.text) ? o.text : v + o.text;\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.SignTextEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SignTextEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SignTextEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.shortcut(\"bi.sign_text_editor\", BI.SignTextEditor);/**\r\n * Created by zcf on 2016/9/22.\r\n */\r\nBI.SliderIconButton = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-single-slider-button\"\r\n },\r\n\r\n constants: {\r\n LARGE_SIZE: 16,\r\n NORMAL_SIZE: 12,\r\n LARGE_OFFSET: 4,\r\n NORMAL_OFFSET: 6\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n ref: function () {\r\n self.wrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n cls: \"slider-button bi-high-light-border\",\r\n ref: function () {\r\n self.slider = this;\r\n }\r\n }\r\n }]\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.single_slider_button\", BI.SliderIconButton);/**\r\n * Created by zcf on 2016/9/22.\r\n */\r\nBI.SingleSlider = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 90,\r\n EDITOR_HEIGHT: 30,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-single-slider bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.value = \"\";\r\n\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n // 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }\r\n });\r\n this.label = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: o.unit,\r\n width: c.EDITOR_WIDTH - 2,\r\n allowBlank: false,\r\n textAlign: \"center\",\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.label.element.hover(function () {\r\n self.label.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.label.element.removeClass(\"bi-border\");\r\n });\r\n this.label.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var v = BI.parseFloat(this.getValue());\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n this.setValue(v);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n });\r\n this._setVisible(false);\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 23,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 20,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.horizontal_auto\",\r\n items: [this.label]\r\n }],\r\n height: c.EDITOR_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n };\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setLabelPosition(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v);\r\n self.value = v;\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n var o = this.options;\r\n var valid = false;\r\n if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {\r\n if(o.digit === false) {\r\n valid = true;\r\n }else{\r\n var dotText = (v + \"\").split(\".\")[1] || \"\";\r\n valid = (dotText.length === o.digit);\r\n }\r\n }\r\n return valid;\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setLabelPosition: function (percent) {\r\n // this.label.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setLabelPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n this.label.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseFloat(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n if ((!isNaN(v))) {\r\n if (this._checkValidation(v)) {\r\n this.value = v;\r\n }\r\n if (v > this.max) {\r\n this.value = this.max;\r\n }\r\n if (v < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSlider.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n\r\n },\r\n\r\n populate: function () {\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n this.label.setErrorText(BI.i18nText(\"BI-Basic_Please_Enter_Number_Between\", this.min, this.max));\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this.label.setValue(this.value);\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this.label.setValue(this.max);\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSlider.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_slider\", BI.SingleSlider);/**\r\n * Created by Urthur on 2017/9/12.\r\n */\r\nBI.SingleSliderLabel = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 90,\r\n EDITOR_HEIGHT: 20,\r\n HEIGHT: 20,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-slider-label bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSliderLabel.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.value = \"\";\r\n\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setText(v + o.unit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }\r\n });\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: c.HEIGHT,\r\n width: c.EDITOR_WIDTH - 2\r\n });\r\n\r\n this._setVisible(false);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 13,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 10,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.horizontal_auto\",\r\n items: [this.label]\r\n }],\r\n height: c.EDITOR_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setLabelPosition(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v + o.unit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max);\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setLabelPosition: function (percent) {\r\n // this.label.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setLabelPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n this.label.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseFloat(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n if ((!isNaN(v))) {\r\n if (this._checkValidation(v)) {\r\n this.value = v;\r\n }\r\n if (v > this.max) {\r\n this.value = this.max;\r\n }\r\n if (v < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n },\r\n\r\n populate: function () {\r\n var o = this.options;\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this.label.setValue(this.value + o.unit);\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this.label.setValue(this.max + o.unit);\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSliderLabel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_slider_label\", BI.SingleSliderLabel);/**\r\n * normal single slider\r\n * Created by Young on 2017/6/21.\r\n */\r\nBI.SingleSliderNormal = BI.inherit(BI.Single, {\r\n\r\n _constant: {\r\n HEIGHT: 28,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-single-slider-normal bi-slider-track\",\r\n minMax: {\r\n min: 0,\r\n max: 100\r\n }\r\n // color: \"#3f8ce8\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n var c = this._constant;\r\n var track = this._createTrack();\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 3,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n };\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderNormal.EVENT_DRAG, v);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrack: function () {\r\n var self = this;\r\n var c = this._constant;\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n if (this.options.color) {\r\n this.blueTrack.element.css({\"background-color\": this.options.color});\r\n }\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }],\r\n ref: function (ref) {\r\n self.track = ref;\r\n }\r\n };\r\n },\r\n\r\n _checkValidation: function (v) {\r\n return !(BI.isNull(v) || v < this.min || v > this.max);\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSliderNormal.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var value = BI.parseFloat(v);\r\n if ((!isNaN(value))) {\r\n if (this._checkValidation(value)) {\r\n this.value = value;\r\n }\r\n if (value > this.max) {\r\n this.value = this.max;\r\n }\r\n if (value < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n },\r\n\r\n populate: function () {\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSliderNormal.EVENT_DRAG = \"EVENT_DRAG\";\r\nBI.shortcut(\"bi.single_slider_normal\", BI.SingleSliderNormal);/**\r\n * @class BI.SingleTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.SingleTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-tree-combo\",\r\n trigger: {},\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreeCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget(BI.extend({\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }, o.trigger));\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.single_level_tree\",\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup\r\n }\r\n });\r\n\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW, arguments);\r\n });\r\n\r\n this.popup.on(BI.SingleTreePopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\n\r\nBI.SingleTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.single_tree_combo\", BI.SingleTreeCombo);/**\r\n * @class BI.SingleTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SingleTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-level-tree\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n \r\n this.tree = BI.createWidget({\r\n type: \"bi.level_tree\",\r\n expander: {\r\n isDefaultInit: true\r\n },\r\n items: o.items,\r\n value: o.value,\r\n chooseType: BI.Selection.Single\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.LevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.check();\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n BI.SingleTreePopup.superclass.populate.apply(this, arguments);\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.SingleTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_level_tree\", BI.SingleTreePopup);/**\r\n * @class BI.SingleTreeTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.SingleTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-tree-trigger\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreeTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n element: this,\r\n text: o.text,\r\n items: o.items,\r\n height: o.height,\r\n value: o.value\r\n });\r\n },\r\n\r\n _checkTitle: function () {\r\n var self = this, val = this.getValue();\r\n BI.any(this.options.items, function (i, item) {\r\n if (BI.contains(val, item.value)) {\r\n self.trigger.setTitle(item.text || item.value);\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.options.value = v;\r\n this.trigger.setValue(v);\r\n this._checkTitle();\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n BI.SingleTreeTrigger.superclass.populate.apply(this, arguments);\r\n this.trigger.populate(items);\r\n }\r\n\r\n});\r\n\r\nBI.shortcut(\"bi.single_tree_trigger\", BI.SingleTreeTrigger);/**\r\n * @class BI.TextValueDownListCombo\r\n * @extend BI.Widget\r\n */\r\nBI.TextValueDownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-down-list-combo\",\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueDownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this._createValueMap();\r\n\r\n var value;\r\n if(BI.isNotNull(o.value)) {\r\n value = this._digest(o.value);\r\n }\r\n this.trigger = BI.createWidget({\r\n type: \"bi.down_list_select_text_trigger\",\r\n cls: \"text-value-down-list-trigger\",\r\n height: o.height,\r\n items: o.items,\r\n text: o.text,\r\n value: value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.down_list_combo\",\r\n element: this,\r\n chooseType: BI.Selection.Single,\r\n adjustLength: 2,\r\n height: o.height,\r\n el: this.trigger,\r\n value: BI.isNull(value) ? [] : [value],\r\n items: BI.deepClone(o.items)\r\n });\r\n\r\n this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () {\r\n var currentVal = self.combo.getValue()[0].value;\r\n if (currentVal !== self.value) {\r\n self.setValue(currentVal);\r\n self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () {\r\n var currentVal = self.combo.getValue()[0].childValue;\r\n if (currentVal !== self.value) {\r\n self.setValue(currentVal);\r\n self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);\r\n }\r\n });\r\n },\r\n\r\n _createValueMap: function () {\r\n var self = this;\r\n this.valueMap = {};\r\n BI.each(BI.flatten(this.options.items), function (idx, item) {\r\n if (BI.has(item, \"el\")) {\r\n BI.each(item.children, function (id, it) {\r\n self.valueMap[it.value] = {value: item.el.value, childValue: it.value};\r\n });\r\n } else {\r\n self.valueMap[item.value] = {value: item.value};\r\n }\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n this.value = v;\r\n return this.valueMap[v];\r\n },\r\n\r\n setValue: function (v) {\r\n v = this._digest(v);\r\n this.combo.setValue([v]);\r\n this.trigger.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.combo.getValue()[0];\r\n return [v.childValue || v.value];\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = BI.flatten(items);\r\n this.combo.populate(items);\r\n this._createValueMap();\r\n }\r\n});\r\nBI.TextValueDownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_down_list_combo\", BI.TextValueDownListCombo);/**\r\n * 选择字段trigger, downlist专用\r\n * 显示形式为 父亲值(儿子值)\r\n *\r\n * @class BI.DownListSelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-select-text-trigger\",\r\n height: 24,\r\n text: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n element: this,\r\n height: o.height,\r\n items: this._formatItemArray(o.items),\r\n text: o.text,\r\n value: BI.isNull(o.value) ? \"\" : o.value.childValue || o.value.value\r\n });\r\n },\r\n\r\n _formatItemArray: function () {\r\n var sourceArray = BI.flatten(BI.deepClone(this.options.items));\r\n var targetArray = [];\r\n BI.each(sourceArray, function (idx, item) {\r\n if(BI.has(item, \"el\")) {\r\n BI.each(item.children, function (id, it) {\r\n it.text = item.el.text + \"(\" + it.text + \")\";\r\n });\r\n targetArray = BI.concat(targetArray, item.children);\r\n }else{\r\n targetArray.push(item);\r\n }\r\n });\r\n return targetArray;\r\n },\r\n\r\n setValue: function (vals) {\r\n this.trigger.setValue(vals.childValue || vals.value);\r\n },\r\n\r\n populate: function (items) {\r\n this.trigger.populate(this._formatItemArray(items));\r\n }\r\n});\r\nBI.shortcut(\"bi.down_list_select_text_trigger\", BI.DownListSelectTextTrigger);!(function () {\r\n BI.TimePopup = BI.inherit(BI.Widget, {\r\n props: {\r\n baseCls: \"bi-date-time-popup\",\r\n height: 68\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-split-top\",\r\n items: [{\r\n type: \"bi.dynamic_date_time_select\",\r\n value: o.value,\r\n ref: function (_ref) {\r\n self.timeSelect = _ref;\r\n }\r\n }]\r\n },\r\n hgap: 10,\r\n height: 44\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clears\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Now\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (value) {\r\n if (this._checkValueValid(value)) {\r\n this.timeSelect.setValue();\r\n } else {\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.timeSelect.getValue();\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n }\r\n });\r\n BI.TimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\n BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\n BI.TimePopup.BUTTON_NOW_EVENT_CHANGE = \"BUTTON_NOW_EVENT_CHANGE\";\r\n BI.TimePopup.CALENDAR_EVENT_CHANGE = \"CALENDAR_EVENT_CHANGE\";\r\n BI.shortcut(\"bi.time_popup\", BI.TimePopup);\r\n})();/**\r\n * 时间选择\r\n * qcc\r\n * 2019/2/28\r\n */\r\n\r\n!(function () {\r\n BI.TimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 80,\r\n popupWidth: 240,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n props: {\r\n baseCls: \"bi-time-combo bi-border bi-border-radius bi-focus-shadow\",\r\n width: 78,\r\n height: 22,\r\n format: \"\",\r\n allowEdit: false\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n this.storeValue = opts.value;\r\n\r\n var popup = {\r\n type: \"bi.time_popup\",\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.hidePopupView();\r\n self.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.TimePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.hidePopupView();\r\n self.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,\r\n action: function () {\r\n self._setNowTime();\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n };\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: {\r\n type: \"bi.time_trigger\",\r\n height: opts.height,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n format: opts.format,\r\n value: opts.value,\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_KEY_DOWN\",\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_STOP\",\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: \"EVENT_FOCUS\",\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(\"EVENT_FOCUS\");\r\n }\r\n }, {\r\n eventName: \"EVENT_BLUR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_BLUR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_ERROR\",\r\n action: function () {\r\n var date = BI.getDate();\r\n self.storeValue = {\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n self.fireEvent(\"EVENT_ERROR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_VALID\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_VALID\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CONFIRM\",\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self.fireEvent(\"EVENT_CONFIRM\");\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: popup,\r\n width: this.constants.popupWidth,\r\n stopPropagation: false\r\n },\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n }\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 22,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button time-font icon-size-16\",\r\n width: 22,\r\n height: 22,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n _setNowTime: function () {\r\n var date = BI.getDate();\r\n var nowTome = {\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n this.setValue(nowTome);\r\n this.hidePopupView();\r\n this.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n BI.TimeCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\n BI.TimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n BI.TimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.TimeCombo.EVENT_VALID = \"EVENT_VALID\";\r\n BI.TimeCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\n BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n BI.shortcut(\"bi.time_combo\", BI.TimeCombo);\r\n})();!(function () {\r\n BI.TimeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _const: {\r\n COMPARE_FORMAT: \"%H:%M:%S\",\r\n COMPLETE_COMPARE_FORMAT: \"%Y-%M-%d %H:%M:%S %P\",\r\n FORMAT_ARRAY: [\r\n \"%H:%M:%S\", // HH:mm:ss\r\n \"%I:%M:%S\", // hh:mm:ss\r\n \"%l:%M:%S\", // h:mm:ss\r\n \"%k:%M:%S\", // H:mm:ss\r\n \"%l:%M:%S %p\", // h:mm:ss a\r\n \"%l:%M:%S %P\", // h:mm:ss a\r\n \"%H:%M:%S %p\", // HH:mm:ss a\r\n \"%H:%M:%S %P\", // HH:mm:ss a\r\n \"%l:%M\", // h:mm\r\n \"%k:%M\", // H:mm\r\n \"%I:%M\", // hh:mm\r\n \"%H:%M\", // HH:mm\r\n \"%M:%S\" // mm:ss\r\n ],\r\n DEFAULT_DATE_STRING: \"2000-01-01\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-time-trigger\",\r\n value: {},\r\n format: \"\",\r\n allowEdit: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.storeTriggerValue = \"\";\r\n this.storeValue = o.value;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n return self._dateCheck(v);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n ref: function (_ref) {\r\n self.editor = _ref;\r\n },\r\n value: this._formatValue(o.value),\r\n hgap: 4,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n title: BI.bind(this._getTitle, this),\r\n listeners: [{\r\n eventName: \"EVENT_KEY_DOWN\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_KEY_DOWN\", arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_FOCUS\",\r\n action: function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(\"EVENT_FOCUS\");\r\n }\r\n }, {\r\n eventName: \"EVENT_BLUR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_BLUR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_STOP\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_STOP\");\r\n }\r\n }, {\r\n eventName: \"EVENT_VALID\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_VALID\");\r\n }\r\n }, {\r\n eventName: \"EVENT_ERROR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_ERROR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CONFIRM\",\r\n action: function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var date = value.match(/\\d+/g);\r\n self.storeValue = {\r\n hour: date[0] | 0,\r\n minute: date[1] | 0,\r\n second: date[2] | 0\r\n };\r\n }\r\n self.fireEvent(\"EVENT_CONFIRM\");\r\n }\r\n }, {\r\n eventName: \"EVENT_START\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_START\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.text\",\r\n invisible: o.allowEdit,\r\n cls: \"show-text\",\r\n title: BI.bind(this._getTitle, this),\r\n hgap: 4\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _dateCheck: function (date) {\r\n var c = this._const;\r\n return BI.any(c.FORMAT_ARRAY, function (idx, format) {\r\n return BI.print(BI.parseDateTime(c.DEFAULT_DATE_STRING + \" \" + date, c.COMPLETE_COMPARE_FORMAT), format) === date;\r\n });\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var date = BI.getDate();\r\n return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.COMPARE_FORMAT;\r\n },\r\n\r\n _formatValue: function (v) {\r\n var now = BI.getDate();\r\n return BI.isNotEmptyObject(v) ? BI.print(BI.getDate(now.getFullYear(), now.getMonth(), now.getDay(), v.hour, v.minute, v.second), this._getFormatString()) : \"\";\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.editor.setValue(this._formatValue(v));\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n });\r\n BI.shortcut(\"bi.time_trigger\", BI.TimeTrigger);\r\n})();/**\r\n * Created by Baron on 2015/10/19.\r\n */\r\nBI.DateInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0,\r\n timeErrorCls: \"time-error\"\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.DateInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-date-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.DateInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_date_combo\",\r\n behaviors: o.behaviors,\r\n value: v\r\n });\r\n combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_VALID, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_FOCUS, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n // combo.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n // self.left.hidePopupView();\r\n // self.right.hidePopupView();\r\n // });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0];\r\n },\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1],\r\n day: smallObj[2]\r\n }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1],\r\n day: bigObj[2]\r\n });\r\n },\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.left.setTitle(v);\r\n this.right.setTitle(v);\r\n this.label.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.left.setTitle(\"\");\r\n this.right.setTitle(\"\");\r\n this.label.setTitle(\"\");\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.DateInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DateInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DateInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_interval\", BI.DateInterval);/**\r\n * Created by Baron on 2015/10/19.\r\n */\r\nBI.TimeInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0,\r\n timeErrorCls: \"time-error\"\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.TimeInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-time-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.TimeInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_date_time_combo\",\r\n behaviors: o.behaviors,\r\n value: v\r\n });\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_VALID, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_FOCUS, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n // 不知道干啥的,先注释掉\r\n // combo.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n // self.left.hidePopupView();\r\n // self.right.hidePopupView();\r\n // });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d %H:%M:%S\"), \"%Y-%x-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e %H:%M:%S\"), \"%Y-%x-%e %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e %H:%M:%S\"), \"%Y-%X-%e %H:%M:%S\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0];\r\n },\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1],\r\n day: smallObj[2]\r\n }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1],\r\n day: bigObj[2]\r\n });\r\n },\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.left.setTitle(v);\r\n this.right.setTitle(v);\r\n this.label.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.left.setTitle(\"\");\r\n this.right.setTitle(\"\");\r\n this.label.setTitle(\"\");\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.TimeInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.TimeInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.TimeInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.time_interval\", BI.TimeInterval);/**\r\n * 时间区间\r\n * qcc\r\n * 2019/2/28\r\n */\r\n\r\n!(function () {\r\n BI.TimePeriods = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0\r\n },\r\n props: {\r\n extraCls: \"bi-time-interval\",\r\n value: {}\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n height: this.constants.height,\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal_auto\",\r\n items: [{\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\",\r\n ref: function (_ref) {\r\n self.label = _ref;\r\n }\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n self.left = _ref;\r\n }\r\n }, this._createCombo(o.value.start)),\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n self.right = _ref;\r\n }\r\n }, this._createCombo(o.value.end)),\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this;\r\n return {\r\n type: \"bi.time_combo\",\r\n value: v,\r\n listeners: [{\r\n eventName: BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.left.hidePopupView();\r\n self.right.hidePopupView();\r\n }\r\n }, {\r\n eventName: BI.TimeCombo.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePeriods.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.TimeCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TimePeriods.EVENT_CONFIRM);\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n });\r\n BI.TimePeriods.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n BI.TimePeriods.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.shortcut(\"bi.time_periods\", BI.TimePeriods);\r\n})();/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.item = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0};\r\n this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n },\r\n\r\n getValue: function () {\r\n var value = this.item.getValue();\r\n return {\r\n year: (value.offset === 0 ? -value.value : value.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_card\", BI.DynamicYearCard);/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.StaticYearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.StaticYearCard = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-card\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _createYearCalendar: function (v) {\r\n var o = this.options, y = this._year;\r\n\r\n var calendar = BI.createWidget({\r\n type: \"bi.year_calendar\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max,\r\n logic: {\r\n dynamic: true\r\n },\r\n year: y + v * 12\r\n });\r\n calendar.setValue(this._year);\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.StaticYearCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.selectedYear = this._year = BI.getDate().getFullYear();\r\n\r\n this.backBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 25,\r\n height: 25,\r\n value: -1,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n self.navigation.setSelect(self.navigation.getSelect() - 1);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n }\r\n }]\r\n });\r\n\r\n this.preBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 25,\r\n height: 25,\r\n value: 1,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n self.navigation.setSelect(self.navigation.getSelect() + 1);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n }\r\n }]\r\n });\r\n\r\n this.navigation = BI.createWidget({\r\n type: \"bi.navigation\",\r\n direction: \"top\",\r\n element: this,\r\n single: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n tab: {\r\n type: \"bi.htape\",\r\n cls: \"bi-split-top bi-split-bottom\",\r\n height: 30,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [self.backBtn]\r\n },\r\n width: 25\r\n }, {\r\n type: \"bi.layout\"\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [self.preBtn]\r\n },\r\n width: 25\r\n }]\r\n },\r\n cardCreator: BI.bind(this._createYearCalendar, this),\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedYear);\r\n var calendar = this.getSelectedCard();\r\n self.backBtn.setEnable(!calendar.isFrontYear());\r\n self.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n });\r\n\r\n this.navigation.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedYear = this.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.StaticYearCard.EVENT_CHANGE, self.selectedYear);\r\n });\r\n\r\n if(BI.isKey(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = true;\r\n this.backBtn.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = true;\r\n this.preBtn.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n obj = obj || {};\r\n var v = obj.year;\r\n if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {\r\n v = BI.getDate().getFullYear();\r\n this.selectedYear = \"\";\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(\"\");\r\n } else {\r\n this.selectedYear = BI.parseInt(v);\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(this.selectedYear);\r\n }\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n }\r\n});\r\nBI.StaticYearCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_card\", BI.StaticYearCard);BI.DynamicYearCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_trigger\",\r\n min: o.min,\r\n max: o.max,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = this.getKey();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM, function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n if (this.getKey() && this.getKey() !== self.storeTriggerValue) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.storeValue);\r\n } else if (!this.getKey()) {\r\n self.storeValue = null;\r\n self.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearCombo.Static, value: {year: date.getFullYear()}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\nBI.DynamicYearCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_combo\", BI.DynamicYearCombo);\r\n\r\nBI.extend(BI.DynamicYearCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.DynamicYearPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n textHeight: c.buttonHeight - 1,\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Year\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Year\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Fen\"),\r\n value: BI.DynamicYearCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.StaticYearCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear()});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Year\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_popup\", BI.DynamicYearPopup);BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-year-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24\r\n });\r\n },\r\n\r\n beforeInit: function (callback) {\r\n var o = this.options;\r\n o.title = BI.bind(this._titleCreator, this);\r\n callback();\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function (v) {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n allowBlank: true,\r\n errorText: function () {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setValue(value);\r\n }\r\n if (BI.isNotEmptyString(value)) {\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: value\r\n }\r\n };\r\n }\r\n\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (self.editor.isValid()) {\r\n self.editor.blur();\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: {\r\n type: \"bi.text_button\",\r\n baseCls: \"bi-trigger-year-text\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n var dateStr = BI.print(date, \"%Y\");\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _titleCreator: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n if(!this.editor.isValid()) {\r\n return \"\";\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, \"%Y\");\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n return value.year;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n this.editor.setState(value.year);\r\n this.editor.setValue(value.year);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue() | 0;\r\n }\r\n});\r\nBI.DynamicYearTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicYearTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.shortcut(\"bi.dynamic_year_trigger\", BI.DynamicYearTrigger);/**\r\n * 年月展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearMonthCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.year = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: BI.DynamicDateCard.TYPE.MONTH,\r\n ref: function () {\r\n self.month = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0, month: 0};\r\n this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));\r\n },\r\n\r\n getValue: function () {\r\n var year = this.year.getValue();\r\n var month = this.month.getValue();\r\n return {\r\n year: (year.offset === 0 ? -year.value : year.value),\r\n month: (month.offset === 0 ? -month.value : month.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearMonthCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_month_card\", BI.DynamicYearMonthCard);BI.StaticYearMonthCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-static-year-month-card\",\r\n behaviors: {}\r\n },\r\n\r\n _createMonths: function () {\r\n var self = this;\r\n // 纵向排列月\r\n var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12];\r\n var items = [];\r\n items.push(month.slice(0, 2));\r\n items.push(month.slice(2, 4));\r\n items.push(month.slice(4, 6));\r\n items.push(month.slice(6, 8));\r\n items.push(month.slice(8, 10));\r\n items.push(month.slice(10, 12));\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 23,\r\n width: 38,\r\n value: td,\r\n text: td,\r\n ref: function (_ref) {\r\n self.monthMap[j === 0 ? i : i + 6] = _ref;\r\n }\r\n };\r\n });\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.monthMap = {};\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.year_picker\",\r\n min: o.min,\r\n max: o.max,\r\n ref: function () {\r\n self.yearPicker = this;\r\n },\r\n behaviors: o.behaviors,\r\n height: 30,\r\n listeners: [{\r\n eventName: BI.YearPicker.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkMonthStatus(value);\r\n self.setValue({\r\n year: value,\r\n month: self.selectedMonth\r\n });\r\n }\r\n }]\r\n }, {\r\n type: \"bi.button_group\",\r\n cls: \"bi-split-top\",\r\n behaviors: o.behaviors,\r\n ref: function () {\r\n self.month = this;\r\n },\r\n items: this._createMonths(),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({\r\n dynamic: true\r\n }, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 25\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1,\r\n hgap: 2\r\n }],\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n self.selectedYear = self.yearPicker.getValue();\r\n self.selectedMonth = this.getValue()[0];\r\n self.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n mounted: function() {\r\n this._checkMonthStatus(this.selectedYear);\r\n },\r\n\r\n _checkMonthStatus: function (year) {\r\n var o = this.options;\r\n var minDate = BI.parseDateTime(o.min, \"%Y-%X-%d\"), maxDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n var minYear = minDate.getFullYear(), maxYear = maxDate.getFullYear();\r\n var minMonth = 0; var maxMonth = 11;\r\n minYear === year && (minMonth = minDate.getMonth());\r\n maxYear === year && (maxMonth = maxDate.getMonth());\r\n var yearInvalid = year < minYear || year > maxYear;\r\n BI.each(this.monthMap, function (month, obj) {\r\n var monthInvalid = month < minMonth || month > maxMonth;\r\n obj.setEnable(!yearInvalid && !monthInvalid);\r\n });\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.yearPicker.setMinDate(minDate);\r\n this._checkMonthStatus(this.selectedYear);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.yearPicker.setMaxDate(maxDate);\r\n this._checkMonthStatus(this.selectedYear);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear,\r\n month: this.selectedMonth\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n var newObj = {};\r\n newObj.year = obj.year || 0;\r\n newObj.month = obj.month || 0;\r\n if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {\r\n var year = newObj.year || BI.getDate().getFullYear();\r\n this.selectedYear = year;\r\n this.selectedMonth = \"\";\r\n this.yearPicker.setValue(year);\r\n this.month.setValue();\r\n } else {\r\n this.selectedYear = BI.parseInt(newObj.year);\r\n this.selectedMonth = BI.parseInt(newObj.month);\r\n this.yearPicker.setValue(this.selectedYear);\r\n this.month.setValue(this.selectedMonth);\r\n }\r\n }\r\n});\r\nBI.StaticYearMonthCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_month_card\", BI.StaticYearMonthCard);\r\nBI.DynamicYearMonthCombo = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n minDate: \"1900-01-01\", // 最小日期\r\n maxDate: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n this.storeTriggerValue = \"\";\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_month_trigger\",\r\n min: o.minDate,\r\n max: o.maxDate,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {\r\n // 没看出来干啥的,先去掉\r\n // if (self.combo.isViewVisible()) {\r\n // return;\r\n // }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS);\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 100,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_month_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearMonthPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), month: date.getMonth() + 1}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.minDate,\r\n max: o.maxDate\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearMonthCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n\r\n isValid: function () {\r\n return this.trigger.isValid();\r\n }\r\n\r\n});\r\nBI.DynamicYearMonthCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearMonthCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicYearMonthCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearMonthCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_month_combo\", BI.DynamicYearMonthCombo);\r\n\r\nBI.extend(BI.DynamicYearMonthCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * 年月\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.DynamicYearMonthPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-month-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearMonthCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Month\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Month\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%x\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Month\"),\r\n value: BI.DynamicYearCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_month_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_month_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.StaticYearMonthCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear(), month: date.getMonth() + 1});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.year.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.year.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Month\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_month_popup\", BI.DynamicYearMonthPopup);BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-month-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n beforeInit: function (callback) {\r\n var o = this.options;\r\n o.title = BI.bind(this._titleCreator, this);\r\n callback();\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n this.yearEditor = this._createEditor(true);\r\n this.monthEditor = this._createEditor(false);\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.center\",\r\n items: [{\r\n type: \"bi.htape\",\r\n items: [this.yearEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n }, {\r\n type: \"bi.htape\",\r\n items: [this.monthEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Month\"),\r\n width: o.height\r\n },\r\n width: o.height}]\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _createEditor: function (isYear) {\r\n var self = this, o = this.options, c = this._const;\r\n var minDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n if(isYear) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, v === minDate.getFullYear() ? minDate.getMonth() + 1 : 1, 1, o.min, o.max)[0]);\r\n }\r\n return v === \"\" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 12) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function (v) {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true\r\n });\r\n editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN);\r\n });\r\n editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS);\r\n });\r\n editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n self._doEditorConfirm(editor);\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);\r\n });\r\n editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (editor.isValid()) {\r\n editor.blur();\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START);\r\n });\r\n editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR);\r\n });\r\n editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n var year = self.yearEditor.getValue();\r\n var month = self.monthEditor.getValue();\r\n if(BI.isNotEmptyString(year) && BI.isNotEmptyString(month)) {\r\n if(BI.isPositiveInteger(year) && month >= 1 && month <= 12 && !BI.checkDateVoid(year, month, 1, o.min, o.max)[0]) {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID);\r\n }\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n if(isYear) {\r\n self._autoSwitch(editor);\r\n }\r\n });\r\n\r\n return editor;\r\n },\r\n\r\n _titleCreator: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {\r\n return \"\";\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, \"%Y-%x\");\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n return this._getStaticTitle(value);\r\n }\r\n },\r\n\r\n _doEditorConfirm: function (editor) {\r\n var value = editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n editor.setValue(value);\r\n }\r\n var monthValue = this.monthEditor.getValue();\r\n this.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: this.yearEditor.getValue(),\r\n month: BI.isEmptyString(this.monthEditor.getValue()) ? \"\" : monthValue\r\n }\r\n };\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _autoSwitch: function (editor) {\r\n var v = editor.getValue();\r\n if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {\r\n if (v.length === 4 && this._yearCheck(v)) {\r\n this._doEditorConfirm(editor);\r\n this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);\r\n this.monthEditor.focus();\r\n }\r\n }\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n if(BI.isNotNull(obj.month) && BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n this.yearEditor.setValue(date.getFullYear());\r\n this.monthEditor.setValue(date.getMonth() + 1);\r\n },\r\n\r\n _getStaticTitle: function (value) {\r\n value = value || {};\r\n var hasYear = !(BI.isNull(value.year) || BI.isEmptyString(value.year));\r\n var hasMonth = !(BI.isNull(value.month) || BI.isEmptyString(value.month));\r\n switch ((hasYear << 1) | hasMonth) {\r\n // !hasYear && !hasMonth\r\n case 0:\r\n return \"\";\r\n // !hasYear && hasMonth\r\n case 1:\r\n return value.month;\r\n // hasYear && !hasMonth\r\n case 2:\r\n return value.year;\r\n // hasYear && hasMonth\r\n case 3:\r\n default:\r\n return value.year + \"-\" + value.month;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n var month = BI.isNull(value.month) ? null : value.month;\r\n this.yearEditor.setValue(value.year);\r\n this.monthEditor.setValue(month);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.yearEditor.getValue() + \"-\" + this.monthEditor.getValue();\r\n },\r\n\r\n isValid: function () {\r\n return this.yearEditor.isValid() && this.monthEditor.isValid();\r\n }\r\n});\r\nBI.DynamicYearMonthTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicYearMonthTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearMonthTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearMonthTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearMonthTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearMonthTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicYearMonthTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_year_month_trigger\", BI.DynamicYearMonthTrigger);BI.YearMonthInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 25,\r\n lgap: 15,\r\n offset: -15,\r\n timeErrorCls: \"time-error\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-month-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.YearMonthInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n hgap: 15,\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: 0,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_year_month_combo\",\r\n behaviors: o.behaviors,\r\n value: v,\r\n listeners: [{\r\n eventName: BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_VALID, function () {\r\n self._checkValid();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_FOCUS, function () {\r\n self._checkValid();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.left.hideView();\r\n self.right.hideView();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x\"), \"%Y-%x\") === date || BI.print(BI.parseDateTime(date, \"%Y-%X\"), \"%Y-%X\") === date;\r\n },\r\n\r\n\r\n // 判是否在最大最小之间\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, 1, o.minDate, o.maxDate)[0];\r\n },\r\n\r\n // 判格式合法\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n\r\n var smallDate4Check = \"\";\r\n if (BI.isNotNull(smallObj)) {\r\n smallDate4Check = (smallObj[0] || \"\") + \"-\" + (smallObj[1] || 1);\r\n }\r\n\r\n var bigDate4Check = \"\";\r\n if (BI.isNotNull(bigObj)) {\r\n bigDate4Check = (bigObj[0] || \"\") + \"-\" + (bigObj[1] || 1);\r\n }\r\n\r\n return this._dateCheck(smallDate4Check) && BI.checkDateLegal(smallDate) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1],\r\n day: 1\r\n }) && this._dateCheck(bigDate4Check) && BI.checkDateLegal(bigDate) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1],\r\n day: 1\r\n });\r\n },\r\n\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X\"), \"%Y-%X\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X\"), \"%Y-%X\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.setTitle(\"\");\r\n },\r\n _checkValid: function () {\r\n var self = this;\r\n\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n\r\n this._checkValid();\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.YearMonthInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.YearMonthInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.YearMonthInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.year_month_interval\", BI.YearMonthInterval);\r\n/**\r\n * 年季度展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.year = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: BI.DynamicDateCard.TYPE.QUARTER,\r\n ref: function () {\r\n self.quarter = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0, month: 0};\r\n this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));\r\n },\r\n\r\n getValue: function () {\r\n var year = this.year.getValue();\r\n var quarter = this.quarter.getValue();\r\n return {\r\n year: (year.offset === 0 ? -year.value : year.value),\r\n quarter: (quarter.offset === 0 ? -quarter.value : quarter.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearQuarterCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_card\", BI.DynamicYearQuarterCard);BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-static-year-quarter-card\",\r\n behaviors: {}\r\n },\r\n\r\n _createQuarter: function () {\r\n\r\n var items = [{\r\n text: BI.Date._QN[1],\r\n value: 1\r\n }, {\r\n text: BI.Date._QN[2],\r\n value: 2\r\n }, {\r\n text: BI.Date._QN[3],\r\n value: 3\r\n }, {\r\n text: BI.Date._QN[4],\r\n value: 4\r\n }];\r\n return BI.map(items, function (j, item) {\r\n return BI.extend(item, {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24\r\n });\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.year_picker\",\r\n ref: function () {\r\n self.yearPicker = this;\r\n },\r\n behaviors: o.behaviors,\r\n height: 30,\r\n listeners: [{\r\n eventName: BI.YearPicker.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue();\r\n self.setValue({\r\n year: value,\r\n quarter: self.selectedQuarter\r\n });\r\n }\r\n }]\r\n }, {\r\n type: \"bi.button_group\",\r\n behaviors: o.behaviors,\r\n ref: function () {\r\n self.quarter = this;\r\n },\r\n items: this._createQuarter(),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n vgap: 10\r\n }],\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n self.selectedYear = self.yearPicker.getValue();\r\n self.selectedQuarter = this.getValue()[0];\r\n self.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear,\r\n quarter: this.selectedQuarter\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n var newObj = {};\r\n newObj.year = obj.year || 0;\r\n newObj.quarter = obj.quarter || 0;\r\n if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {\r\n var year = newObj.year || BI.getDate().getFullYear();\r\n this.selectedYear = year;\r\n this.selectedQuarter = \"\";\r\n this.yearPicker.setValue(year);\r\n this.quarter.setValue();\r\n } else {\r\n this.selectedYear = BI.parseInt(newObj.year);\r\n this.selectedQuarter = BI.parseInt(newObj.quarter);\r\n this.yearPicker.setValue(this.selectedYear);\r\n this.quarter.setValue(this.selectedQuarter);\r\n }\r\n }\r\n});\r\nBI.StaticYearQuarterCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_quarter_card\", BI.StaticYearQuarterCard);\r\nBI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-quarter-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n self.storeTriggerValue = \"\";\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_quarter_trigger\",\r\n min: o.min,\r\n max: o.max,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {\r\n // 没看出来干啥的,先去掉\r\n // if (self.combo.isViewVisible()) {\r\n // return;\r\n // }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_quarter_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), quarter: BI.getQuarter(date)}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\nBI.DynamicYearQuarterCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_combo\", BI.DynamicYearQuarterCombo);\r\n\r\nBI.extend(BI.DynamicYearQuarterCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-quarter-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearQuarterCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Quarter\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicYearQuarterCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Quarter\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%Q\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Quarter\"),\r\n value: BI.DynamicYearQuarterCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearQuarterCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_quarter_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearQuarterCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_quarter_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.DynamicYearCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearQuarterCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear(), quarter: BI.getQuarter(date)});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearQuarterCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Quarter\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_popup\", BI.DynamicYearQuarterPopup);BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-quarter-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearQuarterTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n this.yearEditor = this._createEditor(true);\r\n this.quarterEditor = this._createEditor(false);\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.center\",\r\n items: [{\r\n type: \"bi.htape\",\r\n items: [this.yearEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n }, {\r\n type: \"bi.htape\",\r\n items: [this.quarterEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Quarter\"),\r\n width: 24\r\n },\r\n width: 24}]\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _createEditor: function (isYear) {\r\n var self = this, o = this.options, c = this._const;\r\n var editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n if(isYear) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]);\r\n }\r\n return v === \"\" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 4) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n errorText: function (v) {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n },\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n title: \"\",\r\n allowBlank: true\r\n });\r\n editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN);\r\n });\r\n editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS);\r\n });\r\n editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n self._doEditorConfirm(editor);\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);\r\n });\r\n editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (editor.isValid()) {\r\n editor.blur();\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START);\r\n });\r\n editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n if(isYear) {\r\n self._autoSwitch(editor);\r\n }\r\n });\r\n\r\n return editor;\r\n },\r\n\r\n _doEditorConfirm: function (editor) {\r\n var value = editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n editor.setValue(value);\r\n }\r\n var quarterValue = this.quarterEditor.getValue();\r\n this.storeValue = {\r\n type: BI.DynamicYearQuarterCombo.Static,\r\n value: {\r\n year: this.yearEditor.getValue(),\r\n quarter: BI.isEmptyString(this.quarterEditor.getValue()) ? \"\" : quarterValue\r\n }\r\n };\r\n this.setTitle(this._getStaticTitle(this.storeValue.value));\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _autoSwitch: function (editor) {\r\n var v = editor.getValue();\r\n if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {\r\n if (v.length === 4 && this._yearCheck(v)) {\r\n this._doEditorConfirm(editor);\r\n this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);\r\n this.quarterEditor.focus();\r\n }\r\n }\r\n },\r\n\r\n _getStaticTitle: function (value) {\r\n value = value || {};\r\n var hasYear = !(BI.isNull(value.year) || BI.isEmptyString(value.year));\r\n var hasMonth = !(BI.isNull(value.quarter) || BI.isEmptyString(value.quarter));\r\n switch ((hasYear << 1) | hasMonth) {\r\n // !hasYear && !hasMonth\r\n case 0:\r\n return \"\";\r\n // !hasYear && hasMonth\r\n case 1:\r\n return value.quarter;\r\n // hasYear && !hasMonth\r\n case 2:\r\n return value.year;\r\n // hasYear && hasMonth\r\n case 3:\r\n default:\r\n return value.year + \"-\" + value.quarter;\r\n }\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n if(BI.isNotNull(obj.quarter) && BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n var dateStr = BI.print(date, \"%Y-%Q\");\r\n this.yearEditor.setValue(date.getFullYear());\r\n this.quarterEditor.setValue(BI.getQuarter(date));\r\n this.setTitle(BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr));\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicYearQuarterCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicYearQuarterCombo.Static:\r\n default:\r\n value = value || {};\r\n var quarter = BI.isNull(value.quarter) ? null : value.quarter;\r\n this.yearEditor.setValue(value.year);\r\n this.yearEditor.setTitle(value.year);\r\n this.quarterEditor.setValue(quarter);\r\n this.quarterEditor.setTitle(quarter);\r\n this.setTitle(this._getStaticTitle(value));\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.yearEditor.getValue() + \"-\" + this.quarterEditor.getValue();\r\n }\r\n});\r\nBI.DynamicYearQuarterTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearQuarterTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearQuarterTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearQuarterTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearQuarterTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_trigger\", BI.DynamicYearQuarterTrigger);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AbstractAllValueChooser\r\n * @extends BI.Widget\r\n */\r\nBI.AbstractAllValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n width: 200,\r\n height: 30,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n // 把value都换成字符串\r\n // 需要考虑到value也可能是数字\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!o.cache || !this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self.items = items;\r\n call(items);\r\n });\r\n } else {\r\n call(this.items);\r\n }\r\n function call (items) {\r\n var keywords = (options.keywords || []).slice();\r\n if (options.keyword) {\r\n keywords.push(options.keyword);\r\n }\r\n var resultItems = items;\r\n if(BI.isNotEmptyArray(keywords)) {\r\n resultItems = [];\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n resultItems = resultItems.concat(search.match).concat(search.find);\r\n });\r\n resultItems = BI.uniq(resultItems);\r\n }\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n resultItems = BI.filter(resultItems, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: resultItems\r\n });\r\n return;\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: resultItems.length});\r\n return;\r\n }\r\n callback({\r\n items: resultItems,\r\n hasNext: false\r\n });\r\n }\r\n }\r\n});/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AllValueChooserCombo\r\n * @extends BI.AbstractAllValueChooser\r\n */\r\nBI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-all-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AllValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_combo\",\r\n text: o.text,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n\r\n this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue({\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n if (val.type === BI.Selection.All) {\r\n return val.assist;\r\n }\r\n return val.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.AllValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.all_value_chooser_combo\", BI.AllValueChooserCombo);/**\r\n * 简单的复选面板, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AllValueChooserPane\r\n * @extends BI.AbstractAllValueChooser\r\n */\r\nBI.AllValueChooserPane = BI.inherit(BI.AbstractAllValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-all-value-chooser-pane\",\r\n width: 200,\r\n height: 30,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AllValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.list = BI.createWidget({\r\n type: \"bi.multi_select_list\",\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height\r\n });\r\n\r\n this.list.on(BI.MultiSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue({\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n var val = this.list.getValue() || {};\r\n if (val.type === BI.Selection.All) {\r\n return val.assist;\r\n }\r\n return val.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.list.populate.apply(this.list, arguments);\r\n }\r\n});\r\nBI.AllValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.all_value_chooser_pane\", BI.AllValueChooserPane);BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-all-value-multi-text-value-combo\",\r\n width: 200,\r\n height: 24,\r\n items: []\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var value = this._digestValue(o.value);\r\n return {\r\n type: \"bi.search_multi_text_value_combo\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: value,\r\n numOfPage: 100,\r\n valueFormatter: o.valueFormatter,\r\n warningTitle: o.warningTitle,\r\n listeners: [{\r\n eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.AllValueMultiTextValueCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n ref: function () {\r\n self.combo = this;\r\n }\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n var value = this._digestValue(v);\r\n this.combo.setValue(value);\r\n },\r\n\r\n getValue: function () {\r\n var obj = this.combo.getValue() || {};\r\n obj.value = obj.value || [];\r\n if(obj.type === BI.Selection.All) {\r\n var values = [];\r\n BI.each(this.options.items, function (idx, item) {\r\n !BI.contains(obj.value, item.value) && values.push(item.value);\r\n });\r\n return values;\r\n }\r\n return obj.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n },\r\n\r\n _digestValue: function (v) {\r\n return {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n }\r\n});\r\nBI.AllValueMultiTextValueCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.all_value_multi_text_value_combo\", BI.AllValueMultiTextValueCombo);\r\nBI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n open: false\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _initData: function (items) {\r\n this.items = items;\r\n var nodes = BI.Tree.treeFormat(items);\r\n this.tree = new BI.Tree();\r\n this.tree.initTree(nodes);\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self._initData(items);\r\n call();\r\n });\r\n } else {\r\n call();\r\n }\r\n\r\n function call() {\r\n switch (options.type) {\r\n case BI.TreeView.REQ_TYPE_INIT_DATA:\r\n self._reqInitTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_ADJUST_DATA:\r\n self._reqAdjustTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_SELECT_DATA:\r\n self._reqSelectedTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:\r\n self._reqDisplayTreeNode(options, callback);\r\n break;\r\n default :\r\n self._reqTreeNode(options, callback);\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _reqDisplayTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var selectedValues = op.selectedValues;\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n doCheck([], this.tree.getRoot(), selectedValues);\r\n\r\n callback({\r\n items: result\r\n });\r\n\r\n function doCheck(parentValues, node, selected) {\r\n if (selected == null || BI.isEmpty(selected)) {\r\n BI.each(node.getChildren(), function (i, child) {\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(child.value);\r\n var llen = self._getChildCount(newParents);\r\n createOneJson(child, node.id, llen);\r\n doCheck(newParents, child, {});\r\n });\r\n return;\r\n }\r\n BI.each(selected, function (k) {\r\n var node = self._getTreeNode(parentValues, k);\r\n // 找不到就是新增值\r\n if(BI.isNull(node)) {\r\n createOneJson({\r\n id: BI.UUID(),\r\n text: k,\r\n value: k\r\n }, BI.UUID(), 0);\r\n } else {\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(node.value);\r\n createOneJson(node, node.parent && node.parent.id, getCount(selected[k], newParents));\r\n doCheck(newParents, node, selected[k]);\r\n }\r\n });\r\n }\r\n\r\n function getCount(jo, parentValues) {\r\n if (jo == null) {\r\n return 0;\r\n }\r\n if (BI.isEmpty(jo)) {\r\n return self._getChildCount(parentValues);\r\n }\r\n\r\n return BI.size(jo);\r\n }\r\n\r\n function createOneJson(node, pId, llen) {\r\n result.push({\r\n id: node.id,\r\n pId: pId,\r\n text: node.text + (llen > 0 ? (\"(\" + BI.i18nText(\"BI-Basic_Altogether\") + llen + BI.i18nText(\"BI-Basic_Count\") + \")\") : \"\"),\r\n value: node.value,\r\n open: true\r\n });\r\n }\r\n },\r\n\r\n _reqSelectedTreeNode: function (op, callback) {\r\n var self = this;\r\n var selectedValues = BI.deepClone(op.selectedValues);\r\n var notSelectedValue = op.notSelectedValue || {};\r\n var keyword = op.keyword || \"\";\r\n var parentValues = op.parentValues || [];\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n dealWithSelectedValues(selectedValues);\r\n callback(selectedValues);\r\n\r\n\r\n function dealWithSelectedValues(selectedValues) {\r\n var p = parentValues.concat(notSelectedValue);\r\n // 存储的值中存在这个值就把它删掉\r\n // 例如选中了中国-江苏-南京, 取消中国或江苏或南京\r\n if (canFindKey(selectedValues, p)) {\r\n // 如果搜索的值在父亲链中\r\n if (isSearchValueInParent(p)) {\r\n // 例如选中了 中国-江苏, 搜索江苏, 取消江苏\r\n // 例如选中了 中国-江苏, 搜索江苏, 取消中国\r\n self._deleteNode(selectedValues, p);\r\n } else {\r\n var searched = [];\r\n var find = search(parentValues, notSelectedValue, [], searched);\r\n if (find && BI.isNotEmptyArray(searched)) {\r\n BI.each(searched, function (i, arr) {\r\n var node = self._getNode(selectedValues, arr);\r\n if (node) {\r\n // 例如选中了 中国-江苏-南京,搜索南京,取消中国\r\n self._deleteNode(selectedValues, arr);\r\n } else {\r\n // 例如选中了 中国-江苏,搜索南京,取消中国\r\n expandSelectedValue(selectedValues, arr, BI.last(arr));\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n // 存储的值中不存在这个值,但父亲节点是全选的情况\r\n // 例如选中了中国-江苏,取消南京\r\n // important 选中了中国-江苏,取消了江苏,但是搜索的是南京\r\n if (isChild(selectedValues, p)) {\r\n var result = [], find = false;\r\n // 如果parentValues中有匹配的值,说明搜索结果不在当前值下\r\n if (isSearchValueInParent(p)) {\r\n find = true;\r\n } else {\r\n // 从当前值开始搜\r\n find = search(parentValues, notSelectedValue, result);\r\n p = parentValues;\r\n }\r\n\r\n if (find === true) {\r\n // 去掉点击的节点之后的结果集\r\n expandSelectedValue(selectedValues, p, notSelectedValue);\r\n // 添加去掉搜索的结果集\r\n if (result.length > 0) {\r\n BI.each(result, function (i, strs) {\r\n self._buildTree(selectedValues, strs);\r\n });\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n function expandSelectedValue(selectedValues, parents, notSelectedValue) {\r\n var next = selectedValues;\r\n var childrenCount = [];\r\n var path = [];\r\n // 去掉点击的节点之后的结果集\r\n BI.some(parents, function (i, v) {\r\n var t = next[v];\r\n if (t == null) {\r\n if (i === 0) {\r\n return true;\r\n }\r\n if (BI.isEmpty(next)) {\r\n var split = parents.slice(0, i);\r\n var expanded = self._getChildren(split);\r\n path.push(split);\r\n childrenCount.push(expanded.length);\r\n // 如果只有一个值且取消的就是这个值\r\n if (i === parents.length - 1 && expanded.length === 1 && expanded[0].value === notSelectedValue) {\r\n for (var j = childrenCount.length - 1; j >= 0; j--) {\r\n if (childrenCount[j] === 1) {\r\n self._deleteNode(selectedValues, path[j]);\r\n } else {\r\n break;\r\n }\r\n }\r\n } else {\r\n BI.each(expanded, function (m, child) {\r\n if (i === parents.length - 1 && child.value === notSelectedValue) {\r\n return true;\r\n }\r\n next[child.value] = {};\r\n });\r\n }\r\n next = next[v];\r\n } else {\r\n return true;\r\n // next = {};\r\n // next[v] = {};\r\n }\r\n } else {\r\n next = t;\r\n }\r\n });\r\n }\r\n\r\n function search(parents, current, result, searched) {\r\n var newParents = BI.clone(parents);\r\n newParents.push(current);\r\n if (self._isMatch(parents, current, keyword)) {\r\n searched && searched.push(newParents);\r\n return true;\r\n }\r\n\r\n var children = self._getChildren(newParents);\r\n\r\n var notSearch = [];\r\n var can = false;\r\n\r\n BI.each(children, function (i, child) {\r\n if (search(newParents, child.value, result, searched)) {\r\n can = true;\r\n } else {\r\n notSearch.push(child.value);\r\n }\r\n });\r\n if (can === true) {\r\n BI.each(notSearch, function (i, v) {\r\n var next = BI.clone(newParents);\r\n next.push(v);\r\n result.push(next);\r\n });\r\n }\r\n return can;\r\n }\r\n\r\n function isSearchValueInParent(parentValues) {\r\n for (var i = 0, len = parentValues.length; i < len; i++) {\r\n if (self._isMatch(parentValues.slice(0, i), parentValues[i], keyword)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function canFindKey(selectedValues, parents) {\r\n var t = selectedValues;\r\n for (var i = 0; i < parents.length; i++) {\r\n var v = parents[i];\r\n t = t[v];\r\n if (t == null) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n function isChild(selectedValues, parents) {\r\n var t = selectedValues;\r\n for (var i = 0; i < parents.length; i++) {\r\n var v = parents[i];\r\n if (!BI.has(t, v)) {\r\n return false;\r\n }\r\n t = t[v];\r\n if (BI.isEmpty(t)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n },\r\n\r\n _reqAdjustTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var selectedValues = op.selectedValues;\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n BI.each(selectedValues, function (k, v) {\r\n result.push([k]);\r\n });\r\n\r\n dealWithSelectedValues(selectedValues, []);\r\n\r\n var jo = {};\r\n BI.each(result, function (i, strs) {\r\n self._buildTree(jo, strs);\r\n });\r\n callback(jo);\r\n\r\n function dealWithSelectedValues(selected, parents) {\r\n if (selected == null || BI.isEmpty(selected)) {\r\n return true;\r\n }\r\n var can = true;\r\n BI.each(selected, function (k, v) {\r\n var p = BI.clone(parents);\r\n p.push(k);\r\n if (!dealWithSelectedValues(selected[k], p)) {\r\n BI.each(selected[k], function (nk, nv) {\r\n var t = BI.clone(p);\r\n t.push(nk);\r\n result.push(t);\r\n });\r\n can = false;\r\n }\r\n });\r\n return can && isAllSelected(selected, parents);\r\n }\r\n\r\n function isAllSelected(selected, parents) {\r\n return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);\r\n }\r\n },\r\n\r\n _reqInitTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var keyword = op.keyword || \"\";\r\n var selectedValues = op.selectedValues;\r\n var lastSearchValue = op.lastSearchValue || \"\"; // 一次请求100个,但是搜索是拿全部的,lastSearchValue是上一次遍历到的节点索引\r\n var output = search();\r\n BI.nextTick(function () {\r\n callback({\r\n hasNext: output.length > self._const.perPage,\r\n items: result,\r\n lastSearchValue: BI.last(output)\r\n });\r\n });\r\n\r\n function search() {\r\n var children = self._getChildren([]);\r\n var start = children.length;\r\n if (lastSearchValue !== \"\") {\r\n for (var j = 0, len = start; j < len; j++) {\r\n if (children[j].value === lastSearchValue) {\r\n start = j + 1;\r\n break;\r\n }\r\n }\r\n } else {\r\n start = 0;\r\n }\r\n var output = [];\r\n for (var i = start, len = children.length; i < len; i++) {\r\n if (output.length < self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, false, result);\r\n } else if (output.length === self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, false, []);\r\n }\r\n if (find[0] === true) {\r\n output.push(children[i].value);\r\n }\r\n if (output.length > self._const.perPage) {\r\n break;\r\n }\r\n }\r\n\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (op.times === 1) {\r\n var nodes = self._getAddedValueNode([], selectedValues);\r\n result = BI.concat(BI.filter(nodes, function (idx, node) {\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n return find.find.length > 0 || find.match.length > 0;\r\n }), result);\r\n }\r\n return output;\r\n }\r\n\r\n function nodeSearch(deep, parentValues, current, isAllSelect, result) {\r\n if (self._isMatch(parentValues, current, keyword)) {\r\n var checked = isAllSelect || isSelected(parentValues, current);\r\n createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);\r\n return [true, checked];\r\n }\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(current);\r\n var children = self._getChildren(newParents);\r\n\r\n var can = false, checked = false;\r\n\r\n var isCurAllSelected = isAllSelect || isAllSelected(parentValues, current);\r\n BI.each(children, function (i, child) {\r\n var state = nodeSearch(deep + 1, newParents, child.value, isCurAllSelected, result);\r\n if (state[1] === true) {\r\n checked = true;\r\n }\r\n if (state[0] === true) {\r\n can = true;\r\n }\r\n });\r\n if (can === true) {\r\n checked = isCurAllSelected || (isSelected(parentValues, current) && checked);\r\n createOneJson(parentValues, current, true, checked, false, false, result);\r\n }\r\n return [can, checked];\r\n }\r\n\r\n function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {\r\n var node = self._getTreeNode(parentValues, value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n title: node.title,\r\n isParent: node.getChildrenLength() > 0,\r\n open: isOpen,\r\n checked: checked,\r\n halfCheck: half,\r\n flag: flag\r\n });\r\n }\r\n\r\n function isHalf(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && !BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isAllSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return false;\r\n }\r\n return BI.any(find, function (v) {\r\n if (v === value) {\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n function findSelectedObj(parentValues) {\r\n var find = selectedValues;\r\n if (find == null) {\r\n return null;\r\n }\r\n BI.every(parentValues, function (i, v) {\r\n find = find[v];\r\n if (find == null) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n return find;\r\n }\r\n },\r\n\r\n _reqTreeNode: function (op, callback) {\r\n var self = this, o = this.options;\r\n var result = [];\r\n var times = op.times;\r\n var checkState = op.checkState || {};\r\n var parentValues = op.parentValues || [];\r\n var selectedValues = op.selectedValues || {};\r\n var valueMap = {};\r\n // if (judgeState(parentValues, selectedValues, checkState)) {\r\n valueMap = dealWithSelectedValue(parentValues, selectedValues);\r\n // }\r\n var nodes = this._getChildren(parentValues);\r\n for (var i = (times - 1) * this._const.perPage; nodes[i] && i < times * this._const.perPage; i++) {\r\n var state = getCheckState(nodes[i].value, parentValues, valueMap, checkState);\r\n result.push({\r\n id: nodes[i].id,\r\n pId: nodes[i].pId,\r\n value: nodes[i].value,\r\n text: nodes[i].text,\r\n times: 1,\r\n isParent: nodes[i].getChildrenLength() > 0,\r\n checked: state[0],\r\n halfCheck: state[1],\r\n open: o.open\r\n });\r\n }\r\n // 如果指定节点全部打开\r\n if (o.open) {\r\n var allNodes = [];\r\n // 获取所有节点\r\n BI.each(nodes, function (idx, node) {\r\n allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value])));\r\n });\r\n BI.each(allNodes, function (idx, node) {\r\n var valueMap = dealWithSelectedValue(node.parentValues, selectedValues);\r\n // REPORT-24409 fix: 设置节点全部展开,添加的节点没有给状态\r\n var parentCheckState = {};\r\n var find = BI.find(result, function (idx, pNode) {\r\n return pNode.id === node.pId;\r\n });\r\n if (find) {\r\n parentCheckState.checked = find.halfCheck ? false : find.checked;\r\n parentCheckState.half = find.halfCheck;\r\n }\r\n var state = getCheckState(node.value, node.parentValues, valueMap, parentCheckState);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n value: node.value,\r\n text: node.text,\r\n times: 1,\r\n isParent: node.getChildrenLength() > 0,\r\n checked: state[0],\r\n halfCheck: state[1],\r\n open: self.options.open\r\n });\r\n });\r\n }\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (parentValues.length === 0 && times === 1) {\r\n result = BI.concat(self._getAddedValueNode(parentValues, selectedValues), result);\r\n }\r\n BI.nextTick(function () {\r\n callback({\r\n items: result,\r\n hasNext: nodes.length > times * self._const.perPage\r\n });\r\n });\r\n\r\n function judgeState(parentValues, selected_value, checkState) {\r\n var checked = checkState.checked, half = checkState.half;\r\n if (parentValues.length > 0 && !checked) {\r\n return false;\r\n }\r\n return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));\r\n }\r\n\r\n function dealWithSelectedValue(parentValues, selectedValues) {\r\n var valueMap = {};\r\n BI.each(parentValues, function (i, v) {\r\n selectedValues = selectedValues[v] || {};\r\n });\r\n BI.each(selectedValues, function (value, obj) {\r\n if (BI.isNull(obj)) {\r\n valueMap[value] = [0, 0];\r\n return;\r\n }\r\n if (BI.isEmpty(obj)) {\r\n valueMap[value] = [2, 0];\r\n return;\r\n }\r\n var nextNames = {};\r\n BI.each(obj, function (t, o) {\r\n if (BI.isNull(o) || BI.isEmpty(o)) {\r\n nextNames[t] = true;\r\n }\r\n });\r\n // valueMap的数组第一个参数为不选: 0, 半选: 1, 全选:2, 第二个参数为改节点下选中的子节点个数(子节点全选或者不存在)\r\n valueMap[value] = [1, BI.size(nextNames)];\r\n });\r\n return valueMap;\r\n }\r\n\r\n function getCheckState(current, parentValues, valueMap, checkState) {\r\n // 节点本身的checked和half优先级最高\r\n var checked = checkState.checked, half = checkState.half;\r\n var tempCheck = false, halfCheck = false;\r\n if (BI.has(valueMap, current)) {\r\n // 可能是半选\r\n if (valueMap[current][0] === 1) {\r\n var values = BI.clone(parentValues);\r\n values.push(current);\r\n var childCount = self._getChildCount(values);\r\n if (childCount > 0 && childCount !== valueMap[current][1]) {\r\n halfCheck = true;\r\n }\r\n } else if (valueMap[current][0] === 2) {\r\n tempCheck = true;\r\n }\r\n }\r\n var check;\r\n if (!checked && !halfCheck && !tempCheck) {\r\n // 当节点自身是不选的,且通过selectedValues没有得到全选, 则check状态取决于valueMap\r\n check = BI.has(valueMap, current);\r\n } else {\r\n // 不是上面那种情况就先看在节点没有带有明确半选的时候,通过节点自身的checked和valueMap的状态能都得到选中信息\r\n check = ((tempCheck || checked) && !half) || BI.has(valueMap, current);\r\n }\r\n return [check, halfCheck];\r\n }\r\n },\r\n\r\n _getAddedValueNode: function (parentValues, selectedValues) {\r\n var nodes = this._getChildren(parentValues);\r\n return BI.map(BI.difference(BI.keys(selectedValues), BI.map(nodes, \"value\")), function (idx, v) {\r\n return {\r\n id: BI.UUID(),\r\n pId: nodes.length > 0 ? nodes[0].pId : BI.UUID(),\r\n value: v,\r\n text: v,\r\n times: 1,\r\n isParent: false,\r\n checked: true,\r\n halfCheck: false\r\n };\r\n });\r\n },\r\n\r\n _getNode: function (selectedValues, parentValues) {\r\n var pNode = selectedValues;\r\n for (var i = 0, len = parentValues.length; i < len; i++) {\r\n if (pNode == null) {\r\n return null;\r\n }\r\n pNode = pNode[parentValues[i]];\r\n }\r\n return pNode;\r\n },\r\n\r\n _deleteNode: function (selectedValues, values) {\r\n var name = values[values.length - 1];\r\n var p = values.slice(0, values.length - 1);\r\n var pNode = this._getNode(selectedValues, p);\r\n if (pNode != null && pNode[name]) {\r\n delete pNode[name];\r\n // 递归删掉空父节点\r\n while (p.length > 0 && BI.isEmpty(pNode)) {\r\n name = p[p.length - 1];\r\n p = p.slice(0, p.length - 1);\r\n pNode = this._getNode(selectedValues, p);\r\n if (pNode != null) {\r\n delete pNode[name];\r\n }\r\n }\r\n }\r\n },\r\n\r\n _buildTree: function (jo, values) {\r\n var t = jo;\r\n BI.each(values, function (i, v) {\r\n if (!BI.has(t, v)) {\r\n t[v] = {};\r\n }\r\n t = t[v];\r\n });\r\n },\r\n\r\n _isMatch: function (parentValues, value, keyword) {\r\n var o = this.options;\r\n var node = this._getTreeNode(parentValues, value);\r\n if (!node) {\r\n return false;\r\n }\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n if(o.allowSearchValue && node.value) {\r\n var valueFind = BI.Func.getSearchResult([node.value], keyword);\r\n return valueFind.find.length > 0 || valueFind.match.length > 0 ||\r\n find.find.length > 0 || find.match.length > 0;\r\n }\r\n return find.find.length > 0 || find.match.length > 0;\r\n },\r\n\r\n _getTreeNode: function (parentValues, v) {\r\n var self = this;\r\n var findParentNode;\r\n var index = 0;\r\n this.tree.traverse(function (node) {\r\n if (self.tree.isRoot(node)) {\r\n return;\r\n }\r\n if (index > parentValues.length) {\r\n return false;\r\n }\r\n if (index === parentValues.length && node.value === v) {\r\n findParentNode = node;\r\n return false;\r\n }\r\n if (node.value === parentValues[index]) {\r\n index++;\r\n return;\r\n }\r\n return true;\r\n });\r\n return findParentNode;\r\n },\r\n\r\n _getChildren: function (parentValues) {\r\n if (parentValues.length > 0) {\r\n var value = BI.last(parentValues);\r\n var parent = this._getTreeNode(parentValues.slice(0, parentValues.length - 1), value);\r\n } else {\r\n var parent = this.tree.getRoot();\r\n }\r\n return parent.getChildren();\r\n },\r\n\r\n _getAllChildren: function(parentValues) {\r\n var children = this._getChildren(parentValues);\r\n var nodes = [].concat(children);\r\n BI.each(nodes, function (idx, node) {\r\n node.parentValues = parentValues;\r\n });\r\n var queue = BI.map(children, function (idx, node) {\r\n return {\r\n parentValues: parentValues,\r\n value: node.value\r\n };\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.shift();\r\n var pValues = (node.parentValues).concat(node.value);\r\n var childNodes = this._getChildren(pValues);\r\n BI.each(childNodes, function (idx, node) {\r\n node.parentValues = pValues;\r\n });\r\n queue = queue.concat(childNodes);\r\n nodes = nodes.concat(childNodes);\r\n }\r\n return nodes;\r\n },\r\n\r\n _getChildCount: function (parentValues) {\r\n return this._getChildren(parentValues).length;\r\n }\r\n});BI.AbstractListTreeValueChooser = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _reqDisplayTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = {};\r\n var selectedValues = op.selectedValues;\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n doCheck([], this.tree.getRoot(), selectedValues);\r\n\r\n callback({\r\n items: BI.values(result)\r\n });\r\n\r\n function doCheck(parentValues, node, selected) {\r\n BI.each(selected, function (idx, path) {\r\n BI.each(path, function (id, value) {\r\n var nodeValue = value;\r\n var node = self._getTreeNode(path.slice(0, id), nodeValue);\r\n // 找不到就是新增值\r\n if (BI.isNull(node)) {\r\n createOneJson({\r\n id: BI.UUID(),\r\n text: nodeValue,\r\n value: nodeValue,\r\n isLeaf: true\r\n }, BI.UUID());\r\n } else {\r\n if(!BI.has(result, node.id)) {\r\n createOneJson(node, node.parent && node.parent.id);\r\n }\r\n result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n function createOneJson(node, pId) {\r\n result[node.id] = {\r\n id: node.id,\r\n pId: pId,\r\n text: node.text,\r\n value: node.value,\r\n open: true,\r\n isLeaf: node.isLeaf\r\n };\r\n }\r\n },\r\n\r\n _reqInitTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var keyword = op.keyword || \"\";\r\n var selectedValues = op.selectedValues;\r\n var lastSearchValue = op.lastSearchValue || \"\"; // 一次请求100个,但是搜索是拿全部的,lastSearchValue是上一次遍历到的节点索引\r\n var output = search();\r\n BI.nextTick(function () {\r\n callback({\r\n hasNext: output.length > self._const.perPage,\r\n items: result,\r\n lastSearchValue: BI.last(output)\r\n });\r\n });\r\n\r\n function search() {\r\n var children = self._getChildren([]);\r\n var start = children.length;\r\n if (lastSearchValue !== \"\") {\r\n for (var j = 0, len = start; j < len; j++) {\r\n if (children[j].value === lastSearchValue) {\r\n start = j + 1;\r\n break;\r\n }\r\n }\r\n } else {\r\n start = 0;\r\n }\r\n var output = [];\r\n for (var i = start, len = children.length; i < len; i++) {\r\n if (output.length < self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, result);\r\n } else if (output.length === self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, []);\r\n }\r\n if (find[0] === true) {\r\n output.push(children[i].value);\r\n }\r\n if (output.length > self._const.perPage) {\r\n break;\r\n }\r\n }\r\n\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (op.times === 1) {\r\n var nodes = self._getAddedValueNode([], selectedValues);\r\n result = BI.concat(BI.filter(nodes, function (idx, node) {\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n return find.find.length > 0 || find.match.length > 0;\r\n }), result);\r\n }\r\n return output;\r\n }\r\n\r\n function nodeSearch(deep, parentValues, current, result) {\r\n if (self._isMatch(parentValues, current, keyword)) {\r\n var checked = isSelected(parentValues, current);\r\n createOneJson(parentValues, current, false, checked, true, result);\r\n return [true, checked];\r\n }\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(current);\r\n var children = self._getChildren(newParents);\r\n\r\n var can = false, checked = false;\r\n\r\n BI.each(children, function (i, child) {\r\n var state = nodeSearch(deep + 1, newParents, child.value, result);\r\n if (state[1] === true) {\r\n checked = true;\r\n }\r\n if (state[0] === true) {\r\n can = true;\r\n }\r\n });\r\n if (can === true) {\r\n checked = isSelected(parentValues, current);\r\n createOneJson(parentValues, current, true, checked, false, result);\r\n }\r\n return [can, checked];\r\n }\r\n\r\n function createOneJson(parentValues, value, isOpen, checked, flag, result) {\r\n var node = self._getTreeNode(parentValues, value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n title: node.title,\r\n isParent: node.getChildrenLength() > 0,\r\n open: isOpen,\r\n checked: checked,\r\n halfCheck: false,\r\n flag: flag\r\n });\r\n }\r\n\r\n function isHalf(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && !BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isAllSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isSelected(parentValues, value) {\r\n return BI.any(selectedValues, function (idx, array) {\r\n return BI.isEqual(parentValues, array.slice(0, parentValues.length)) && BI.last(array) === value;\r\n });\r\n }\r\n\r\n function findSelectedObj(parentValues) {\r\n var find = selectedValues;\r\n if (find == null) {\r\n return null;\r\n }\r\n BI.every(parentValues, function (i, v) {\r\n find = find[v];\r\n if (find == null) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n return find;\r\n }\r\n },\r\n\r\n _reqTreeNode: function (op, callback) {\r\n var self = this, o = this.options;\r\n var result = [];\r\n var times = op.times;\r\n var parentValues = op.parentValues || [];\r\n var selectedValues = op.selectedValues || [];\r\n var valueMap = dealWithSelectedValue(parentValues, selectedValues);\r\n var nodes = this._getChildren(parentValues);\r\n for (var i = (times - 1) * this._const.perPage; nodes[i] && i < times * this._const.perPage; i++) {\r\n var checked = BI.has(valueMap, nodes[i].value);\r\n result.push({\r\n id: nodes[i].id,\r\n pId: nodes[i].pId,\r\n value: nodes[i].value,\r\n text: nodes[i].text,\r\n times: 1,\r\n isParent: nodes[i].getChildrenLength() > 0,\r\n checked: checked,\r\n halfCheck: false,\r\n open: o.open\r\n });\r\n }\r\n // 如果指定节点全部打开\r\n if (o.open) {\r\n var allNodes = [];\r\n // 获取所有节点\r\n BI.each(nodes, function (idx, node) {\r\n allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value])));\r\n });\r\n BI.each(allNodes, function (idx, node) {\r\n var checked = BI.has(valueMap, node.value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n value: node.value,\r\n text: node.text,\r\n times: 1,\r\n isParent: node.getChildrenLength() > 0,\r\n checked: checked,\r\n halfCheck: false,\r\n open: o.open\r\n });\r\n });\r\n }\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (parentValues.length === 0 && times === 1) {\r\n result = BI.concat(self._getAddedValueNode(parentValues, selectedValues), result);\r\n }\r\n BI.nextTick(function () {\r\n callback({\r\n items: result,\r\n hasNext: nodes.length > times * self._const.perPage\r\n });\r\n });\r\n\r\n function dealWithSelectedValue(parentValues, selectedValues) {\r\n var valueMap = {};\r\n BI.each(selectedValues, function (idx, v) {\r\n if (BI.isEqual(parentValues, v.slice(0, parentValues.length))) {\r\n valueMap[BI.last(v)] = [2, 0];\r\n }\r\n });\r\n return valueMap;\r\n }\r\n },\r\n\r\n _getAddedValueNode: function (parentValues, selectedValues) {\r\n var nodes = this._getChildren(parentValues);\r\n var values = BI.flatten(BI.filter(selectedValues, function (idx, array) {\r\n return array.length === 1;\r\n }));\r\n return BI.map(BI.difference(values, BI.map(nodes, \"value\")), function (idx, v) {\r\n return {\r\n id: BI.UUID(),\r\n pId: nodes.length > 0 ? nodes[0].pId : BI.UUID(),\r\n value: v,\r\n text: v,\r\n times: 1,\r\n isParent: false,\r\n checked: true,\r\n halfCheck: false\r\n };\r\n });\r\n }\r\n});/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况, 可以自增值\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ListTreeValueChooserInsertCombo\r\n * @extends BI.Widget\r\n */\r\nBI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListTreeValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-list-tree-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ListTreeValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_list_combo\",\r\n element: this,\r\n text: o.text,\r\n value: o.value,\r\n watermark: o.watermark,\r\n allowInsertValue: o.allowInsertValue,\r\n allowEdit: o.allowEdit,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeListCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.ListTreeValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.list_tree_value_chooser_insert_combo\", BI.ListTreeValueChooserInsertCombo);/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况, 可以自增值\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserInsertCombo\r\n * @extends BI.Widget\r\n */\r\nBI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_insert_combo\",\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n watermark: o.watermark,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeInsertCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.TreeValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TreeValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TreeValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.TreeValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.TreeValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.tree_value_chooser_insert_combo\", BI.TreeValueChooserInsertCombo);/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserCombo\r\n * @extends BI.Widget\r\n */\r\nBI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_combo\",\r\n text: o.text,\r\n allowEdit: o.allowEdit,\r\n value: o.value,\r\n watermark: o.watermark,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.TreeValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TreeValueChooserCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TreeValueChooserCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TreeValueChooserCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TreeValueChooserCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.TreeValueChooserCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.tree_value_chooser_combo\", BI.TreeValueChooserCombo);/**\r\n * 简单的树面板, 适用于数据量少的情况\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserPane\r\n * @extends BI.AbstractTreeValueChooser\r\n */\r\nBI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-pane\",\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.pane = BI.createWidget({\r\n type: \"bi.multi_select_tree\",\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this)\r\n });\r\n\r\n this.pane.on(BI.MultiSelectTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE);\r\n });\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n this.populate();\r\n }\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n this.pane.setSelectedValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.pane.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.pane.getValue();\r\n },\r\n\r\n populate: function () {\r\n this.pane.populate.apply(this.pane, arguments);\r\n }\r\n});\r\nBI.TreeValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.tree_value_chooser_pane\", BI.TreeValueChooserPane);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AbstractValueChooser\r\n * @extends BI.Widget\r\n */\r\nBI.AbstractValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n // 把value都换成字符串\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _getItemsByTimes: function (items, times) {\r\n var res = [];\r\n for (var i = (times - 1) * this._const.perPage; items[i] && i < times * this._const.perPage; i++) {\r\n res.push(items[i]);\r\n }\r\n return res;\r\n },\r\n\r\n _hasNextByTimes: function (items, times) {\r\n return times * this._const.perPage < items.length;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!o.cache || !this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self.items = items;\r\n call(items);\r\n });\r\n } else {\r\n call(this.items);\r\n }\r\n function call (items) {\r\n var keywords = (options.keywords || []).slice();\r\n var resultItems = items;\r\n if(BI.isNotEmptyArray(keywords)) {\r\n resultItems = [];\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n resultItems = resultItems.concat(search.match).concat(search.find);\r\n });\r\n resultItems = BI.uniq(resultItems);\r\n }\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n resultItems = BI.filter(resultItems, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: resultItems\r\n });\r\n return;\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: resultItems.length});\r\n return;\r\n }\r\n callback({\r\n items: self._getItemsByTimes(resultItems, options.times),\r\n hasNext: self._hasNextByTimes(resultItems, options.times)\r\n });\r\n }\r\n }\r\n});/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n */\r\nBI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_insert_combo\",\r\n element: this,\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiSelectCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.ValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.value_chooser_insert_combo\", BI.ValueChooserInsertCombo);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ValueChooserCombo\r\n * @extends BI.Widget\r\n */\r\nBI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_combo\",\r\n element: this,\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiSelectCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.ValueChooserCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ValueChooserCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ValueChooserCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ValueChooserCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ValueChooserCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.value_chooser_combo\", BI.ValueChooserCombo);/**\r\n * 简单的复选面板, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ValueChooserPane\r\n * @extends BI.Widget\r\n */\r\nBI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-pane\",\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.list = BI.createWidget({\r\n type: \"bi.multi_select_list\",\r\n element: this,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this)\r\n });\r\n\r\n this.list.on(BI.MultiSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ValueChooserPane.EVENT_CHANGE);\r\n });\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n this.list.populate();\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.list.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n items && (this.items = items);\r\n this.list.populate.apply(this.list, arguments);\r\n }\r\n});\r\nBI.ValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.value_chooser_pane\", BI.ValueChooserPane);(function () {\r\n var Events = {\r\n\r\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\r\n // the callback to all events fired.\r\n on: function (name, callback, context) {\r\n if (!eventsApi(this, \"on\", name, [callback, context]) || !callback) return this;\r\n this._events || (this._events = {});\r\n var events = this._events[name] || (this._events[name] = []);\r\n events.push({callback: callback, context: context, ctx: context || this});\r\n return this;\r\n },\r\n\r\n // Bind an event to only be triggered a single time. After the first time\r\n // the callback is invoked, it will be removed.\r\n once: function (name, callback, context) {\r\n if (!eventsApi(this, \"once\", name, [callback, context]) || !callback) return this;\r\n var self = this;\r\n var once = _.once(function () {\r\n self.off(name, once);\r\n callback.apply(this, arguments);\r\n });\r\n once._callback = callback;\r\n return this.on(name, once, context);\r\n },\r\n\r\n // Remove one or many callbacks. If `context` is null, removes all\r\n // callbacks with that function. If `callback` is null, removes all\r\n // callbacks for the event. If `name` is null, removes all bound\r\n // callbacks for all events.\r\n off: function (name, callback, context) {\r\n if (!this._events || !eventsApi(this, \"off\", name, [callback, context])) return this;\r\n\r\n // Remove all callbacks for all events.\r\n if (!name && !callback && !context) {\r\n this._events = void 0;\r\n return this;\r\n }\r\n\r\n var names = name ? [name] : _.keys(this._events);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n name = names[i];\r\n\r\n // Bail out if there are no events stored.\r\n var events = this._events[name];\r\n if (!events) continue;\r\n\r\n // Remove all callbacks for this event.\r\n if (!callback && !context) {\r\n delete this._events[name];\r\n continue;\r\n }\r\n\r\n // Find any remaining events.\r\n var remaining = [];\r\n for (var j = 0, k = events.length; j < k; j++) {\r\n var event = events[j];\r\n if (\r\n callback && callback !== event.callback &&\r\n callback !== event.callback._callback ||\r\n context && context !== event.context\r\n ) {\r\n remaining.push(event);\r\n }\r\n }\r\n\r\n // Replace events if there are any remaining. Otherwise, clean up.\r\n if (remaining.length) {\r\n this._events[name] = remaining;\r\n } else {\r\n delete this._events[name];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n un: function () {\r\n this.off.apply(this, arguments);\r\n },\r\n\r\n // Trigger one or many events, firing all bound callbacks. Callbacks are\r\n // passed the same arguments as `trigger` is, apart from the event name\r\n // (unless you're listening on `\"all\"`, which will cause your callback to\r\n // receive the true name of the event as the first argument).\r\n trigger: function (name) {\r\n if (!this._events) return this;\r\n var args = slice.call(arguments, 1);\r\n if (!eventsApi(this, \"trigger\", name, args)) return this;\r\n var events = this._events[name];\r\n var allEvents = this._events.all;\r\n if (events) triggerEvents(events, args);\r\n if (allEvents) triggerEvents(allEvents, arguments);\r\n return this;\r\n },\r\n\r\n fireEvent: function () {\r\n this.trigger.apply(this, arguments);\r\n },\r\n\r\n // Inversion-of-control versions of `on` and `once`. Tell *this* object to\r\n // listen to an event in another object ... keeping track of what it's\r\n // listening to.\r\n listenTo: function (obj, name, callback) {\r\n var listeningTo = this._listeningTo || (this._listeningTo = {});\r\n var id = obj._listenId || (obj._listenId = _.uniqueId(\"l\"));\r\n listeningTo[id] = obj;\r\n if (!callback && typeof name === \"object\") callback = this;\r\n obj.on(name, callback, this);\r\n return this;\r\n },\r\n\r\n listenToOnce: function (obj, name, callback) {\r\n if (typeof name === \"object\") {\r\n for (var event in name) this.listenToOnce(obj, event, name[event]);\r\n return this;\r\n }\r\n if (eventSplitter.test(name)) {\r\n var names = name.split(eventSplitter);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n this.listenToOnce(obj, names[i], callback);\r\n }\r\n return this;\r\n }\r\n if (!callback) return this;\r\n var once = _.once(function () {\r\n this.stopListening(obj, name, once);\r\n callback.apply(this, arguments);\r\n });\r\n once._callback = callback;\r\n return this.listenTo(obj, name, once);\r\n },\r\n\r\n // Tell this object to stop listening to either specific events ... or\r\n // to every object it's currently listening to.\r\n stopListening: function (obj, name, callback) {\r\n var listeningTo = this._listeningTo;\r\n if (!listeningTo) return this;\r\n var remove = !name && !callback;\r\n if (!callback && typeof name === \"object\") callback = this;\r\n if (obj) (listeningTo = {})[obj._listenId] = obj;\r\n for (var id in listeningTo) {\r\n obj = listeningTo[id];\r\n obj.off(name, callback, this);\r\n if (remove || _.isEmpty(obj._events)) delete this._listeningTo[id];\r\n }\r\n return this;\r\n }\r\n\r\n };\r\n\r\n // Regular expression used to split event strings.\r\n var eventSplitter = /\\s+/;\r\n\r\n // Implement fancy features of the Events API such as multiple event\r\n // names `\"change blur\"` and jQuery-style event maps `{change: action}`\r\n // in terms of the existing API.\r\n var eventsApi = function (obj, action, name, rest) {\r\n if (!name) return true;\r\n\r\n // Handle event maps.\r\n if (typeof name === \"object\") {\r\n for (var key in name) {\r\n obj[action].apply(obj, [key, name[key]].concat(rest));\r\n }\r\n return false;\r\n }\r\n\r\n // Handle space separated event names.\r\n if (eventSplitter.test(name)) {\r\n var names = name.split(eventSplitter);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n obj[action].apply(obj, [names[i]].concat(rest));\r\n }\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n // A difficult-to-believe, but optimized internal dispatch function for\r\n // triggering events. Tries to keep the usual cases speedy (most internal\r\n // BI events have 3 arguments).\r\n var triggerEvents = function (events, args) {\r\n var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\r\n switch (args.length) {\r\n case 0:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx);\r\n return;\r\n case 1:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1);\r\n return;\r\n case 2:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2);\r\n return;\r\n case 3:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);\r\n return;\r\n default:\r\n while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);\r\n return;\r\n }\r\n };\r\n\r\n // BI.Router\r\n // ---------------\r\n\r\n // Routers map faux-URLs to actions, and fire events when routes are\r\n // matched. Creating a new one sets its `routes` hash, if not set statically.\r\n var Router = BI.Router = function (options) {\r\n options || (options = {});\r\n if (options.routes) this.routes = options.routes;\r\n this._bindRoutes();\r\n this._init.apply(this, arguments);\r\n };\r\n\r\n // Cached regular expressions for matching named param parts and splatted\r\n // parts of route strings.\r\n var optionalParam = /\\((.*?)\\)/g;\r\n var namedParam = /(\\(\\?)?:\\w+/g;\r\n var splatParam = /\\*\\w+/g;\r\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\r\n\r\n // Set up all inheritable **BI.Router** properties and methods.\r\n _.extend(Router.prototype, Events, {\r\n\r\n // _init is an empty function by default. Override it with your own\r\n // initialization logic.\r\n _init: function () {\r\n },\r\n\r\n // Manually bind a single named route to a callback. For example:\r\n //\r\n // this.route('search/:query/p:num', 'search', function(query, num) {\r\n // ...\r\n // });\r\n //\r\n route: function (route, name, callback) {\r\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\r\n if (_.isFunction(name)) {\r\n callback = name;\r\n name = \"\";\r\n }\r\n if (!callback) callback = this[name];\r\n var router = this;\r\n BI.history.route(route, function (fragment) {\r\n var args = router._extractParameters(route, fragment);\r\n if (router.execute(callback, args, name) !== false) {\r\n router.trigger.apply(router, [\"route:\" + name].concat(args));\r\n router.trigger(\"route\", name, args);\r\n BI.history.trigger(\"route\", router, name, args);\r\n }\r\n });\r\n return this;\r\n },\r\n\r\n // Execute a route handler with the provided parameters. This is an\r\n // excellent place to do pre-route setup or post-route cleanup.\r\n execute: function (callback, args, name) {\r\n if (callback) callback.apply(this, args);\r\n },\r\n\r\n // Simple proxy to `BI.history` to save a fragment into the history.\r\n navigate: function (fragment, options) {\r\n BI.history.navigate(fragment, options);\r\n return this;\r\n },\r\n\r\n // Bind all defined routes to `BI.history`. We have to reverse the\r\n // order of the routes here to support behavior where the most general\r\n // routes can be defined at the bottom of the route map.\r\n _bindRoutes: function () {\r\n if (!this.routes) return;\r\n this.routes = _.result(this, \"routes\");\r\n var route, routes = _.keys(this.routes);\r\n while ((route = routes.pop()) != null) {\r\n this.route(route, this.routes[route]);\r\n }\r\n },\r\n\r\n // Convert a route string into a regular expression, suitable for matching\r\n // against the current location hash.\r\n _routeToRegExp: function (route) {\r\n route = route.replace(escapeRegExp, \"\\\\$&\")\r\n .replace(optionalParam, \"(?:$1)?\")\r\n .replace(namedParam, function (match, optional) {\r\n return optional ? match : \"([^/?]+)\";\r\n })\r\n .replace(splatParam, \"([^?]*?)\");\r\n return new RegExp(\"^\" + route + \"(?:\\\\?([\\\\s\\\\S]*))?$\");\r\n },\r\n\r\n // Given a route, and a URL fragment that it matches, return the array of\r\n // extracted decoded parameters. Empty or unmatched parameters will be\r\n // treated as `null` to normalize cross-browser behavior.\r\n _extractParameters: function (route, fragment) {\r\n var params = route.exec(fragment).slice(1);\r\n return _.map(params, function (param, i) {\r\n // Don't decode the search params.\r\n if (i === params.length - 1) return param || null;\r\n return param ? decodeURIComponent(param) : null;\r\n });\r\n }\r\n\r\n });\r\n\r\n // History\r\n // ----------------\r\n\r\n // Handles cross-browser history management, based on either\r\n // [pushState](http://diveintohtml5.info/history.html) and real URLs, or\r\n // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)\r\n // and URL fragments. If the browser supports neither (old IE, natch),\r\n // falls back to polling.\r\n var History = function () {\r\n this.handlers = [];\r\n this.checkUrl = _.bind(this.checkUrl, this);\r\n\r\n // Ensure that `History` can be used outside of the browser.\r\n if (typeof window !== \"undefined\") {\r\n this.location = _global.location;\r\n this.history = _global.history;\r\n }\r\n };\r\n\r\n // Cached regex for stripping a leading hash/slash and trailing space.\r\n var routeStripper = /^[#\\/]|\\s+$/g;\r\n\r\n // Cached regex for stripping leading and trailing slashes.\r\n var rootStripper = /^\\/+|\\/+$/g;\r\n\r\n // Cached regex for stripping urls of hash.\r\n var pathStripper = /#.*$/;\r\n\r\n // Has the history handling already been started?\r\n History.started = false;\r\n\r\n // Set up all inheritable **BI.History** properties and methods.\r\n _.extend(History.prototype, Events, {\r\n\r\n // The default interval to poll for hash changes, if necessary, is\r\n // twenty times a second.\r\n interval: 50,\r\n\r\n // Are we at the app root?\r\n atRoot: function () {\r\n var path = this.location.pathname.replace(/[^\\/]$/, \"$&/\");\r\n return path === this.root && !this.getSearch();\r\n },\r\n\r\n // In IE6, the hash fragment and search params are incorrect if the\r\n // fragment contains `?`.\r\n getSearch: function () {\r\n var match = this.location.href.replace(/#.*/, \"\").match(/\\?.+/);\r\n return match ? match[0] : \"\";\r\n },\r\n\r\n // Gets the true hash value. Cannot use location.hash directly due to bug\r\n // in Firefox where location.hash will always be decoded.\r\n getHash: function (window) {\r\n var match = (window || this).location.href.match(/#(.*)$/);\r\n return match ? match[1] : \"\";\r\n },\r\n\r\n // Get the pathname and search params, without the root.\r\n getPath: function () {\r\n var path = decodeURI(this.location.pathname + this.getSearch());\r\n var root = this.root.slice(0, -1);\r\n if (!path.indexOf(root)) path = path.slice(root.length);\r\n return path.charAt(0) === \"/\" ? path.slice(1) : path;\r\n },\r\n\r\n // Get the cross-browser normalized URL fragment from the path or hash.\r\n getFragment: function (fragment) {\r\n if (fragment == null) {\r\n if (this._hasPushState || !this._wantsHashChange) {\r\n fragment = this.getPath();\r\n } else {\r\n fragment = this.getHash();\r\n }\r\n }\r\n return fragment.replace(routeStripper, \"\");\r\n },\r\n\r\n // Start the hash change handling, returning `true` if the current URL matches\r\n // an existing route, and `false` otherwise.\r\n start: function (options) {\r\n if (History.started) throw new Error(\"BI.history has already been started\");\r\n History.started = true;\r\n\r\n // Figure out the initial configuration. Do we need an iframe?\r\n // Is pushState desired ... is it available?\r\n this.options = _.extend({root: \"/\"}, this.options, options);\r\n this.root = this.options.root;\r\n this._wantsHashChange = this.options.hashChange !== false;\r\n this._hasHashChange = \"onhashchange\" in window;\r\n this._wantsPushState = !!this.options.pushState;\r\n this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);\r\n this.fragment = this.getFragment();\r\n\r\n // Normalize root to always include a leading and trailing slash.\r\n this.root = (\"/\" + this.root + \"/\").replace(rootStripper, \"/\");\r\n\r\n // Transition from hashChange to pushState or vice versa if both are\r\n // requested.\r\n if (this._wantsHashChange && this._wantsPushState) {\r\n\r\n // If we've started off with a route from a `pushState`-enabled\r\n // browser, but we're currently in a browser that doesn't support it...\r\n if (!this._hasPushState && !this.atRoot()) {\r\n var root = this.root.slice(0, -1) || \"/\";\r\n this.location.replace(root + \"#\" + this.getPath());\r\n // Return immediately as browser will do redirect to new url\r\n return true;\r\n\r\n // Or if we've started out with a hash-based route, but we're currently\r\n // in a browser where it could be `pushState`-based instead...\r\n } else if (this._hasPushState && this.atRoot()) {\r\n this.navigate(this.getHash(), {replace: true});\r\n }\r\n\r\n }\r\n\r\n // Proxy an iframe to handle location events if the browser doesn't\r\n // support the `hashchange` event, HTML5 history, or the user wants\r\n // `hashChange` but not `pushState`.\r\n if (!this._hasHashChange && this._wantsHashChange && (!this._wantsPushState || !this._hasPushState)) {\r\n var iframe = document.createElement(\"iframe\");\r\n iframe.src = \"javascript:0\";\r\n iframe.style.display = \"none\";\r\n iframe.tabIndex = -1;\r\n var body = document.body;\r\n // Using `appendChild` will throw on IE < 9 if the document is not ready.\r\n this.iframe = body.insertBefore(iframe, body.firstChild).contentWindow;\r\n this.iframe.document.open().close();\r\n this.iframe.location.hash = \"#\" + this.fragment;\r\n }\r\n\r\n // Add a cross-platform `addEventListener` shim for older browsers.\r\n var addEventListener = _global.addEventListener || function (eventName, listener) {\r\n return attachEvent(\"on\" + eventName, listener);\r\n };\r\n\r\n // Depending on whether we're using pushState or hashes, and whether\r\n // 'onhashchange' is supported, determine how we check the URL state.\r\n if (this._hasPushState) {\r\n addEventListener(\"popstate\", this.checkUrl, false);\r\n } else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {\r\n addEventListener(\"hashchange\", this.checkUrl, false);\r\n } else if (this._wantsHashChange) {\r\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\r\n }\r\n\r\n if (!this.options.silent) return this.loadUrl();\r\n },\r\n\r\n // Disable BI.history, perhaps temporarily. Not useful in a real app,\r\n // but possibly useful for unit testing Routers.\r\n stop: function () {\r\n // Add a cross-platform `removeEventListener` shim for older browsers.\r\n var removeEventListener = _global.removeEventListener || function (eventName, listener) {\r\n return detachEvent(\"on\" + eventName, listener);\r\n };\r\n\r\n // Remove window listeners.\r\n if (this._hasPushState) {\r\n removeEventListener(\"popstate\", this.checkUrl, false);\r\n } else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {\r\n removeEventListener(\"hashchange\", this.checkUrl, false);\r\n }\r\n\r\n // Clean up the iframe if necessary.\r\n if (this.iframe) {\r\n document.body.removeChild(this.iframe.frameElement);\r\n this.iframe = null;\r\n }\r\n\r\n // Some environments will throw when clearing an undefined interval.\r\n if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);\r\n History.started = false;\r\n },\r\n\r\n // Add a route to be tested when the fragment changes. Routes added later\r\n // may override previous routes.\r\n route: function (route, callback) {\r\n this.handlers.unshift({route: route, callback: callback});\r\n },\r\n\r\n // Checks the current URL to see if it has changed, and if it has,\r\n // calls `loadUrl`, normalizing across the hidden iframe.\r\n checkUrl: function (e) {\r\n var current = this.getFragment();\r\n\r\n // If the user pressed the back button, the iframe's hash will have\r\n // changed and we should use that for comparison.\r\n if (current === this.fragment && this.iframe) {\r\n current = this.getHash(this.iframe);\r\n }\r\n\r\n if (current === this.fragment) return false;\r\n if (this.iframe) this.navigate(current);\r\n this.loadUrl();\r\n },\r\n\r\n // Attempt to load the current URL fragment. If a route succeeds with a\r\n // match, returns `true`. If no defined routes matches the fragment,\r\n // returns `false`.\r\n loadUrl: function (fragment) {\r\n fragment = this.fragment = this.getFragment(fragment);\r\n return _.some(this.handlers, function (handler) {\r\n if (handler.route.test(fragment)) {\r\n handler.callback(fragment);\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n // Save a fragment into the hash history, or replace the URL state if the\r\n // 'replace' option is passed. You are responsible for properly URL-encoding\r\n // the fragment in advance.\r\n //\r\n // The options object can contain `trigger: true` if you wish to have the\r\n // route callback be fired (not usually desirable), or `replace: true`, if\r\n // you wish to modify the current URL without adding an entry to the history.\r\n navigate: function (fragment, options) {\r\n if (!History.started) return false;\r\n if (!options || options === true) options = {trigger: !!options};\r\n\r\n // Normalize the fragment.\r\n fragment = this.getFragment(fragment || \"\");\r\n\r\n // Don't include a trailing slash on the root.\r\n var root = this.root;\r\n if (fragment === \"\" || fragment.charAt(0) === \"?\") {\r\n root = root.slice(0, -1) || \"/\";\r\n }\r\n var url = root + fragment;\r\n\r\n // Strip the hash and decode for matching.\r\n fragment = decodeURI(fragment.replace(pathStripper, \"\"));\r\n\r\n if (this.fragment === fragment) return;\r\n this.fragment = fragment;\r\n\r\n // If pushState is available, we use it to set the fragment as a real URL.\r\n if (this._hasPushState) {\r\n this.history[options.replace ? \"replaceState\" : \"pushState\"]({}, document.title, url);\r\n\r\n // If hash changes haven't been explicitly disabled, update the hash\r\n // fragment to store history.\r\n } else if (this._wantsHashChange) {\r\n this._updateHash(this.location, fragment, options.replace);\r\n if (this.iframe && (fragment !== this.getHash(this.iframe))) {\r\n // Opening and closing the iframe tricks IE7 and earlier to push a\r\n // history entry on hash-tag change. When replace is true, we don't\r\n // want this.\r\n if (!options.replace) this.iframe.document.open().close();\r\n this._updateHash(this.iframe.location, fragment, options.replace);\r\n }\r\n\r\n // If you've told us that you explicitly don't want fallback hashchange-\r\n // based history, then `navigate` becomes a page refresh.\r\n } else {\r\n return this.location.assign(url);\r\n }\r\n if (options.trigger) return this.loadUrl(fragment);\r\n },\r\n\r\n // Update the hash location, either replacing the current entry, or adding\r\n // a new one to the browser history.\r\n _updateHash: function (location, fragment, replace) {\r\n if (replace) {\r\n var href = location.href.replace(/(javascript:|#).*$/, \"\");\r\n location.replace(href + \"#\" + fragment);\r\n } else {\r\n // Some browsers require that `hash` contains a leading #.\r\n location.hash = \"#\" + fragment;\r\n }\r\n }\r\n\r\n });\r\n\r\n // Create the default BI.history.\r\n BI.history = new History;\r\n}());;(function () {\r\n function initWatch(vm, watch) {\r\n vm._watchers || (vm._watchers = []);\r\n for (var key in watch) {\r\n var handler = watch[key];\r\n if (BI.isArray(handler)) {\r\n for (var i = 0; i < handler.length; i++) {\r\n vm._watchers.push(createWatcher(vm, key, handler[i]));\r\n }\r\n } else {\r\n vm._watchers.push(createWatcher(vm, key, handler));\r\n }\r\n }\r\n }\r\n\r\n function createWatcher(vm, keyOrFn, handler) {\r\n return Fix.watch(vm.store, keyOrFn, _.bind(handler, vm), {\r\n store: vm.store\r\n });\r\n }\r\n\r\n var target = null;\r\n var targetStack = [];\r\n\r\n function pushTarget(_target) {\r\n if (target) targetStack.push(target);\r\n Fix.Model.target = target = _target;\r\n }\r\n\r\n function popTarget() {\r\n Fix.Model.target = target = targetStack.pop();\r\n }\r\n\r\n var context = null;\r\n var contextStack = [];\r\n\r\n function pushContext(_context) {\r\n if (context) contextStack.push(context);\r\n Fix.Model.context = context = _context;\r\n }\r\n\r\n function popContext() {\r\n Fix.Model.context = context = contextStack.pop();\r\n }\r\n\r\n var oldWatch = Fix.watch;\r\n Fix.watch = function (model, expOrFn, cb, options) {\r\n if (BI.isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === \"string\") {\r\n cb = model[cb];\r\n }\r\n return oldWatch.call(this, model, expOrFn, function () {\r\n options && options.store && pushTarget(options.store);\r\n var res = cb.apply(this, arguments);\r\n options && options.store && popTarget();\r\n return res;\r\n }, options);\r\n };\r\n\r\n function findStore(widget) {\r\n if (target != null) {\r\n return target;\r\n }\r\n widget = widget || context;\r\n var p = widget;\r\n while (p) {\r\n if (p instanceof Fix.Model || p.store || p.__cacheStore) {\r\n break;\r\n }\r\n p = p._parent || (p.options && p.options.element);\r\n }\r\n if (p) {\r\n if (p instanceof Fix.Model) {\r\n return widget.__cacheStore = p;\r\n }\r\n widget.__cacheStore = p.store || p.__cacheStore;\r\n return p.__cacheStore || p.store;\r\n }\r\n }\r\n\r\n var _create = BI.createWidget;\r\n BI.createWidget = function (item, options, context) {\r\n var pushed = false;\r\n if (BI.isWidget(options)) {\r\n pushContext(options);\r\n pushed = true;\r\n } else if (context != null) {\r\n pushContext(context);\r\n pushed = true;\r\n }\r\n var result = _create.apply(this, arguments);\r\n pushed && popContext();\r\n return result;\r\n };\r\n\r\n _.each([\"populate\", \"addItems\", \"prependItems\"], function (name) {\r\n var old = BI.Loader.prototype[name];\r\n BI.Loader.prototype[name] = function () {\r\n pushContext(this);\r\n var result = old.apply(this, arguments);\r\n popContext();\r\n return result;\r\n };\r\n });\r\n\r\n function createStore() {\r\n var needPop = false;\r\n if (_global.Fix && this._store) {\r\n var store = findStore(this.options.context || this.options.element);\r\n if (store) {\r\n pushTarget(store);\r\n needPop = true;\r\n }\r\n this.store = this._store();\r\n this.store && (this.store._widget = this);\r\n needPop && popTarget();\r\n needPop = false;\r\n pushTarget(this.store);\r\n if (this.store instanceof Fix.Model) {\r\n this.model = this.store.model;\r\n } else {\r\n this.model = this.store;\r\n }\r\n needPop = true;\r\n }\r\n return needPop;\r\n }\r\n\r\n BI.Widget.prototype._initRender = function () {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.beforeInit(BI.bind(function () {\r\n if (this.model && this.model.$vm) {\r\n this.model.$vm.$digest();\r\n }\r\n this._render();\r\n }, this));\r\n if (this.__asking === true) {\r\n this.__async = true;\r\n }\r\n } else {\r\n this._render();\r\n }\r\n };\r\n\r\n var _init = BI.Widget.prototype._init;\r\n BI.Widget.prototype._init = function () {\r\n var self = this;\r\n var needPop = createStore.call(this);\r\n _init.apply(this, arguments);\r\n needPop && popTarget();\r\n };\r\n\r\n var _render = BI.Widget.prototype._render;\r\n BI.Widget.prototype._render = function () {\r\n var needPop = false;\r\n if (_global.Fix && this._store) {\r\n needPop = true;\r\n pushTarget(this.store);\r\n initWatch(this, this.watch);\r\n }\r\n _render.apply(this, arguments);\r\n needPop && popTarget();\r\n };\r\n\r\n var unMount = BI.Widget.prototype.__d;\r\n BI.Widget.prototype.__d = function () {\r\n unMount.apply(this, arguments);\r\n this.store && BI.isFunction(this.store.destroy) && this.store.destroy();\r\n BI.each(this._watchers, function (i, unwatches) {\r\n unwatches = BI.isArray(unwatches) ? unwatches : [unwatches];\r\n BI.each(unwatches, function (j, unwatch) {\r\n unwatch();\r\n });\r\n });\r\n this._watchers && (this._watchers = []);\r\n if (this.store) {\r\n this.store._parent && (this.store._parent = null);\r\n this.store._widget && (this.store._widget = null);\r\n this.store = null;\r\n }\r\n delete this.__cacheStore;\r\n };\r\n\r\n _.each([\"_mount\"], function (name) {\r\n var old = BI.Widget.prototype[name];\r\n old && (BI.Widget.prototype[name] = function () {\r\n this.store && pushTarget(this.store);\r\n try {\r\n var res = old.apply(this, arguments);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n this.store && popTarget();\r\n return res;\r\n });\r\n });\r\n\r\n var additionFunc = function () {\r\n BI.nextTick(function () {\r\n Fix && Fix.refreshAll && Fix.refreshAll();\r\n });\r\n };\r\n\r\n $(document).ajaxComplete(additionFunc);\r\n\r\n if (BI.history) {\r\n var navigate = BI.history.navigate;\r\n // navigate之后不会立即变化有一段延迟\r\n BI.history.navigate = function () {\r\n navigate.apply(this, arguments);\r\n BI.defer(function () {\r\n additionFunc();\r\n }, 200);\r\n }\r\n var back = window.history.back;\r\n window.history.back = function () {\r\n back.apply(this, arguments);\r\n BI.defer(function () {\r\n additionFunc();\r\n }, 200);\r\n }\r\n }\r\n\r\n if (BI.Router) {\r\n var execute = BI.Router.prototype.execute;\r\n BI.Router.prototype.execute = function () {\r\n execute.apply(this, arguments);\r\n additionFunc();\r\n }\r\n }\r\n\r\n _.each([\"each\", \"map\", \"reduce\", \"reduceRight\", \"find\", \"filter\", \"reject\", \"every\", \"all\", \"some\", \"any\", \"max\", \"min\",\r\n \"sortBy\", \"groupBy\", \"indexBy\", \"countBy\", \"partition\",\r\n \"keys\", \"allKeys\", \"values\", \"pairs\", \"invert\",\r\n \"mapObject\", \"findKey\", \"pick\", \"omit\", \"tap\"], function (name) {\r\n var old = BI[name];\r\n BI[name] = function (obj, fn, context) {\r\n return typeof fn === \"function\" ? old(obj, function (key, value) {\r\n if (!(key in Fix.$$skipArray)) {\r\n return fn.apply(this, arguments);\r\n }\r\n }, context) : old.apply(this, arguments);\r\n };\r\n });\r\n BI.isEmpty = function (ob) {\r\n if (BI.isPlainObject(ob) && ob.__ob__) {\r\n return BI.keys(ob).length === 0;\r\n }\r\n return _.isEmpty(ob);\r\n };\r\n BI.keys = function (ob) {\r\n var keys = _.keys(ob);\r\n var nKeys = [];\r\n for (var i = 0; i < keys.length; i++) {\r\n if (!(keys[i] in Fix.$$skipArray)) {\r\n nKeys.push(keys[i]);\r\n }\r\n }\r\n return nKeys;\r\n };\r\n BI.values = function (ob) {\r\n var keys = BI.keys(obj);\r\n var length = keys.length;\r\n var values = [];\r\n for (var i = 0; i < length; i++) {\r\n values[i] = obj[keys[i]];\r\n }\r\n return values;\r\n };\r\n BI.extend = function () {\r\n var args = Array.prototype.slice.call(arguments);\r\n if (args.length < 1) {\r\n return {};\r\n }\r\n var object = args[0];\r\n var i = 1;\r\n while (i < args.length) {\r\n BI.each(args[i], function (key, v) {\r\n object[key] = v;\r\n });\r\n i++;\r\n }\r\n return object;\r\n };\r\n BI.size = function (ob) {\r\n if (BI.isPlainObject(ob) && ob.__ob__) {\r\n return BI.keys(ob).length;\r\n }\r\n return _.size(ob);\r\n };\r\n BI.isEmptyObject = function (ob) {\r\n return BI.size(ob) === 0;\r\n };\r\n BI.deepClone = function (ob) {\r\n return Fix.toJSON(ob);\r\n };\r\n\r\n Fix.set = function (obj, k, v) {\r\n try {\r\n if(obj) {\r\n obj[k] = v;\r\n }\r\n } catch (e) {\r\n\r\n } finally {\r\n return _.cloneDeep(obj);\r\n }\r\n }\r\n Fix.del = function (obj, k) {\r\n try {\r\n delete obj[k];\r\n } catch (e) {\r\n\r\n } finally {\r\n return _.cloneDeep(obj);\r\n }\r\n }\r\n BI.watch = Fix.watch;\r\n}());\r\n\n//# sourceMappingURL=fineui.ie.js.map"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 141);\n","import fineui from \"./index\";\r\n\r\nBI.extend(BI, fineui);\r\n","import { _Combo, _ComboStatic } from \"./base/combination/combo\";\r\nimport { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from \"./base/combination/group.button\";\r\nimport { _Tab, _TabStatic } from \"./base/combination/tab\";\r\nimport { _Pane, _PaneStatic } from \"./base/pane\";\r\nimport { _BasicButton, _BasicButtonStatic } from \"./base/single/button/button.basic\";\r\nimport { _Button, _ButtonStatic } from \"./base/single/button/buttons/button\";\r\nimport { _TextButton, _TextButtonStatic } from \"./base/single/button/buttons/button.text\";\r\nimport { _IconTextItem, _IconTextItemStatic } from \"./base/single/button/listitem/icontextitem\";\r\nimport { _Editor, _EditorStatic } from \"./base/single/editor/editor\";\r\nimport { _AbstractLabel } from \"./base/single/label/abstract.label\";\r\nimport { _Label } from \"./base/single/label/label\";\r\nimport { _Single } from \"./base/single/single\";\r\nimport { _Text } from \"./base/single/text\";\r\nimport { _Trigger } from \"./base/single/trigger/trigger\";\r\nimport { _IconChangeButton, _IconChangeButtonStatic } from \"./case/button/icon/icon.change\";\r\nimport { _MultiSelectItem, _MultiSelectItemStatic } from \"./case/button/item.multiselect\";\r\nimport { _BubbleCombo, _BubbleComboStatic } from \"./case/combo/bubblecombo/combo.bubble\";\r\nimport { _TextValueCombo, _TextValueComboStatic } from \"./case/combo/combo.textvalue\";\r\nimport { _SignEditor, _SignEditorStatic } from \"./case/editor/editor.sign\";\r\nimport { _LoadingPane } from \"./case/loading/loading_pane\";\r\nimport { _AllValueMultiTextValueCombo, _AllValueMultiTextValueComboStatic } from \"./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo\";\r\nimport { _Action, _ActionFactory } from \"./core/action/action\";\r\nimport { _ShowAction } from \"./core/action/action.show\";\r\nimport { _base } from \"./core/base\";\r\nimport { _Behavior, _BehaviorFactory } from \"./core/behavior/behavior\";\r\nimport { _HighlightBehavior } from \"./core/behavior/behavior.highlight\";\r\nimport { _RedMarkBehavior } from \"./core/behavior/behavior.redmark\";\r\nimport * as decorator from \"./core/decorator/decorator\";\r\nimport { _func } from \"./core/func\";\r\nimport { _i18n } from \"./core/i18n\";\r\nimport { _OB } from \"./core/ob\";\r\nimport { _Widget, _WidgetStatic } from \"./core/widget\";\r\nimport { _Layout } from \"./core/wrapper/layout\";\r\nimport { _HTapeLayout, _VTapeLayout } from \"./core/wrapper/layout/layout.tape\";\r\n\r\n\r\ntype ClassConstructor<T extends {}> = T & {\r\n new(config: any): T;\r\n (config: any): T;\r\n readonly prototype: T;\r\n}\r\n\r\nexport interface BI extends _func, _i18n, _base {\r\n OB: ClassConstructor<_OB>;\r\n Widget: ClassConstructor<_Widget> & _WidgetStatic;\r\n Single: ClassConstructor<_Single>;\r\n BasicButton: ClassConstructor<_BasicButton> & _BasicButtonStatic;\r\n Button: ClassConstructor<_Button> & _ButtonStatic;\r\n TextButton: ClassConstructor<_TextButton> & _TextButtonStatic;\r\n IconChangeButton: ClassConstructor<_IconChangeButton> & _IconChangeButtonStatic;\r\n Trigger: ClassConstructor<_Trigger>;\r\n Action: ClassConstructor<_Action>;\r\n ActionFactory: ClassConstructor<_ActionFactory>;\r\n ShowAction: ClassConstructor<_ShowAction>;\r\n Behavior: ClassConstructor<_Behavior>;\r\n BehaviorFactory: ClassConstructor<_BehaviorFactory>;\r\n HighlightBehavior: ClassConstructor<_HighlightBehavior>;\r\n RedMarkBehavior: ClassConstructor<_RedMarkBehavior>;\r\n Pane: ClassConstructor<_Pane> & _PaneStatic;\r\n LoadingPane: ClassConstructor<_LoadingPane>;\r\n Tab: ClassConstructor<_Tab> & _TabStatic;\r\n ButtonGroup: ClassConstructor<_ButtonGroup> & _ButtonGroupChooseType & _ButtonGroupStatic;\r\n Combo: ClassConstructor<_Combo> & _ComboStatic;\r\n TextValueCombo: ClassConstructor<_TextValueCombo> & _TextValueComboStatic;\r\n BubbleCombo: ClassConstructor<_BubbleCombo> & _BubbleComboStatic;\r\n AllValueMultiTextValueCombo: ClassConstructor<_AllValueMultiTextValueCombo> & _AllValueMultiTextValueComboStatic;\r\n IconTextItem: ClassConstructor<_IconTextItem> & _IconTextItemStatic;\r\n MultiSelectItem: ClassConstructor<_MultiSelectItem> & _MultiSelectItemStatic;\r\n AbstractLabel: ClassConstructor<_AbstractLabel>;\r\n Label: ClassConstructor<_Label>;\r\n Text: ClassConstructor<_Text>;\r\n Editor: ClassConstructor<_Editor> & _EditorStatic;\r\n SignEditor: ClassConstructor<_SignEditor> & _SignEditorStatic;\r\n Layout: ClassConstructor<_Layout>;\r\n HTapeLayout: ClassConstructor<_HTapeLayout>;\r\n VTapeLayout: ClassConstructor<_VTapeLayout>;\r\n Decorators: typeof decorator;\r\n}\r\n\r\nexport default {\r\n Decorators: decorator,\r\n};\r\n","export type Constructor<T> = new(...args: any[]) => T;\r\n\r\n/**\r\n * 注册widget\r\n */\r\nexport function shortcut() {\r\n return function decorator<U>(Target: Constructor<U> & {xtype: string}): void {\r\n BI.shortcut(Target.xtype, Target);\r\n };\r\n}\r\n\r\n/**\r\n * 注册model\r\n */\r\nexport function model() {\r\n return function decorator<U extends {new(...args:any[]):{}} & {xtype: string, context?: ReadonlyArray<string>}>(Target: U): void {\r\n BI.model(Target.xtype, Target);\r\n };\r\n}\r\n\r\n/**\r\n * 类注册_store属性\r\n * @param Model model类\r\n * @param opts 额外条件\r\n */\r\nexport function store<T>(Model: Constructor<T> & {xtype: string}, opts: { props?(this: unknown): { [key: string]: unknown } } = {}) {\r\n return function classDecorator<U extends {new(...args:any[]):{}}>(constructor:U) {\r\n return class extends constructor {\r\n _store() {\r\n const props = opts.props ? opts.props.apply(this) : undefined;\r\n\r\n return BI.Models.getModel(Model.xtype, props);\r\n }\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Model基类\r\n */\r\nexport class Model<U extends {types?: {[key: string]: unknown} | {}, context?: ReadonlyArray<string>} = {}> extends Fix.Model {\r\n // @ts-ignore this[\"computed\"][key]为空\r\n model: Pick<{[key in keyof U[\"types\"]]: U[\"types\"][key]}, U[\"context\"][number]> & {[key in keyof ReturnType<this[\"state\"]>]: ReturnType<this[\"state\"]>[key]} & {[key in keyof this[\"computed\"]]: ReturnType<this[\"computed\"][key]>};\r\n\r\n store: this[\"actions\"];\r\n\r\n state(): {[key: string]: unknown} | {} {\r\n return {};\r\n }\r\n\r\n context: U[\"context\"];\r\n\r\n actions:{[key: string]: (...args: any[]) => any};\r\n\r\n childContext: ReadonlyArray<keyof (this[\"computed\"] & ReturnType<this[\"state\"]>)>;\r\n\r\n // @ts-ignore this[\"computed\"][key]为空\r\n TYPE: Pick<{[key in keyof this[\"computed\"]]: ReturnType<this[\"computed\"][key]>} & {[key in keyof ReturnType<this[\"state\"]>]: ReturnType<this[\"state\"]>[key]}, this[\"childContext\"][number]>;\r\n\r\n computed: {[key: string]: () => unknown} | {};\r\n}\r\n\r\n/* 分享一段很好看的代码\r\n// union to intersection of functions\r\ntype UnionToIoF<U> =\r\n (U extends any ? (k: (x: U) => void) => void : never) extends\r\n ((k: infer I) => void) ? I : never\r\n\r\n// return last element from Union\r\ntype UnionPop<U> = UnionToIoF<U> extends { (a: infer A): void; } ? A : never;\r\n\r\n// prepend an element to a tuple.\r\ntype Prepend<U, T extends ReadonlyArray<any>> =\r\n ((a: U, ...r: T) => void) extends (...r: infer R) => void ? R : never;\r\n\r\ntype UnionToTupleRecursively<Union, Result extends ReadonlyArray<any>> = {\r\n 1: Result;\r\n 0: UnionToTupleRecursively_<Union, UnionPop<Union>, Result>;\r\n // 0: UnionToTupleRecursively<Exclude<Union, UnionPop<Union>>, Prepend<UnionPop<Union>, Result>>\r\n}[[Union] extends [never] ? 1 : 0];\r\n\r\ntype UnionToTupleRecursively_<Union, Element, Result extends ReadonlyArray<any>> =\r\n UnionToTupleRecursively<Exclude<Union, Element>, Prepend<Element, Result>>;\r\n\r\ntype UnionToTuple<U> = UnionToTupleRecursively<U, []>;\r\n*/\r\n"]}