forked from fanruan/fineui
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
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","Math","globalThis","window","self","Function","this","u","f","v","h","y","target","global","a","stat","noTargetGet","forced","undefined","sham","String","enforce","split","unsafe","source","join","toString","slice","WeakMap","has","g","set","x","getterFor","type","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","constructor","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","b","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","__proto__","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","iterator","max","defineProperties","assign","I","_","C","R","N","D","G","V","$","z","H","W","q","JSON","B","stringify","U","Y","J","K","Q","X","Z","tt","nt","et","QObject","rt","findChild","ot","it","tag","description","ut","ct","ft","pt","at","st","lt","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","toGMTString","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","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","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","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","isFrontDate","newDate","isFinalDate","getPageByDateJSON","page","getDateJSONByPage","months","YearCalendar","_yearCreator","getStartYear","startDate","endDate","INTERVAL","currentYear","years","tyears","isFrontYear","isFinalYear","getEndYear","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","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","_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","REQ_GET_DATA_LENGTH","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","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":";;AA4zoCA,QAASA,iBAAgBC,SAAUC,aAAe,KAAMD,mBAAoBC,cAAgB,KAAM,IAAIC,WAAU,sCA5zoC/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,EAAE,SAASD,GAAG,mBAAoBc,SAAQA,OAAOC,aAAaL,OAAOC,eAAeX,EAAEc,OAAOC,aAAaC,MAAM,WAAWN,OAAOC,eAAeX,EA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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,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,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,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,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC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C,WAA8B,OAAOA,GAEtC,OADA4zK,EAAoBp1M,EAAEiqI,EAAQ,IAAKA,GAC5BA,GAIRmrE,EAAoB91M,EAAI,SAAS2X,EAAQ4Q,GAAY,OAAO5nB,OAAOU,UAAUC,eAAef,KAAKoX,EAAQ4Q,IAGzGutL,EAAoBv0M,EAAI,GAIjBu0M,EAAoBA,EAAoBt0M,EAAI,K,yEClFrD,M,qDAAA,SAEAqR,GAAGgzB,OAAOhzB,GAAIojM,e,0bCwCC,CACXC,W,0aA3CJ,U,8nBCKO,SAASj8J,IACZ,OAAO,SAAsBk8J,GACzBtjM,GAAGonC,SAASk8J,EAAOh8J,MAAOg8J,K,QAO3B,SAASzlH,IACZ,OAAO,SAAyGylH,GAC5GtjM,GAAG69E,MAAMylH,EAAOh8J,MAAOg8J,K,QASxB,SAASvlH,EAAS29C,GAA2G,IAAlE3hC,EAAkE,0DAAJ,GAC5H,OAAO,SAA2DrnG,GAC9D,+FACI2vM,OAAA,WACI,IAAM/8L,EAAQy0F,EAAKz0F,MAAQy0F,EAAKz0F,MAAM9S,MAAMvD,MAAQY,UAEpD,OAAOmQ,GAAGq/E,OAAOC,SAASo8C,EAAMp0F,MAAOhiC,IAJ/C,GAAqB5S,K,mBAahBgpI,E,2VAMT99H,MAAA,WACI,MAAO,I,GAPqGs4H,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(e,t,n){(function(t){var n=function(t){return t&&t.Math==Math&&t};e.exports=n(\"object\"==typeof globalThis&&globalThis)||n(\"object\"==typeof window&&window)||n(\"object\"==typeof self&&self)||n(\"object\"==typeof t&&t)||Function(\"return this\")()}).call(this,n(74))},function(t,n,e){var r=e(0),o=e(20),i=e(41),u=e(53),c=r.Symbol,f=o(\"wks\");t.exports=function(t){return f[t]||(f[t]=u&&c[t]||(u?c:i)(\"Symbol.\"+t))}},function(t,n,e){var s=e(0),l=e(24).f,p=e(6),v=e(11),d=e(40),h=e(77),y=e(51);t.exports=function(t,n){var e,r,o,i,u,c=t.target,f=t.global,a=t.stat;if(e=f?s:a?s[c]||d(c,{}):(s[c]||{}).prototype)for(r in n){if(i=n[r],o=t.noTargetGet?(u=l(e,r))&&u.value:e[r],!y(f?r:c+(a?\".\":\"#\")+r,t.forced)&&o!==undefined){if(typeof i==typeof o)continue;h(i,o)}(t.sham||o&&o.sham)&&p(i,\"sham\",!0),v(e,r,i,t)}}},function(t,n,e){var r=e(7);t.exports=function(t){if(!r(t))throw TypeError(String(t)+\" is not an object\");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,e){var r=e(4);t.exports=!r(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,n,e){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){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){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){t.exports=e(0)},function(t,n,e){var c=e(0),r=e(20),f=e(6),a=e(8),s=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||a(e,\"name\")||f(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:f(t,n,e)):i?t[n]=e:s(n,e)})(Function.prototype,\"toString\",function(){return\"function\"==typeof this&&u(this).source||o.call(this)})},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(String(t)+\" is not a function\");return t}},function(t,n,e){var r=e(37),o=e(25);t.exports=function(t){return r(o(t))}},function(t,n){t.exports=!1},function(t,n,e){var r,o,i,u=e(76),c=e(0),f=e(7),a=e(6),s=e(8),l=e(26),p=e(27),v=c.WeakMap;if(u){var d=new v,h=d.get,y=d.has,g=d.set;r=function(t,n){return g.call(d,t,n),n},o=function(t){return h.call(d,t)||{}},i=function(t){return y.call(d,t)}}else{var x=l(\"state\");p[x]=!0,r=function(t,n){return a(t,x,n),n},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(e){return function(t){var n;if(!f(t)||(n=o(t)).type!==e)throw TypeError(\"Incompatible receiver, \"+e+\" required\");return n}}}},function(t,n,e){var r=e(10),o=e(0),i=function(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){var r=e(25);t.exports=function(t){return Object(r(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){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){var r=e(3),o=e(83),i=e(43),u=e(27),c=e(52),f=e(39),a=e(26)(\"IE_PROTO\"),s=\"prototype\",l=function(){},p=function(){var t,n=f(\"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[s][i[e]];return p()};t.exports=Object.create||function(t,n){var e;return null!==t?(l[s]=r(t),e=new l,l[s]=null,e[a]=t):e=p(),n===undefined?e:o(e,n)},u[a]=!0},function(t,n){t.exports={}},function(t,n,e){\"use strict\";var o=e(13),r=function(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 r(t)}},function(t,n,e){var r=e(5),o=e(36),i=e(19),u=e(14),c=e(38),f=e(8),a=e(47),s=Object.getOwnPropertyDescriptor;n.f=r?s:function(t,n){if(t=u(t),n=c(n,!0),a)try{return s(t,n)}catch(e){}if(f(t,n))return i(!o.f.call(t,n),t[n])}},function(t,n){t.exports=function(t){if(t==undefined)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n,e){var r=e(20),o=e(41),i=r(\"keys\");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n){t.exports={}},function(t,n,e){var r=e(29),o=Math.min;t.exports=function(t){return 0<t?o(r(t),9007199254740991):0}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?r:e)(t)}},function(t,n,e){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){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){var r=e(8),o=e(18),i=e(26),u=e(57),c=i(\"IE_PROTO\"),f=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?f:null}},function(t,n,e){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){var v=e(3),d=e(123),h=e(28),y=e(31),g=e(124),x=e(125),m=function(t,n){this.stopped=t,this.result=n};(t.exports=function(t,n,e,r,o){var i,u,c,f,a,s,l,p=y(n,e,r?2:1);if(o)i=t;else{if(\"function\"!=typeof(u=g(t)))throw TypeError(\"Target is not iterable\");if(d(u)){for(c=0,f=h(t.length);c<f;c++)if((a=r?p(v(l=t[c])[0],l[1]):p(t[c]))&&a instanceof m)return a;return new m(!1)}i=u.call(t)}for(s=i.next;!(l=s.call(i)).done;)if(\"object\"==typeof(a=x(i,p,l.value,r))&&a&&a instanceof m)return a;return new m(!1)}).stop=function(t){return new m(!0,t)}},function(t,n){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){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){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){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){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){var e=0,r=Math.random();t.exports=function(t){return\"Symbol(\"+String(t===undefined?\"\":t)+\")_\"+(++e+r).toString(36)}},function(t,n,e){var r=e(49),o=e(43).concat(\"length\",\"prototype\");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n){t.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(49),o=e(43);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){var r=e(17);t.exports=r(\"navigator\",\"userAgent\")||\"\"},function(t,n,e){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){var r=e(20);t.exports=r(\"native-function-to-string\",Function.toString)},function(t,n,e){var u=e(8),c=e(14),f=e(50).indexOf,a=e(27);t.exports=function(t,n){var e,r=c(t),o=0,i=[];for(e in r)!u(a,e)&&u(r,e)&&i.push(e);for(;n.length>o;)u(r,e=n[o++])&&(~f(i,e)||i.push(e));return i}},function(t,n,e){var f=e(14),a=e(28),s=e(79),r=function(c){return function(t,n,e){var r,o=f(t),i=a(o.length),u=s(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){var r=e(4),o=/#|\\.prototype\\./,i=function(t,n){var e=c[u(t)];return e==a||e!=f&&(\"function\"==typeof n?r(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,\".\").toLowerCase()},c=i.data={},f=i.NATIVE=\"N\",a=i.POLYFILL=\"P\";t.exports=i},function(t,n,e){var r=e(17);t.exports=r(\"document\",\"documentElement\")},function(t,n,e){var r=e(4);t.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(t,n,e){var r=e(12);t.exports=Array.isArray||function(t){return\"Array\"==r(t)}},function(t,n,e){n.f=e(1)},function(t,n,e){var b=e(31),S=e(37),O=e(18),j=e(28),w=e(93),P=[].push,r=function(v){var d=1==v,h=2==v,y=3==v,g=4==v,x=6==v,m=5==v||x;return function(t,n,e,r){for(var o,i,u=O(t),c=S(u),f=b(n,e,3),a=j(c.length),s=0,l=r||w,p=d?l(t,a):h?l(t,0):undefined;s<a;s++)if((m||s in c)&&(i=f(o=c[s],s,u),v))if(d)p[s]=i;else if(i)switch(v){case 3:return!0;case 5:return o;case 6:return s;case 2:P.call(p,o)}else if(g)return!1;return x?-1:y||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){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){var o=e(12),i=e(1)(\"toStringTag\"),u=\"Arguments\"==o(function(){return arguments}());t.exports=function(t){var n,e,r;return t===undefined?\"Undefined\":null===t?\"Null\":\"string\"==typeof(e=function(t,n){try{return t[n]}catch(e){}}(n=Object(t),i))?e:u?o(n):\"Object\"==(r=o(n))&&\"function\"==typeof n.callee?\"Arguments\":r}},function(t,n,e){var f=e(29),a=e(25),r=function(c){return function(t,n){var e,r,o=String(a(t)),i=f(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),x=e(113),m=e(32),b=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(){return this};t.exports=function(t,n,e,r,o,i,u){x(e,n,r);var c,f,a,s=function(t){if(t===o&&h)return h;if(!A&&t in v)return v[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,v=t.prototype,d=v[T]||v[\"@@iterator\"]||o&&v[o],h=!A&&d||s(o),y=\"Array\"==n&&v.entries||d;if(y&&(c=m(y.call(new t)),E!==Object.prototype&&c.next&&(w||m(c)===E||(b?b(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,h=function(){return d.call(this)}),w&&!u||v[T]===h||O(v,T,h),P[n]=h,o)if(f={values:s(L),keys:i?h:s(\"keys\"),entries:s(M)},u)for(a in f)!A&&!p&&a in v||j(v,a,f[a]);else g({target:n,proto:!0,forced:A||p},f);return f}},function(t,n,e){\"use strict\";var r,o,i,u=e(32),c=e(6),f=e(8),a=e(1),s=e(15),l=a(\"iterator\"),p=!1;[].keys&&(\"next\"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):p=!0),r==undefined&&(r={}),s||f(r,l)||c(r,l,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,n,e){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):t.__proto__=n,t}}():undefined)},function(t,n,e){var r=e(0);t.exports=r.Promise},function(t,n,e){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){var r,o,i,u=e(0),c=e(4),f=e(12),a=e(31),s=e(52),l=e(39),p=e(46),v=u.location,d=u.setImmediate,h=u.clearImmediate,y=u.process,g=u.MessageChannel,x=u.Dispatch,m=0,b={},S=\"onreadystatechange\",O=function(t){if(b.hasOwnProperty(t)){var n=b[t];delete b[t],n()}},j=function(t){return function(){O(t)}},w=function(t){O(t.data)},P=function(t){u.postMessage(t+\"\",v.protocol+\"//\"+v.host)};d&&h||(d=function(t){for(var n=[],e=1;e<arguments.length;)n.push(arguments[e++]);return b[++m]=function(){(\"function\"==typeof t?t:Function(t)).apply(undefined,n)},r(m),m},h=function(t){delete b[t]},\"process\"==f(y)?r=function(t){y.nextTick(j(t))}:x&&x.now?r=function(t){x.now(j(t))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(p)?(i=(o=new g).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):!u.addEventListener||\"function\"!=typeof postMessage||u.importScripts||c(P)?r=S in l(\"script\")?function(t){s.appendChild(l(\"script\"))[S]=function(){s.removeChild(this),O(t)}}:function(t){setTimeout(j(t),0)}:(r=P,u.addEventListener(\"message\",w,!1))),t.exports={set:d,clear:h}},function(t,n,e){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),a=e(13),o=e(23),i=e(35),s=e(34);r({target:\"Promise\",stat:!0},{allSettled:function(t){var c=this,n=o.f(c),f=n.resolve,e=n.reject,r=i(function(){var r=a(c.resolve),o=[],i=0,u=1;s(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||f(o))},function(t){e||(e=!0,o[n]={status:\"rejected\",reason:t},--u||f(o))})}),--u||f(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,f=String.prototype.replace,i=c,a=(r=/a/,o=/b*/g,c.call(r,\"a\"),c.call(o,\"a\"),0!==r.lastIndex||0!==o.lastIndex),s=/()??/.exec(\"\")[1]!==undefined;(a||s)&&(i=function(t){var n,e,r,o,i=this;return s&&(e=new RegExp(\"^\"+i.source+\"$(?!\\\\s)\",u.call(i))),a&&(n=i.lastIndex),r=c.call(i,t),a&&r&&(i.lastIndex=i.global?r.index+r[0].length:n),s&&r&&1<r.length&&f.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){t.exports=e(72)},function(t,n,e){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){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){var r=e(0),o=e(40),i=\"__core-js_shared__\",u=r[i]||o(i,{});t.exports=u},function(t,n,e){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){var c=e(8),f=e(78),a=e(24),s=e(9);t.exports=function(t,n){for(var e=f(n),r=s.f,o=a.f,i=0;i<e.length;i++){var u=e[i];c(t,u)||r(t,u,o(n,u))}}},function(t,n,e){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){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){t.exports=e(81)},function(t,n,e){e(82);var r=e(10).Object;t.exports=function(t,n){return r.create(t,n)}},function(t,n,e){e(2)({target:\"Object\",stat:!0,sham:!e(5)},{create:e(21)})},function(t,n,e){var r=e(5),u=e(9),c=e(3),f=e(45);t.exports=r?Object.defineProperties:function(t,n){c(t);for(var e,r=f(n),o=r.length,i=0;i<o;)u.f(t,e=r[i++],n[e]);return t}},function(t,n,e){t.exports=e(85)},function(t,n,e){e(86);var r=e(10);t.exports=r.Object.assign},function(t,n,e){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),v=e(45),d=e(44),h=e(36),y=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]||v(o({},n)).join(\"\")!=r})?function(t,n){for(var e=y(t),r=arguments.length,o=1,i=d.f,u=h.f;o<r;)for(var c,f=g(arguments[o++]),a=i?v(f).concat(i(f)):v(f),s=a.length,l=0;l<s;)c=a[l++],p&&!u.call(f,c)||(e[c]=f[c]);return e}:o},function(t,n,e){t.exports=e(89)},function(t,n,e){e(90);var r=e(10);t.exports=r.Object.getOwnPropertySymbols},function(t,n,e){\"use strict\";var r=e(2),o=e(0),i=e(15),u=e(5),c=e(53),f=e(4),a=e(8),s=e(54),l=e(7),p=e(3),v=e(18),d=e(14),h=e(38),y=e(19),g=e(21),x=e(45),m=e(42),b=e(91),S=e(44),O=e(24),j=e(9),w=e(36),P=e(6),E=e(11),A=e(20),T=e(26),L=e(27),M=e(41),k=e(1),I=e(55),_=e(92),F=e(30),C=e(16),R=e(56).forEach,N=T(\"hidden\"),D=\"Symbol\",G=\"prototype\",V=k(\"toPrimitive\"),$=C.set,z=C.getterFor(D),H=Object[G],W=o.Symbol,q=o.JSON,B=q&&q.stringify,U=O.f,Y=j.f,J=b.f,K=w.f,Q=A(\"symbols\"),X=A(\"op-symbols\"),Z=A(\"string-to-symbol-registry\"),tt=A(\"symbol-to-string-registry\"),nt=A(\"wks\"),et=o.QObject,rt=!et||!et[G]||!et[G].findChild,ot=u&&f(function(){return 7!=g(Y({},\"a\",{get:function(){return Y(this,\"a\",{value:7}).a}})).a})?function(t,n,e){var r=U(H,n);r&&delete H[n],Y(t,n,e),r&&t!==H&&Y(H,n,r)}:Y,it=function(t,n){var e=Q[t]=g(W[G]);return $(e,{type:D,tag:t,description:n}),u||(e.description=n),e},ut=c&&\"symbol\"==typeof W.iterator?function(t){return\"symbol\"==typeof t}:function(t){return Object(t)instanceof W},ct=function(t,n,e){t===H&&ct(X,n,e),p(t);var r=h(n,!0);return p(e),a(Q,r)?(e.enumerable?(a(t,N)&&t[N][r]&&(t[N][r]=!1),e=g(e,{enumerable:y(0,!1)})):(a(t,N)||Y(t,N,y(1,{})),t[N][r]=!0),ot(t,r,e)):Y(t,r,e)},ft=function(n,t){p(n);var e=d(t),r=x(e).concat(pt(e));return R(r,function(t){u&&!at.call(e,t)||ct(n,t,e[t])}),n},at=function(t){var n=h(t,!0),e=K.call(this,n);return!(this===H&&a(Q,n)&&!a(X,n))&&(!(e||!a(this,n)||!a(Q,n)||a(this,N)&&this[N][n])||e)},st=function(t,n){var e=d(t),r=h(n,!0);if(e!==H||!a(Q,r)||a(X,r)){var o=U(e,r);return!o||!a(Q,r)||a(e,N)&&e[N][r]||(o.enumerable=!0),o}},lt=function(t){var n=J(d(t)),e=[];return R(n,function(t){a(Q,t)||a(L,t)||e.push(t)}),e},pt=function(t){var n=t===H,e=J(n?X:d(t)),r=[];return R(e,function(t){!a(Q,t)||n&&!a(H,t)||r.push(Q[t])}),r};c||(E((W=function(){if(this instanceof W)throw TypeError(\"Symbol is not a constructor\");var t=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,n=M(t),e=function(t){this===H&&e.call(X,t),a(this,N)&&a(this[N],n)&&(this[N][n]=!1),ot(this,n,y(1,t))};return u&&rt&&ot(H,n,{configurable:!0,set:e}),it(n,t)})[G],\"toString\",function(){return z(this).tag}),w.f=at,j.f=ct,O.f=st,m.f=b.f=lt,S.f=pt,u&&(Y(W[G],\"description\",{configurable:!0,get:function(){return z(this).description}}),i||E(H,\"propertyIsEnumerable\",at,{unsafe:!0})),I.f=function(t){return it(k(t),t)}),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),R(x(nt),function(t){_(t)}),r({target:D,stat:!0,forced:!c},{\"for\":function(t){var n=String(t);if(a(Z,n))return Z[n];var e=W(n);return Z[n]=e,tt[e]=n,e},keyFor:function(t){if(!ut(t))throw TypeError(t+\" is not a symbol\");if(a(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:\"Object\",stat:!0,forced:!c,sham:!u},{create:function(t,n){return n===undefined?g(t):ft(g(t),n)},defineProperty:ct,defineProperties:ft,getOwnPropertyDescriptor:st}),r({target:\"Object\",stat:!0,forced:!c},{getOwnPropertyNames:lt,getOwnPropertySymbols:pt}),r({target:\"Object\",stat:!0,forced:f(function(){S.f(1)})},{getOwnPropertySymbols:function(t){return S.f(v(t))}}),q&&r({target:\"JSON\",stat:!0,forced:!c||f(function(){var t=W();return\"[null]\"!=B([t])||\"{}\"!=B({a:t})||\"{}\"!=B(Object(t))})},{stringify:function(t){for(var n,e,r=[t],o=1;o<arguments.length;)r.push(arguments[o++]);if(e=n=r[1],(l(n)||t!==undefined)&&!ut(t))return s(n)||(n=function(t,n){if(\"function\"==typeof e&&(n=e.call(this,t,n)),!ut(n))return n}),r[1]=n,B.apply(q,r)}}),W[G][V]||P(W[G],V,W[G].valueOf),F(W,D),L[N]=!0},function(t,n,e){var r=e(14),o=e(42).f,i={}.toString,u=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&\"[object Window]\"==i.call(t)?function(t){try{return o(t)}catch(n){return u.slice()}}(t):o(r(t))}},function(t,n,e){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){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):e=undefined),new(e===undefined?Array:e)(0===n?0:n)}},function(t,n,e){t.exports=e(95)},function(t,n,e){e(96);var r=e(10);t.exports=r.Object.getPrototypeOf},function(t,n,e){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){t.exports=e(98)},function(t,n,e){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){t.exports=e(102)},function(t,n,e){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,f=i(\"indexOf\");r({target:\"Array\",proto:!0,forced:c||f},{indexOf:function(t){return c?u.apply(this,arguments)||0:o(this,t,1<arguments.length?arguments[1]:undefined)}})},function(t,n,e){t.exports=e(105)},function(t,n,e){e(106);var r=e(33);t.exports=r(\"Function\",\"bind\")},function(t,n,e){e(2)({target:\"Function\",proto:!0},{bind:e(107)})},function(t,n,e){\"use strict\";var i=e(13),u=e(7),c=[].slice,f={};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?function(t,n,e){if(!(n in f)){for(var r=[],o=0;o<n;o++)r[o]=\"a[\"+o+\"]\";f[n]=Function(\"C,a\",\"return new C(\"+r.join(\",\")+\")\")}return f[n](t,e)}(e,t.length,t):e.apply(n,t)};return u(e.prototype)&&(o.prototype=e.prototype),o}},function(t,n,e){t.exports=e(109),e(130),e(131),e(132),e(133)},function(t,n,e){e(110),e(112),e(115),e(119),e(68),e(129);var r=e(10);t.exports=r.Promise},function(t,n,e){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,f=r.getterFor(u);i(String,\"String\",function(t){c(this,{type:u,string:String(t),index:0})},function(){var t,n=f(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),f=e(22),a=function(){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),f[r]=a,t}},function(t,n,e){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){var r=e(0),o=e(116),i=e(117),u=e(6),c=e(1),f=c(\"iterator\"),a=c(\"toStringTag\"),s=i.values;for(var l in o){var p=r[l],v=p&&p.prototype;if(v){if(v[f]!==s)try{u(v,f,s)}catch(h){v[f]=s}if(v[a]||u(v,a,l),o[l])for(var d in i)if(v[d]!==i[d])try{u(v,d,i[d])}catch(h){v[d]=i[d]}}}},function(t,n){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),f=\"Array Iterator\",a=u.set,s=u.getterFor(f);t.exports=c(Array,\"Array\",function(t,n){a(this,{type:f,target:r(t),index:0,kind:n})},function(){var t=s(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){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),f=e(15),a=e(0),s=e(10),l=e(64),p=e(11),v=e(120),d=e(30),h=e(121),y=e(7),g=e(13),x=e(122),m=e(12),b=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=a.TypeError,G=a.document,V=a.process,$=a.fetch,z=V&&V.versions,H=z&&z.v8||\"\",W=A.f,q=W,B=\"process\"==m(V),U=!!(G&&G.createEvent&&a.dispatchEvent),Y=\"unhandledrejection\",J=k(_,function(){var t=N.resolve(1),n=function(){},e=(t.constructor={})[I]=function(t){t(n,n)};return!((B||\"function\"==typeof PromiseRejectionEvent)&&(!f||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(t){var n;return!(!y(t)||\"function\"!=typeof(n=t.then))&&n},X=function(p,v,d){if(!v.notified){v.notified=!0;var h=v.reactions;w(function(){for(var t=v.value,n=1==v.state,e=0;h.length>e;){var r,o,i,u=h[e++],c=n?u.ok:u.fail,f=u.resolve,a=u.reject,s=u.domain;try{c?(n||(2===v.rejection&&et(p,v),v.rejection=1),!0===c?r=t:(s&&s.enter(),r=c(t),s&&(s.exit(),i=!0)),r===u.promise?a(D(\"Promise-chain cycle\")):(o=Q(r))?o.call(r,f,a):f(r)):a(t)}catch(l){s&&!i&&s.exit(),a(l)}}v.reactions=[],v.notified=!1,d&&!v.rejection&&tt(p,v)})}},Z=function(t,n,e){var r,o;U?((r=G.createEvent(\"Event\")).promise=n,r.reason=e,r.initEvent(t,!1,!0),a.dispatchEvent(r)):r={promise:n,reason:e},(o=a[\"on\"+t])?o(r):t===Y&&E(\"Unhandled promise rejection\",e)},tt=function(e,r){j.call(a,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(t){return 1!==t.rejection&&!t.parent},et=function(t,n){j.call(a,function(){B?V.emit(\"rejectionHandled\",t):Z(\"rejectionhandled\",t,n.value)})},rt=function(n,e,r,o){return function(t){n(e,r,t,o)}},ot=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,X(t,n,!0))},it=function(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){x(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=v(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(){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(t){return t===N||t===i?new o(t):q(t)},f||\"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(a,arguments))}}))),c({global:!0,wrap:!0,forced:J},{Promise:N}),d(N,_,!1,!0),h(_),i=s[_],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:f||J},{resolve:function(t){return P(f&&this===i?N:this,t)}}),c({target:_,stat:!0,forced:K},{all:function(t){var c=this,n=W(c),f=n.resolve,a=n.reject,e=T(function(){var r=g(c.resolve),o=[],i=0,u=1;b(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||f(o))},a)}),--u||f(o)});return e.error&&a(e.value),n.promise},race:function(t){var e=this,r=W(e),o=r.reject,n=T(function(){var n=g(e.resolve);b(t,function(t){n.call(e,t).then(r.resolve,o)})});return n.error&&o(n.value),r.promise}})},function(t,n,e){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){t.exports=function(t,n,e){if(!(t instanceof n))throw TypeError(\"Incorrect \"+(e?e+\" \":\"\")+\"invocation\");return t}},function(t,n,e){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){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){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){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){var r,o,i,u,c,f,a,s,l=e(0),p=e(24).f,v=e(12),d=e(66).set,h=e(46),y=l.MutationObserver||l.WebKitMutationObserver,g=l.process,x=l.Promise,m=\"process\"==v(g),b=p(l,\"queueMicrotask\"),S=b&&b.value;S||(r=function(){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(){g.nextTick(r)}:y&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(c=!0,f=document.createTextNode(\"\"),new y(r).observe(f,{characterData:!0}),function(){f.data=c=!c}):x&&x.resolve?(a=x.resolve(undefined),s=a.then,function(){s.call(a,r)}):function(){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){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),f=e(67),a=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 f(e,n()).then(function(){return t})}:n,t?function(t){return f(e,n()).then(function(){throw t})}:n)}}),o||\"function\"!=typeof i||i.prototype[\"finally\"]||a(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),f=e(9),a=e(19),s=e(34),l=e(6),p=e(3),v=e(16),d=v.set,h=v.getterFor(\"AggregateError\"),y=function(t,n){var e=this;if(!(e instanceof y))return new y(t,n);u&&(e=u(new Error(n),i(e)));var r=[];return s(t,r.push,r),o?d(e,{errors:r,type:\"AggregateError\"}):e.errors=r,n!==undefined&&l(e,\"message\",String(n)),e};y.prototype=c(Error.prototype,{constructor:a(5,y),message:a(5,\"\"),name:a(5,\"AggregateError\"),toString:a(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&&f.f(y.prototype,\"errors\",{get:function(){return h(this).errors},configurable:!0}),r({global:!0},{AggregateError:y})},function(t,n,e){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),v=e(34),d=\"No one promise resolved\";r({target:\"Promise\",stat:!0},{any:function(t){var f=this,n=o.f(f),a=n.resolve,s=n.reject,e=i(function(){var r=l(f.resolve),o=[],i=0,u=1,c=!1;v(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(f,t).then(function(t){e||c||(c=!0,a(t))},function(t){e||c||(e=!0,o[n]=t,--u||s(new(p(\"AggregateError\"))(o,d)))})}),--u||s(new(p(\"AggregateError\"))(o,d))});return e.error&&s(e.value),n.promise}})},function(t,n,e){t.exports=e(135)},function(t,n,e){e(136);var r=e(33);t.exports=r(\"String\",\"replace\")},function(t,n,e){\"use strict\";var r=e(137),w=e(3),p=e(18),P=e(28),E=e(29),i=e(25),A=e(139),T=e(140),L=Math.max,M=Math.min,v=Math.floor,d=/\\$([$&'`]|\\d\\d?|<[^>]*>)/g,h=/\\$([$&'`]|\\d\\d?)/g;r(\"replace\",2,function(o,S,O){return[function(t,n){var e=i(this),r=t==undefined?undefined:t[o];return r!==undefined?r.call(t,e,n):S.call(String(e),t,n)},function(t,n){var e=O(S,t,this,n);if(e.done)return e.value;var r=w(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 f=[];;){var a=T(r,o);if(null===a)break;if(f.push(a),!u)break;\"\"===String(a[0])&&(r.lastIndex=A(o,P(r.lastIndex),c))}for(var s,l=\"\",p=0,v=0;v<f.length;v++){a=f[v];for(var d=String(a[0]),h=L(M(E(a.index),o.length),0),y=[],g=1;g<a.length;g++)y.push((s=a[g])===undefined?s:String(s));var x=a.groups;if(i){var m=[d].concat(y,h,o);x!==undefined&&m.push(x);var b=String(n.apply(undefined,m))}else b=j(d,o,h,y,x,n);p<=h&&(l+=o.slice(p,h)+b,p=h+d.length)}return l+o.slice(p)}];function j(i,u,c,f,a,t){var s=c+i.length,l=f.length,n=h;return a!==undefined&&(a=p(a),n=d),S.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(s);case\"<\":e=a[n.slice(1,-1)];break;default:var r=+n;if(0==r)return t;if(l<r){var o=v(r/10);return 0===o?t:o<=l?f[o-1]===undefined?n.charAt(1):f[o-1]+n.charAt(1):t}e=f[r-1]}return e===undefined?\"\":e})}})},function(t,n,e){\"use strict\";var l=e(6),p=e(11),v=e(4),d=e(1),h=e(69),y=d(\"species\"),g=!v(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:\"7\"},t},\"7\"!==\"\".replace(t,\"$<a>\")}),x=!v(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=!v(function(){var t={};return t[o]=function(){return 7},7!=\"\"[e](t)}),u=i&&!v(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},\"split\"===e&&(n.constructor={},n.constructor[y]=function(){return n}),n[o](\"\"),!t});if(!i||!u||\"replace\"===e&&!g||\"split\"===e&&!x){var c=/./[o],f=n(o,\"\"[e],function(t,n,e,r,o){return n.exec===h?i&&!o?{done:!0,value:c.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}}),a=f[0],s=f[1];p(String.prototype,e,a),p(RegExp.prototype,o,2==t?function(t,n){return s.call(t,this,n)}:function(t){return s.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){var o=e(12),i=e(69);t.exports=function(t,n){var e=t.exec;if(\"function\"==typeof e){var r=e.call(t,n);if(\"object\"!=typeof r)throw TypeError(\"RegExp exec method returned something other than an Object or null\");return r}if(\"RegExp\"!==o(t))throw TypeError(\"RegExp#exec called on incompatible receiver\");return i.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 '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": '''\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, & 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;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks = [];\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 () {\r\n p.then(nextTickHandler);\r\n };\r\n } else\r\n\r\n /* istanbul ignore if */\r\n if (typeof MutationObserver !== \"undefined\") {\r\n var counter = 1;\r\n var observer = new MutationObserver(nextTickHandler);\r\n var textNode = document.createTextNode(counter + \"\");\r\n observer.observe(textNode, {\r\n characterData: true\r\n });\r\n timerFunc = function () {\r\n counter = (counter + 1) % 2;\r\n textNode.data = counter + \"\";\r\n };\r\n } else {\r\n timerFunc = function () {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n return function queueNextTick(cb) {\r\n var _resolve;\r\n var args = [].slice.call(arguments, 1);\r\n callbacks.push(function () {\r\n if (cb) {\r\n cb.apply(null, args);\r\n }\r\n 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 if (!cb && typeof Promise !== \"undefined\") {\r\n return new Promise(function (resolve) {\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 }\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 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 },\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 date.setTime(BI.getTime() + expiresHours * 3600 * 1000);\r\n cookieString = cookieString + \"; expires=\" + date.toGMTString();\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(BI.getTime() - 10000);\r\n var cookieString = name + \"=v; expires=\" + date.toGMTString();\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 = \"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQNCLLLKBYBZZSYHQQLTWLCCXTXLLZNTYLNEWYZYXCZXXGRKRMTCNDNJTSYYSSDQDGHSDBJGHRWRQLYBGLXHLGTGXBQJDZPYJSJYJCTMRNYMGRZJC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FJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY\";\r\n\r\n // 此处收录了375个多音字,数据来自于http://www.51window.net/page/pinyin\r\n var oMultiDiff = {\r\n 19969: \"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, ignoreMulti) {\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 return arrRslt.join(\"\").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.ignoreMulti);\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 \"&\": \"&\",\r\n \"\\\"\": \""\",\r\n \"<\": \"<\",\r\n \">\": \">\",\r\n \" \": \" \"\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] : \" \";\r\n });\r\n };\r\n // html decode\r\n BI.htmlDecode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|"|<|>| \", function (v) {\r\n switch (v) {\r\n case \"&\":\r\n return \"&\";\r\n case \""\":\r\n return \"\\\"\";\r\n case \"<\":\r\n return \"<\";\r\n case \">\":\r\n return \">\";\r\n case \" \":\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 || context);\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 = 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 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 } else if (pidx = py.indexOf(keyword), (pidx > -1 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / text.length))) {\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 in prefix) {\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 __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 if (py != null) {\r\n py = BI.toUpperCase(py);\r\n }\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 = null;\r\n if (py != null) {\r\n pidx = py.indexOf(keyword);\r\n if (pidx >= 0) {\r\n pidx = pidx % text.length;\r\n }\r\n }\r\n\r\n if (tidx >= 0) {\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 (py != null) {\r\n py = py.substr(tidx + keyword.length);\r\n }\r\n } else if (pidx != null && pidx >= 0 && Math.floor(pidx / text.length) === Math.floor((pidx + keyword.length - 1) / 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 (py != null) {\r\n py = py.substr(pidx + keyword.length);\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, i, key, keys;\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 }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 }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 // 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 }\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 + \"×=\" + (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, \"\"), \" \", \" \") : 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 } 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, {});\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 }\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.editor.getValue();\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 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.editor.getValue();\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\n destroy: function () {\r\n BI.Switcher.superclass.destroy.apply(this, arguments);\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 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 }\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,'&').replace(/</g,'<').replace(/>/g,'>');\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,\"'\").replace(/</g,'<').replace(/>/g,'>'),\"'\");}\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 });\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 var days = this._dateCreator(o.year, o.month - 1, o.day);\r\n 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 items = 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 this.days = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(items, {}),\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 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 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 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 items = 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 this.years = BI.createWidget({\r\n type: \"bi.button_group\",\r\n behaviors: o.behaviors,\r\n items: BI.createItems(items, {}),\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 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);\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.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\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.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 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\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\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 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 var 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 var 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: [backBtn, 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 backBtn.setEnable(!calendar.isFrontYear());\r\n 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 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 day: day\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 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 value: opts.value,\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.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 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 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 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 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 value: opts.value,\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.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 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 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 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 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 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 if(o.digit === false) {\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.labelOne.element.css({left: isSliderOneLeft ? \"0%\" : \"100%\"});\r\n this.labelTwo.element.css({left: isSliderOneLeft ? \"100%\" : \"0%\"});\r\n }\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 : valueOne.toFixed(o.digit);\r\n valueTwo = o.digit === false ? valueTwo : 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 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(this.valueOne);\r\n this.labelTwo.setValue(this.valueTwo);\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 }\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 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 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 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_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 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 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 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 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_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 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: false,\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 }\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.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: false,\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 }\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\",\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.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.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 }\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 setValue: function (ob) {\r\n var self = this, o = this.options;\r\n ob || (ob = {});\r\n ob.type || (ob.type = BI.Selection.Multi);\r\n ob.value || (ob.value = []);\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 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 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\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 });\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 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: false,\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: false,\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: false,\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 if(show) {\r\n this.indicator.setVisible(true);\r\n this.checkSelected.setVisible(false);\r\n }\r\n\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 _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeSearchPane.superclass._defaultConfig.apply(this, arguments), {\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\r\n _init: function () {\r\n BI.MultiTreeSearchPane.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.partTree = BI.createWidget({\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 });\r\n\r\n this.partTree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.partTree.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE);\r\n });\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 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 level: \"warning\",\r\n tipType: \"success\",\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\r\n // this.smallCombo = BI.createWidget({\r\n // type: \"bi.number_interval_combo\",\r\n // cls: \"number-interval-small-combo\",\r\n // height: o.height,\r\n // value: o.closemin ? 1 : 0,\r\n // offsetStyle: \"left\"\r\n // });\r\n //\r\n // this.bigCombo = BI.createWidget({\r\n // type: \"bi.number_interval_combo\",\r\n // cls: \"number-interval-big-combo\",\r\n // height: o.height,\r\n // value: o.closemax ? 1 : 0,\r\n // offsetStyle: \"left\"\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 var self = this;\r\n self.bigEditor.setTitle(v);\r\n self.smallEditor.setTitle(v);\r\n self.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 level: o.level,\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 setTitle: function (v) {\r\n return this.editor.setTitle(v);\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()) {\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()) {\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()) {\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 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_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_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_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 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 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 var state = getCheckState(node.value, node.parentValues, valueMap, checkState);\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(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(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(value) {\r\n return BI.any(selectedValues, function (idx, array) {\r\n return 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(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(selectedValues) {\r\n var valueMap = {};\r\n BI.each(selectedValues, function (idx, v) {\r\n valueMap[BI.last(v)] = [2, 0];\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 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 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 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 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 * as decorator from \"./core/decorator/decorator\";\r\n\r\nimport { _i18n } from \"./core/i18n\";\r\nimport { _OB } from \"./core/ob\";\r\nimport { _func } from \"./core/func\";\r\nimport { _Widget, _WidgetStatic } from \"./core/widget\";\r\nimport { _Single } from \"./base/single/single\";\r\nimport { _base } from \"./core/base\";\r\nimport { _BasicButton } from \"./base/single/button/button.basic\";\r\nimport { _Trigger } from \"./base/single/trigger/trigger\";\r\nimport { _Action, _ActionFactory } from \"./core/action/action\";\r\nimport { _ShowAction } from \"./core/action/action.show\";\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 { _Pane, _PaneStatic } from \"./base/pane\";\r\nimport { _LoadingPane } from \"./case/loading/loading_pane\";\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>;\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 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"]} |