layui/dist/layui.js.map
2023-12-11 10:26:56 +08:00

1 line
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["layui.js","modules/layui.all.js","modules/lay.js","modules/laytpl.js","modules/laypage.js","modules/laydate.js","modules/jquery.js","modules/layer.js","modules/util.js","modules/dropdown.js","modules/slider.js","modules/colorpicker.js","modules/element.js","modules/upload.js","modules/form.js","modules/table.js","modules/treeTable.js","modules/tree.js","modules/transfer.js","modules/carousel.js","modules/rate.js","modules/flow.js","modules/code.js"],"names":["win","jsPath","doc","document","config","modules","status","timeout","event","Layui","this","v","GLOBAL","LAYUI_GLOBAL","getPath","currentScript","src","js","scripts","last","length","i","readyState","dir","substring","lastIndexOf","error","msg","type","console","isOpera","opera","toString","builtin","lay","layer","laydate","laypage","laytpl","form","upload","dropdown","transfer","tree","table","treeTable","element","rate","colorpicker","slider","carousel","flow","util","code","jquery","all","layui.all","EV_REMOVE","prototype","cache","define","deps","factory","use","setApp","app","exports","layui","callback","apps","from","node","url","that","head","getElementsByTagName","item","jQuery","fn","on","each","index","splice","$","onScriptLoad","e","readyRegExp","navigator","platform","test","currentTarget","srcElement","removeChild","poll","onCallback","setTimeout","push","slice","apply","host","match","location","base","replace","createElement","async","charset","version","Date","getTime","appendChild","attachEvent","indexOf","addEventListener","disuse","isArray","getStyle","name","style","currentStyle","getComputedStyle","getPropertyValue","link","href","cssname","id","STAUTS_NAME","debug","rel","media","getElementById","getLinkElem","parseInt","removeAttribute","getAttribute","setAttribute","addcss","firename","modName","img","Image","complete","onload","onerror","options","key","o","clone","extend","router","hash","data","path","search","split","obj","pathname","_index","substr","settings","storage","localStorage","JSON","parse","value","remove","stringify","sessionData","sessionStorage","device","agent","userAgent","toLowerCase","getVersion","label","exp","RegExp","result","os","ie","ActiveXObject","weixin","android","ios","mobile","hint","_typeof","operand","String","Object","call","_isArray","len","callFn","sort","arr","desc","notClone","o1","o2","v1","v2","isNaN","isNum","reverse","stope","thisEvent","stopPropagation","cancelBubble","onevent","events","params","filter","eventName","filterName","_","off","debounce","func","wait","context","args","arguments","clearTimeout","throttle","cooldown","window","selector","Class","elem","querySelectorAll","Array","searchElement","fromIndex","rst","val","constructor","ai","target","digit","num","str","Math","pow","elemName","attr","hasScrollbar","body","scrollHeight","innerHeight","documentElement","clientHeight","getStyleRules","rules","sheet","styleSheet","cssRules","styleText","text","cssText","innerHTML","styleElem","find","append","position","opts","scrollArea","winArea","margin","left","top","rect1","clickType","rect","clientX","clientY","right","bottom","getBoundingClientRect","elemWidth","offsetWidth","elemHeight","offsetHeight","align","allowBottomOut","SYSTEM_RELOAD","othis","attrName","attrValue","Function","ev","errorText","join","isTopElem","topElems","matched","clipboard","writeText","legacyCopy","opacity","select","execCommand","done","err","then","addStr","new_str","ii","removeStr","isObject","children","contains","child","addClass","className","removeClass","hasClass","has","css","parseValue","undefined","thisKey","thisValue","width","height","removeAttr","html","parentNode","detachEvent","removeEventListener","open","close","tool","escape","inner","source","template","tagExp","__","jss","jsse","tag","start","render","DISABLED","view","elemArr","countText","plate","groups","Number","layout","count","curr","limits","limit","pages","ceil","prev","next","views","page","pager","first","halve","floor","end","max","theme","def","limitTemplet","refresh","skip","skipText","jump","isskip","childs","btn","input","nodeName","keyCode","load","even","isLayui","ready","MOD_NAME","MOD_ID","weekStart","laydate_dir","set","thisModule","inst","content","reload","THIS","LIMIT_YEAR","ELEM_STATIC","ELEM_LIST","ELEM_SELECTED","ELEM_HINT","ELEM_PREV","ELEM_NEXT","ELEM_CONFIRM","ELEM_TIME_TEXT","ELEM_TIME_BTN","ELEM_PREVIEW","ELEM_SHADE","newThat","getThis","init","dateType","formatArr","format","isLeapYear","year","range","isInitValue","min","trigger","show","showBottom","isPreview","btns","lang","calendar","mark","holidays","zIndex","change","autoConfirm","shade","cn","weeks","time","timeTips","startTime","endTime","dateTips","month","tools","confirm","clear","now","invalidDate","formatError","preview","en","isStatic","date","datetime","eventElem","fullPanel","rangeStr","rangeLinked","autoCalendarModel","state","startDate","endDate","auto","rangeElem","EXP_IF","EXP_SPLIT","EXP","EXP_IF_ONE","isInput","0-1-1","0-2-14","0-3-8","0-3-12","0-4-1","0-5-1","0-5-4","0-6-1","0-9-10","0-10-1","0-12-25","ymd","hms","day","tDate","newDate","getFullYear","getMonth","getDate","hours","minutes","seconds","thisDate","getHours","getMinutes","getSeconds","elemID","setValue","systemDate","themeStr","shortcutBtns","colorTheme","class","elemMain","elemHeader","elemCont","elemTable","divFooter","footer","divShortcut","shortcut","divHeader","headerChild","spanY","spanM","divContent","thead","theadTr","tr","insertRow","j","th","insertCell","insertBefore","ELEM_MAIN","title","shortcuts","btnSetting","dataset","timeBtn","dateTime","endState","listYM","checkDate","click","main","isPrimaryColor","thisElemDate","thisId","insertAdjacentHTML","changeEvent","renderAdditional","div","hinTimer","ms","getAsYM","Y","M","thisMaxDate","vals","arrDate","minMaxError","checkValid","getEndDate","initDate","startEnd","thisv","parseFloat","EYM","_i","_v","getDateTime","td","YMD","keys","idx","dayStr","timestamp","isOut","thisDateTime","startWeek","prevMaxDate","isAlone","tds","elemYM","firstDate","setFullYear","getDay","index_","st","list","setBtnStatus","timeParams","stampRange","yearNum","setTimeStatus","span","scroll","ul","haveList","isCN","startY","li","lay-ym","ol","childUL","ym","closeList","choose","scrollTop","haveSpan","tips","elemBtn","elemPreview","color","thisTime","param","panelIndex","isChange","YM","isSameDate","dateTimeTemp","active","addSubYear","isYear","isMonth","prevYear","prevMonth","nextMonth","nextYear","header","layYM","layType","tagName","toLocaleLowerCase","showEvent","eventHandler","unbind","run","closeStop","preventDefault","getInst","one","concat","amd","global","module","w","Error","noGlobal","deletedIds","class2type","hasOwn","hasOwnProperty","support","rtrim","rmsPrefix","rdashAlpha","fcamelCase","letter","toUpperCase","isArrayLike","isWindow","toArray","get","pushStack","elems","ret","merge","prevObject","map","eq","copyIsArray","copy","deep","isFunction","isPlainObject","expando","random","isReady","noop","isNumeric","realStringObj","isEmptyObject","nodeType","ownFirst","globalEval","trim","execScript","camelCase","string","makeArray","results","inArray","second","grep","invert","matches","callbackExpect","arg","guid","proxy","tmp","Symbol","iterator","Sizzle","Expr","getText","isXML","tokenize","compile","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","pop","push_native","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","escaped","escapedWhitespace","high","fromCharCode","unloadHandler","childNodes","els","seed","m","nid","nidselect","newSelector","newContext","ownerDocument","exec","getElementsByClassName","qsa","toSelector","testContext","qsaError","cacheLength","shift","markFunction","assert","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createPositionalPseudo","argument","matchIndexes","parent","defaultView","createComment","getById","getElementsByName","attrId","getAttributeNode","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","hasCompare","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","what","simple","forward","ofType","xml","uniqueCache","outerCache","nodeIndex","useCache","lastChild","uniqueID","pseudo","setFilters","not","matcher","unmatched","innerText","elemLang","root","focus","activeElement","hasFocus","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","button","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","addCombinator","combinator","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","matcherIn","matcherOut","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","until","truncate","is","siblings","n","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","rootjQuery","rparentsprev","charAt","parseHTML","guaranteedUnique","contents","sibling","targets","closest","l","pos","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","contentWindow","readyList","rnotwhite","detach","completed","Callbacks","object","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","disable","lock","fireWith","Deferred","tuples","promise","always","deferred","fail","fns","newDefer","tuple","returned","progress","notify","resolve","reject","pipe","stateString","when","subordinate","progressValues","progressContexts","resolveContexts","resolveValues","remaining","updateFunc","values","notifyWith","resolveWith","readyWait","holdReady","hold","triggerHandler","doScroll","frameElement","doScrollCheck","inlineBlockNeedsLayout","container","zoom","deleteExpando","shrinkWrapBlocksVal","acceptData","noData","rbrace","rmultiDash","dataAttr","parseJSON","isEmptyDataObject","internalData","pvt","internalKey","isNode","toJSON","thisCache","internalRemoveData","cleanData","applet ","embed ","object ","hasData","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","shrinkWrapBlocks","pnum","rcssNum","cssExpand","isHidden","el","adjustCSS","prop","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","access","chainable","emptyGet","raw","bulk","rcheckableType","rtagName","rscriptType","rleadingWhitespace","nodeNames","createSafeFragment","safeFrag","createDocumentFragment","fragment","leadingWhitespace","tbody","htmlSerialize","html5Clone","cloneNode","outerHTML","appendChecked","noCloneChecked","checkClone","noCloneEvent","wrapMap","option","legend","area","col","_default","getAll","found","setGlobalEval","refElements","optgroup","tfoot","colgroup","caption","rhtml","rtbody","fixDefaultChecked","defaultChecked","buildFragment","selection","ignored","wrap","safe","nodes","htmlPrefilter","createTextNode","focusin","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","types","origFn","t","handleObjIn","special","eventHandle","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","handleObj","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","rnamespace","noBubble","parentWindow","isPropagationStopped","isDefaultPrevented","fix","handlerQueue","delegateTarget","preDispatch","isImmediatePropagationStopped","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","props","metaKey","original","which","charCode","eventDoc","fromElement","pageX","scrollLeft","clientLeft","pageY","clientTop","relatedTarget","toElement","blur","beforeunload","returnValue","simulate","isSimulated","defaultPrevented","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","_submitBubble","propertyName","_justChanged","attaches","rinlinejQuery","rnoshimcache","rxhtmlTag","rnoInnerhtml","rchecked","rscriptTypeMasked","rcleanScript","fragmentDiv","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","oldData","curData","domManip","collection","hasScripts","iNoClone","_evalUrl","keepData","dataAndEvents","deepDataAndEvents","destElements","srcElements","inPage","fixCloneNodeIssues","defaultSelected","forceAcceptData","prepend","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","HTML","BODY","actualDisplay","display","defaultDisplay","write","pixelPositionVal","pixelMarginRightVal","boxSizingReliableVal","reliableHiddenOffsetsVal","reliableMarginRightVal","reliableMarginLeftVal","rmargin","rnumnonpx","swap","old","computeStyleTests","divStyle","marginLeft","marginRight","getClientRects","borderCollapse","cssFloat","backgroundClip","clearCloneStyle","boxSizing","MozBoxSizing","WebkitBoxSizing","reliableHiddenOffsets","boxSizingReliable","pixelMarginRight","pixelPosition","reliableMarginRight","reliableMarginLeft","getStyles","curCSS","rposition","addGetHookIf","conditionFn","hookFn","opener","computed","maxWidth","minWidth","rs","rsLeft","runtimeStyle","pixelLeft","ralpha","ropacity","rdisplayswap","rnumsplit","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","emptyStyle","vendorPropName","capName","showHide","hidden","setPositiveNumber","subtract","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","Tween","easing","cssHooks","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","cssProps","float","origName","isFinite","$1","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","propHooks","percent","eased","duration","step","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rrun","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","tick","currentTime","tweens","specialEasing","originalProperties","originalOptions","gotoEnd","rejectWith","timer","anim","*","tweener","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","getSetAttribute","hrefNormalized","checkOn","optSelected","enctype","optDisabled","radioValue","rreturn","rspaces","valHooks","optionSet","nodeHook","boolHook","ruseDefault","getSetInput","rfocusable","nType","attrHooks","propName","attrNames","propFix","getter","setAttributeNode","createAttribute","coords","contenteditable","rclickable","rclass","removeProp","tabindex","for","getClass","classes","clazz","finalValue","curValue","toggleClass","stateVal","classNames","hover","fnOver","fnOut","nonce","rquery","rvalidtokens","rhash","requireNonComma","depth","comma","parseXML","DOMParser","parseFromString","loadXML","rts","rheaders","rnoContent","rprotocol","rurl","transports","allTypes","ajaxLocation","ajaxLocParts","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxConvert","s","response","isSuccess","conv2","current","conv","converters","responseFields","dataFilter","filterHidden","lastModified","etag","isLocal","processData","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","ajaxPrefilter","ajaxTransport","ajax","cacheURL","responseHeadersString","timeoutTimer","fireGlobals","transport","responseHeaders","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","abort","statusText","finalText","success","method","crossDomain","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","firstDataType","ct","finalDataType","modified","getJSON","getScript","throws","wrapAll","wrapInner","unwrap","visible","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","encodeURIComponent","buildParams","serialize","serializeArray","xhr","createActiveXHR","documentMode","createStandardXHR","xhrId","xhrCallbacks","xhrSupported","XMLHttpRequest","cors","username","xhrFields","isAbort","onreadystatechange","responseText","script","text script","scriptCharset","oldCallbacks","rjsonp","_load","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","getWindow","animated","offset","setOffset","curCSSTop","curTop","curOffset","curCSSLeft","curElem","curLeft","curPosition","using","box","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","bind","delegate","undelegate","size","andSelf","layer_dir","removeFocus","resize","minStackIndex","minStackArr","STATUS_NAME","alert","yes","cancel","btn2","rskin","skin","doms","closeBtn","icon","follow","fixed","setings","creat","pt","0","1","2","3","4","5","6","slideLeft","slideRight","SHADE","MOVE","move","isOutAnim","minStack","moveType","scrollbar","vessel","conType","times","titype","ismax","maxmin","titleHTML","face","animClass","additFaceClass","btnAlign","layero","elemShade","restore","hideOnClose","closeAll","tipsMore","moveElem","shadeo","setScrollbar","background-color","innerWidth","outerWidth","titHeight","outerHeight","btnHeight","setHeight","maxHeight","offsetTop","offsetLeft","layArea","goal","tipsG","guide","autoLeft","tipLeft","where","tipTop","padding-right","_DOC","DATA_NAME","resizeElem","dict","eventMoveElem","eventResizeElem","docEvent","setRig","setBot","X","stX","stY","moveOut","resizing","moveEnd","openLayer","IE6","shadeClose","full","reselect","sthis","setTop","record","restScrollbar","removeProperty","getChildFrame","getFrameIndex","iframeAuto","heg","iframeSrc","contElem","elemMin","hasMinLeft","maxminStatus","minLeft","edgeIndex","isfix","closeAnim","WRAP","domsElem","closeLast","prompt","placeholder","formType","maxlength","tab","photos","loop","toolbar","imgIndex","pushData","alt","pid","thumb","imgprev","tabimg","imgnext","errorMsg","keyup","isNumber","getTransform","transforms","rotate","scaleX","imgElem","transform","ratio","delta","wheelDelta","detail","zoomElem","loadi","loadImage","winarea","imgarea","wh","_$","isMobile","_win","propSuffix","deliver","fixbar","elemTopBar","setTopBar","ELEM","$doc","$target","bars","default","$scroll","bar1","bar2","elemBar","lay-type","bgcolor","countdown","clock","countTime","d","h","setTime","timeAgo","onlyDate","stamp","toDateString","years","days","milliseconds","meridiem","getMilliseconds","customMeridiem","hm","yy","yyyy","MM","dd","H","HH","hh","A","mm","ss","SSS","unescape","openWin","specs","toVisibleArea","scrollElem","SCROLL_NAME","OFFSET_NAME","scrollValue","scrollOffset","thisOffset","thisElem","vertical","callbacks","attrSelector","DATANAME","dataCache","_WIN","ELEM_LI","clickOrMousedown","MOD_INDEX","customName","reloadData","STR_ELEM","STR_ITEM_UP","STR_ITEM_DOWN","STR_MENU_TITLE","STR_ITEM_GROUP","STR_ITEM_PARENT","STR_ITEM_CHECKED","STR_ITEM_CHECKED2","STR_MENU_PANEL","STR_MENU_PANEL_L","STR_ELEM_SHADE","STR_GROUP_TITLE","isAllowSpread","isSpreadItem","accordion","rerender","elemView","elemBody","getDefaultView","elemUl","eachItemView","isChild","templet","group","-","viewLi","viewText","elemPanel","TPL_MAIN","delayRemove","prevElem","isClickAllScope","clickScope","elemGroup","spread","elemPrev","prevElemCallback","isAccordion","contentElem","needSpread","groupSibs","ELEM_LI_PAR","dataParams","SLIDER_BAR","SLIDER_WRAP","SLIDER_WRAP_BTN","SLIDER_TIPS","SLIDER_INPUT_TXT","ELEM_HOVER","showstep","minValue","maxValue","scaleFir","scaleSec","hasRender","elemTemp","number","elemInput","slide","sliderWidth","sliderWrap","tipsTxt","setTips","margin-bottom","sliderAct","sliderTxt","inputValue","offsetValue","round","arrValue","firLeft","valueTo","secLeft","wrapWidth","abs","selfValue","oldLeft","elemMove","up","upCall","oldleft","oldx","reaLeft","inputScale","getInputValue","realValue","ICON_PICKER_DOWN","ICON_PICKER_CLOSE","PICKER_TRIG_SPAN","PICKER_TRIG_I","PICKER_SIDE_SLIDER","PICKER_BASIS","PICKER_ALPHA_BG","PICKER_ALPHA_SLIDER","PICKER_BASIS_CUR","PICKER_INPUT","RGBToHSB","rgb","hsb","r","g","HSBToRGB","t1","t3","t2","HSBToHEX","hex","nr","RGBSTo","rgbs","re","$win","alpha","predefine","colors","elemColorBox","bgstr","background","renderPicker","elemPicker","removePicker","thisElemInd","thisColor","pickerEvents","bindElem","elemPickerInput","backgroundColor","side","basis","alphacolor","alphaslider","_h","_b","_s","_a","pre","x","y","z","createMoveElem","oldtop","oldy","maxh","maxw","sidetop","elemColorBoxSpan","colorValue","attrEvent","SHOW","TITLE","Element","NAV_ELEM","tabAdd","layAttr","tabElem","titElem","barElem","tabChange","tabAuto","tabDelete","layid","liElem","tabClick","dom","headerElem","NAV_ITEM","NAV_BAR","NAV_TREE","NAV_CHILD","NAV_MORE","NAV_ANIM","bodyElem","elemA","isJump","unselect","MORE","BAR","CLOSE","STOPE","isSpread","hideTabMore","tsbTitle","clickThis","NAV_ITEMED","needExpand","parentSibs","collapse","isNone","elemFilter","items","nav","timerMore","timeEnd","NAV_TITLE","bar","itemElem","thisA","breadcrumb","ATTE_SPR","separator","aNode","elemTitle","files","ELEM_FILE","ELEM_FORM","ELEM_IFRAME","ELEM_CHOOSE","UPLOADING","accept","exts","bindAction","force","field","acceptMime","drag","multiple","cross-domain","data-format-error","check-error","limit-number","limit-size","elemFile","isFile","initIE","elemForm","FileReader","chooseFiles","reader","readAsDataURL","limitSize","getFiles","ajaxSend","successful","failed","allDone","fileLength","total","request","sets","formData","FormData","resetFileState","unified","res","lengthComputable","loaded","iframeSend","iframeBody","thisFile","pushFile","resetFile","filename","newFile","File","typeName","images","video","audio","toFixed","setChooseFile","setChooseText","dataTransfer","HIDE","Form","verify","required","phone","email","identity","autocomplete","getFormElem","itemForm","getValue","nameIndex","fieldElem","init_name","inputs","handleInputNumber","eventType","rawValue","precision","noAction","isInit","decimals","controlBtn","increment","decrement","affix","CLASS_WRAP","CLASS_SUFFIX","CLASS_AFFIX","showAffix","renderAffix","affixOptions","elemAffix","elemIcon","hasElemAffix","hasElemSuffix","inputFilter","eye","SHOW_NAME","isShow","thatInput","TIPS","NONE","initValue","selects","reElem","isSearch","nearElem","laySearch","showDown","hideDown","followScroll","notOption","dl","dds","dts","dlHeight","none","posTop","thisDd","ddHeight","setThisDd","prevNext","thisElem1","showDd","firstIndex","cacheNearElem","nearDd","origin","thisDds","optionsFirst","switch","SUBTRA","checks","RE_CLASS","indeterminate","ICON","radios","ANIM","forms","sameRadio","renderItem","itemType","validate","intercept","DANGER","vers","verType","thisVer","rule","verst","isForm2Elem","layFilter","verifyElem","$dom","checkName","indexName","numbersName","disabledName","thisTable","setColsWidth","getThisTable","getThisTableConfig","parseTempData","item3","tplData","exportTemplet","LAY_COL","HIDE_V","ELEM_VIEW","ELEM_HEADER","ELEM_BODY","ELEM_FIXR","ELEM_PAGE_VIEW","ELEM_SORT","ELEM_CHECKED","ELEM_EDIT","ELEM_GROUP","ELEM_COL_SPECIAL","ELEM_TOOL_PANEL","ELEM_EXPAND","DATA_MOVE_NAME","TPL_HEADER","TPL_BODY","eachChildCols","loading","cellMinWidth","cellMaxWidth","MAX_VALUE","editTrigger","defaultToolbar","defaultContextmenu","autoSort","cols","pageName","limitName","statusName","msgName","dataName","totalRowName","countName","pullData","setInit","fullHeightGap","parentDiv","parentHeightGap","customHeightFunc","lay-filter","lay-id","renderStyle","layTool","layBox","layHeader","layMain","layBody","layFixed","layFixLeft","layFixRight","layTotal","layPage","renderToolbar","renderPagebar","fullSize","initOpts","space","unresize","numbers","getWidth","clientWidth","initChildCols","i1","item1","i2","item2","indexChild","childIndex","colspan","rowspan","colGroup","i22","item22","HAS_PARENT","parentKey","lineStyle","trClassName","cellMaxHeight","leftDefaultTemp","elemToolTemp","toolbarHtml","layEvent","print","iconElem","thisItem","pagebarHtml","layPagebar","pagebar","setParentCol","parentTh","parentColspan","arrParentKey","getThisCol","colspan2","nextParentKey","setColsPatch","setGroupWidth","getEndTh","colNums","autoColNums","autoWidth","countWidth","cntrWidth","getAutoWidth","eachCols","getScrollWidth","back","patchNums","i3","headerWidth","scrollPatch","haveInit","HAS_SET_COLS_PATCH","errorView","elemNone","layNone","syncCheckAll","renderForm","startLimit","initSort","reloadType","renderData","totalRow","parseData","newData","getTrHtml","trsObj","trs","trs_fixed","trs_fixed_r","tds_fixed","tds_fixed_r","LAY_KEY","edit","trAttr","totalRowData","sortKey","pull","scrollPos","tipsIndex","renderTotal","totalNums","dataTotal","TOTAL_NUMS","totalRowDecimals","thisTotalNum","totalRowText","getContent","TOTAL_ROW","patchElem","getColElem","checkAllElem","checkStatus","isAll","setRowActive","setRowChecked","isCheckAll","isCheckMult","dataIndex","thisData","existChecked","getChecked","checkedElem","currTr","checkedSameElem","fixRElem","_field","elemSort","fromEvent","layInit","selectorText","headerMain","thIndex","thElem","bodyHeight","layMainTable","scrollWidth","outWidth","addPatch","fixHeight","ELEM_CELL","_BODY","commonMember","lis","openPanel","panel","fieldTitle","exportFile","printWin","edg","onafterprint","oLeft","pLeft","allowResize","ruleWidth","thatTable","setWidth","nowType","clearCacheKey","del","update","fields","cell","thisTd","setRowEvent","getCol","UNROW","renderGridEdit","editType","ELEM_GRID_DOWN","oldValue","reedit","showGridExpandIcon","elemCell","gridExpand","expandedMode","ELEM_CELL_C","elemCellClose","cellExpandedMode","expandedWidth","cellExpandedWidth","$this","toolFn","errorTips","tdIndex","attrData","tableData","trElem","itemData","row","tableIns","CHILD_COLS","PARENT_COL_INDEX","arrs","eachArrs","nums","invalidNum","getData","dataTitle","dataMain","fieldsIsHide","textType","csv","xls","alink","reduce","acc","ignoreExport","download","getOptions","hideCol","thisTreeTable","ELEM_FIXL","TABLE_TREE","LAY_DATA_INDEX","LAY_DATA_INDEX_HISTORY","LAY_PARENT_INDEX","LAY_CHECKBOX_HALF","LAY_EXPAND","LAY_HAS_EXPANDED","LAY_ASYNC_STATUS","LAY_CASCADE","updateCache","childrenKey","tableCache","itemDataIndex","updateOptions","thatOptionsTemp","treeOptions","idKey","hasNumberCol","hasChecboxCol","hasRadioCol","mod","parseDataThat","retData","isSimpleData","enable","flatToTree","updateStatus","initData","isRenderData","tableView","isExpandAll","layTableAllChooseElem","renderTreeTable","cascade","isParent","indent","flexIconClose","flexIconOpen","showIcon","iconClose","iconOpen","iconLeaf","showFlexIconIfNotParent","dblClickExpand","expandAllDefault","rootPid","autoParam","beforeExpand","onExpand","pIdKey","idTemp","pidTemp","tableId","flatArr","k","treeToFlat","parentId","parentIndex","flat","dataNew","getTreeNode","getParentNode","getNodeByIndex","treeNode","treeNodeData","getNodeDataByIndex","updateNode","removeNode","expandNode","setChecked","getNodeById","tableDataFlat","newValue","dataRet","indexArr","getTableData","isParentKey","debounceFn","expandFlag","sonSign","callbackFlag","tableViewElem","treeTableThat","trData","isToggle","trExpand","retValue","trExpanded","trsElem","flexIconElem","trDataId","array","asyncSuccessFn","asyncContentType","asyncDataType","asyncJsonpCallback","asyncHeaders","asyncParseData","asyncResponse","str2","str2Obj","dataLevelNew","asyncSetting","asyncUrl","asyncAutoParam","itemArr","asyncType","childItem","data-index","lay-data-index","data-level","childNodesFlat","formatNumber","inherit","expandAll","isAllAsyncDone","isAllExpanded","trAll","trAllObj","dataItem","dataLevel","level","treeOptionsView","dataExpand","nameKey","htmlTemp","itemCell","trIndex","trDefaultExpand","trMain","trFixedL","trFixedR","statusObj","notCascade","dataUpdated","updateObjParams","tableThat","updateFn","checkNode","newNode","trLevel","newNodeTemp","trNew","delNodesFlat","delNode","nodeP","updateCheckStatus","i4","item4","addNodes","newNodes","childKey","childrenNodes","dataAfter","childrenNodesFlat","pageOptions","newNodesHtml","newNodesHtmlObj","trIndexPrev","newNodeIndex","newNodeItem","tableViewElemMAIN","tableViewElemFIXL","tableViewElemFIXR","trIndexNext","scrollIntoViewIfNeeded","includeHalfCheck","checkedData","updateData","setRowCheckedClass","dataP","trsP","isIndeterminate","updateParentCheckStatus","indexP","itemP","checkboxElem","checkedNum","inputElem","isRadio","triggerEvent","trDataP","radioElem","collectNeedExpandNodeIndex","needExpandIndex","nodeData","checkAllNodes","reloadAsyncNode","dataId","getNodesByFilter","isSingle","nodesResult","ELEM_SET","ICON_CLICK","ICON_ADD","ICON_SUB","ELEM_ENTRY","ELEM_TEXT","ELEM_PACK","ELEM_SPREAD","ELEM_LINE_SHORT","ELEM_SHOW","ELEM_EXTEND","showCheckbox","showLine","onlyIconControl","defaultNodeName","checkids","editIcon","hasChild","packDiv","entryDiv","checkClick","operate","entry","elemCheckbox","elemText","touchOpen","packCont","iconClick","updateFieldValue","sibls","setCheckbox","setParentsChecked","thisNodeElem","parentNodeElem","parentCheckbox","parentPack","oncheck","getVal","returnObj","textNew","elemDel","pare","siblingTree","checkState","parentTree","prevDiv","pack","onsearch","checkId","checkData","eachNodes","index2","cloneItem","checkedId","reInput","ELEM_BOX","ELEM_SEARCH","ELEM_DATA","TPL_BOX","checkAllName","showSearch","searchNone","layData","layBtn","listElem","renderCheckBtn","thisDataElem","allElemCheckbox","listElemCheckbox","haveChecked","isHide","stopNone","noneView","createNoneElem","selectedData","thisElemCheckbox","thisBoxElem","siblingInput","thisList","onchange","elemThis","thisListElem","isMatch","ELEM_LEFT","ELEM_RIGHT","ELEM_ARROW","ELEM_IND","arrow","indicator","autoplay","elemItem","prevIndex","nextIndex","addIndex","subIndex","tplArrow","goto","tplInd","elemInd","thisIndex","haveSlide","ICON_RATE","ICON_RATE_SOLID","ICON_RATE_HALF","ICON_SOLID_HALF","ICON_HALF_RATE","readonly","half","setText","action","setvalue","_ul","wide","ind","Flow","isOver","lazyimg","mb","isAuto","notDocument","more","over","isLazyimg","elemTop","CONST","ELEM_TAB","ELEM_FULL","ELEM_ITEM","ELEM_LINE","ELEM_LINE_NUM","ELEM_LN_MODE","CDDE_DATA_CLASS","LINE_RAW_WIDTH","about","ln","encode","wordWrap","highlighter","langMarker","codeIndex","mode","rawCode","finalCode","isIframePreview","elemHeaderView","elemToolbar","runPreview","codeElem","createCodeRst","lines","setCodeLayout","elemFixbar","copyElem","reloadCode","obverse","codeRender","createCode","line","codeParse","hasDataClass","onCopy","elemViewHas","elemTabHas","elemPreviewViewHas","FILTER_VALUE","elemTabView","elemPreviewView","classNameFull","classNameRestore","htmlElem","ELEM_SCROLLBAR_HIDE","oi","parameters","toolsEvent","addTools","viso","thisItemBody","srcdoc","previewStyle","elemItemBody","codeStyle","multiLine"],"mappings":"6BAMC,CAAC,SAASA,GACT,aAEA,IAiBMC,EAjBFC,EAAMF,EAAIG,SACVC,EAAS,CACXC,QAAS,GACTC,OAAQ,GACRC,QAAS,GACTC,MAAO,EACT,EAEIC,EAAQ,WACVC,KAAKC,EAAI,OACX,EAGIC,EAASZ,EAAIa,cAAgB,GAG7BC,GACEb,EAASC,EAAIa,cAAgBb,EAAIa,cAAcC,IAAM,WAIvD,IAHA,IAEIA,EAFAC,EAAKf,EAAIgB,QACTC,EAAOF,EAAGG,OAAS,EAEfC,EAAIF,EAAU,EAAJE,EAAOA,CAAC,GACxB,GAAwB,gBAArBJ,EAAGI,GAAGC,WAA6B,CACpCN,EAAMC,EAAGI,GAAGL,IACZ,KACF,CAEF,OAAOA,GAAOC,EAAGE,GA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AG,QAAS,WACnBwW,EAAM2N,KAAK1oB,MAAM,CACnB,CAAC,EAEDouF,EAAWr+E,OAAOs+E,CAAQ,GAIxB7lF,EAAQ+kF,YACVa,EAAWr+E,OAAO,wCAA0CvH,EAAQuR,KAAO,SAAS,EAIlFvR,EAAQ0kF,OACVkB,EAAWr+E,OAAOvH,EAAQ0kF,KAAK,EAIjC57E,EAAMvB,OAAOq+E,CAAU,EAGlB5lF,EAAQ6S,SACX9V,WAAW,WACe,YAAxB,OAAOiD,EAAQ8J,MAAuB9J,EAAQ8J,KAAK,EAAE,CACvD,EAAE,CAAC,EAIF9J,EAAQqF,KAAKjN,SAAmB,EAAR6D,GACE,YAA3B,OAAO+D,EAAQg4D,SAA0Bh4D,EAAQg4D,QAAQ,IAGpDp4C,CACT,CAAC,CACH,CAAC,EAGGzkB,MAAM,cACRA,MAAMqE,OAAO,uBAAwB,aAAa","file":"layui.js","sourcesContent":["/**\n * Layui\n * Classic modular front-end UI library\n * MIT Licensed\n */\n\n;!function(win){\n \"use strict\";\n\n var doc = win.document;\n var config = {\n modules: {}, // 模块物理路径\n status: {}, // 模块加载状态\n timeout: 10, // 符合规范的模块请求最长等待秒数\n event: {} // 模块自定义事件\n };\n\n var Layui = function(){\n this.v = '2.9.1'; // Layui 版本号\n };\n\n // 识别预先可能定义的指定全局对象\n var GLOBAL = win.LAYUI_GLOBAL || {};\n\n // 获取 layui 所在目录\n var getPath = function(){\n var jsPath = doc.currentScript ? doc.currentScript.src : function(){\n var js = doc.scripts;\n var last = js.length - 1;\n var src;\n for(var i = last; i > 0; i--){\n if(js[i].readyState === 'interactive'){\n src = js[i].src;\n break;\n }\n }\n return src || js[last].src;\n }();\n\n return config.dir = GLOBAL.dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);\n }();\n\n // 异常提示\n var error = function(msg, type){\n type = type || 'log';\n win.console && console[type] && console[type]('layui error hint: ' + msg);\n };\n\n var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';\n\n // 内置模块\n var modules = config.builtin = {\n lay: 'lay', // 基础 DOM 操作\n layer: 'layer', // 弹层\n laydate: 'laydate', // 日期\n laypage: 'laypage', // 分页\n laytpl: 'laytpl', // 模板引擎\n form: 'form', // 表单集\n upload: 'upload', // 上传\n dropdown: 'dropdown', // 下拉菜单\n transfer: 'transfer', // 穿梭框\n tree: 'tree', // 树结构\n table: 'table', // 表格\n treeTable: 'treeTable', // 树表\n element: 'element', // 常用元素操作\n rate: 'rate', // 评分组件\n colorpicker: 'colorpicker', // 颜色选择器\n slider: 'slider', // 滑块\n carousel: 'carousel', // 轮播\n flow: 'flow', // 流加载\n util: 'util', // 工具块\n code: 'code', // 代码修饰器\n jquery: 'jquery', // DOM 库(第三方)\n\n all: 'all',\n 'layui.all': 'layui.all' // 聚合标识(功能性的,非真实模块)\n };\n\n // 记录基础数据\n Layui.prototype.cache = config;\n\n // 定义模块\n Layui.prototype.define = function(deps, factory){\n var that = this;\n var type = typeof deps === 'function';\n var callback = function(){\n var setApp = function(app, exports){\n layui[app] = exports;\n config.status[app] = true;\n };\n typeof factory === 'function' && factory(function(app, exports){\n setApp(app, exports);\n config.callback[app] = function(){\n factory(setApp);\n }\n });\n return this;\n };\n\n type && (\n factory = deps,\n deps = []\n );\n\n that.use(deps, callback, null, 'define');\n return that;\n };\n\n // 使用特定模块\n Layui.prototype.use = function(apps, callback, exports, from){\n var that = this;\n var dir = config.dir = config.dir ? config.dir : getPath;\n var head = doc.getElementsByTagName('head')[0];\n\n apps = function(){\n if(typeof apps === 'string'){\n return [apps];\n }\n // 当第一个参数为 function 时,则自动加载所有内置模块,且执行的回调即为该 function 参数;\n else if(typeof apps === 'function'){\n callback = apps;\n return ['all'];\n }\n return apps;\n }();\n\n // 如果页面已经存在 jQuery 1.7+ 库且所定义的模块依赖 jQuery则不加载内部 jquery 模块\n if(win.jQuery && jQuery.fn.on){\n that.each(apps, function(index, item){\n if(item === 'jquery'){\n apps.splice(index, 1);\n }\n });\n layui.jquery = layui.$ = jQuery;\n }\n\n var item = apps[0];\n var timeout = 0;\n\n exports = exports || [];\n\n // 静态资源host\n config.host = config.host || (dir.match(/\\/\\/([\\s\\S]+?)\\//)||['//'+ location.host +'/'])[0];\n\n // 加载完毕\n function onScriptLoad(e, url){\n var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/\n if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) {\n config.modules[item] = url;\n head.removeChild(node);\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n config.status[item] ? onCallback() : setTimeout(poll, 4);\n }());\n }\n }\n\n // 回调\n function onCallback(){\n exports.push(layui[item]);\n apps.length > 1 ?\n that.use(apps.slice(1), callback, exports, from)\n : ( typeof callback === 'function' && function(){\n // 保证文档加载完毕再执行回调\n if(layui.jquery && typeof layui.jquery === 'function' && from !== 'define'){\n return layui.jquery(function(){\n callback.apply(layui, exports);\n });\n }\n callback.apply(layui, exports);\n }() );\n }\n\n // 如果引入了聚合板,内置的模块则不必重复加载\n if( apps.length === 0 || (layui['layui.all'] && modules[item]) ){\n return onCallback(), that;\n }\n\n /*\n * 获取加载的模块 URL\n * 如果是内置模块,则按照 dir 参数拼接模块路径\n * 如果是扩展模块,则判断模块路径值是否为 {/} 开头,\n * 如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。\n * 否则,则按照 base 参数拼接模块路径\n */\n\n var url = ( modules[item] ? (dir + 'modules/')\n : (/^\\{\\/\\}/.test(that.modules[item]) ? '' : (config.base || ''))\n ) + (that.modules[item] || item) + '.js';\n url = url.replace(/^\\{\\/\\}/, '');\n\n // 如果扩展模块(即:非内置模块)对象已经存在,则不必再加载\n if(!config.modules[item] && layui[item]){\n config.modules[item] = url; // 并记录起该扩展模块的 url\n }\n\n // 首次加载模块\n if(!config.modules[item]){\n var node = doc.createElement('script');\n\n node.async = true;\n node.charset = 'utf-8';\n node.src = url + function(){\n var version = config.version === true\n ? (config.v || (new Date()).getTime())\n : (config.version||'');\n return version ? ('?v=' + version) : '';\n }();\n\n head.appendChild(node);\n\n if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){\n node.attachEvent('onreadystatechange', function(e){\n onScriptLoad(e, url);\n });\n } else {\n node.addEventListener('load', function(e){\n onScriptLoad(e, url);\n }, false);\n }\n\n config.modules[item] = url;\n } else { // 缓存\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n (typeof config.modules[item] === 'string' && config.status[item])\n ? onCallback()\n : setTimeout(poll, 4);\n }());\n }\n\n return that;\n };\n\n // 弃用原有的指定模块,以便重新扩展新的同名模块\n Layui.prototype.disuse = function(apps){\n var that = this;\n apps = that.isArray(apps) ? apps : [apps];\n that.each(apps, function (index, item) {\n if (!config.status[item]) {\n // return error('module ' + item + ' is not exist');\n }\n delete that[item];\n delete modules[item];\n delete that.modules[item];\n delete config.status[item];\n delete config.modules[item];\n });\n return that;\n };\n\n // 获取节点的 style 属性值\n Layui.prototype.getStyle = function(node, name){\n var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);\n return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);\n };\n\n // css 外部加载器\n Layui.prototype.link = function(href, fn, cssname){\n var that = this;\n var head = doc.getElementsByTagName('head')[0];\n var link = doc.createElement('link');\n\n if(typeof fn === 'string') cssname = fn;\n\n var app = (cssname || href).replace(/\\.|\\//g, '');\n var id = 'layuicss-'+ app;\n var STAUTS_NAME = 'creating';\n var timeout = 0;\n\n link.href = href + (config.debug ? '?v='+new Date().getTime() : '');\n link.rel = 'stylesheet';\n link.id = id;\n link.media = 'all';\n\n if(!doc.getElementById(id)){\n head.appendChild(link);\n }\n\n if(typeof fn !== 'function') return that;\n\n // 轮询 css 是否加载完毕\n (function poll(status) {\n var delay = 100;\n var getLinkElem = doc.getElementById(id); // 获取动态插入的 link 元素\n\n // 如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范\n if(++timeout > config.timeout * 1000 / delay){\n return error(href + ' timeout');\n }\n\n // css 加载就绪\n if(parseInt(that.getStyle(getLinkElem, 'width')) === 1989){\n // 如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态\n if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');\n // 如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调\n getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();\n } else {\n getLinkElem.setAttribute('lay-status', STAUTS_NAME);\n setTimeout(function(){\n poll(STAUTS_NAME);\n }, delay);\n }\n }());\n\n // 轮询css是否加载完毕\n /*\n (function poll() {\n if(++timeout > config.timeout * 1000 / 100){\n return error(href + ' timeout');\n };\n parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){\n fn();\n }() : setTimeout(poll, 100);\n }());\n */\n\n return that;\n };\n\n // css 内部加载器\n Layui.prototype.addcss = function(firename, fn, cssname){\n return layui.link(config.dir + 'css/' + firename, fn, cssname);\n };\n\n // 存储模块的回调\n config.callback = {};\n\n // 重新执行模块的工厂函数\n Layui.prototype.factory = function(modName){\n if(layui[modName]){\n return typeof config.callback[modName] === 'function'\n ? config.callback[modName]\n : null;\n }\n };\n\n // 图片预加载\n Layui.prototype.img = function(url, callback, error) {\n var img = new Image();\n img.src = url;\n if(img.complete){\n return callback(img);\n }\n img.onload = function(){\n img.onload = null;\n typeof callback === 'function' && callback(img);\n };\n img.onerror = function(e){\n img.onerror = null;\n typeof error === 'function' && error(e);\n };\n };\n\n // 全局配置\n Layui.prototype.config = function(options){\n options = options || {};\n for(var key in options){\n config[key] = options[key];\n }\n return this;\n };\n\n // 记录全部模块\n Layui.prototype.modules = function(){\n var clone = {};\n for(var o in modules){\n clone[o] = modules[o];\n }\n return clone;\n }();\n\n // 拓展模块\n Layui.prototype.extend = function(options){\n var that = this;\n\n // 验证模块是否被占用\n options = options || {};\n for(var o in options){\n if(that[o] || that.modules[o]){\n error(o+ ' Module already exists', 'error');\n } else {\n that.modules[o] = options[o];\n }\n }\n\n return that;\n };\n\n // location.hash 路由解析\n Layui.prototype.router = Layui.prototype.hash = function(hash){\n var that = this;\n var hash = hash || location.hash;\n var data = {\n path: [],\n search: {},\n hash: (hash.match(/[^#](#.*$)/) || [])[1] || ''\n };\n\n if(!/^#\\//.test(hash)) return data; // 禁止非路由规范\n\n hash = hash.replace(/^#\\//, '');\n data.href = '/' + hash;\n hash = hash.replace(/([^#])(#.*$)/, '$1').split('/') || [];\n\n // 提取 Hash 结构\n that.each(hash, function(index, item){\n /^\\w+=/.test(item) ? function(){\n item = item.split('=');\n data.search[item[0]] = item[1];\n }() : data.path.push(item);\n });\n\n return data;\n };\n\n // URL 解析\n Layui.prototype.url = function(href){\n var that = this;\n var data = {\n // 提取 url 路径\n pathname: function(){\n var pathname = href\n ? function(){\n var str = (href.match(/\\.[^.]+?\\/.+/) || [])[0] || '';\n return str.replace(/^[^\\/]+/, '').replace(/\\?.+/, '');\n }()\n : location.pathname;\n return pathname.replace(/^\\//, '').split('/');\n }(),\n\n // 提取 url 参数\n search: function(){\n var obj = {};\n var search = (href\n ? function(){\n var str = (href.match(/\\?.+/) || [])[0] || '';\n return str.replace(/\\#.+/, '');\n }()\n : location.search\n ).replace(/^\\?+/, '').split('&'); // 去除 ?,按 & 分割参数\n\n // 遍历分割后的参数\n that.each(search, function(index, item){\n var _index = item.indexOf('=')\n ,key = function(){ // 提取 key\n if(_index < 0){\n return item.substr(0, item.length);\n } else if(_index === 0){\n return false;\n } else {\n return item.substr(0, _index);\n }\n }();\n // 提取 value\n if(key){\n obj[key] = _index > 0 ? item.substr(_index + 1) : null;\n }\n });\n\n return obj;\n }(),\n\n // 提取 Hash\n hash: that.router(function(){\n return href\n ? ((href.match(/#.+/) || [])[0] || '/')\n : location.hash;\n }())\n };\n\n return data;\n };\n\n // 本地持久存储\n Layui.prototype.data = function(table, settings, storage){\n table = table || 'layui';\n storage = storage || localStorage;\n\n if(!win.JSON || !win.JSON.parse) return;\n\n // 如果 settings 为 null则删除表\n if(settings === null){\n return delete storage[table];\n }\n\n settings = typeof settings === 'object'\n ? settings\n : {key: settings};\n\n try {\n var data = JSON.parse(storage[table]);\n } catch(e) {\n var data = {};\n }\n\n if('value' in settings) data[settings.key] = settings.value;\n if(settings.remove) delete data[settings.key];\n storage[table] = JSON.stringify(data);\n\n return settings.key ? data[settings.key] : data;\n };\n\n // 本地临时存储\n Layui.prototype.sessionData = function(table, settings){\n return this.data(table, settings, sessionStorage);\n }\n\n // 设备信息\n Layui.prototype.device = function(key){\n var agent = navigator.userAgent.toLowerCase();\n\n // 获取版本号\n var getVersion = function(label){\n var exp = new RegExp(label + '/([^\\\\s\\\\_\\\\-]+)');\n label = (agent.match(exp)||[])[1];\n return label || false;\n };\n\n // 返回结果集\n var result = {\n os: function(){ // 底层操作系统\n if(/windows/.test(agent)){\n return 'windows';\n } else if(/linux/.test(agent)){\n return 'linux';\n } else if(/iphone|ipod|ipad|ios/.test(agent)){\n return 'ios';\n } else if(/mac/.test(agent)){\n return 'mac';\n }\n }(),\n ie: function(){ // ie 版本\n return (!!win.ActiveXObject || \"ActiveXObject\" in win) ? (\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\n ) : false;\n }(),\n weixin: getVersion('micromessenger') // 是否微信\n };\n\n // 任意的 key\n if(key && !result[key]){\n result[key] = getVersion(key);\n }\n\n // 移动设备\n result.android = /android/.test(agent);\n result.ios = result.os === 'ios';\n result.mobile = (result.android || result.ios);\n\n return result;\n };\n\n // 提示\n Layui.prototype.hint = function(){\n return {\n error: error\n };\n };\n\n // typeof 类型细分 -> string/number/boolean/undefined/null、object/array/function/…\n Layui.prototype._typeof = Layui.prototype.type = function(operand){\n if(operand === null) return String(operand);\n\n // 细分引用类型\n return (typeof operand === 'object' || typeof operand === 'function') ? function(){\n var type = Object.prototype.toString.call(operand).match(/\\s(.+)\\]$/) || []; // 匹配类型字符\n var classType = 'Function|Array|Date|RegExp|Object|Error|Symbol'; // 常见类型字符\n\n type = type[1] || 'Object';\n\n // 除匹配到的类型外,其他对象均返回 object\n return new RegExp('\\\\b('+ classType + ')\\\\b').test(type)\n ? type.toLowerCase()\n : 'object';\n }() : typeof operand;\n };\n\n // 对象是否具备数组结构(此处为兼容 jQuery 对象)\n Layui.prototype._isArray = Layui.prototype.isArray = function(obj){\n var that = this;\n var len;\n var type = that.type(obj);\n\n if(!obj || (typeof obj !== 'object') || obj === win) return false;\n\n len = 'length' in obj && obj.length; // 兼容 ie\n return type === 'array' || len === 0 || (\n typeof len === 'number' && len > 0 && (len - 1) in obj // 兼容 jQuery 对象\n );\n };\n\n // 遍历\n Layui.prototype.each = function(obj, fn){\n var key;\n var that = this;\n var callFn = function(key, obj){ // 回调\n return fn.call(obj[key], key, obj[key])\n };\n\n if(typeof fn !== 'function') return that;\n obj = obj || [];\n\n // 优先处理数组结构\n if(that.isArray(obj)){\n for(key = 0; key < obj.length; key++){\n if(callFn(key, obj)) break;\n }\n } else {\n for(key in obj){\n if(callFn(key, obj)) break;\n }\n }\n\n return that;\n };\n\n // 将数组中的成员对象按照某个 key 的 value 值进行排序\n Layui.prototype.sort = function(arr, key, desc, notClone){\n var that = this;\n var clone = notClone ? (arr || []) : JSON.parse(\n JSON.stringify(arr || [])\n );\n\n // 若未传入 key则直接返回原对象\n if(that.type(arr) === 'object' && !key){\n return clone;\n } else if(typeof arr !== 'object'){ // 若 arr 非对象\n return [clone];\n }\n\n // 开始排序\n clone.sort(function(o1, o2){\n var v1 = o1[key];\n var v2 = o2[key];\n\n /*\n * 特殊数据\n * 若比较的成员均非对象\n */\n\n // 若比较的成员均为数字\n if(!isNaN(o1) && !isNaN(o2)) return o1 - o2;\n // 若比较的成员只存在某一个非对象\n if(!isNaN(o1) && isNaN(o2)){\n if(key && typeof o2 === 'object'){\n v1 = o1;\n } else {\n return -1;\n }\n } else if (isNaN(o1) && !isNaN(o2)){\n if(key && typeof o1 === 'object'){\n v2 = o2;\n } else {\n return 1;\n }\n }\n\n /*\n * 正常数据\n * 即成员均为对象,也传入了对比依据: key\n * 若 value 为数字,按「大小」排序;若 value 非数字,则按「字典序」排序\n */\n\n // value 是否为数字\n var isNum = [!isNaN(v1), !isNaN(v2)];\n\n // 若为数字比较\n if(isNum[0] && isNum[1]){\n if(v1 && (!v2 && v2 !== 0)){ // 数字 vs 空\n return 1;\n } else if((!v1 && v1 !== 0) && v2){ // 空 vs 数字\n return -1;\n } else { // 数字 vs 数字\n return v1 - v2;\n }\n }\n\n /**\n * 字典序排序\n */\n\n // 若为非数字比较\n if(!isNum[0] && !isNum[1]){\n // 字典序比较\n if(v1 > v2){\n return 1;\n } else if (v1 < v2) {\n return -1;\n } else {\n return 0;\n }\n }\n\n // 若为混合比较\n if(isNum[0] || !isNum[1]){ // 数字 vs 非数字\n return -1;\n } else if(!isNum[0] || isNum[1]) { // 非数字 vs 数字\n return 1;\n }\n\n });\n\n desc && clone.reverse(); // 倒序\n return clone;\n };\n\n // 阻止事件冒泡\n Layui.prototype.stope = function(thisEvent){\n thisEvent = thisEvent || win.event;\n try { thisEvent.stopPropagation() } catch(e){\n thisEvent.cancelBubble = true;\n }\n };\n\n // 字符常理\n var EV_REMOVE = 'LAYUI-EVENT-REMOVE';\n\n // 自定义模块事件\n Layui.prototype.onevent = function(modName, events, callback){\n if(typeof modName !== 'string'\n || typeof callback !== 'function') return this;\n\n return Layui.event(modName, events, null, callback);\n };\n\n // 执行自定义模块事件\n Layui.prototype.event = Layui.event = function(modName, events, params, fn){\n var that = this;\n var result = null;\n var filter = (events || '').match(/\\((.*)\\)$/)||[]; // 提取事件过滤器字符结构select(xxx)\n var eventName = (modName + '.'+ events).replace(filter[0], ''); // 获取事件名称form.select\n var filterName = filter[1] || ''; // 获取过滤器名称,xxx\n var callback = function(_, item){\n var res = item && item.call(that, params);\n res === false && result === null && (result = false);\n };\n\n // 如果参数传入特定字符,则执行移除事件\n if(params === EV_REMOVE){\n delete (that.cache.event[eventName] || {})[filterName];\n return that;\n }\n\n // 添加事件\n if(fn){\n config.event[eventName] = config.event[eventName] || {};\n\n if (filterName) {\n // 带filter不支持重复事件\n config.event[eventName][filterName] = [fn];\n } else {\n // 不带filter处理的是所有的同类事件应该支持重复事件\n config.event[eventName][filterName] = config.event[eventName][filterName] || [];\n config.event[eventName][filterName].push(fn);\n }\n return this;\n }\n\n // 执行事件回调\n layui.each(config.event[eventName], function(key, item){\n // 执行当前模块的全部事件\n if(filterName === '{*}'){\n layui.each(item, callback);\n return;\n }\n\n // 执行指定事件\n key === '' && layui.each(item, callback);\n (filterName && key === filterName) && layui.each(item, callback);\n });\n\n return result;\n };\n\n // 新增模块事件\n Layui.prototype.on = function(events, modName, callback){\n var that = this;\n return that.onevent.call(that, modName, events, callback);\n }\n\n // 移除模块事件\n Layui.prototype.off = function(events, modName){\n var that = this;\n return that.event.call(that, modName, events, EV_REMOVE);\n };\n\n // 防抖\n Layui.prototype.debounce = function (func, wait) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n func.apply(context, args);\n }, wait);\n }\n };\n\n // 节流\n Layui.prototype.throttle = function (func, wait) {\n var cooldown = false;\n return function () {\n var context = this;\n var args = arguments;\n if (!cooldown) {\n func.apply(context, args);\n cooldown = true;\n setTimeout(function () {\n cooldown = false;\n }, wait);\n }\n }\n };\n\n // exports layui\n win.layui = new Layui();\n\n}(window); // gulp build: layui-footer\n\n","/**\n * 用于打包聚合版,该文件不会存在于构建后的目录 \n */\n \nlayui.define(function(exports){\n var cache = layui.cache;\n layui.config({\n dir: cache.dir.replace(/lay\\/dest\\/$/, '')\n });\n exports('layui.all', layui.v);\n});","\r\n/** lay 基础模块 | MIT Licensed */\r\n\r\n;!function(window){ // gulp build: lay-header\r\n \"use strict\";\r\n\r\n var MOD_NAME = 'lay'; // 模块名\r\n var document = window.document;\r\n\r\n /**\r\n * 元素查找\r\n * @param {string | HTMLElement | JQuery} selector\r\n */\r\n var lay = function(selector){\r\n return new Class(selector);\r\n };\r\n\r\n // 构造器\r\n var Class = function(selector){\r\n var that = this;\r\n var elem = typeof selector === 'object' ? function(){\r\n // 仅适配简单元素对象\r\n return layui.isArray(selector) ? selector : [selector];\r\n }() : (\r\n this.selector = selector,\r\n document.querySelectorAll(selector || null)\r\n );\r\n\r\n lay.each(elem, function(index, item){\r\n that.push(elem[index]);\r\n });\r\n };\r\n\r\n /*\r\n * API 兼容\r\n */\r\n Array.prototype.indexOf = Array.prototype.indexOf || function(searchElement, fromIndex) {\r\n var rst = -1;\r\n fromIndex = fromIndex || 0;\r\n layui.each(this, function(index, val){\r\n if (searchElement === val && index >= fromIndex) {\r\n rst = index;\r\n return !0;\r\n }\r\n });\r\n return rst;\r\n };\r\n\r\n /*\r\n lay 对象操作\r\n */\r\n\r\n Class.fn = Class.prototype = [];\r\n Class.fn.constructor = Class;\r\n\r\n /**\r\n * 将两个或多个对象的内容深度合并到第一个对象中\r\n * @callback ExtendFunc\r\n * @param {*} target - 一个对象\r\n * @param {...*} objectN - 包含额外的属性合并到第一个参数\r\n * @returns {*} 返回合并后的对象\r\n */\r\n /** @type ExtendFunc*/\r\n lay.extend = function(){\r\n var ai = 1;\r\n var length;\r\n var args = arguments;\r\n var clone = function(target, obj){\r\n target = target || (layui.type(obj) === 'array' ? [] : {}); // 目标对象\r\n for(var i in obj){\r\n // 若值为普通对象,则进入递归,继续深度合并\r\n target[i] = (obj[i] && obj[i].constructor === Object)\r\n ? clone(target[i], obj[i])\r\n : obj[i];\r\n }\r\n return target;\r\n };\r\n\r\n args[0] = typeof args[0] === 'object' ? args[0] : {};\r\n length = args.length\r\n\r\n for(; ai < length; ai++){\r\n if(typeof args[ai] === 'object'){\r\n clone(args[0], args[ai]);\r\n }\r\n }\r\n return args[0];\r\n };\r\n\r\n /**\r\n * IE 版本\r\n * @type {string | boolean} - 如果是 IE 返回版本字符串,否则返回 false\r\n */\r\n lay.ie = function(){\r\n var agent = navigator.userAgent.toLowerCase();\r\n return (!!window.ActiveXObject || \"ActiveXObject\" in window) ? (\r\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\r\n ) : false;\r\n }();\r\n\r\n\r\n /**\r\n * 获取 layui 常见方法,以便用于组件单独版\r\n */\r\n\r\n lay.layui = layui || {};\r\n lay.getPath = layui.cache.dir; // 获取当前 JS 所在目录\r\n lay.stope = layui.stope; // 中止冒泡\r\n lay.each = function(){ // 遍历\r\n layui.each.apply(layui, arguments);\r\n return this;\r\n };\r\n\r\n\r\n /**\r\n * 数字前置补零\r\n * @param {number | string} num - 原始数字\r\n * @param {number} [length=2] - 数字长度,如果原始数字长度小于 length则前面补零\r\n * @returns {string} 返回补 0 后的数字\r\n * @example\r\n * ```js\r\n * lay.digit(6, 2); // \"06\"\r\n * lay.digit('7', 3); // \"007\"\r\n * ```\r\n */\r\n lay.digit = function(num, length){\r\n if(!(typeof num === 'string' || typeof num === 'number')) return '';\r\n\r\n var str = '';\r\n num = String(num);\r\n length = length || 2;\r\n for(var i = num.length; i < length; i++){\r\n str += '0';\r\n }\r\n return num < Math.pow(10, length) ? str + num : num;\r\n };\r\n\r\n /**\r\n * 创建元素\r\n * @param {string} elemName - 元素的标签名\r\n * @param {Object.<string, string>} [attr] - 添加到元素上的属性\r\n * @returns {HTMLElement} 返回创建的 HTML 元素\r\n * @example\r\n * ```js\r\n * lay.elem('div', {id: 'test'}) // <div id=\"test\"></div>\r\n * ```\r\n */\r\n lay.elem = function(elemName, attr){\r\n var elem = document.createElement(elemName);\r\n lay.each(attr || {}, function(key, value){\r\n elem.setAttribute(key, value);\r\n });\r\n return elem;\r\n };\r\n\r\n /**\r\n * 当前页面是否存在滚动条\r\n * @returns {boolean} 是否存在滚动条\r\n * @example\r\n * ```\r\n * lay.hasScrollbar() // true 或 false\r\n * ```\r\n */\r\n lay.hasScrollbar = function(){\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n };\r\n\r\n /**\r\n * 获取 style rules\r\n * @param {HTMLStyleElement} style - HTMLStyle 元素\r\n * @param {(ruleItem: CSSStyleRule, index: number) => boolean} [callback] - 用来返回 style 元素中的每个 `style rule` 的函数,返回 true 终止遍历\r\n * @returns {CSSRuleList } 返回 `style rules`\r\n * @example\r\n * ```\r\n * <style id=\"test\">\r\n * .lay-card{\r\n * color: #000;\r\n * }\r\n * .lay-btn-success{\r\n * color: green;\r\n * }\r\n * </style>\r\n *\r\n * lay.getStyleRules($('#test')[0], function(rule, index){\r\n * if(rule.selectorText === '.lay-card'){\r\n * console.log(index, rule.cssText) // 0 '.lay-card{color: #000}'\r\n * rule.style.color = '#EEE';\r\n * return true; // 终止遍历\r\n * }\r\n * }) // RuleList\r\n * ```\r\n */\r\n lay.getStyleRules = function(style, callback) {\r\n if (!style) return;\r\n\r\n var sheet = style.sheet || style.styleSheet || {};\r\n var rules = sheet.cssRules || sheet.rules;\r\n\r\n if (typeof callback === 'function') {\r\n layui.each(rules, function(i, item){\r\n if (callback(item, i)) return true;\r\n });\r\n }\r\n\r\n return rules;\r\n };\r\n\r\n /**\r\n * 创建 style 样式\r\n * @param {Object} options - 可配置的选项\r\n * @param {string | HTMLElement | JQuery} [options.target] - 目标容器,指定后会将样式追加到目标容器\r\n * @param {string} [options.id] - 样式元素的 id默认自增\r\n * @param {string} options.text - 样式内容\r\n * @returns {HTMLStyleElement} 返回创建的样式元素\r\n * @example\r\n * ```html\r\n * <div id=\"targetEl\">\r\n * <!-- 样式追加到目标容器 -->\r\n * <style id=\"LAY-STYLE-DF-0\">.card{color: #000}</style>\r\n * </div>\r\n *\r\n * lay.style({\r\n * target: '#targetEl',\r\n * text: '.card{color: #000}'\r\n * }) // <style id=\"LAY-STYLE-DF-0\">.card{color: #000}</style>\r\n * ```\r\n */\r\n lay.style = function(options){\r\n options = options || {};\r\n\r\n var style = lay.elem('style');\r\n var styleText = options.text || '';\r\n var target = options.target;\r\n\r\n if (!styleText) return;\r\n\r\n // 添加样式\r\n if ('styleSheet' in style) {\r\n style.setAttribute('type', 'text/css');\r\n style.styleSheet.cssText = styleText;\r\n } else {\r\n style.innerHTML = styleText;\r\n }\r\n\r\n // ID\r\n style.id = 'LAY-STYLE-'+ (options.id || function(index) {\r\n lay.style.index++;\r\n return 'DF-'+ index;\r\n }(lay.style.index || 0));\r\n\r\n // 是否向目标容器中追加 style 元素\r\n if (target) {\r\n var styleElem = lay(target).find('#'+ style.id);\r\n styleElem[0] && styleElem.remove();\r\n lay(target).append(style);\r\n }\r\n\r\n return style;\r\n };\r\n\r\n /**\r\n * 将元素定位到指定目标元素附近\r\n * @param {HTMLElement} target - 目标元素\r\n * @param {HTMLElement} elem - 定位元素\r\n * @param {Object} [opts] - 可配置的选项\r\n * @param {'absolute' | 'fixed'} [opts.position] - 元素的定位类型\r\n * @param {'left' | 'right'} [opts.clickType=\"left\"] - 点击类型,默认为 'left',如果 {@link target} 是 document 或 body 元素,则为 'right'\r\n * @param {'left' | 'right' | 'center'} [opts.align=\"left\"] - 对齐方式\r\n * @param {boolean} [opts.allowBottomOut=false] - 顶部没有足够区域显示时,是否允许底部溢出\r\n * @param {string | number} [opts.margin=5] - 边距\r\n * @param {Event} [opts.e] - 事件对象,仅右键生效\r\n * @param {boolean} [opts.SYSTEM_RELOAD] - 是否重载,用于出现滚动条时重新计算位置\r\n * @example\r\n * ```js\r\n * <button id=\"targetEl\">dropdown</button>\r\n * <ul id=\"contentEl\" class=\"dropdown-menu\">\r\n * <li>菜单1</li>\r\n * <li>菜单2</li>\r\n * </ul>\r\n *\r\n * // 下拉菜单将被定位到按钮附近\r\n * lay.position(\r\n * $('#targetEl')[0],\r\n * $('#contentEl')[0],\r\n * {\r\n * position: 'fixed',\r\n * align: 'center'\r\n * }\r\n * )\r\n * ```\r\n */\r\n lay.position = function(target, elem, opts){\r\n if(!elem) return;\r\n opts = opts || {};\r\n\r\n // 如果绑定的是 document 或 body 元素,则直接获取鼠标坐标\r\n if(target === document || target === lay('body')[0]){\r\n opts.clickType = 'right';\r\n }\r\n\r\n // 绑定绑定元素的坐标\r\n var rect = opts.clickType === 'right' ? function(){\r\n var e = opts.e || window.event || {};\r\n return {\r\n left: e.clientX,\r\n top: e.clientY,\r\n right: e.clientX,\r\n bottom: e.clientY\r\n }\r\n }() : target.getBoundingClientRect();\r\n var elemWidth = elem.offsetWidth; // 控件的宽度\r\n var elemHeight = elem.offsetHeight; // 控件的高度\r\n\r\n // 滚动条高度\r\n var scrollArea = function(type){\r\n type = type ? 'scrollLeft' : 'scrollTop';\r\n return document.body[type] | document.documentElement[type];\r\n };\r\n\r\n // 窗口宽高\r\n var winArea = function(type){\r\n return document.documentElement[type ? 'clientWidth' : 'clientHeight']\r\n };\r\n var margin = 'margin' in opts ? opts.margin : 5;\r\n var left = rect.left;\r\n var top = rect.bottom;\r\n\r\n // 相对元素居中\r\n if(opts.align === 'center'){\r\n left = left - (elemWidth - target.offsetWidth) / 2;\r\n } else if(opts.align === 'right'){\r\n left = left - elemWidth + target.offsetWidth;\r\n }\r\n\r\n // 判断右侧是否超出边界\r\n if(left + elemWidth + margin > winArea('width')){\r\n left = winArea('width') - elemWidth - margin; // 如果超出右侧,则将面板向右靠齐\r\n }\r\n // 左侧是否超出边界\r\n if(left < margin) left = margin;\r\n\r\n\r\n // 判断底部和顶部是否超出边界\r\n if(rect.bottom + elemHeight + margin > winArea()){ // 底部超出边界\r\n // 优先判断顶部是否有足够区域显示完全,且底部不能超出边界\r\n if(rect.top > elemHeight + margin && rect.top <= winArea() ){\r\n top = rect.top - elemHeight - margin*2; // 顶部有足够的区域显示\r\n } else if(!opts.allowBottomOut){ // 顶部没有足够区域显示时,是否允许底部溢出\r\n top = winArea() - elemHeight - margin*2; // 面板向底部靠齐\r\n if(top < 0) top = 0; // 如果面板底部靠齐时,又溢出窗口顶部,则只能将顶部靠齐\r\n }\r\n }\r\n /*\r\n if(top + elemHeight + margin > winArea()){\r\n // 优先顶部是否有足够区域显示完全\r\n if(rect.top > elemHeight + margin){\r\n top = rect.top - elemHeight - margin*2; // 顶部有足够的区域显示\r\n } else {\r\n // 如果面板是鼠标右键弹出,且顶部没有足够区域显示,则将面板向底部靠齐\r\n if(obj.clickType === 'right'){\r\n top = winArea() - elemHeight - margin*2;\r\n if(top < 0) top = 0; // 不能溢出窗口顶部\r\n } else {\r\n top = margin; // 位置计算逻辑完备性处理\r\n }\r\n }\r\n }\r\n */\r\n\r\n // 定位类型\r\n var position = opts.position;\r\n if(position) elem.style.position = position;\r\n\r\n // 设置坐标\r\n elem.style.left = left + (position === 'fixed' ? 0 : scrollArea(1)) + 'px';\r\n elem.style.top = top + (position === 'fixed' ? 0 : scrollArea()) + 'px';\r\n\r\n // 防止页面无滚动条时,又因为弹出面板而出现滚动条导致的坐标计算偏差\r\n if(!lay.hasScrollbar()){\r\n var rect1 = elem.getBoundingClientRect();\r\n // 如果弹出面板的溢出窗口底部,则表示将出现滚动条,此时需要重新计算坐标\r\n if(!opts.SYSTEM_RELOAD && (rect1.bottom + margin) > winArea()){\r\n opts.SYSTEM_RELOAD = true;\r\n setTimeout(function(){\r\n lay.position(target, elem, opts);\r\n }, 50);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * 获取元素上的属性配置项\r\n * @param {string | HTMLElement | JQuery} elem - HTML 元素\r\n * @param {{attr: string} | string} [opts=\"lay-options\"] - 可配置的选项string 类型指定属性名\r\n * @returns {Object.<string, any>} 返回元素上的属性配置项\r\n * @example\r\n * ```js\r\n * <div id=\"testEl\" lay-options=\"{color:red}\" lay-toc=\"{hot: true}\"></div>\r\n *\r\n * var elem = $('#testEl')\r\n * lay.options(elem) // {color:red}\r\n * lay.options(elem[0]) // {color:red}\r\n * lay.options('#testEl') // {color:red}\r\n * lay.options('#testEl', {attr: 'lay-toc'}) // {hot: true}\r\n * lay.options('#testEl', 'lay-toc') // {hot: true}\r\n *\r\n * $('#testEl').attr('lay-toc') // '{hot: true}'\r\n * ```\r\n */\r\n lay.options = function(elem, opts){\r\n opts = typeof opts === 'object' ? opts : {attr: opts};\r\n\r\n if(elem === document) return {};\r\n\r\n var othis = lay(elem);\r\n var attrName = opts.attr || 'lay-options';\r\n var attrValue = othis.attr(attrName);\r\n\r\n try {\r\n /**\r\n * 请注意: 开发者在使用 lay-options=\"{}\" 配置组件选项时,需确保属性值不来自于网页用户,\r\n * 即属性值必须在网页开发者自身的可控范围内,否则请勿在 HTML 标签属性中获取组件选项。\r\n */\r\n return new Function('return '+ (attrValue || '{}'))();\r\n } catch(ev) {\r\n layui.hint().error(opts.errorText || [\r\n attrName + '=\"'+ attrValue + '\"',\r\n '\\n parseerror: '+ ev\r\n ].join('\\n'), 'error');\r\n return {};\r\n }\r\n };\r\n\r\n\r\n /**\r\n * 元素是否属于顶级元素document 或 body\r\n * @param {HTMLElement} elem - HTML 元素\r\n * @returns {boolean} 是否属于顶级元素\r\n * @example\r\n * ```js\r\n * lay.isTopElem(document) // true\r\n * ```\r\n */\r\n lay.isTopElem = function(elem){\r\n var topElems = [document, lay('body')[0]]\r\n ,matched = false;\r\n lay.each(topElems, function(index, item){\r\n if(item === elem){\r\n return matched = true\r\n }\r\n });\r\n return matched;\r\n };\r\n\r\n // 剪切板\r\n lay.clipboard = {\r\n /**\r\n * 写入文本\r\n * @param {Object} options - 可配置的选项\r\n * @param {string} options.text - 写入剪贴板的文本\r\n * @param {() => void} [options.done] - 写入成功/完成回调\r\n * @param {(err?: any) => void} [options.error] - 写入失败回调\r\n * @example\r\n * ```js\r\n * lay.clipboard.writeText({\r\n * text: '测试文本',\r\n * done: function(){ layer.msg('copied')},\r\n * error: function(){ layer.msg('error')}\r\n * })\r\n * ```\r\n */\r\n writeText: function(options) {\r\n var text = String(options.text);\r\n\r\n if(navigator && 'clipboard' in navigator){\r\n navigator.clipboard.writeText(text)\r\n .then(options.done, function(){\r\n legacyCopy();\r\n });\r\n }else{\r\n legacyCopy();\r\n }\r\n\r\n function legacyCopy(){\r\n var elem = document.createElement('textarea');\r\n\r\n elem.value = text;\r\n elem.style.position = 'fixed';\r\n elem.style.opacity = '0';\r\n elem.style.top = '0px';\r\n elem.style.left = '0px';\r\n\r\n document.body.appendChild(elem);\r\n elem.select();\r\n\r\n try {\r\n document.execCommand('copy');\r\n typeof options.done === 'function' && options.done();\r\n } catch(err) {\r\n typeof options.error === 'function' && options.error(err);\r\n } finally {\r\n elem.remove ? elem.remove() : document.body.removeChild(elem);\r\n }\r\n }\r\n }\r\n };\r\n\r\n\r\n /*\r\n * lay 元素操作\r\n */\r\n\r\n\r\n // 追加字符\r\n Class.addStr = function(str, new_str){\r\n str = str.replace(/\\s+/, ' ');\r\n new_str = new_str.replace(/\\s+/, ' ').split(' ');\r\n lay.each(new_str, function(ii, item){\r\n if(!new RegExp('\\\\b'+ item + '\\\\b').test(str)){\r\n str = str + ' ' + item;\r\n }\r\n });\r\n return str.replace(/^\\s|\\s$/, '');\r\n };\r\n\r\n // 移除值\r\n Class.removeStr = function(str, new_str){\r\n str = str.replace(/\\s+/, ' ');\r\n new_str = new_str.replace(/\\s+/, ' ').split(' ');\r\n lay.each(new_str, function(ii, item){\r\n var exp = new RegExp('\\\\b'+ item + '\\\\b')\r\n if(exp.test(str)){\r\n str = str.replace(exp, '');\r\n }\r\n });\r\n return str.replace(/\\s+/, ' ').replace(/^\\s|\\s$/, '');\r\n };\r\n\r\n // 查找子元素\r\n Class.fn.find = function(selector){\r\n var that = this;\r\n var elem = [];\r\n var isObject = typeof selector === 'object';\r\n\r\n this.each(function(i, item){\r\n var children = isObject && item.contains(selector)\r\n ? selector\r\n : item.querySelectorAll(selector || null);\r\n\r\n lay.each(children, function(index, child){\r\n elem.push(child);\r\n });\r\n });\r\n\r\n return lay(elem);\r\n };\r\n\r\n // 元素遍历\r\n Class.fn.each = function(fn){\r\n return lay.each.call(this, this, fn);\r\n };\r\n\r\n // 添加 className\r\n Class.fn.addClass = function(className, type){\r\n return this.each(function(index, item){\r\n item.className = Class[type ? 'removeStr' : 'addStr'](item.className, className)\r\n });\r\n };\r\n\r\n // 移除 className\r\n Class.fn.removeClass = function(className){\r\n return this.addClass(className, true);\r\n };\r\n\r\n // 是否包含 css 类\r\n Class.fn.hasClass = function(className){\r\n var has = false;\r\n this.each(function(index, item){\r\n if(new RegExp('\\\\b'+ className +'\\\\b').test(item.className)){\r\n has = true;\r\n }\r\n });\r\n return has;\r\n };\r\n\r\n // 添加或获取 css style\r\n Class.fn.css = function(key, value){\r\n var that = this;\r\n var parseValue = function(v){\r\n return isNaN(v) ? v : (v +'px');\r\n };\r\n return (typeof key === 'string' && value === undefined) ? function(){\r\n if(that.length > 0) return that[0].style[key];\r\n }() : that.each(function(index, item){\r\n typeof key === 'object' ? lay.each(key, function(thisKey, thisValue){\r\n item.style[thisKey] = parseValue(thisValue);\r\n }) : item.style[key] = parseValue(value);\r\n });\r\n };\r\n\r\n // 添加或获取宽度\r\n Class.fn.width = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].offsetWidth; // 此处还需做兼容\r\n }() : that.each(function(index, item){\r\n that.css('width', value);\r\n });\r\n };\r\n\r\n // 添加或获取高度\r\n Class.fn.height = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].offsetHeight; // 此处还需做兼容\r\n }() : that.each(function(index, item){\r\n that.css('height', value);\r\n });\r\n };\r\n\r\n // 添加或获取属性\r\n Class.fn.attr = function(key, value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].getAttribute(key);\r\n }() : that.each(function(index, item){\r\n item.setAttribute(key, value);\r\n });\r\n };\r\n\r\n // 移除属性\r\n Class.fn.removeAttr = function(key){\r\n return this.each(function(index, item){\r\n item.removeAttribute(key);\r\n });\r\n };\r\n\r\n // 设置或获取 HTML 内容\r\n Class.fn.html = function(html){\r\n var that = this;\r\n return html === undefined ? function(){\r\n if(that.length > 0) return that[0].innerHTML;\r\n }() : this.each(function(index, item){\r\n item.innerHTML = html;\r\n });\r\n };\r\n\r\n // 设置或获取值\r\n Class.fn.val = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].value;\r\n }() : this.each(function(index, item){\r\n item.value = value;\r\n });\r\n };\r\n\r\n // 追加内容\r\n Class.fn.append = function(elem){\r\n return this.each(function(index, item){\r\n typeof elem === 'object'\r\n ? item.appendChild(elem)\r\n : item.innerHTML = item.innerHTML + elem;\r\n });\r\n };\r\n\r\n // 移除内容\r\n Class.fn.remove = function(elem){\r\n return this.each(function(index, item){\r\n elem ? item.removeChild(elem) : item.parentNode.removeChild(item);\r\n });\r\n };\r\n\r\n // 事件绑定\r\n Class.fn.on = function(eventName, fn){\r\n return this.each(function(index, item){\r\n item.attachEvent ? item.attachEvent('on' + eventName, function(e){\r\n e.target = e.srcElement;\r\n fn.call(item, e);\r\n }) : item.addEventListener(eventName, fn, false);\r\n });\r\n };\r\n\r\n // 解除事件\r\n Class.fn.off = function(eventName, fn){\r\n return this.each(function(index, item){\r\n item.detachEvent\r\n ? item.detachEvent('on'+ eventName, fn)\r\n : item.removeEventListener(eventName, fn, false);\r\n });\r\n };\r\n\r\n // export\r\n window.lay = lay;\r\n\r\n // 输出为 layui 模块\r\n if(window.layui && layui.define){\r\n layui.define(function(exports){\r\n exports(MOD_NAME, lay);\r\n });\r\n }\r\n\r\n}(window, window.document); // gulp build: lay-footer\r\n","/**\r\n * laytpl 轻量模板引擎\r\n */\r\n\r\nlayui.define(function(exports){\r\n \"use strict\";\r\n\r\n // 默认属性\r\n var config = {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n };\r\n\r\n // 模板工具\r\n var tool = {\r\n escape: function(html){\r\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\r\n if(html === undefined || html === null) return '';\r\n\r\n html += '';\r\n if(!exp.test(html)) return html;\r\n\r\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&amp;')\r\n .replace(/</g, '&lt;').replace(/>/g, '&gt;')\r\n .replace(/'/g, '&#39;').replace(/\"/g, '&quot;');\r\n }\r\n };\r\n\r\n // 内部方法\r\n var inner = {\r\n exp: function(str){\r\n return new RegExp(str, 'g');\r\n },\r\n // 错误提示\r\n error: function(e, source){\r\n var error = 'Laytpl Error: ';\r\n typeof console === 'object' && console.error(error + e + '\\n'+ (source || ''));\r\n return error + e;\r\n }\r\n };\r\n\r\n // constructor\r\n var Class = function(template, options){\r\n var that = this;\r\n that.config = that.config || {};\r\n that.template = template;\r\n\r\n // 简单属性合并\r\n var extend = function(obj){\r\n for(var i in obj){\r\n that.config[i] = obj[i];\r\n }\r\n };\r\n\r\n extend(config);\r\n extend(options);\r\n };\r\n\r\n // 标签正则\r\n Class.prototype.tagExp = function(type, _, __){\r\n var options = this.config;\r\n var types = [\r\n '#([\\\\s\\\\S])+?', // js 语句\r\n '([^{#}])*?' // 普通字段\r\n ][type || 0];\r\n\r\n return inner.exp((_||'') + options.open + types + options.close + (__||''));\r\n };\r\n\r\n // 模版解析\r\n Class.prototype.parse = function(template, data){\r\n var that = this;\r\n var options = that.config;\r\n var source = template;\r\n var jss = inner.exp('^'+ options.open +'#', '');\r\n var jsse = inner.exp(options.close +'$', '');\r\n\r\n // 模板必须为 string 类型\r\n if(typeof template !== 'string') return template;\r\n\r\n // 正则解析\r\n template = template.replace(/\\s+|\\r|\\t|\\n/g, ' ')\r\n .replace(inner.exp(options.open +'#'), options.open +'# ')\r\n .replace(inner.exp(options.close +'}'), '} '+ options.close).replace(/\\\\/g, '\\\\\\\\')\r\n\r\n // 不匹配指定区域的内容\r\n .replace(inner.exp(options.open + '!(.+?)!' + options.close), function(str){\r\n str = str.replace(inner.exp('^'+ options.open + '!'), '')\r\n .replace(inner.exp('!'+ options.close), '')\r\n .replace(inner.exp(options.open + '|' + options.close), function(tag){\r\n return tag.replace(/(.)/g, '\\\\$1')\r\n });\r\n return str\r\n })\r\n\r\n // 匹配 JS 语法\r\n .replace(/(?=\"|')/g, '\\\\').replace(that.tagExp(), function(str){\r\n str = str.replace(jss, '').replace(jsse, '');\r\n return '\";' + str.replace(/\\\\(.)/g, '$1') + ';view+=\"';\r\n })\r\n\r\n // 匹配普通输出语句\r\n .replace(that.tagExp(1), function(str){\r\n var start = '\"+laytpl.escape(';\r\n if(str.replace(/\\s/g, '') === options.open + options.close){\r\n return '';\r\n }\r\n str = str.replace(inner.exp(options.open + '|' + options.close), '');\r\n if(/^=/.test(str)){\r\n str = str.replace(/^=/, '');\r\n } else if(/^-/.test(str)){\r\n str = str.replace(/^-/, '');\r\n start = '\"+(';\r\n }\r\n return start + str.replace(/\\\\(.)/g, '$1') + ')+\"';\r\n });\r\n\r\n template = '\"use strict\";var view = \"' + template + '\";return view;';\r\n\r\n try {\r\n /**\r\n * 请注意: 开发者在使用模板语法时,需确保模板中的 JS 语句不来自于页面用户输入。\r\n * 即模板中的 JS 语句必须在页面开发者自身的可控范围内,否则请避免使用该模板解析。\r\n */\r\n that.cache = template = new Function('d, laytpl', template);\r\n return template(data, tool);\r\n } catch(e) {\r\n delete that.cache;\r\n return inner.error(e, source);\r\n }\r\n };\r\n\r\n // 数据渲染\r\n Class.prototype.render = function(data, callback){\r\n data = data || {};\r\n\r\n var that = this;\r\n var result = that.cache ? that.cache(data, tool) : that.parse(that.template, data);\r\n\r\n // 返回渲染结果\r\n typeof callback === 'function' && callback(result);\r\n return result;\r\n };\r\n\r\n // 创建实例\r\n var laytpl = function(template, options){\r\n return new Class(template, options);\r\n };\r\n\r\n // 配置全局属性\r\n laytpl.config = function(options){\r\n options = options || {};\r\n for(var i in options){\r\n config[i] = options[i];\r\n }\r\n };\r\n\r\n laytpl.v = '2.0.0';\r\n\r\n // export\r\n exports('laytpl', laytpl);\r\n});\r\n","/**\r\n * laypage 分页组件\r\n */\r\n\r\nlayui.define(function(exports){\r\n \"use strict\";\r\n \r\n var doc = document;\r\n var id = 'getElementById';\r\n var tag = 'getElementsByTagName';\r\n \r\n // 字符常量\r\n var MOD_NAME = 'laypage';\r\n var DISABLED = 'layui-disabled';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.config = options || {};\r\n that.config.index = ++laypage.index;\r\n that.render(true);\r\n };\r\n\r\n // 判断传入的容器类型\r\n Class.prototype.type = function(){\r\n var config = this.config;\r\n if(typeof config.elem === 'object'){\r\n return config.elem.length === undefined ? 2 : 3;\r\n }\r\n };\r\n\r\n // 分页视图\r\n Class.prototype.view = function(){\r\n var that = this;\r\n var config = that.config;\r\n\r\n // 连续页码个数\r\n var groups = config.groups = 'groups' in config \r\n ? (Number(config.groups) || 0)\r\n : 5; \r\n \r\n // 排版\r\n config.layout = typeof config.layout === 'object' \r\n ? config.layout \r\n : ['prev', 'page', 'next'];\r\n \r\n config.count = Number(config.count) || 0; // 数据总数\r\n config.curr = Number(config.curr) || 1; // 当前页\r\n\r\n // 每页条数的选择项\r\n config.limits = typeof config.limits === 'object'\r\n ? config.limits\r\n : [10, 20, 30, 40, 50];\r\n\r\n // 默认条数\r\n config.limit = Number(config.limit) || 10;\r\n \r\n // 总页数\r\n config.pages = Math.ceil(config.count/config.limit) || 1;\r\n \r\n // 当前页不能超过总页数\r\n if(config.curr > config.pages){\r\n config.curr = config.pages;\r\n } else if(config.curr < 1) { // 当前分页不能小于 1\r\n config.curr = 1;\r\n }\r\n \r\n // 连续分页个数不能低于 0 且不能大于总页数\r\n if(groups < 0){\r\n groups = 1;\r\n } else if (groups > config.pages){\r\n groups = config.pages;\r\n }\r\n \r\n config.prev = 'prev' in config ? config.prev : '&#x4E0A;&#x4E00;&#x9875;'; // 上一页文本\r\n config.next = 'next' in config ? config.next : '&#x4E0B;&#x4E00;&#x9875;'; // 下一页文本\r\n \r\n // 计算当前组\r\n var index = config.pages > groups \r\n ? Math.ceil( (config.curr + (groups > 1 ? 1 : 0)) / (groups > 0 ? groups : 1) )\r\n : 1;\r\n \r\n // 视图片段\r\n var views = {\r\n // 上一页\r\n prev: function(){\r\n return config.prev \r\n ? '<a class=\"layui-laypage-prev'+ (config.curr == 1 ? (' ' + DISABLED) : '') +'\" data-page=\"'+ (config.curr - 1) +'\">'+ config.prev +'</a>'\r\n : '';\r\n }(),\r\n \r\n // 页码\r\n page: function(){\r\n var pager = [];\r\n \r\n // 数据量为0时不输出页码\r\n if(config.count < 1){\r\n return '';\r\n }\r\n \r\n // 首页\r\n if(index > 1 && config.first !== false && groups !== 0){\r\n pager.push('<a class=\"layui-laypage-first\" data-page=\"1\" title=\"&#x9996;&#x9875;\">'+ (config.first || 1) +'</a>');\r\n }\r\n\r\n // 计算当前页码组的起始页\r\n var halve = Math.floor((groups-1)/2) // 页码数等分\r\n var start = index > 1 ? config.curr - halve : 1;\r\n var end = index > 1 ? (function(){\r\n var max = config.curr + (groups - halve - 1);\r\n return max > config.pages ? config.pages : max;\r\n }()) : groups;\r\n \r\n // 防止最后一组出现“不规定”的连续页码数\r\n if(end - start < groups - 1){\r\n start = end - groups + 1;\r\n }\r\n\r\n // 输出左分割符\r\n if(config.first !== false && start > 2){\r\n pager.push('<span class=\"layui-laypage-spr\">&#x2026;</span>')\r\n }\r\n \r\n // 输出连续页码\r\n for(; start <= end; start++){\r\n if(start === config.curr){\r\n // 当前页\r\n pager.push('<span class=\"layui-laypage-curr\"><em class=\"layui-laypage-em\" '+ (/^#/.test(config.theme) ? 'style=\"background-color:'+ config.theme +';\"' : '') +'></em><em>'+ start +'</em></span>');\r\n } else {\r\n pager.push('<a data-page=\"'+ start +'\">'+ start +'</a>');\r\n }\r\n }\r\n \r\n // 输出输出右分隔符 & 末页\r\n if(config.pages > groups && config.pages > end && config.last !== false){\r\n if(end + 1 < config.pages){\r\n pager.push('<span class=\"layui-laypage-spr\">&#x2026;</span>');\r\n }\r\n if(groups !== 0){\r\n pager.push('<a class=\"layui-laypage-last\" title=\"&#x5C3E;&#x9875;\" data-page=\"'+ config.pages +'\">'+ (config.last || config.pages) +'</a>');\r\n }\r\n }\r\n\r\n return pager.join('');\r\n }(),\r\n \r\n // 下一页\r\n next: function(){\r\n return config.next \r\n ? '<a class=\"layui-laypage-next'+ (config.curr == config.pages ? (' ' + DISABLED) : '') +'\" data-page=\"'+ (config.curr + 1) +'\">'+ config.next +'</a>'\r\n : '';\r\n }(),\r\n \r\n // 数据总数\r\n count: function(){\r\n var countText = typeof config.countText === 'object' ? config.countText : ['共 ', ' 条'];\r\n return '<span class=\"layui-laypage-count\">'+ countText[0] + config.count + countText[1] +'</span>'\r\n }(),\r\n \r\n // 每页条数\r\n limit: function(){\r\n var elemArr = ['<span class=\"layui-laypage-limits\"><select lay-ignore>'];\r\n var template = function(item) {\r\n var def = item +' 条/页';\r\n return typeof config.limitTemplet === 'function'\r\n ? (config.limitTemplet(item) || def)\r\n : def;\r\n };\r\n\r\n // 条目选项列表\r\n layui.each(config.limits, function(index, item){\r\n elemArr.push(\r\n '<option value=\"'+ item +'\"'+ (item === config.limit ? ' selected' : '') +'>'\r\n + template(item)\r\n + '</option>'\r\n );\r\n });\r\n\r\n return elemArr.join('') +'</select></span>';\r\n }(),\r\n \r\n // 刷新当前页\r\n refresh: [\r\n '<a data-page=\"'+ config.curr +'\" class=\"layui-laypage-refresh\">',\r\n '<i class=\"layui-icon layui-icon-refresh\"></i>',\r\n '</a>'\r\n ].join(''),\r\n\r\n // 跳页区域\r\n skip: function(){\r\n var skipText = typeof config.skipText === 'object' ? config.skipText : [\r\n '&#x5230;&#x7B2C;',\r\n '&#x9875;',\r\n '&#x786e;&#x5b9a;'\r\n ];\r\n return [\r\n '<span class=\"layui-laypage-skip\">'+ skipText[0],\r\n '<input type=\"text\" min=\"1\" value=\"'+ config.curr +'\" class=\"layui-input\">',\r\n skipText[1]+ '<button type=\"button\" class=\"layui-laypage-btn\">'+ skipText[2] +'</button>',\r\n '</span>'\r\n ].join('');\r\n }()\r\n };\r\n\r\n return ['<div class=\"layui-box layui-laypage layui-laypage-'+ (config.theme ? (\r\n /^#/.test(config.theme) ? 'molv' : config.theme\r\n ) : 'default') +'\" id=\"layui-laypage-'+ config.index +'\">',\r\n function(){\r\n var plate = [];\r\n layui.each(config.layout, function(index, item){\r\n if(views[item]){\r\n plate.push(views[item])\r\n }\r\n });\r\n return plate.join('');\r\n }(),\r\n '</div>'].join('');\r\n };\r\n\r\n // 跳页的回调\r\n Class.prototype.jump = function(elem, isskip){\r\n if(!elem) return;\r\n\r\n var that = this;\r\n var config = that.config;\r\n var childs = elem.children;\r\n var btn = elem[tag]('button')[0];\r\n var input = elem[tag]('input')[0];\r\n var select = elem[tag]('select')[0];\r\n var skip = function(){\r\n var curr = Number(input.value.replace(/\\s|\\D/g, ''));\r\n if(curr){\r\n config.curr = curr;\r\n that.render();\r\n }\r\n };\r\n \r\n if(isskip) return skip();\r\n \r\n // 页码\r\n for(var i = 0, len = childs.length; i < len; i++){\r\n if(childs[i].nodeName.toLowerCase() === 'a'){\r\n laypage.on(childs[i], 'click', function(){\r\n var curr = Number(this.getAttribute('data-page'));\r\n if(curr < 1 || curr > config.pages) return;\r\n config.curr = curr;\r\n that.render();\r\n });\r\n }\r\n }\r\n \r\n // 条数\r\n if(select){\r\n laypage.on(select, 'change', function(){\r\n var value = this.value;\r\n if(config.curr*value > config.count){\r\n config.curr = Math.ceil(config.count/value);\r\n }\r\n config.limit = value;\r\n that.render();\r\n });\r\n }\r\n \r\n // 确定\r\n if(btn){\r\n laypage.on(btn, 'click', function(){\r\n skip();\r\n });\r\n }\r\n };\r\n \r\n // 输入页数字控制\r\n Class.prototype.skip = function(elem){\r\n if(!elem) return;\r\n\r\n var that = this;\r\n var input = elem[tag]('input')[0];\r\n\r\n if(!input) return;\r\n\r\n // 键盘事件\r\n laypage.on(input, 'keyup', function(e){\r\n var value = this.value;\r\n var keyCode = e.keyCode;\r\n\r\n if(/^(37|38|39|40)$/.test(keyCode)) return;\r\n\r\n if(/\\D/.test(value)){\r\n this.value = value.replace(/\\D/, '');\r\n }\r\n if(keyCode === 13){\r\n that.jump(elem, true)\r\n }\r\n });\r\n };\r\n\r\n // 渲染分页\r\n Class.prototype.render = function(load){\r\n var that = this;\r\n var config = that.config;\r\n var type = that.type();\r\n var view = that.view();\r\n \r\n if(type === 2){\r\n config.elem && (config.elem.innerHTML = view);\r\n } else if(type === 3){\r\n config.elem.html(view);\r\n } else {\r\n if(doc[id](config.elem)){\r\n doc[id](config.elem).innerHTML = view;\r\n }\r\n }\r\n\r\n config.jump && config.jump(config, load);\r\n \r\n var elem = doc[id]('layui-laypage-' + config.index);\r\n that.jump(elem);\r\n \r\n if(config.hash && !load){\r\n location.hash = '!'+ config.hash +'='+ config.curr;\r\n }\r\n \r\n that.skip(elem);\r\n };\r\n \r\n // 外部接口\r\n var laypage = {\r\n // 分页渲染\r\n render: function(options){\r\n var o = new Class(options);\r\n return o.index;\r\n },\r\n index: layui.laypage ? (layui.laypage.index + 10000) : 0,\r\n on: function(elem, even, fn){\r\n elem.attachEvent ? elem.attachEvent('on'+ even, function(e){ // for ie\r\n e.target = e.srcElement;\r\n fn.call(elem, e);\r\n }) : elem.addEventListener(even, fn, false);\r\n return this;\r\n }\r\n }\r\n\r\n exports(MOD_NAME, laypage);\r\n});\r\n","/** laydate 日期与时间控件 | MIT Licensed */\r\n\r\n;!function(window, document){ // gulp build: laydate-header\r\n \"use strict\";\r\n\r\n var isLayui = window.layui && layui.define, ready = {\r\n getPath: (window.lay && lay.getPath) ? lay.getPath : ''\r\n\r\n // 载入 CSS 依赖\r\n ,link: function(href, fn, cssname){\r\n\r\n // 未设置路径,则不主动加载 css\r\n if(!laydate.path) return;\r\n\r\n // 加载 css\r\n if(window.lay && lay.layui){\r\n lay.layui.link(laydate.path + href, fn, cssname);\r\n }\r\n }\r\n };\r\n\r\n // 识别预先可能定义的指定全局对象\r\n var GLOBAL = window.LAYUI_GLOBAL || {};\r\n\r\n // 模块名\r\n var MOD_NAME = 'laydate';\r\n var MOD_ID = 'layui-'+ MOD_NAME +'-id' // 已渲染过的索引标记名\r\n\r\n // 外部调用\r\n var laydate = {\r\n v: '5.5.0' // layDate 版本号\r\n ,config: {\r\n weekStart: 0, // 默认周日一周的开始\r\n } // 全局配置项\r\n ,index: (window.laydate && window.laydate.v) ? 100000 : 0\r\n ,path: GLOBAL.laydate_dir || ready.getPath\r\n\r\n // 设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = lay.extend({}, that.config, options);\r\n return that;\r\n }\r\n\r\n // 主体 CSS 等待事件\r\n ,ready: function(callback){\r\n var cssname = 'laydate';\r\n var ver = ''\r\n var path = (isLayui ? 'modules/' : '') + 'laydate.css?v='+ laydate.v + ver;\r\n\r\n isLayui ? (\r\n layui['layui.all']\r\n ? (typeof callback === 'function' && callback())\r\n : layui.addcss(path, callback, cssname)\r\n ) : ready.link(path, callback, cssname);\r\n\r\n return this;\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return that.inst = {\r\n // 提示框\r\n hint: function(content){\r\n that.hint.call(that, content);\r\n },\r\n // 重载实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n config: that.config\r\n };\r\n };\r\n\r\n // 字符常量\r\n var ELEM = '.layui-laydate';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'laydate-disabled';\r\n var LIMIT_YEAR = [100, 200000];\r\n\r\n var ELEM_STATIC = 'layui-laydate-static';\r\n var ELEM_LIST = 'layui-laydate-list';\r\n var ELEM_SELECTED = 'laydate-selected';\r\n var ELEM_HINT = 'layui-laydate-hint';\r\n var ELEM_DAY_NOW = 'laydate-day-now';\r\n var ELEM_PREV = 'laydate-day-prev';\r\n var ELEM_NEXT = 'laydate-day-next';\r\n var ELEM_FOOTER = 'layui-laydate-footer';\r\n var ELEM_SHORTCUT = 'layui-laydate-shortcut';\r\n var ELEM_NOW = '.laydate-btns-now'\r\n var ELEM_CONFIRM = '.laydate-btns-confirm';\r\n var ELEM_TIME_TEXT = 'laydate-time-text';\r\n var ELEM_TIME_BTN = 'laydate-btns-time';\r\n var ELEM_PREVIEW = 'layui-laydate-preview';\r\n var ELEM_MAIN = 'layui-laydate-main';\r\n var ELEM_SHADE = 'layui-laydate-shade';\r\n\r\n // 组件构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++laydate.index;\r\n that.config = lay.extend({}, that.config, laydate.config, options);\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = lay(options.elem || that.config.elem);\r\n if(elem.length > 1){\r\n lay.each(elem, function(){\r\n laydate.render(lay.extend({}, that.config, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 初始化属性\r\n options = lay.extend(that.config, lay.options(elem[0])); // 继承节点上的属性\r\n\r\n // 若重复执行 render则视为 reload 处理\r\n if(elem[0] && elem.attr(MOD_ID)){\r\n var newThat = thisModule.getThis(elem.attr(MOD_ID));\r\n if(!newThat) return;\r\n return newThat.reload(options);\r\n }\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 自增索引\r\n options.index = that.index;\r\n\r\n // 初始化\r\n laydate.ready(function(){\r\n that.init();\r\n });\r\n };\r\n\r\n // 日期格式字符\r\n var dateType = 'yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s';\r\n\r\n // 将日期格式字符转换为数组\r\n thisModule.formatArr = function(format){\r\n return (format || '').match(new RegExp(dateType + '|.', 'g')) || []\r\n };\r\n\r\n /*\r\n 组件操作\r\n */\r\n\r\n // 是否闰年\r\n Class.isLeapYear = function(year){\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n type: 'date' //控件类型支持year/month/date/time/datetime\r\n ,range: false //是否开启范围选择,即双控件\r\n ,format: 'yyyy-MM-dd' //默认日期格式\r\n ,value: null //默认日期支持传入new Date()或者符合format参数设定的日期格式字符\r\n ,isInitValue: true //用于控制是否自动向元素填充初始值(需配合 value 参数使用)\r\n ,min: '1900-1-1' //有效最小日期,年月日必须用“-”分割,时分秒必须用“:”分割。注意:它并不是遵循 format 设定的格式。\r\n ,max: '2099-12-31' //有效最大日期,同上\r\n ,trigger: 'click' //呼出控件的事件\r\n ,show: false //是否直接显示,如果设置 true则默认直接显示控件\r\n ,showBottom: true //是否显示底部栏\r\n ,isPreview: true //是否显示值预览\r\n ,btns: ['clear', 'now', 'confirm'] //右下角显示的按钮,会按照数组顺序排列\r\n ,lang: 'cn' //语言只支持cn/en即中文和英文\r\n ,theme: 'default' //主题\r\n ,position: null //控件定位方式定位, 默认absolute支持fixed/absolute/static\r\n ,calendar: false //是否开启公历重要节日,仅支持中文版\r\n ,mark: {} //日期备注,如重要事件或活动标记\r\n ,holidays: null // 标注法定节假日或补假上班\r\n ,zIndex: null //控件层叠顺序\r\n ,done: null //控件选择完毕后的回调,点击清空/现在/确定也均会触发\r\n ,change: null //日期时间改变后的回调\r\n ,autoConfirm: true //是否自动确认(日期|年份|月份选择器非range下是否自动确认\r\n ,shade: 0\r\n };\r\n\r\n //多语言\r\n Class.prototype.lang = function(){\r\n var that = this\r\n ,options = that.config\r\n ,text = {\r\n cn: {\r\n weeks: ['日', '一', '二', '三', '四', '五', '六']\r\n ,time: ['时', '分', '秒']\r\n ,timeTips: '选择时间'\r\n ,startTime: '开始时间'\r\n ,endTime: '结束时间'\r\n ,dateTips: '返回日期'\r\n ,month: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']\r\n ,tools: {\r\n confirm: '确定'\r\n ,clear: '清空'\r\n ,now: '现在'\r\n }\r\n ,timeout: '结束时间不能早于开始时间<br>请重新选择'\r\n ,invalidDate: '不在有效日期或时间范围内'\r\n ,formatError: ['日期格式不合法<br>必须遵循下述格式:<br>', '<br>已为你重置']\r\n ,preview: '当前选中的结果'\r\n }\r\n ,en: {\r\n weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\r\n ,time: ['Hours', 'Minutes', 'Seconds']\r\n ,timeTips: 'Select Time'\r\n ,startTime: 'Start Time'\r\n ,endTime: 'End Time'\r\n ,dateTips: 'Select Date'\r\n ,month: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\r\n ,tools: {\r\n confirm: 'Confirm'\r\n ,clear: 'Clear'\r\n ,now: 'Now'\r\n }\r\n ,timeout: 'End time cannot be less than start Time<br>Please re-select'\r\n ,invalidDate: 'Invalid date'\r\n ,formatError: ['The date format error<br>Must be followed<br>', '<br>It has been reset']\r\n ,preview: 'The selected result'\r\n }\r\n };\r\n return text[options.lang] || text['cn'];\r\n };\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = lay.extend({}, that.config, options);\r\n that.init();\r\n };\r\n\r\n //初始准备\r\n Class.prototype.init = function(){\r\n var that = this\r\n ,options = that.config\r\n ,isStatic = options.position === 'static'\r\n ,format = {\r\n year: 'yyyy'\r\n ,month: 'yyyy-MM'\r\n ,date: 'yyyy-MM-dd'\r\n ,time: 'HH:mm:ss'\r\n ,datetime: 'yyyy-MM-dd HH:mm:ss'\r\n };\r\n\r\n options.elem = lay(options.elem);\r\n options.eventElem = lay(options.eventElem);\r\n\r\n if(!options.elem[0]) return;\r\n\r\n layui.type(options.theme) !== 'array' && (options.theme = [options.theme]);\r\n // 设置了全面版模式\r\n if (options.fullPanel) {\r\n if (options.type !== 'datetime' || options.range) {\r\n // 目前只支持datetime的全面版\r\n delete options.fullPanel;\r\n }\r\n }\r\n\r\n //日期范围分隔符\r\n that.rangeStr = options.range ? (\r\n typeof options.range === 'string' ? options.range : '-'\r\n ) : '';\r\n\r\n //日期范围的日历面板是否联动\r\n that.rangeLinked = !!(options.range && options.rangeLinked && (options.type === 'date' || options.type === 'datetime'))\r\n\r\n //切换日历联动方式\r\n that.autoCalendarModel = function () {\r\n var state = that.rangeLinked;\r\n that.rangeLinked = (options.range && (options.type === 'date' || options.type === 'datetime'))\r\n && ((!that.startDate || !that.endDate) || (that.startDate && that.endDate && that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month));\r\n lay(that.elem)[that.rangeLinked ? 'addClass' : 'removeClass']('layui-laydate-linkage');\r\n return that.rangeLinked != state; // 返回发生了变化\r\n };\r\n\r\n //是否自动切换\r\n that.autoCalendarModel.auto = that.rangeLinked && options.rangeLinked === 'auto';\r\n\r\n //若 range 参数为数组,则表示为开始日期和结束日期的 input 对象\r\n if(layui.type(options.range) === 'array'){\r\n that.rangeElem = [\r\n lay(options.range[0]),\r\n lay(options.range[1])\r\n ];\r\n }\r\n\r\n //若 type 设置非法,则初始化为 date 类型\r\n if(!format[options.type]){\r\n window.console && console.error && console.error('laydate type error:\\''+ options.type + '\\' is not supported')\r\n options.type = 'date';\r\n }\r\n\r\n //根据不同 type初始化默认 format\r\n if(options.format === format.date){\r\n options.format = format[options.type] || format.date;\r\n }\r\n\r\n //将日期格式转化成数组\r\n that.format = thisModule.formatArr(options.format);\r\n\r\n // 设置了一周的开始是周几,此处做一个控制\r\n if (options.weekStart) {\r\n if (!/^[0-6]$/.test(options.weekStart)) {\r\n var lang = that.lang();\r\n options.weekStart = lang.weeks.indexOf(options.weekStart);\r\n if (options.weekStart === -1) options.weekStart = 0;\r\n }\r\n }\r\n\r\n //生成正则表达式\r\n that.EXP_IF = '';\r\n that.EXP_SPLIT = '';\r\n lay.each(that.format, function(i, item){\r\n var EXP = new RegExp(dateType).test(item)\r\n ? '\\\\d{'+ function(){\r\n if(new RegExp(dateType).test(that.format[i === 0 ? i + 1 : i - 1]||'')){\r\n if(/^yyyy|y$/.test(item)) return 4;\r\n return item.length;\r\n }\r\n if(/^yyyy$/.test(item)) return '1,4';\r\n if(/^y$/.test(item)) return '1,308';\r\n return '1,2';\r\n }() +'}'\r\n : '\\\\' + item;\r\n that.EXP_IF = that.EXP_IF + EXP;\r\n that.EXP_SPLIT = that.EXP_SPLIT + '(' + EXP + ')';\r\n });\r\n //验证日期格式正则\r\n that.EXP_IF_ONE = new RegExp('^'+ that.EXP_IF +'$'); //验证单个日期格式\r\n that.EXP_IF = new RegExp('^'+ (\r\n options.range ?\r\n that.EXP_IF + '\\\\s\\\\'+ that.rangeStr + '\\\\s' + that.EXP_IF\r\n : that.EXP_IF\r\n ) +'$');\r\n that.EXP_SPLIT = new RegExp('^'+ that.EXP_SPLIT +'$', '');\r\n\r\n //如果不是 input|textarea 元素,则默认采用 click 事件\r\n if(!that.isInput(options.elem[0])){\r\n if(options.trigger === 'focus'){\r\n options.trigger = 'click';\r\n }\r\n }\r\n\r\n // 设置唯一 KEY\r\n options.elem.attr('lay-key', that.index);\r\n options.eventElem.attr('lay-key', that.index);\r\n options.elem.attr(MOD_ID, options.id); // 渲染过的标记\r\n\r\n //记录重要日期\r\n options.mark = lay.extend({}, (options.calendar && options.lang === 'cn') ? {\r\n '0-1-1': '元旦'\r\n ,'0-2-14': '情人'\r\n ,'0-3-8': '妇女'\r\n ,'0-3-12': '植树'\r\n ,'0-4-1': '愚人'\r\n ,'0-5-1': '劳动'\r\n ,'0-5-4': '青年'\r\n ,'0-6-1': '儿童'\r\n ,'0-9-10': '教师'\r\n ,'0-10-1': '国庆'\r\n ,'0-12-25': '圣诞'\r\n } : {}, options.mark);\r\n\r\n //获取限制内日期\r\n lay.each(['min', 'max'], function(i, item){\r\n var ymd = [];\r\n var hms = [];\r\n if(typeof options[item] === 'number'){ //如果为数字\r\n var day = options[item]\r\n ,tDate = new Date()\r\n ,time = that.newDate({ //今天的最大毫秒数\r\n year: tDate.getFullYear()\r\n ,month: tDate.getMonth()\r\n ,date: tDate.getDate()\r\n ,hours: i ? 23 : 0\r\n ,minutes: i ? 59 : 0\r\n ,seconds: i ? 59 : 0\r\n }).getTime()\r\n ,STAMP = 86400000 //代表一天的毫秒数\r\n ,thisDate = new Date(\r\n day ? (\r\n day < STAMP ? time + day*STAMP : day //如果数字小于一天的毫秒数,则数字为天数,否则为毫秒数\r\n ) : time\r\n );\r\n ymd = [thisDate.getFullYear(), thisDate.getMonth() + 1, thisDate.getDate()];\r\n hms = [thisDate.getHours(), thisDate.getMinutes(), thisDate.getSeconds()];\r\n } else if(typeof options[item] === 'string') {\r\n ymd = (options[item].match(/\\d+-\\d+-\\d+/) || [''])[0].split('-');\r\n hms = (options[item].match(/\\d+:\\d+:\\d+/) || [''])[0].split(':');\r\n } else if(typeof options[item] === 'object'){\r\n return options[item];\r\n }\r\n options[item] = {\r\n year: ymd[0] | 0 || new Date().getFullYear()\r\n ,month: ymd[1] ? (ymd[1] | 0) - 1 : new Date().getMonth()\r\n ,date: ymd[2] | 0 || new Date().getDate()\r\n ,hours: hms[0] | 0\r\n ,minutes: hms[1] | 0\r\n ,seconds: hms[2] | 0\r\n };\r\n });\r\n\r\n that.elemID = 'layui-laydate'+ options.elem.attr('lay-key');\r\n\r\n if(options.show || isStatic) that.render();\r\n isStatic || that.events();\r\n\r\n //默认赋值\r\n if(options.value && options.isInitValue){\r\n if(layui.type(options.value) === 'date'){\r\n that.setValue(that.parse(0, that.systemDate(options.value)));\r\n } else {\r\n that.setValue(options.value);\r\n }\r\n }\r\n };\r\n\r\n //控件主体渲染\r\n Class.prototype.render = function(){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,isStatic = options.position === 'static'\r\n\r\n //主面板\r\n ,elem = that.elem = lay.elem('div', {\r\n id: that.elemID\r\n ,\"class\": [\r\n 'layui-laydate'\r\n ,options.range ? ' layui-laydate-range' : ''\r\n ,that.rangeLinked ? ' layui-laydate-linkage' : ''\r\n ,isStatic ? (' '+ ELEM_STATIC) : ''\r\n ,options.fullPanel ? ' laydate-theme-fullpanel' : '' // 全面版\r\n // ,options.theme && options.theme !== 'default' && !/^#/.test(options.theme) ? (' laydate-theme-' + options.theme) : ''\r\n ,(function () {\r\n var themeStr = '';\r\n lay.each(options.theme, function (index, theme) {\r\n if (theme !== 'default' && !/^#/.test(theme)) {\r\n themeStr += ' laydate-theme-' + theme;\r\n }\r\n })\r\n return themeStr;\r\n })()\r\n ].join('')\r\n })\r\n\r\n //主区域\r\n ,elemMain = that.elemMain = []\r\n ,elemHeader = that.elemHeader = []\r\n ,elemCont = that.elemCont = []\r\n ,elemTable = that.table = []\r\n\r\n //底部区域\r\n ,divFooter = that.footer = lay.elem('div', {\r\n \"class\": ELEM_FOOTER\r\n })\r\n\r\n //快捷栏\r\n ,divShortcut = that.shortcut = lay.elem('ul', {\r\n \"class\": ELEM_SHORTCUT\r\n });\r\n\r\n if(options.zIndex) elem.style.zIndex = options.zIndex;\r\n\r\n //单双日历区域\r\n lay.each(new Array(2), function(i){\r\n if(!options.range && i > 0){\r\n return true;\r\n }\r\n\r\n //头部区域\r\n var divHeader = lay.elem('div', {\r\n \"class\": 'layui-laydate-header'\r\n })\r\n\r\n //左右切换\r\n ,headerChild = [function(){ //上一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-y'\r\n });\r\n elem.innerHTML = '&#xe65a;';\r\n return elem;\r\n }(), function(){ //上一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-m'\r\n });\r\n elem.innerHTML = '&#xe603;';\r\n return elem;\r\n }(), function(){ //年月选择\r\n var elem = lay.elem('div', {\r\n \"class\": 'laydate-set-ym'\r\n }), spanY = lay.elem('span'), spanM = lay.elem('span');\r\n elem.appendChild(spanY);\r\n elem.appendChild(spanM);\r\n return elem;\r\n }(), function(){ //下一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-m'\r\n });\r\n elem.innerHTML = '&#xe602;';\r\n return elem;\r\n }(), function(){ //下一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-y'\r\n });\r\n elem.innerHTML = '&#xe65b;';\r\n return elem;\r\n }()]\r\n\r\n //日历内容区域\r\n ,divContent = lay.elem('div', {\r\n \"class\": 'layui-laydate-content'\r\n })\r\n ,table = lay.elem('table')\r\n ,thead = lay.elem('thead'), theadTr = lay.elem('tr');\r\n\r\n //生成年月选择\r\n lay.each(headerChild, function(i, item){\r\n divHeader.appendChild(item);\r\n });\r\n\r\n //生成表格\r\n thead.appendChild(theadTr);\r\n lay.each(new Array(6), function(i){ //表体\r\n var tr = table.insertRow(0);\r\n lay.each(new Array(7), function(j){\r\n if(i === 0){\r\n var th = lay.elem('th');\r\n th.innerHTML = lang.weeks[(j + options.weekStart) % 7];\r\n theadTr.appendChild(th);\r\n }\r\n tr.insertCell(j);\r\n });\r\n });\r\n table.insertBefore(thead, table.children[0]); //表头\r\n divContent.appendChild(table);\r\n\r\n elemMain[i] = lay.elem('div', {\r\n \"class\": ELEM_MAIN + ' laydate-main-list-'+ i\r\n });\r\n\r\n elemMain[i].appendChild(divHeader);\r\n elemMain[i].appendChild(divContent);\r\n\r\n elemHeader.push(headerChild);\r\n elemCont.push(divContent);\r\n elemTable.push(table);\r\n });\r\n\r\n //生成底部栏\r\n lay(divFooter).html(function(){\r\n var html = [], btns = [];\r\n if(options.type === 'datetime'){\r\n html.push('<span lay-type=\"datetime\" class=\"'+ ELEM_TIME_BTN +'\">'+ lang.timeTips +'</span>');\r\n }\r\n if(!(!options.range && options.type === 'datetime') || options.fullPanel){\r\n html.push('<span class=\"'+ ELEM_PREVIEW +'\" title=\"'+ lang.preview +'\"></span>')\r\n }\r\n\r\n lay.each(options.btns, function(i, item){\r\n var title = lang.tools[item] || 'btn';\r\n if(options.range && item === 'now') return;\r\n if(isStatic && item === 'clear') title = options.lang === 'cn' ? '重置' : 'Reset';\r\n btns.push('<span lay-type=\"'+ item +'\" class=\"laydate-btns-'+ item +'\">'+ title +'</span>');\r\n });\r\n html.push('<div class=\"laydate-footer-btns\">'+ btns.join('') +'</div>');\r\n return html.join('');\r\n }());\r\n\r\n // 生成快捷键栏\r\n if (options.shortcuts) {\r\n elem.appendChild(divShortcut);\r\n lay(divShortcut).html(function () {\r\n var shortcutBtns = [];\r\n lay.each(options.shortcuts, function (i, item) {\r\n shortcutBtns.push('<li data-index=\"' + i + '\">'+item.text+'</li>')\r\n })\r\n return shortcutBtns.join('');\r\n }()).find('li').on('click', function (event) {\r\n var btnSetting = options.shortcuts[this.dataset['index']] || {};\r\n var value = (typeof btnSetting.value === 'function'\r\n ? btnSetting.value()\r\n : btnSetting.value) || [];\r\n if (!layui.isArray(value)) {\r\n value = [value];\r\n }\r\n var type = options.type;\r\n lay.each(value, function (i, item) {\r\n var dateTime = [options.dateTime, that.endDate][i];\r\n if (type === 'time' && layui.type(item) !== 'date') {\r\n if (that.EXP_IF.test(item)) {\r\n item = (item.match(that.EXP_SPLIT) || []).slice(1);\r\n lay.extend(dateTime, {hours: item[0] | 0, minutes: item[2] | 0, seconds: item[4] | 0})\r\n }\r\n } else {\r\n lay.extend(dateTime, that.systemDate(layui.type(item) === 'date' ? item : new Date(item)))\r\n }\r\n\r\n if (type === 'time' || type === 'datetime') {\r\n that[['startTime', 'endTime'][i]] = {\r\n hours: dateTime.hours,\r\n minutes: dateTime.minutes,\r\n seconds: dateTime.seconds,\r\n }\r\n }\r\n if (i === 0) { // 第一个值作为startDate\r\n that.startDate = lay.extend({}, dateTime);\r\n } else {\r\n that.endState = true;\r\n }\r\n if (type === 'year' || type === 'month' || type === 'time') {\r\n that.listYM[i] = [dateTime.year, dateTime.month + 1];\r\n } else if (i) {\r\n that.autoCalendarModel.auto && that.autoCalendarModel();\r\n }\r\n });\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n\r\n var timeBtn = lay(that.footer).find('.'+ ELEM_TIME_BTN).removeClass(DISABLED);\r\n timeBtn && timeBtn.attr('lay-type') === 'date' && timeBtn[0].click();\r\n that.done(null, 'change');\r\n\r\n lay(this).addClass(THIS);\r\n\r\n // 自动确认\r\n if(options.position !== 'static'){\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n /*\r\n if (options.position !== 'static' && !options.range && options.autoConfirm) {\r\n if (type === 'date') {\r\n that.choose(lay(elem).find('td.layui-this'))\r\n } else if (type === 'year' || type === 'month') {\r\n if(lay(elemMain[0]).find('.' + ELEM_MAIN + ' li.' + THIS + ':not(.laydate-disabled)')[0]) {\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n }\r\n }\r\n */\r\n })\r\n }\r\n\r\n //插入到主区域\r\n lay.each(elemMain, function(i, main){\r\n elem.appendChild(main);\r\n });\r\n options.showBottom && elem.appendChild(divFooter);\r\n\r\n // 生成自定义主题\r\n var style = lay.elem('style');\r\n var styleText = [];\r\n var colorTheme;\r\n var isPrimaryColor = true;\r\n lay.each(options.theme, function (index, theme) {\r\n // 主色\r\n if(isPrimaryColor && /^#/.test(theme)){\r\n colorTheme = true;\r\n isPrimaryColor = false;\r\n styleText.push([\r\n '#{{id}} .layui-laydate-header{background-color:{{theme}};}',\r\n '#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}',\r\n options.theme.indexOf('circle') !== -1 ? '' : '#{{id}} .layui-this{background-color:{{theme}} !important;}',\r\n '#{{id}} .laydate-day-now{color:{{theme}} !important;}',\r\n '#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}'\r\n ].join('').replace(/{{id}}/g, that.elemID).replace(/{{theme}}/g, theme));\r\n return;\r\n }\r\n // 第二个自定义颜色作为辅色\r\n if(!isPrimaryColor && /^#/.test(theme)){\r\n styleText.push([\r\n '#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}',\r\n '#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}'\r\n ].join('').replace(/{{id}}/g, that.elemID).replace(/{{theme}}/g, theme));\r\n }\r\n });\r\n //快捷栏样式\r\n if (options.shortcuts && options.range) {\r\n styleText.push('#{{id}}.layui-laydate-range{width: 628px;}'.replace(/{{id}}/g, that.elemID))\r\n }\r\n if (styleText.length) {\r\n styleText = styleText.join('');\r\n if('styleSheet' in style){\r\n style.setAttribute('type', 'text/css');\r\n style.styleSheet.cssText = styleText;\r\n } else {\r\n style.innerHTML = styleText;\r\n }\r\n\r\n colorTheme && lay(elem).addClass('laydate-theme-molv');\r\n elem.appendChild(style);\r\n }\r\n\r\n //移除上一个控件\r\n that.remove(Class.thisElemDate);\r\n\r\n //记录当前执行的实例索引\r\n laydate.thisId = options.id;\r\n\r\n //如果是静态定位则插入到指定的容器中否则插入到body\r\n isStatic ? options.elem.append(elem) : (\r\n document.body.appendChild(elem)\r\n ,that.position() //定位\r\n );\r\n\r\n var shade = options.shade ? ('<div class=\"'+ ELEM_SHADE +'\" style=\"'+ ('z-index:'+ (parseInt(layui.getStyle(elem, 'z-index'))-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'\"></div>') : '';\r\n elem.insertAdjacentHTML('beforebegin', shade);\r\n\r\n that.checkDate().calendar(null, 0, 'init'); //初始校验\r\n that.changeEvent(); //日期切换\r\n\r\n Class.thisElemDate = that.elemID;\r\n\r\n that.renderAdditional()\r\n typeof options.ready === 'function' && options.ready(lay.extend({}, options.dateTime, {\r\n month: options.dateTime.month + 1\r\n }));\r\n\r\n that.preview();\r\n };\r\n\r\n //控件移除\r\n Class.prototype.remove = function(prev){\r\n var that = this\r\n ,options = that.config\r\n ,elem = lay('#'+ (prev || that.elemID));\r\n if(!elem[0]) return that;\r\n\r\n if(!elem.hasClass(ELEM_STATIC)){\r\n that.checkDate(function(){\r\n elem.remove();\r\n //delete options.dateTime;\r\n delete that.startDate;\r\n delete that.endDate;\r\n delete that.endState;\r\n delete that.startTime;\r\n delete that.endTime;\r\n delete laydate.thisId;\r\n typeof options.close === 'function' && options.close(that);\r\n });\r\n }\r\n lay('.' + ELEM_SHADE).remove();\r\n return that;\r\n };\r\n\r\n //定位算法\r\n Class.prototype.position = function(){\r\n var that = this\r\n ,options = that.config;\r\n lay.position(options.elem[0], that.elem, {\r\n position: options.position\r\n });\r\n return that;\r\n };\r\n\r\n // 提示\r\n Class.prototype.hint = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n var div = lay.elem('div', {\r\n \"class\": ELEM_HINT\r\n });\r\n\r\n if(!that.elem) return;\r\n\r\n // 兼容旧版参数\r\n if(typeof opts === 'object'){\r\n opts = opts || {};\r\n } else {\r\n opts = {\r\n content: opts\r\n }\r\n }\r\n\r\n div.innerHTML = opts.content || '';\r\n lay(that.elem).find('.'+ ELEM_HINT).remove();\r\n that.elem.appendChild(div);\r\n\r\n clearTimeout(that.hinTimer);\r\n that.hinTimer = setTimeout(function(){\r\n lay(that.elem).find('.'+ ELEM_HINT).remove();\r\n }, 'ms' in opts ? opts.ms : 3000);\r\n };\r\n\r\n //获取递增/减后的年月\r\n Class.prototype.getAsYM = function(Y, M, type){\r\n type ? M-- : M++;\r\n if(M < 0){\r\n M = 11;\r\n Y--;\r\n }\r\n if(M > 11){\r\n M = 0;\r\n Y++;\r\n }\r\n return [Y, M];\r\n };\r\n\r\n //系统日期\r\n Class.prototype.systemDate = function(newDate){\r\n var thisDate = newDate || new Date();\r\n return {\r\n year: thisDate.getFullYear() //年\r\n ,month: thisDate.getMonth() //月\r\n ,date: thisDate.getDate() //日\r\n ,hours: newDate ? newDate.getHours() : 0 //时\r\n ,minutes: newDate ? newDate.getMinutes() : 0 //分\r\n ,seconds: newDate ? newDate.getSeconds() : 0 //秒\r\n }\r\n };\r\n\r\n //日期校验\r\n Class.prototype.checkDate = function(fn){\r\n var that = this\r\n ,thisDate = new Date()\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,dateTime = options.dateTime = options.dateTime || that.systemDate()\r\n ,thisMaxDate, error\r\n\r\n ,elem = options.elem[0]\r\n ,valType = that.isInput(elem) ? 'val' : 'html'\r\n ,value = function(){\r\n //如果传入了开始和结束日期的 input 对象,则将其拼接为日期范围字符\r\n if(that.rangeElem){\r\n var vals = [that.rangeElem[0].val(), that.rangeElem[1].val()];\r\n\r\n if(vals[0] && vals[1]){\r\n return vals.join(' ' + that.rangeStr + ' ');\r\n }\r\n }\r\n return that.isInput(elem)\r\n ? elem.value\r\n : (options.position === 'static' ? '' : lay(elem).attr('lay-date'));\r\n }()\r\n\r\n //校验日期有效数字\r\n ,checkValid = function(dateTime){\r\n if (!dateTime) {\r\n return;\r\n }\r\n if(dateTime.year > LIMIT_YEAR[1]) dateTime.year = LIMIT_YEAR[1], error = true; //不能超过20万年\r\n if(dateTime.month > 11) dateTime.month = 11, error = true;\r\n if(dateTime.seconds > 59) dateTime.seconds = 0, dateTime.minutes++, error = true;\r\n if(dateTime.minutes > 59) dateTime.minutes = 0, dateTime.hours++, error = true;\r\n if(dateTime.hours > 23) dateTime.hours = 0, error = true;\r\n\r\n //计算当前月的最后一天\r\n thisMaxDate = laydate.getEndDate(dateTime.month + 1, dateTime.year);\r\n if(dateTime.date > thisMaxDate) dateTime.date = thisMaxDate, error = true;\r\n }\r\n\r\n //获得初始化日期值\r\n ,initDate = function(dateTime, value, index){\r\n var startEnd = ['startTime', 'endTime'];\r\n value = (value.match(that.EXP_SPLIT) || []).slice(1);\r\n index = index || 0;\r\n\r\n if(options.range){\r\n that[startEnd[index]] = that[startEnd[index]] || {};\r\n }\r\n lay.each(that.format, function(i, item){\r\n var thisv = parseFloat(value[i]);\r\n if(value[i].length < item.length) error = true;\r\n if(/yyyy|y/.test(item)){ //年\r\n if(thisv < LIMIT_YEAR[0]) thisv = LIMIT_YEAR[0], error = true; //年不能低于100年\r\n dateTime.year = thisv;\r\n } else if(/MM|M/.test(item)){ //月\r\n if(thisv < 1) thisv = 1, error = true;\r\n dateTime.month = thisv - 1;\r\n } else if(/dd|d/.test(item)){ //日\r\n if(thisv < 1) thisv = 1, error = true;\r\n dateTime.date = thisv;\r\n } else if(/HH|H/.test(item)){ //时\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 23) thisv = 23, error = true;\r\n dateTime.hours = thisv;\r\n options.range && (that[startEnd[index]].hours = thisv);\r\n } else if(/mm|m/.test(item)){ //分\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 59) thisv = 59, error = true;\r\n dateTime.minutes = thisv;\r\n options.range && (that[startEnd[index]].minutes = thisv);\r\n } else if(/ss|s/.test(item)){ //秒\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 59) thisv = 59, error = true;\r\n dateTime.seconds = thisv;\r\n options.range && (that[startEnd[index]].seconds = thisv);\r\n }\r\n });\r\n checkValid(dateTime);\r\n };\r\n\r\n if(fn === 'limit') {\r\n if (options.range) {\r\n checkValid(that.rangeLinked ? that.startDate : dateTime); // 校验开始时间\r\n that.endDate && checkValid(that.endDate); // 校验结束时间\r\n } else {\r\n checkValid(dateTime);\r\n }\r\n return that;\r\n }\r\n\r\n value = value || options.value;\r\n if(typeof value === 'string'){\r\n value = value.replace(/\\s+/g, ' ').replace(/^\\s|\\s$/g, '');\r\n }\r\n\r\n //如果开启范围,则计算结束日期\r\n var getEndDate = function(){\r\n if(options.range){\r\n that.endDate = that.endDate || lay.extend({}, options.dateTime, function(){\r\n var obj = {}\r\n ,dateTime = options.dateTime\r\n ,EYM = that.getAsYM(dateTime.year, dateTime.month);\r\n\r\n //初始右侧面板的年月\r\n if(options.type === 'year'){\r\n obj.year = dateTime.year + 1;\r\n } else if(options.type !== 'time'){\r\n obj.year = EYM[0];\r\n obj.month = EYM[1];\r\n }\r\n\r\n //初始右侧面板的时间\r\n if(options.type === 'datetime' || options.type === 'time'){\r\n obj.hours = 23;\r\n obj.minutes = obj.seconds = 59;\r\n }\r\n\r\n return obj;\r\n }());\r\n }\r\n };\r\n getEndDate();\r\n\r\n if(typeof value === 'string' && value){\r\n if(that.EXP_IF.test(value)){ //校验日期格式\r\n if(options.range){\r\n value = value.split(' '+ that.rangeStr +' ');\r\n lay.each([options.dateTime, that.endDate], function(i, item){\r\n initDate(item, value[i], i);\r\n });\r\n } else {\r\n initDate(dateTime, value);\r\n }\r\n } else {\r\n //格式不合法\r\n that.hint(lang.formatError[0] + (\r\n options.range ? (options.format + ' '+ that.rangeStr +' ' + options.format) : options.format\r\n ) + lang.formatError[1]);\r\n error = true;\r\n }\r\n } else if(value && layui.type(value) === 'date'){ //若值为日期对象\r\n options.dateTime = that.systemDate(value);\r\n } else {\r\n //重置开始日期\r\n options.dateTime = that.systemDate();\r\n delete that.startTime;\r\n\r\n //重置结束日期\r\n delete that.endDate; //删除原有的结束日期\r\n getEndDate(); //并重新获得新的结束日期\r\n delete that.endTime;\r\n }\r\n\r\n //从日期范围表单中获取初始值\r\n (function(){\r\n if(that.rangeElem){\r\n var vals = [that.rangeElem[0].val(), that.rangeElem[1].val()]\r\n ,arrDate = [options.dateTime, that.endDate];\r\n lay.each(vals, function(_i, _v){\r\n if(that.EXP_IF_ONE.test(_v)){ //校验日期格式\r\n initDate(arrDate[_i], _v, _i);\r\n }\r\n });\r\n }\r\n })();\r\n\r\n // 校验日期有效数字\r\n checkValid(dateTime);\r\n if(options.range) checkValid(that.endDate);\r\n\r\n // 如果初始值格式错误,则纠正初始值\r\n if(error && value){\r\n that.setValue(\r\n options.range ? (that.endDate ? that.parse() : '') : that.parse()\r\n );\r\n }\r\n\r\n //如果当前日期不在设定的最大小日期区间,则自动纠正在可选区域\r\n //校验主面板是否在可选日期区间\r\n var minMaxError;\r\n if(that.getDateTime(dateTime) > that.getDateTime(options.max)){ //若超出最大日期\r\n dateTime = options.dateTime = lay.extend({}, options.max);\r\n minMaxError = true;\r\n } else if(that.getDateTime(dateTime) < that.getDateTime(options.min)){ //若少于最小日期\r\n dateTime = options.dateTime = lay.extend({}, options.min);\r\n minMaxError = true;\r\n }\r\n\r\n //校验右侧面板是否在可选日期区间\r\n if(options.range){\r\n if(that.getDateTime(that.endDate) < that.getDateTime(options.min) || that.getDateTime(that.endDate) > that.getDateTime(options.max)){\r\n that.endDate = lay.extend({}, options.max);\r\n minMaxError = true;\r\n }\r\n // 有时间范围的情况下初始化startTime和endTime\r\n that.startTime = {\r\n hours: options.dateTime.hours,\r\n minutes: options.dateTime.minutes,\r\n seconds: options.dateTime.seconds,\r\n }\r\n that.endTime = {\r\n hours: that.endDate.hours,\r\n minutes: that.endDate.minutes,\r\n seconds: that.endDate.seconds,\r\n }\r\n // 如果是年月范围将对应的日期统一成当月的1日进行比较避免出现同一个月但是开始日期大于结束日期的情况\r\n if (options.type === 'month') {\r\n options.dateTime.date = 1;\r\n that.endDate.date = 1;\r\n }\r\n }\r\n\r\n // 初始值不在最大最小范围内\r\n if(minMaxError && value){\r\n that.setValue(that.parse());\r\n that.hint('value ' + lang.invalidDate + lang.formatError[1]);\r\n }\r\n\r\n // 初始赋值 startDate,endState\r\n that.startDate = that.startDate || value && lay.extend({}, options.dateTime); // 有默认值才初始化startDate\r\n that.autoCalendarModel.auto && that.autoCalendarModel();\r\n that.endState = !options.range || !that.rangeLinked || !!(that.startDate && that.endDate); // 初始化选中范围状态\r\n\r\n fn && fn();\r\n return that;\r\n };\r\n\r\n // 公历重要日期与自定义备注\r\n Class.prototype.mark = function(td, YMD){\r\n var that = this\r\n ,mark, options = that.config;\r\n lay.each(options.mark, function(key, title){\r\n var keys = key.split('-');\r\n if((keys[0] == YMD[0] || keys[0] == 0) //每年的每月\r\n && (keys[1] == YMD[1] || keys[1] == 0) //每月的每日\r\n && keys[2] == YMD[2]){ //特定日\r\n mark = title || YMD[2];\r\n }\r\n });\r\n mark && td.find('div').html('<span class=\"laydate-day-mark\">'+ mark +'</span>');\r\n\r\n return that;\r\n };\r\n\r\n // 标注法定节假日或补假上班\r\n Class.prototype.holidays = function(td, YMD) {\r\n var that = this;\r\n var options = that.config;\r\n var type = ['', 'work'];\r\n\r\n if(layui.type(options.holidays) !== 'array') return that;\r\n\r\n lay.each(options.holidays, function(idx, item) {\r\n lay.each(item, function(i, dayStr) {\r\n if(dayStr === td.attr('lay-ymd')){\r\n td.find('div').html('<span class=\"laydate-day-holidays\"' + (\r\n type[idx] ? ('type=\"'+ type[idx] +'\"') : ''\r\n ) + '>' + YMD[2] + '</span>');\r\n }\r\n });\r\n });\r\n\r\n return that;\r\n };\r\n\r\n // 无效日期范围的标记\r\n Class.prototype.limit = function(opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n var timestamp = {}\r\n var dateTime = opts.index > (opts.time ? 0 : 41) ? that.endDate : options.dateTime;\r\n var isOut;\r\n\r\n lay.each({\r\n now: lay.extend({}, dateTime, opts.date || {})\r\n ,min: options.min\r\n ,max: options.max\r\n }, function(key, item){\r\n timestamp[key] = that.newDate(lay.extend({\r\n year: item.year\r\n ,month: opts.type === 'year' ? 0 : item.month // 年份的时候只比较年\r\n ,date: (opts.type === 'year' || opts.type === 'month') ? 1 : item.date // 年月只比较年月不与最大最小比日期\r\n }, function(){\r\n var hms = {};\r\n lay.each(opts.time, function(i, keys){\r\n hms[keys] = item[keys];\r\n });\r\n return hms;\r\n }())).getTime(); //time是否比较时分秒\r\n });\r\n\r\n isOut = timestamp.now < timestamp.min || timestamp.now > timestamp.max;\r\n opts.elem && opts.elem[isOut ? 'addClass' : 'removeClass'](DISABLED);\r\n\r\n return isOut;\r\n };\r\n\r\n //当前日期对象\r\n Class.prototype.thisDateTime = function(index){\r\n var that = this\r\n ,options = that.config;\r\n return index ? that.endDate: options.dateTime;\r\n };\r\n\r\n //日历表\r\n Class.prototype.calendar = function(value, index, type){\r\n index = index ? 1 : 0;\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = value || that.thisDateTime(index)\r\n ,thisDate = new Date(), startWeek, prevMaxDate, thisMaxDate\r\n ,lang = that.lang()\r\n\r\n ,isAlone = options.type !== 'date' && options.type !== 'datetime'\r\n ,tds = lay(that.table[index]).find('td')\r\n ,elemYM = lay(that.elemHeader[index][2]).find('span');\r\n\r\n if(dateTime.year < LIMIT_YEAR[0]) dateTime.year = LIMIT_YEAR[0], that.hint(lang.invalidDate);\r\n if(dateTime.year > LIMIT_YEAR[1]) dateTime.year = LIMIT_YEAR[1], that.hint(lang.invalidDate);\r\n\r\n //记录初始值\r\n if(!that.firstDate){\r\n that.firstDate = lay.extend({}, dateTime);\r\n }\r\n\r\n //计算当前月第一天的星期\r\n thisDate.setFullYear(dateTime.year, dateTime.month, 1);\r\n startWeek = (thisDate.getDay() + (7 - options.weekStart)) % 7;\r\n\r\n prevMaxDate = laydate.getEndDate(dateTime.month || 12, dateTime.year); //计算上个月的最后一天\r\n thisMaxDate = laydate.getEndDate(dateTime.month + 1, dateTime.year); //计算当前月的最后一天\r\n\r\n //赋值日\r\n lay.each(tds, function(index_, item){\r\n var YMD = [dateTime.year, dateTime.month], st;\r\n item = lay(item);\r\n item.removeAttr(\"class\");\r\n if(index_ < startWeek){\r\n st = prevMaxDate - startWeek + index_;\r\n item.addClass('laydate-day-prev');\r\n YMD = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n } else if(index_ >= startWeek && index_ < thisMaxDate + startWeek){\r\n st = index_ - startWeek;\r\n if (!that.rangeLinked) {\r\n st + 1 === dateTime.date && item.addClass(THIS);\r\n }\r\n } else {\r\n st = index_ - thisMaxDate - startWeek;\r\n item.addClass('laydate-day-next');\r\n YMD = that.getAsYM(dateTime.year, dateTime.month);\r\n }\r\n YMD[1]++;\r\n YMD[2] = st + 1;\r\n item.attr('lay-ymd', YMD.join('-')).html('<div>' + YMD[2] + '</div>');\r\n that.mark(item, YMD).holidays(item, YMD).limit({\r\n elem: item,\r\n date: {\r\n year: YMD[0],\r\n month: YMD[1] - 1,\r\n date: YMD[2]\r\n },\r\n index: index_\r\n });\r\n });\r\n\r\n //同步头部年月\r\n lay(elemYM[0]).attr('lay-ym', dateTime.year + '-' + (dateTime.month + 1));\r\n lay(elemYM[1]).attr('lay-ym', dateTime.year + '-' + (dateTime.month + 1));\r\n\r\n if(options.lang === 'cn'){\r\n lay(elemYM[0]).attr('lay-type', 'year').html(dateTime.year + ' 年')\r\n lay(elemYM[1]).attr('lay-type', 'month').html((dateTime.month + 1) + ' 月');\r\n } else {\r\n lay(elemYM[0]).attr('lay-type', 'month').html(lang.month[dateTime.month]);\r\n lay(elemYM[1]).attr('lay-type', 'year').html(dateTime.year);\r\n }\r\n\r\n //初始默认选择器\r\n if(isAlone){ //年、月等独立选择器\r\n if(options.range){\r\n if(value || type !== 'init'){ // 判断是否需要显示年月时间列表\r\n that.listYM = [\r\n [(that.startDate || options.dateTime).year, (that.startDate || options.dateTime).month + 1]\r\n ,[that.endDate.year, that.endDate.month + 1]\r\n ];\r\n that.list(options.type, 0).list(options.type, 1);\r\n\r\n //同步按钮可点状态\r\n options.type === 'time' ? that.setBtnStatus('时间'\r\n ,lay.extend({}, that.systemDate(), that.startTime)\r\n ,lay.extend({}, that.systemDate(), that.endTime)\r\n ) : that.setBtnStatus(true);\r\n }\r\n } else {\r\n that.listYM = [[dateTime.year, dateTime.month + 1]];\r\n that.list(options.type, 0);\r\n }\r\n }\r\n\r\n //初始赋值双日历\r\n if(options.range && type === 'init'){\r\n //执行渲染第二个日历\r\n if (that.rangeLinked) {\r\n var EYM = that.getAsYM(dateTime.year, dateTime.month, index ? 'sub' : null)\r\n that.calendar(lay.extend({}, dateTime, {\r\n year: EYM[0]\r\n ,month: EYM[1]\r\n }), 1 - index); // 渲染另外一个\r\n } else {\r\n that.calendar(null, 1 - index);\r\n }\r\n }\r\n\r\n // 通过检测当前有效日期,来设定底部按钮状态\r\n if(!options.range){\r\n var timeParams = ['hours', 'minutes', 'seconds'];\r\n\r\n // 现在按钮\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_NOW),\r\n date: that.systemDate(/^(datetime|time)$/.test(options.type) ? new Date() : null),\r\n index: 0,\r\n time: timeParams\r\n });\r\n // 确认按钮\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n index: 0,\r\n time: timeParams\r\n });\r\n }\r\n\r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n\r\n // 重置快捷栏选中状态\r\n lay(that.shortcut).find('li.' + THIS).removeClass(THIS);\r\n\r\n //标记选择范围\r\n if(options.range && !isAlone && type !== 'init') that.stampRange();\r\n\r\n return that;\r\n };\r\n\r\n //生成年月时分秒列表\r\n Class.prototype.list = function(type, index){\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = that.rangeLinked ? options.dateTime : [options.dateTime, that.endDate][index]\r\n ,lang = that.lang()\r\n ,isAlone = options.range && options.type !== 'date' && options.type !== 'datetime' //独立范围选择器\r\n\r\n ,ul = lay.elem('ul', {\r\n \"class\": ELEM_LIST + ' ' + ({\r\n year: 'laydate-year-list'\r\n ,month: 'laydate-month-list'\r\n ,time: 'laydate-time-list'\r\n })[type]\r\n })\r\n ,elemHeader = that.elemHeader[index]\r\n ,elemYM = lay(elemHeader[2]).find('span')\r\n ,elemCont = that.elemCont[index || 0]\r\n ,haveList = lay(elemCont).find('.'+ ELEM_LIST)[0]\r\n ,isCN = options.lang === 'cn'\r\n ,text = isCN ? '年' : ''\r\n\r\n ,listYM = that.listYM[index] || {}\r\n ,hms = ['hours', 'minutes', 'seconds']\r\n ,startEnd = ['startTime', 'endTime'][index];\r\n\r\n if(listYM[0] < 1) listYM[0] = 1;\r\n\r\n //生成年列表\r\n if(type === 'year'){\r\n var yearNum, startY = yearNum = listYM[0] - 7;\r\n if(startY < 1) startY = yearNum = 1;\r\n lay.each(new Array(15), function(i){\r\n var li = lay.elem('li', {\r\n 'lay-ym': yearNum\r\n })\r\n ,ymd = {\r\n year: yearNum\r\n ,month: 0\r\n ,date: 1\r\n };\r\n\r\n yearNum == listYM[0] && lay(li).addClass(THIS);\r\n li.innerHTML = yearNum + text;\r\n ul.appendChild(li);\r\n\r\n /*\r\n if(yearNum < that.firstDate.year){\r\n ymd.month = options.min.month;\r\n ymd.date = options.min.date;\r\n } else if(yearNum >= that.firstDate.year){\r\n ymd.month = options.max.month;\r\n ymd.date = options.max.date;\r\n }\r\n */\r\n\r\n that.limit({\r\n elem: lay(li),\r\n date: ymd,\r\n index: index,\r\n type: type\r\n });\r\n yearNum++;\r\n });\r\n\r\n lay(elemYM[isCN ? 0 : 1]).attr('lay-ym', (yearNum - 8) + '-' + listYM[1])\r\n .html((startY + text) + ' - ' + (yearNum - 1 + text));\r\n }\r\n\r\n //生成月列表\r\n else if(type === 'month'){\r\n lay.each(new Array(12), function(i){\r\n var li = lay.elem('li', {\r\n 'lay-ym': i\r\n })\r\n ,ymd = {\r\n year: listYM[0]\r\n ,month: i\r\n ,date: 1\r\n };\r\n\r\n i + 1 == listYM[1] && lay(li).addClass(THIS);\r\n li.innerHTML = lang.month[i] + (isCN ? '月' : '');\r\n ul.appendChild(li);\r\n\r\n /*\r\n if(listYM[0] < that.firstDate.year){\r\n ymd.date = options.min.date;\r\n } else if(listYM[0] >= that.firstDate.year){\r\n ymd.date = options.max.date;\r\n }\r\n */\r\n\r\n that.limit({\r\n elem: lay(li),\r\n date: ymd,\r\n index: index,\r\n type: type\r\n });\r\n });\r\n\r\n lay(elemYM[isCN ? 0 : 1]).attr('lay-ym', listYM[0] + '-' + listYM[1])\r\n .html(listYM[0] + text);\r\n }\r\n\r\n //生成时间列表\r\n else if(type === 'time'){\r\n //检测时分秒状态是否在有效日期时间范围内\r\n var setTimeStatus = function(){\r\n lay(ul).find('ol').each(function(i, ol){\r\n lay(ol).find('li').each(function(ii, li){\r\n that.limit({\r\n elem: lay(li),\r\n date: [{\r\n hours: ii\r\n }, {\r\n hours: that[startEnd].hours\r\n ,minutes: ii\r\n }, {\r\n hours: that[startEnd].hours\r\n ,minutes: that[startEnd].minutes\r\n ,seconds: ii\r\n }][i],\r\n index: index,\r\n time: [\r\n ['hours'],\r\n ['hours', 'minutes'],\r\n ['hours', 'minutes', 'seconds']\r\n ][i]\r\n });\r\n });\r\n });\r\n if(!options.range){\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n date: that[startEnd],\r\n index: 0,\r\n time: ['hours', 'minutes', 'seconds']\r\n });\r\n }\r\n };\r\n\r\n //初始化时间对象\r\n if(options.range){\r\n if(!that[startEnd]){\r\n that[startEnd] = startEnd === 'startTime' ? dateTime : that.endDate;\r\n }\r\n } else {\r\n that[startEnd] = dateTime;\r\n }\r\n\r\n //生成时分秒\r\n lay.each([24, 60, 60], function(i, item){\r\n var li = lay.elem('li'), childUL = ['<p>'+ lang.time[i] +'</p><ol>'];\r\n lay.each(new Array(item), function(ii){\r\n childUL.push('<li'+ (that[startEnd][hms[i]] === ii ? ' class=\"'+ THIS +'\"' : '') +'>'+ lay.digit(ii, 2) +'</li>');\r\n });\r\n li.innerHTML = childUL.join('') + '</ol>';\r\n ul.appendChild(li);\r\n });\r\n setTimeStatus();\r\n }\r\n\r\n //插入容器\r\n if(haveList) elemCont.removeChild(haveList);\r\n elemCont.appendChild(ul);\r\n\r\n //年月面板 - 选择事件\r\n if(type === 'year' || type === 'month'){\r\n //显示切换箭头\r\n lay(that.elemMain[index]).addClass('laydate-ym-show');\r\n\r\n //选中\r\n lay(ul).find('li').on('click', function(){\r\n var ym = lay(this).attr('lay-ym') | 0;\r\n if(lay(this).hasClass(DISABLED)) return;\r\n if (that.rangeLinked) {\r\n lay.extend(dateTime, {\r\n year: type === 'year' ? ym : listYM[0]\r\n ,month: type === 'year' ? listYM[1] - 1 : ym\r\n });\r\n } else {\r\n dateTime[type] = ym;\r\n }\r\n\r\n //当为年选择器或者年月选择器\r\n var isYearOrMonth = options.type === 'year' || options.type === 'month';\r\n if(isYearOrMonth){\r\n lay(ul).find('.'+ THIS).removeClass(THIS);\r\n lay(this).addClass(THIS);\r\n\r\n //如果为年月选择器,点击了年列表,则切换到月选择器\r\n if(options.type === 'month' && type === 'year'){\r\n that.listYM[index][0] = ym;\r\n isAlone && ((index ? that.endDate : dateTime).year = ym);\r\n that.list('month', index);\r\n }\r\n } else {\r\n that.checkDate('limit').calendar(dateTime, index, 'init'); // 重新渲染一下两个面板\r\n that.closeList();\r\n }\r\n\r\n that.setBtnStatus(); //同步按钮可点状态\r\n\r\n //若为月选择器,只有当选择月份时才自动关闭;\r\n //若为年选择器,选择年份即自动关闭\r\n //且在范围未开启时\r\n if(!options.range && options.autoConfirm){\r\n if((options.type === 'month' && type === 'month') || (options.type === 'year' && type === 'year')){\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n }\r\n\r\n (that.autoCalendarModel.auto && !that.rangeLinked) ? that.choose(lay(elemCont).find('td.layui-this'), index) : (that.endState && that.done(null, 'change'));\r\n lay(that.footer).find('.'+ ELEM_TIME_BTN).removeClass(DISABLED);\r\n });\r\n } else { //时间选择面板 - 选择事件\r\n var span = lay.elem('span', {\r\n \"class\": ELEM_TIME_TEXT\r\n })\r\n\r\n //滚动条定位\r\n ,scroll = function(){\r\n lay(ul).find('ol').each(function(i){\r\n var ol = this\r\n ,li = lay(ol).find('li')\r\n ol.scrollTop = 30*(that[startEnd][hms[i]] - 2);\r\n if(ol.scrollTop <= 0){\r\n li.each(function(ii, item){\r\n if(!lay(this).hasClass(DISABLED)){\r\n ol.scrollTop = 30*(ii - 2);\r\n return true;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n ,haveSpan = lay(elemHeader[2]).find('.'+ ELEM_TIME_TEXT);\r\n\r\n scroll();\r\n span.innerHTML = options.range ? [lang.startTime,lang.endTime][index] : lang.timeTips;\r\n lay(that.elemMain[index]).addClass('laydate-time-show');\r\n\r\n if(haveSpan[0]) haveSpan.remove();\r\n elemHeader[2].appendChild(span);\r\n\r\n lay(ul).find('ol').each(function(i){\r\n var ol = this;\r\n //选择时分秒\r\n lay(ol).find('li').on('click', function(){\r\n var value = this.innerHTML | 0;\r\n if(lay(this).hasClass(DISABLED)) return;\r\n\r\n if(options.range){\r\n that[startEnd][hms[i]] = value;\r\n } else {\r\n dateTime[hms[i]] = value;\r\n }\r\n lay(ol).find('.'+ THIS).removeClass(THIS);\r\n lay(this).addClass(THIS);\r\n\r\n setTimeStatus();\r\n scroll();\r\n (that.endDate || options.type === 'time' || (options.type === 'datetime' && options.fullPanel)) && that.done(null, 'change');\r\n\r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n });\r\n });\r\n }\r\n\r\n return that;\r\n };\r\n\r\n //记录列表切换后的年月\r\n Class.prototype.listYM = [];\r\n\r\n //关闭列表\r\n Class.prototype.closeList = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n lay.each(that.elemCont, function(index, item){\r\n lay(this).find('.'+ ELEM_LIST).remove();\r\n lay(that.elemMain[index]).removeClass('laydate-ym-show laydate-time-show');\r\n });\r\n lay(that.elem).find('.'+ ELEM_TIME_TEXT).remove();\r\n };\r\n\r\n //检测结束日期是否超出开始日期\r\n Class.prototype.setBtnStatus = function(tips, start, end){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,isOut, elemBtn = lay(that.footer).find(ELEM_CONFIRM);\r\n if(options.range && options.type !== 'time'){\r\n start = start || (that.rangeLinked ? that.startDate : options.dateTime);\r\n end = end || that.endDate;\r\n isOut = !that.endState || that.newDate(start).getTime() > that.newDate(end).getTime();\r\n\r\n //如果不在有效日期内,直接禁用按钮,否则比较开始和结束日期\r\n (that.limit({\r\n date: start\r\n }) || that.limit({\r\n date: end\r\n }))\r\n ? elemBtn.addClass(DISABLED)\r\n : elemBtn[isOut ? 'addClass' : 'removeClass'](DISABLED);\r\n\r\n //是否异常提示\r\n if(tips && isOut) that.hint(\r\n typeof tips === 'string' ? lang.timeout.replace(/日期/g, tips) : lang.timeout\r\n );\r\n }\r\n };\r\n\r\n // 转义为规定格式的日期字符\r\n Class.prototype.parse = function(state, date) {\r\n var that = this;\r\n var options = that.config;\r\n var startDate = (that.rangeLinked ? that.startDate : options.dateTime)\r\n var dateTime = date || (\r\n state == 'end' ? lay.extend({}, that.endDate, that.endTime) : (\r\n options.range\r\n ? lay.extend({}, startDate || options.dateTime, that.startTime)\r\n : options.dateTime\r\n )\r\n );\r\n var format = laydate.parse(dateTime, that.format, 1);\r\n\r\n // 返回日期范围字符\r\n if (options.range && state === undefined) {\r\n return format + ' '+ that.rangeStr +' ' + that.parse('end');\r\n }\r\n\r\n return format;\r\n };\r\n\r\n //创建指定日期时间对象\r\n Class.prototype.newDate = function(dateTime){\r\n dateTime = dateTime || {};\r\n return new Date(\r\n dateTime.year || 1\r\n ,dateTime.month || 0\r\n ,dateTime.date || 1\r\n ,dateTime.hours || 0\r\n ,dateTime.minutes || 0\r\n ,dateTime.seconds || 0\r\n );\r\n };\r\n\r\n // 获得指定日期时间对象的毫秒数\r\n Class.prototype.getDateTime = function(obj){\r\n return this.newDate(obj).getTime();\r\n }\r\n\r\n //赋值\r\n Class.prototype.setValue = function(value){\r\n var that = this\r\n ,options = that.config\r\n ,elem = options.elem[0];\r\n\r\n //静态展现则不作默认赋值\r\n if(options.position === 'static') return that;\r\n\r\n value = value || '';\r\n\r\n //绑定的元素是否为 input\r\n if(that.isInput(elem)){\r\n lay(elem).val(value);\r\n } else {\r\n //如果 range 传入了开始和结束的 input 对象,则分别对其赋值\r\n var rangeElem = that.rangeElem;\r\n if(rangeElem){\r\n if(layui.type(value) !== 'array'){\r\n value = value.split(' '+ that.rangeStr +' ');\r\n }\r\n rangeElem[0].val(value[0] || '');\r\n rangeElem[1].val(value[1] || '');\r\n } else {\r\n if(lay(elem).find('*').length === 0){\r\n lay(elem).html(value);\r\n }\r\n lay(elem).attr('lay-date', value);\r\n }\r\n }\r\n\r\n return that;\r\n };\r\n\r\n //预览\r\n Class.prototype.preview = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n if(!options.isPreview) return;\r\n\r\n var elemPreview = lay(that.elem).find('.'+ ELEM_PREVIEW)\r\n ,value = options.range ? ((that.rangeLinked ? that.endState : that.endDate) ? that.parse() : '') : that.parse();\r\n\r\n // 显示预览\r\n elemPreview.html(value);\r\n\r\n // 预览颜色渐变\r\n var oldValue = elemPreview.html();\r\n oldValue && (elemPreview.css({\r\n 'color': '#16b777'\r\n }),\r\n setTimeout(function(){\r\n elemPreview.css({\r\n 'color': '#777'\r\n });\r\n }, 300));\r\n };\r\n\r\n // 附加的渲染处理,在 ready 和 change 的时候调用\r\n Class.prototype.renderAdditional = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 处理全面板\r\n if (options.fullPanel) {\r\n that.list('time', 0);\r\n }\r\n };\r\n\r\n // 标记范围内的日期\r\n Class.prototype.stampRange = function(){\r\n var that = this\r\n ,options = that.config\r\n ,startTime = that.rangeLinked ? that.startDate : options.dateTime, endTime\r\n ,tds = lay(that.elem).find('td');\r\n\r\n if(options.range && !that.endState) lay(that.footer).find(ELEM_CONFIRM).addClass(DISABLED);\r\n // if(!that.endState) return;\r\n\r\n startTime = startTime && that.newDate({\r\n year: startTime.year\r\n ,month: startTime.month\r\n ,date: startTime.date\r\n }).getTime();\r\n\r\n endTime = that.endState && that.endDate && that.newDate({\r\n year: that.endDate.year\r\n ,month: that.endDate.month\r\n ,date: that.endDate.date\r\n }).getTime();\r\n\r\n // if(startTime > endTime) return that.hint(TIPS_OUT);\r\n\r\n lay.each(tds, function(i, item){\r\n var ymd = lay(item).attr('lay-ymd').split('-');\r\n var thisTime = that.newDate({\r\n year: ymd[0]\r\n ,month: ymd[1] - 1\r\n ,date: ymd[2]\r\n }).getTime();\r\n\r\n // 标记当天\r\n if(options.rangeLinked && !that.startDate){\r\n if(thisTime === that.newDate(that.systemDate()).getTime()){\r\n lay(item).addClass(\r\n lay(item).hasClass(ELEM_PREV) || lay(item).hasClass(ELEM_NEXT)\r\n ? ''\r\n : ELEM_DAY_NOW\r\n );\r\n }\r\n }\r\n\r\n /*\r\n * 标注区间\r\n */\r\n\r\n lay(item).removeClass(ELEM_SELECTED + ' ' + THIS);\r\n\r\n if(thisTime === startTime || thisTime === endTime){\r\n (that.rangeLinked || (!that.rangeLinked && (i < 42 ? thisTime === startTime : thisTime === endTime))) &&\r\n lay(item).addClass(\r\n lay(item).hasClass(ELEM_PREV) || lay(item).hasClass(ELEM_NEXT)\r\n ? ELEM_SELECTED\r\n : THIS\r\n );\r\n }\r\n if(thisTime > startTime && thisTime < endTime){\r\n lay(item).addClass(ELEM_SELECTED);\r\n }\r\n });\r\n };\r\n\r\n // 执行 done/change 回调\r\n Class.prototype.done = function(param, type){\r\n var that = this;\r\n var options = that.config;\r\n var start = lay.extend({},\r\n lay.extend(that.rangeLinked ? that.startDate : options.dateTime, that.startTime)\r\n );\r\n var end = lay.extend({}, lay.extend(that.endDate, that.endTime));\r\n\r\n lay.each([start, end], function(i, item){\r\n if(!('month' in item)) return;\r\n lay.extend(item, {\r\n month: item.month + 1\r\n });\r\n });\r\n\r\n that.preview();\r\n\r\n param = param || [that.parse(), start, end];\r\n type === 'change' && that.renderAdditional();\r\n typeof options[type || 'done'] === 'function' && options[type || 'done'].apply(options, param);\r\n\r\n return that;\r\n };\r\n\r\n //选择日期\r\n Class.prototype.choose = function(td, index){\r\n if(td.hasClass(DISABLED)) return;\r\n\r\n var that = this\r\n ,options = that.config\r\n ,panelIndex = index; // 记录点击的是哪一个面板的\r\n\r\n if (that.rangeLinked) {\r\n if (that.endState || !that.startDate) {\r\n // 重新选择或者第一次选择\r\n index = 0;\r\n that.endState = false;\r\n that.endDate = {};\r\n } else {\r\n index = 1;\r\n that.endState = true;\r\n }\r\n }\r\n\r\n var dateTime = that.thisDateTime(index)\r\n\r\n ,tds = lay(that.elem).find('td')\r\n ,YMD = td.attr('lay-ymd').split('-');\r\n\r\n YMD = {\r\n year: YMD[0] | 0\r\n ,month: (YMD[1] | 0) - 1\r\n ,date: YMD[2] | 0\r\n };\r\n\r\n lay.extend(dateTime, YMD); //同步 dateTime\r\n\r\n //范围选择\r\n if(options.range){\r\n //补充时分秒\r\n lay.each(['startTime', 'endTime'], function(i, item){\r\n that[item] = that[item] || {\r\n hours: i ? 23: 0\r\n ,minutes: i ? 59: 0\r\n ,seconds: i ? 59: 0\r\n };\r\n if (index === i) {\r\n // 判断选择之后的是否在范围内,超出则需要调整时分秒\r\n if (that.getDateTime(lay.extend({}, dateTime, that[item])) < that.getDateTime(options.min)) {\r\n that[item] = {\r\n hours: options.min.hours\r\n ,minutes: options.min.minutes\r\n ,seconds: options.min.seconds\r\n };\r\n lay.extend(dateTime, that[item]);\r\n } else if (that.getDateTime(lay.extend({}, dateTime, that[item])) > that.getDateTime(options.max)) {\r\n that[item] = {\r\n hours: options.max.hours\r\n ,minutes: options.max.minutes\r\n ,seconds: options.max.seconds\r\n };\r\n lay.extend(dateTime, that[item]);\r\n }\r\n }\r\n });\r\n if (!index) {\r\n that.startDate = lay.extend({}, dateTime); // 同步startDate\r\n }\r\n // 校验另外一个日期是否在有效的范围内\r\n if (that.endState && !that.limit({date: that.thisDateTime(1 - index)})) {\r\n // 根据选择之后判断是否需要切换模式\r\n var isChange;\r\n if (that.endState && that.autoCalendarModel.auto) {\r\n isChange = that.autoCalendarModel();\r\n }\r\n if ((isChange || that.rangeLinked && that.endState) && that.newDate(that.startDate) > that.newDate(that.endDate)) {\r\n var isSameDate = that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month && that.startDate.date === that.endDate.date;\r\n // 判断是否反选\r\n var startDate = that.startDate;\r\n that.startDate = lay.extend({}, that.endDate, isSameDate ? {} : that.startTime);\r\n options.dateTime = lay.extend({}, that.startDate);\r\n that.endDate = lay.extend({}, startDate, isSameDate ? {} : that.endTime);\r\n isSameDate && ( // 如果是同一天并且出现了反选证明是时分秒出现开始时间大于结束时间的现象\r\n startDate = that.startTime,\r\n that.startTime = that.endTime,\r\n that.endTime = startDate\r\n )\r\n }\r\n isChange && (options.dateTime = lay.extend({}, that.startDate));\r\n }\r\n if (that.rangeLinked) {\r\n var dateTimeTemp = lay.extend({}, dateTime);\r\n if (panelIndex && !index && !isChange) { // 处理可能出现的联动面板中点击右面板但是判定为开始日期这个时候点击头部的切换上下月第一次没有反应的问题\r\n // 选择了右面板但是判断之后作为开始时间\r\n var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n lay.extend(options.dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n }\r\n that.calendar(dateTimeTemp, panelIndex, isChange ? 'init' : null);\r\n } else {\r\n that.calendar(null, index, isChange ? 'init' : null);\r\n }\r\n that.endState && that.done(null, 'change');\r\n } else if(options.position === 'static'){ //直接嵌套的选中\r\n that.calendar().done().done(null, 'change'); //同时执行 done 和 change 回调\r\n } else if(options.type === 'date'){\r\n options.autoConfirm ? that.setValue(that.parse()).done().remove() : that.calendar().done(null, 'change');\r\n } else if(options.type === 'datetime'){\r\n that.calendar().done(null, 'change');\r\n }\r\n };\r\n\r\n //底部按钮\r\n Class.prototype.tool = function(btn, type){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,dateTime = options.dateTime\r\n ,isStatic = options.position === 'static'\r\n ,active = {\r\n //选择时间\r\n datetime: function(){\r\n if(lay(btn).hasClass(DISABLED)) return;\r\n that.list('time', 0);\r\n options.range && that.list('time', 1);\r\n lay(btn).attr('lay-type', 'date').html(that.lang().dateTips);\r\n }\r\n\r\n //选择日期\r\n ,date: function(){\r\n that.closeList();\r\n lay(btn).attr('lay-type', 'datetime').html(that.lang().timeTips);\r\n }\r\n\r\n //清空、重置\r\n ,clear: function(){\r\n isStatic && (\r\n lay.extend(dateTime, that.firstDate)\r\n ,that.calendar()\r\n )\r\n options.range && (\r\n delete options.dateTime\r\n ,delete that.endDate\r\n ,delete that.startTime\r\n ,delete that.endTime\r\n );\r\n that.setValue('');\r\n that.done(null, 'onClear').done(['', {}, {}]).remove();\r\n }\r\n\r\n // 现在\r\n ,now: function(){\r\n var thisDate = new Date();\r\n\r\n // 当前系统时间未在 min/max 范围内,则不可点击\r\n if(lay(btn).hasClass(DISABLED)){\r\n return that.hint(lang.tools.now +', '+ lang.invalidDate);\r\n }\r\n\r\n lay.extend(dateTime, that.systemDate(), {\r\n hours: thisDate.getHours()\r\n ,minutes: thisDate.getMinutes()\r\n ,seconds: thisDate.getSeconds()\r\n });\r\n\r\n that.setValue(that.parse());\r\n isStatic && that.calendar();\r\n that.done(null, 'onNow').done().remove();\r\n }\r\n\r\n //确定\r\n ,confirm: function(){\r\n if(options.range){\r\n if(lay(btn).hasClass(DISABLED)) return that.hint(\r\n options.type === 'time' ? lang.timeout.replace(/日期/g, '时间') : lang.timeout\r\n );\r\n } else {\r\n if(lay(btn).hasClass(DISABLED)) return that.hint(lang.invalidDate);\r\n }\r\n\r\n that.setValue(that.parse());\r\n that.done(null, 'onConfirm').done().remove();\r\n }\r\n };\r\n active[type] && active[type]();\r\n };\r\n\r\n //统一切换处理\r\n Class.prototype.change = function(index){\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = that.thisDateTime(index)\r\n ,isAlone = options.range && (options.type === 'year' || options.type === 'month')\r\n\r\n ,elemCont = that.elemCont[index || 0]\r\n ,listYM = that.listYM[index]\r\n ,addSubYear = function(type){\r\n var isYear = lay(elemCont).find('.laydate-year-list')[0]\r\n ,isMonth = lay(elemCont).find('.laydate-month-list')[0];\r\n\r\n //切换年列表\r\n if(isYear){\r\n listYM[0] = type ? listYM[0] - 15 : listYM[0] + 15;\r\n that.list('year', index);\r\n }\r\n\r\n if(isMonth){ //切换月面板中的年\r\n type ? listYM[0]-- : listYM[0]++;\r\n that.list('month', index);\r\n }\r\n\r\n if(isYear || isMonth){\r\n lay.extend(dateTime, {\r\n year: listYM[0]\r\n });\r\n if(isAlone) dateTime.year = listYM[0];\r\n options.range || that.done(null, 'change');\r\n options.range || that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n date: {\r\n year: listYM[0]\r\n }\r\n });\r\n }\r\n\r\n that.setBtnStatus();\r\n return isYear || isMonth;\r\n };\r\n\r\n return {\r\n prevYear: function(){\r\n if(addSubYear('sub')) return;\r\n if (that.rangeLinked) {\r\n options.dateTime.year--;\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n } else {\r\n dateTime.year--;\r\n that.checkDate('limit').calendar(null, index);\r\n // 面板自动切换的模式下重新判定是否发生模式转换等细节处理\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,prevMonth: function(){\r\n if (that.rangeLinked) {\r\n dateTime = options.dateTime;\r\n }\r\n var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n lay.extend(dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n if (!that.rangeLinked) {\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,nextMonth: function(){\r\n if (that.rangeLinked) {\r\n dateTime = options.dateTime;\r\n }\r\n var YM = that.getAsYM(dateTime.year, dateTime.month);\r\n lay.extend(dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n if (!that.rangeLinked) {\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,nextYear: function(){\r\n if(addSubYear()) return;\r\n if (that.rangeLinked) {\r\n options.dateTime.year++;\r\n that.checkDate('limit').calendar(null, 0, 'init');\r\n } else {\r\n dateTime.year++;\r\n that.checkDate('limit').calendar(null, index);\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n };\r\n };\r\n\r\n //日期切换事件\r\n Class.prototype.changeEvent = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n //日期选择事件\r\n lay(that.elem).on('click', function(e){\r\n lay.stope(e);\r\n }).on('mousedown', function(e){\r\n lay.stope(e);\r\n });\r\n\r\n //年月切换\r\n lay.each(that.elemHeader, function(i, header){\r\n //上一年\r\n lay(header[0]).on('click', function(e){\r\n that.change(i).prevYear();\r\n });\r\n\r\n //上一月\r\n lay(header[1]).on('click', function(e){\r\n that.change(i).prevMonth();\r\n });\r\n\r\n //选择年月\r\n lay(header[2]).find('span').on('click', function(e){\r\n var othis = lay(this)\r\n ,layYM = othis.attr('lay-ym')\r\n ,layType = othis.attr('lay-type');\r\n\r\n if(!layYM) return;\r\n\r\n layYM = layYM.split('-');\r\n\r\n that.listYM[i] = [layYM[0] | 0, layYM[1] | 0];\r\n that.list(layType, i);\r\n lay(that.footer).find('.'+ ELEM_TIME_BTN).addClass(DISABLED);\r\n });\r\n\r\n //下一月\r\n lay(header[3]).on('click', function(e){\r\n that.change(i).nextMonth();\r\n });\r\n\r\n //下一年\r\n lay(header[4]).on('click', function(e){\r\n that.change(i).nextYear();\r\n });\r\n });\r\n\r\n //点击日期\r\n lay.each(that.table, function(i, table){\r\n var tds = lay(table).find('td');\r\n tds.on('click', function(){\r\n that.choose(lay(this), i);\r\n });\r\n });\r\n\r\n //点击底部按钮\r\n lay(that.footer).find('span').on('click', function(){\r\n var type = lay(this).attr('lay-type');\r\n that.tool(this, type);\r\n });\r\n };\r\n\r\n //是否输入框\r\n Class.prototype.isInput = function(elem){\r\n return /input|textarea/.test(elem.tagName.toLocaleLowerCase()) || /INPUT|TEXTAREA/.test(elem.tagName);\r\n };\r\n\r\n //绑定的元素事件处理\r\n Class.prototype.events = function(){\r\n var that = this\r\n var options = that.config\r\n\r\n if(!options.elem[0] || options.elem[0].eventHandler) return;\r\n\r\n var showEvent = function(){\r\n // 已经打开的面板避免重新渲染\r\n if(laydate.thisId === options.id) return;\r\n that.render();\r\n };\r\n\r\n //绑定呼出控件事件\r\n options.elem.on(options.trigger, showEvent);\r\n options.elem[0].eventHandler = true;\r\n options.eventElem.on(options.trigger, showEvent);\r\n\r\n // 元素解绑\r\n that.unbind = function () {\r\n that.remove();\r\n options.elem.off(options.trigger, showEvent);\r\n options.elem.removeAttr('lay-key');\r\n options.elem.removeAttr(MOD_ID);\r\n options.elem[0].eventHandler = false;\r\n options.eventElem.off(options.trigger, showEvent);\r\n options.eventElem.removeAttr('lay-key');\r\n delete thisModule.that[options.id];\r\n };\r\n };\r\n\r\n //记录所有实例\r\n thisModule.that = {}; //记录所有实例对象\r\n\r\n //获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that && isLayui) layui.hint().error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n\r\n // 初始执行\r\n ready.run = function(lay){\r\n // 绑定关闭控件事件\r\n lay(document).on('mousedown', function(e){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n\r\n var options = that.config;\r\n\r\n if(\r\n e.target === options.elem[0] ||\r\n e.target === options.eventElem[0] ||\r\n e.target === lay(options.closeStop)[0] ||\r\n (options.elem[0] && options.elem[0].contains(e.target))\r\n ) return;\r\n\r\n that.remove();\r\n\r\n }).on('keydown', function(e){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n\r\n // 回车触发确认\r\n if(that.config.position === 'static') return;\r\n if(e.keyCode === 13){\r\n if(lay('#'+ that.elemID)[0] && that.elemID === Class.thisElemDate){\r\n e.preventDefault();\r\n lay(that.footer).find(ELEM_CONFIRM)[0].click();\r\n }\r\n }\r\n });\r\n\r\n //自适应定位\r\n lay(window).on('resize', function(){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n\r\n if(!that.elem || !lay(ELEM)[0]){\r\n return false;\r\n }\r\n\r\n that.position();\r\n });\r\n };\r\n\r\n // 渲染 - 核心接口\r\n laydate.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n // 重载\r\n laydate.reload = function (id, options) {\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.reload(options);\r\n };\r\n\r\n // 获取对应 ID 的实例\r\n laydate.getInst = function (id) {\r\n var that = thisModule.getThis(id);\r\n if(that){\r\n return that.inst;\r\n }\r\n };\r\n\r\n // 面板提示\r\n laydate.hint = function(id, opts){\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.hint(opts);\r\n };\r\n\r\n // 解绑实例\r\n laydate.unbind = function(id){\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.unbind();\r\n };\r\n\r\n // 关闭日期面板\r\n laydate.close = function(id){\r\n var that = thisModule.getThis(id || laydate.thisId);\r\n if(!that) return;\r\n return that.remove();\r\n };\r\n\r\n // 将指定对象转化为日期值\r\n laydate.parse = function(dateTime, format, one){\r\n dateTime = dateTime || {};\r\n\r\n //如果 format 是字符型,则转换为数组格式\r\n if(typeof format === 'string'){\r\n format = thisModule.formatArr(format);\r\n }\r\n\r\n format = (format || []).concat();\r\n\r\n //转义为规定格式\r\n lay.each(format, function(i, item){\r\n if(/yyyy|y/.test(item)){ //年\r\n format[i] = lay.digit(dateTime.year, item.length);\r\n } else if(/MM|M/.test(item)){ //月\r\n format[i] = lay.digit(dateTime.month + (one || 0), item.length);\r\n } else if(/dd|d/.test(item)){ //日\r\n format[i] = lay.digit(dateTime.date, item.length);\r\n } else if(/HH|H/.test(item)){ //时\r\n format[i] = lay.digit(dateTime.hours, item.length);\r\n } else if(/mm|m/.test(item)){ //分\r\n format[i] = lay.digit(dateTime.minutes, item.length);\r\n } else if(/ss|s/.test(item)){ //秒\r\n format[i] = lay.digit(dateTime.seconds, item.length);\r\n }\r\n });\r\n\r\n return format.join('');\r\n };\r\n\r\n // 得到某月的最后一天\r\n laydate.getEndDate = function(month, year){\r\n var thisDate = new Date();\r\n //设置日期为下个月的第一天\r\n thisDate.setFullYear(\r\n year || thisDate.getFullYear()\r\n ,month || (thisDate.getMonth() + 1)\r\n ,1);\r\n //减去一天,得到当前月最后一天\r\n return new Date(thisDate.getTime() - 1000*60*60*24).getDate();\r\n };\r\n\r\n //加载方式\r\n isLayui ? (\r\n laydate.ready()\r\n ,layui.define('lay', function(exports){ //layui 加载\r\n laydate.path = layui.cache.dir;\r\n ready.run(lay);\r\n exports(MOD_NAME, laydate);\r\n })\r\n ) : (\r\n (typeof define === 'function' && define.amd) ? define(function(){ //requirejs 加载\r\n ready.run(lay);\r\n return laydate;\r\n }) : function(){ //普通 script 标签加载\r\n laydate.ready();\r\n ready.run(window.lay);\r\n window.laydate = laydate;\r\n }()\r\n );\r\n\r\n}(window, window.document);\r\n\r\n","/*!\n * jQuery JavaScript Library v1.12.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:17Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar deletedIds = [];\n\nvar document = window.document;\n\nvar slice = deletedIds.slice;\n\nvar concat = deletedIds.concat;\n\nvar push = deletedIds.push;\n\nvar indexOf = deletedIds.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"1.12.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1, IE<9\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: deletedIds.sort,\n\tsplice: deletedIds.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar src, copyIsArray, copy, name, options, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type( obj ) === \"array\";\n\t},\n\n\tisWindow: function( obj ) {\n\t\t/* jshint eqeqeq: false */\n\t\treturn obj != null && obj == obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Handle iteration over inherited properties before own properties.\n\t\tif ( !support.ownFirst ) {\n\t\t\tfor ( key in obj ) {\n\t\t\t\treturn hasOwn.call( obj, key );\n\t\t\t}\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && jQuery.trim( data ) ) {\n\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data ); // jscs:ignore requireDotNotation\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1, IE<9\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\tvar len;\n\n\t\tif ( arr ) {\n\t\t\tif ( indexOf ) {\n\t\t\t\treturn indexOf.call( arr, elem, i );\n\t\t\t}\n\n\t\t\tlen = arr.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\twhile ( j < len ) {\n\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)\n\t\tif ( len !== len ) {\n\t\t\twhile ( second[ j ] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar args, proxy, tmp;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: function() {\n\t\treturn +( new Date() );\n\t},\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tret = [],\n\t\t\tself = this,\n\t\t\tlen = self.length;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// init accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector.charAt( 0 ) === \"<\" &&\n\t\t\t\tselector.charAt( selector.length - 1 ) === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[ 2 ] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn typeof root.ready !== \"undefined\" ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar i,\n\t\t\ttargets = jQuery( target, this ),\n\t\t\tlen = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[ 0 ], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\tdo {\n\t\tcur = cur[ dir ];\n\t} while ( cur && cur.nodeType !== 1 );\n\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tret = jQuery.uniqueSort( ret );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tret = ret.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = true;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * Clean-up method for dom ready events\n */\nfunction detach() {\n\tif ( document.addEventListener ) {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\t\twindow.removeEventListener( \"load\", completed );\n\n\t} else {\n\t\tdocument.detachEvent( \"onreadystatechange\", completed );\n\t\twindow.detachEvent( \"onload\", completed );\n\t}\n}\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE6-10\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t// Standards-based browsers support DOMContentLoaded\n\t\t} else if ( document.addEventListener ) {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\n\t\t// If IE event model is used\n\t\t} else {\n\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", completed );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar top = false;\n\n\t\t\ttry {\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\n\t\t\t} catch ( e ) {}\n\n\t\t\tif ( top && top.doScroll ) {\n\t\t\t\t( function doScrollCheck() {\n\t\t\t\t\tif ( !jQuery.isReady ) {\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\ttop.doScroll( \"left\" );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn window.setTimeout( doScrollCheck, 50 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// detach all dom ready events\n\t\t\t\t\t\tdetach();\n\n\t\t\t\t\t\t// and execute any waiting functions\n\t\t\t\t\t\tjQuery.ready();\n\t\t\t\t\t}\n\t\t\t\t} )();\n\t\t\t}\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Support: IE<9\n// Iteration over object's inherited properties before its own\nvar i;\nfor ( i in jQuery( support ) ) {\n\tbreak;\n}\nsupport.ownFirst = i === \"0\";\n\n// Note: most support tests are defined in their respective modules.\n// false until the test is run\nsupport.inlineBlockNeedsLayout = false;\n\n// Execute ASAP in case we need to set body.style.zoom\njQuery( function() {\n\n\t// Minified: var a,b,c,d\n\tvar val, div, body, container;\n\n\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\tif ( !body || !body.style ) {\n\n\t\t// Return for frameset docs that don't have a body\n\t\treturn;\n\t}\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\tbody.appendChild( container ).appendChild( div );\n\n\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t// Support: IE<8\n\t\t// Check if natively block-level elements act like inline-block\n\t\t// elements when setting their display to 'inline' and giving\n\t\t// them layout\n\t\tdiv.style.cssText = \"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\";\n\n\t\tsupport.inlineBlockNeedsLayout = val = div.offsetWidth === 3;\n\t\tif ( val ) {\n\n\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\n\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\n\t\t\t// Support: IE<8\n\t\t\tbody.style.zoom = 1;\n\t\t}\n\t}\n\n\tbody.removeChild( container );\n} );\n\n\n( function() {\n\tvar div = document.createElement( \"div\" );\n\n\t// Support: IE<9\n\tsupport.deleteExpando = true;\n\ttry {\n\t\tdelete div.test;\n\t} catch ( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\nvar acceptData = function( elem ) {\n\tvar noData = jQuery.noData[ ( elem.nodeName + \" \" ).toLowerCase() ],\n\t\tnodeType = +elem.nodeType || 1;\n\n\t// Do not set data on non-element DOM nodes because it will not be cleared (#8335).\n\treturn nodeType !== 1 && nodeType !== 9 ?\n\t\tfalse :\n\n\t\t// Nodes accept data unless otherwise specified; rejection can be conditional\n\t\t!noData || noData !== true && elem.getAttribute( \"classid\" ) === noData;\n};\n\n\n\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction dataAttr( elem, key, data ) {\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[ name ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar ret, thisCache,\n\t\tinternalKey = jQuery.expando,\n\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t// can't GC object references properly across the DOM-JS boundary\n\t\tisNode = elem.nodeType,\n\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t// attached directly to the object so GC can occur automatically\n\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\n\n\t// Avoid doing any more work than we need to when trying to get data on an\n\t// object that has no data at all\n\tif ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&\n\t\tdata === undefined && typeof name === \"string\" ) {\n\t\treturn;\n\t}\n\n\tif ( !id ) {\n\n\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t// ends up in the global cache\n\t\tif ( isNode ) {\n\t\t\tid = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;\n\t\t} else {\n\t\t\tid = internalKey;\n\t\t}\n\t}\n\n\tif ( !cache[ id ] ) {\n\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\n\t\t// is serialized using JSON.stringify\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\n\t}\n\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t// shallow copied over onto the existing cache\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\tif ( pvt ) {\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t} else {\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t}\n\t}\n\n\tthisCache = cache[ id ];\n\n\t// jQuery data() is stored in a separate object inside the object's internal data\n\t// cache in order to avoid key collisions between internal data and user-defined\n\t// data.\n\tif ( !pvt ) {\n\t\tif ( !thisCache.data ) {\n\t\t\tthisCache.data = {};\n\t\t}\n\n\t\tthisCache = thisCache.data;\n\t}\n\n\tif ( data !== undefined ) {\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t}\n\n\t// Check for both converted-to-camel and non-converted data property names\n\t// If a data property was specified\n\tif ( typeof name === \"string\" ) {\n\n\t\t// First Try to find as-is property data\n\t\tret = thisCache[ name ];\n\n\t\t// Test for null|undefined property data\n\t\tif ( ret == null ) {\n\n\t\t\t// Try to find the camelCased property\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t}\n\t} else {\n\t\tret = thisCache;\n\t}\n\n\treturn ret;\n}\n\nfunction internalRemoveData( elem, name, pvt ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar thisCache, i,\n\t\tisNode = elem.nodeType,\n\n\t\t// See jQuery.data for more information\n\t\tcache = isNode ? jQuery.cache : elem,\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t// If there is already no cache entry for this object, there is no\n\t// purpose in continuing\n\tif ( !cache[ id ] ) {\n\t\treturn;\n\t}\n\n\tif ( name ) {\n\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\tif ( thisCache ) {\n\n\t\t\t// Support array or space separated string names for data keys\n\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\tname = [ name ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tname = name.split( \" \" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete thisCache[ name[ i ] ];\n\t\t\t}\n\n\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t// and let the cache object itself get destroyed\n\t\t\tif ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// See jQuery.data for more information\n\tif ( !pvt ) {\n\t\tdelete cache[ id ].data;\n\n\t\t// Don't destroy the parent cache unless the internal data object\n\t\t// had been the only thing left in it\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Destroy the cache\n\tif ( isNode ) {\n\t\tjQuery.cleanData( [ elem ], true );\n\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\t/* jshint eqeqeq: false */\n\t} else if ( support.deleteExpando || cache != cache.window ) {\n\t\t/* jshint eqeqeq: true */\n\t\tdelete cache[ id ];\n\n\t// When all else fails, undefined\n\t} else {\n\t\tcache[ id ] = undefined;\n\t}\n}\n\njQuery.extend( {\n\tcache: {},\n\n\t// The following elements (space-suffixed to avoid Object.prototype collisions)\n\t// throw uncatchable exceptions if you attempt to set expando properties\n\tnoData: {\n\t\t\"applet \": true,\n\t\t\"embed \": true,\n\n\t\t// ...but Flash objects (which have this classid) *can* handle expandos\n\t\t\"object \": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name );\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data, true );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name, true );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Special expections of .data basically thwart jQuery.access,\n\t\t// so implement the relevant behavior ourselves\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn arguments.length > 1 ?\n\n\t\t\t// Sets one value\n\t\t\tthis.each( function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t} ) :\n\n\t\t\t// Gets one value\n\t\t\t// Try to fetch any internally stored data first\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// not intended for public consumption - generates a queueHooks object,\n\t// or returns the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\n\t\t\t\tjQuery._removeData( elem, key );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\n\n\n( function() {\n\tvar shrinkWrapBlocksVal;\n\n\tsupport.shrinkWrapBlocks = function() {\n\t\tif ( shrinkWrapBlocksVal != null ) {\n\t\t\treturn shrinkWrapBlocksVal;\n\t\t}\n\n\t\t// Will be changed later if needed.\n\t\tshrinkWrapBlocksVal = false;\n\n\t\t// Minified: var b,c,d\n\t\tvar div, body, container;\n\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\t\tif ( !body || !body.style ) {\n\n\t\t\t// Test fired too early or in an unsupported environment, exit.\n\t\t\treturn;\n\t\t}\n\n\t\t// Setup\n\t\tdiv = document.createElement( \"div\" );\n\t\tcontainer = document.createElement( \"div\" );\n\t\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\t\tbody.appendChild( container ).appendChild( div );\n\n\t\t// Support: IE6\n\t\t// Check if elements with layout shrink-wrap their children\n\t\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border\n\t\t\tdiv.style.cssText =\n\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;\" +\n\t\t\t\t\"padding:1px;width:1px;zoom:1\";\n\t\t\tdiv.appendChild( document.createElement( \"div\" ) ).style.width = \"5px\";\n\t\t\tshrinkWrapBlocksVal = div.offsetWidth !== 3;\n\t\t}\n\n\t\tbody.removeChild( container );\n\n\t\treturn shrinkWrapBlocksVal;\n\t};\n\n} )();\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlength = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ],\n\t\t\t\t\tkey,\n\t\t\t\t\traw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlength ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\nvar rleadingWhitespace = ( /^\\s+/ );\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|\" +\n\t\t\"details|dialog|figcaption|figure|footer|header|hgroup|main|\" +\n\t\t\"mark|meter|nav|output|picture|progress|section|summary|template|time|video\";\n\n\n\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\t\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\n\n( function() {\n\tvar div = document.createElement( \"div\" ),\n\t\tfragment = document.createDocumentFragment(),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Setup\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\n\t// IE strips leading whitespace when .innerHTML is used\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\n\n\t// Make sure that tbody elements aren't automatically inserted\n\t// IE will insert them into empty tables\n\tsupport.tbody = !div.getElementsByTagName( \"tbody\" ).length;\n\n\t// Make sure that link elements get serialized correctly by innerHTML\n\t// This requires a wrapper element in IE\n\tsupport.htmlSerialize = !!div.getElementsByTagName( \"link\" ).length;\n\n\t// Makes sure cloning an html5 element does not cause problems\n\t// Where outerHTML is undefined, this still works\n\tsupport.html5Clone =\n\t\tdocument.createElement( \"nav\" ).cloneNode( true ).outerHTML !== \"<:nav></:nav>\";\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tinput.type = \"checkbox\";\n\tinput.checked = true;\n\tfragment.appendChild( input );\n\tsupport.appendChecked = input.checked;\n\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\t// Support: IE6-IE11+\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// #11217 - WebKit loses check when the name is after the checked attribute\n\tfragment.appendChild( div );\n\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3\n\t// old WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<9\n\t// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+\n\tsupport.noCloneEvent = !!div.addEventListener;\n\n\t// Support: IE<9\n\t// Since attributes and properties are the same in IE,\n\t// cleanData must set properties to undefined rather than use removeAttribute\n\tdiv[ jQuery.expando ] = 1;\n\tsupport.attributes = !div.getAttribute( jQuery.expando );\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\n\tarea: [ 1, \"<map>\", \"</map>\" ],\n\n\t// Support: IE8\n\tparam: [ 1, \"<object>\", \"</object>\" ],\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t// unless wrapped in a div with non-breaking characters in front of it.\n\t_default: support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\" ]\n};\n\n// Support: IE8-IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\tvar elems, elem,\n\t\ti = 0,\n\t\tfound = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t\tundefined;\n\n\tif ( !found ) {\n\t\tfor ( found = [], elems = context.childNodes || context;\n\t\t\t( elem = elems[ i ] ) != null;\n\t\t\ti++\n\t\t) {\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\n\t\t\t\tfound.push( elem );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], found ) :\n\t\tfound;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\tjQuery._data(\n\t\t\telem,\n\t\t\t\"globalEval\",\n\t\t\t!refElements || jQuery._data( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/,\n\trtbody = /<tbody/i;\n\nfunction fixDefaultChecked( elem ) {\n\tif ( rcheckableType.test( elem.type ) ) {\n\t\telem.defaultChecked = elem.checked;\n\t}\n}\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar j, elem, contains,\n\t\ttmp, tag, tbody, wrap,\n\t\tl = elems.length,\n\n\t\t// Ensure a safe fragment\n\t\tsafe = createSafeFragment( context ),\n\n\t\tnodes = [],\n\t\ti = 0;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || safe.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Manually add leading whitespace removed by IE\n\t\t\t\tif ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\n\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );\n\t\t\t\t}\n\n\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\n\t\t\t\tif ( !support.tbody ) {\n\n\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\n\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\ttmp.firstChild :\n\n\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\n\t\t\t\t\t\twrap[ 1 ] === \"<table>\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\ttmp :\n\t\t\t\t\t\t\t0;\n\n\t\t\t\t\tj = elem && elem.childNodes.length;\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\tif ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), \"tbody\" ) &&\n\t\t\t\t\t\t\t!tbody.childNodes.length ) {\n\n\t\t\t\t\t\t\telem.removeChild( tbody );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Fix #12392 for WebKit and IE > 9\n\t\t\t\ttmp.textContent = \"\";\n\n\t\t\t\t// Fix #12392 for oldIE\n\t\t\t\twhile ( tmp.firstChild ) {\n\t\t\t\t\ttmp.removeChild( tmp.firstChild );\n\t\t\t\t}\n\n\t\t\t\t// Remember the top-level container for proper cleanup\n\t\t\t\ttmp = safe.lastChild;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fix #11356: Clear elements from fragment\n\tif ( tmp ) {\n\t\tsafe.removeChild( tmp );\n\t}\n\n\t// Reset defaultChecked for any radios and checkboxes\n\t// about to be appended to the DOM in IE 6/7 (#8060)\n\tif ( !support.appendChecked ) {\n\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\n\t}\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\ttmp = null;\n\n\treturn safe;\n}\n\n\n( function() {\n\tvar i, eventName,\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)\n\tfor ( i in { submit: true, change: true, focusin: true } ) {\n\t\teventName = \"on\" + i;\n\n\t\tif ( !( support[ i ] = eventName in window ) ) {\n\n\t\t\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n\t\t\tdiv.setAttribute( eventName, \"t\" );\n\t\t\tsupport[ i ] = div.attributes[ eventName ].expando === false;\n\t\t}\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\n\n\nvar rformElems = /^(?:input|select|textarea)$/i,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\t\tvar tmp, events, t, handleObjIn,\n\t\t\tspecial, eventHandle, handleObj,\n\t\t\thandlers, type, namespaces, origType,\n\t\t\telemData = jQuery._data( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" &&\n\t\t\t\t\t( !e || jQuery.event.triggered !== e.type ) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak\n\t\t\t// with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\t\tvar j, handleObj, tmp,\n\t\t\torigCount, t, events,\n\t\t\tspecial, handlers, type,\n\t\t\tnamespaces, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery._removeData( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\tvar handle, ontype, cur,\n\t\t\tbubbleType, special, tmp, i,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tjQuery._data( cur, \"handle\" );\n\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif (\n\t\t\t\t( !special._default ||\n\t\t\t\t special._default.apply( eventPath.pop(), data ) === false\n\t\t\t\t) && acceptData( elem )\n\t\t\t) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem[ type ]();\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\n\t\t\t\t\t}\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\t/* jshint eqeqeq: false */\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\t/* jshint eqeqeq: true */\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Fix target property (#1925)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Support: Safari 6-8+\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\t\tevent.metaKey = !!event.metaKey;\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY fromElement offsetX offsetY \" +\n\t\t\t\"pageX pageY screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar body, eventDoc, doc,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop || body && body.clientTop || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ?\n\t\t\t\t\toriginal.toElement :\n\t\t\t\t\tfromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\n\t\t\t\t\t\t// let .trigger() run the handlers\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\n\t\t\t\t// Previously, `originalEvent: {}` was set here, so stopPropagation call\n\t\t\t\t// would not be triggered on donor event, since in our own\n\t\t\t\t// jQuery.event.stopPropagation function we had a check for existence of\n\t\t\t\t// originalEvent.stopPropagation method, so, consequently it would be a noop.\n\t\t\t\t//\n\t\t\t\t// Guard for simulated events was moved to jQuery.event.stopPropagation function\n\t\t\t\t// since `originalEvent` should point to the original event for the\n\t\t\t\t// constancy with other events and for more focused logic\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\n\t\t// This \"if\" is needed for plain objects\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tvar name = \"on\" + type;\n\n\t\tif ( elem.detachEvent ) {\n\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\n\t\t\t// detachEvent needed property on element, by name of that event,\n\t\t\t// to properly expose it to GC\n\t\t\tif ( typeof elem[ name ] === \"undefined\" ) {\n\t\t\t\telem[ name ] = null;\n\t\t\t}\n\n\t\t\telem.detachEvent( name, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: IE < 9, Android < 4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If preventDefault exists, run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// Support: IE\n\t\t// Otherwise set the returnValue property of the original event to false\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( !e || this.isSimulated ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If stopPropagation exists, run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Set the cancelBubble property of the original event to true\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && e.stopImmediatePropagation ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\n// IE submit delegation\nif ( !support.submit ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ?\n\n\t\t\t\t\t\t// Support: IE <=8\n\t\t\t\t\t\t// We use jQuery.prop instead of elem.form\n\t\t\t\t\t\t// to allow fixing the IE8 delegated submit issue (gh-2332)\n\t\t\t\t\t\t// by 3rd party polyfills/workarounds.\n\t\t\t\t\t\tjQuery.prop( elem, \"form\" ) :\n\t\t\t\t\t\tundefined;\n\n\t\t\t\tif ( form && !jQuery._data( form, \"submit\" ) ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\tevent._submitBubble = true;\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( form, \"submit\", true );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tpostDispatch: function( event ) {\n\n\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\tif ( event._submitBubble ) {\n\t\t\t\tdelete event._submitBubble;\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !support.change ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._justChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._justChanged && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._justChanged = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"change\" ) ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( elem, \"change\", true );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger ||\n\t\t\t\t( elem.type !== \"radio\" && elem.type !== \"checkbox\" ) ) {\n\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn !rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Support: Firefox\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tjQuery._data( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tjQuery._removeData( doc, fix );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery._data( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar rinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n\trnoshimcache = new RegExp( \"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\" ),\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\n\tsafeFragment = createSafeFragment( document ),\n\tfragmentDiv = safeFragment.appendChild( document.createElement( \"div\" ) );\n\n// Support: IE<8\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction fixCloneNodeIssues( src, dest ) {\n\tvar nodeName, e, data;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\n\tif ( !support.noCloneEvent && dest[ jQuery.expando ] ) {\n\t\tdata = jQuery._data( dest );\n\n\t\tfor ( e in data.events ) {\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\n\t\t}\n\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\n\t\tdest.removeAttribute( jQuery.expando );\n\t}\n\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\n\t\tdisableScript( dest ).text = src.text;\n\t\trestoreScript( dest );\n\n\t// IE6-10 improperly clones children of object elements using classid.\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\n\t} else if ( nodeName === \"object\" ) {\n\t\tif ( dest.parentNode ) {\n\t\t\tdest.outerHTML = src.outerHTML;\n\t\t}\n\n\t\t// This path appears unavoidable for IE9. When cloning an object\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\n\t\t// If the src has innerHTML and the destination does not,\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\n\t\tif ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {\n\t\t\tdest.innerHTML = src.innerHTML;\n\t\t}\n\n\t} else if ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\n\t\tdest.defaultChecked = dest.checked = src.checked;\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar first, node, hasScripts,\n\t\tscripts, doc, fragment,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval(\n\t\t\t\t\t\t\t\t( node.text || node.textContent || node.innerHTML || \"\" )\n\t\t\t\t\t\t\t\t\t.replace( rcleanScript, \"\" )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fix #11809: Avoid leaking memory\n\t\t\tfragment = first = null;\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\telems = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = elems[ i ] ) != null; i++ ) {\n\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar destElements, node, clone, i, srcElements,\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\tif ( support.html5Clone || jQuery.isXMLDoc( elem ) ||\n\t\t\t!rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\n\n\t\t\tclone = elem.cloneNode( true );\n\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t} else {\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\n\t\t}\n\n\t\tif ( ( !support.noCloneEvent || !support.noCloneChecked ) &&\n\t\t\t\t( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\t// Fix all IE cloning issues\n\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {\n\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[ i ] ) {\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {\n\t\t\t\t\tcloneCopyEvent( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\tdestElements = srcElements = node = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems, /* internal */ forceAcceptData ) {\n\t\tvar elem, type, id, data,\n\t\t\ti = 0,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tcache = jQuery.cache,\n\t\t\tattributes = support.attributes,\n\t\t\tspecial = jQuery.event.special;\n\n\t\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\tif ( forceAcceptData || acceptData( elem ) ) {\n\n\t\t\t\tid = elem[ internalKey ];\n\t\t\t\tdata = id && cache[ id ];\n\n\t\t\t\tif ( data ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\n\t\t\t\t\tif ( cache[ id ] ) {\n\n\t\t\t\t\t\tdelete cache[ id ];\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes\n\t\t\t\t\t\t// IE creates expando attributes along with the property\n\t\t\t\t\t\t// IE does not have a removeAttribute function on Document nodes\n\t\t\t\t\t\tif ( !attributes && typeof elem.removeAttribute !== \"undefined\" ) {\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\n\n\t\t\t\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telem[ internalKey ] = undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeletedIds.push( id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().append(\n\t\t\t\t\t( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )\n\t\t\t\t);\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\n\t\t\t// Support: IE<9\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\telem.options.length = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn elem.nodeType === 1 ?\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t( support.htmlSerialize || !rnoshimcache.test( value ) ) &&\n\t\t\t\t( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\telem = this[ i ] || {};\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\ti = 0,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: \"block\",\n\t\tBODY: \"block\"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( \"<iframe frameborder='0' width='0' height='0'/>\" ) )\n\t\t\t\t.appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;\n\n\t\t\t// Support: IE\n\t\t\tdoc.write();\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\nvar rmargin = ( /^margin/ );\n\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar documentElement = document.documentElement;\n\n\n\n( function() {\n\tvar pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,\n\t\treliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\tdiv.style.cssText = \"float:left;opacity:.5\";\n\n\t// Support: IE<9\n\t// Make sure that element opacity exists (as opposed to filter)\n\tsupport.opacity = div.style.opacity === \"0.5\";\n\n\t// Verify style float existence\n\t// (IE uses styleFloat instead of cssFloat)\n\tsupport.cssFloat = !!div.style.cssFloat;\n\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"border:0;width:8px;height:0;top:0;left:-9999px;\" +\n\t\t\"padding:0;margin-top:1px;position:absolute\";\n\tdiv.innerHTML = \"\";\n\tcontainer.appendChild( div );\n\n\t// Support: Firefox<29, Android 2.3\n\t// Vendor-prefix box-sizing\n\tsupport.boxSizing = div.style.boxSizing === \"\" || div.style.MozBoxSizing === \"\" ||\n\t\tdiv.style.WebkitBoxSizing === \"\";\n\n\tjQuery.extend( support, {\n\t\treliableHiddenOffsets: function() {\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableHiddenOffsetsVal;\n\t\t},\n\n\t\tboxSizingReliable: function() {\n\n\t\t\t// We're checking for pixelPositionVal here instead of boxSizingReliableVal\n\t\t\t// since that compresses better and they're computed together anyway.\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\n\t\tpixelMarginRight: function() {\n\n\t\t\t// Support: Android 4.0-4.3\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\n\t\tpixelPosition: function() {\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn pixelPositionVal;\n\t\t},\n\n\t\treliableMarginRight: function() {\n\n\t\t\t// Support: Android 2.3\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginRightVal;\n\t\t},\n\n\t\treliableMarginLeft: function() {\n\n\t\t\t// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37\n\t\t\tif ( pixelPositionVal == null ) {\n\t\t\t\tcomputeStyleTests();\n\t\t\t}\n\t\t\treturn reliableMarginLeftVal;\n\t\t}\n\t} );\n\n\tfunction computeStyleTests() {\n\t\tvar contents, divStyle,\n\t\t\tdocumentElement = document.documentElement;\n\n\t\t// Setup\n\t\tdocumentElement.appendChild( container );\n\n\t\tdiv.style.cssText =\n\n\t\t\t// Support: Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\n\t\t// Support: IE<9\n\t\t// Assume reasonable values in the absence of getComputedStyle\n\t\tpixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;\n\t\tpixelMarginRightVal = reliableMarginRightVal = true;\n\n\t\t// Check for getComputedStyle so that this code is not run in IE<9.\n\t\tif ( window.getComputedStyle ) {\n\t\t\tdivStyle = window.getComputedStyle( div );\n\t\t\tpixelPositionVal = ( divStyle || {} ).top !== \"1%\";\n\t\t\treliableMarginLeftVal = ( divStyle || {} ).marginLeft === \"2px\";\n\t\t\tboxSizingReliableVal = ( divStyle || { width: \"4px\" } ).width === \"4px\";\n\n\t\t\t// Support: Android 4.0 - 4.3 only\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\t\tdiv.style.marginRight = \"50%\";\n\t\t\tpixelMarginRightVal = ( divStyle || { marginRight: \"4px\" } ).marginRight === \"4px\";\n\n\t\t\t// Support: Android 2.3 only\n\t\t\t// Div with explicit width and no margin-right incorrectly\n\t\t\t// gets computed margin-right based on width of container (#3333)\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\tcontents = div.appendChild( document.createElement( \"div\" ) );\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\n\t\t\tcontents.style.cssText = div.style.cssText =\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;padding:0\";\n\t\t\tcontents.style.marginRight = contents.style.width = \"0\";\n\t\t\tdiv.style.width = \"1px\";\n\n\t\t\treliableMarginRightVal =\n\t\t\t\t!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );\n\n\t\t\tdiv.removeChild( contents );\n\t\t}\n\n\t\t// Support: IE6-8\n\t\t// First check that getClientRects works as expected\n\t\t// Check if table cells still have offsetWidth/Height when they are set\n\t\t// to display:none and there are still other visible table cells in a\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\n\t\t// determining if an element has been hidden directly using\n\t\t// display:none (it is still safe to use offsets if a parent element is\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\n\t\tdiv.style.display = \"none\";\n\t\treliableHiddenOffsetsVal = div.getClientRects().length === 0;\n\t\tif ( reliableHiddenOffsetsVal ) {\n\t\t\tdiv.style.display = \"\";\n\t\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\n\t\t\tdiv.childNodes[ 0 ].style.borderCollapse = \"separate\";\n\t\t\tcontents = div.getElementsByTagName( \"td\" );\n\t\t\tcontents[ 0 ].style.cssText = \"margin:0;border:0;padding:0;display:none\";\n\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\n\t\t\tif ( reliableHiddenOffsetsVal ) {\n\t\t\t\tcontents[ 0 ].style.display = \"\";\n\t\t\t\tcontents[ 1 ].style.display = \"none\";\n\t\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\n\t\t\t}\n\t\t}\n\n\t\t// Teardown\n\t\tdocumentElement.removeChild( container );\n\t}\n\n} )();\n\n\nvar getStyles, curCSS,\n\trposition = /^(top|right|bottom|left)$/;\n\nif ( window.getComputedStyle ) {\n\tgetStyles = function( elem ) {\n\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\n\tcurCSS = function( elem, name, computed ) {\n\t\tvar width, minWidth, maxWidth, ret,\n\t\t\tstyle = elem.style;\n\n\t\tcomputed = computed || getStyles( elem );\n\n\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\n\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;\n\n\t\t// Support: Opera 12.1x only\n\t\t// Fall back to style even without computed\n\t\t// computed is undefined for elems on document fragments\n\t\tif ( ( ret === \"\" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\tif ( computed ) {\n\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\"\n\t\t\t// instead of \"used value\" for margin-right\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values,\n\t\t\t// but width seems to be reliably pixels\n\t\t\t// this is against the CSSOM draft spec:\n\t\t\t// http://dev.w3.org/csswg/cssom/#resolved-values\n\t\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t\t// Remember the original values\n\t\t\t\twidth = style.width;\n\t\t\t\tminWidth = style.minWidth;\n\t\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\t\tret = computed.width;\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.width = width;\n\t\t\t\tstyle.minWidth = minWidth;\n\t\t\t\tstyle.maxWidth = maxWidth;\n\t\t\t}\n\t\t}\n\n\t\t// Support: IE\n\t\t// IE returns zIndex value as an integer.\n\t\treturn ret === undefined ?\n\t\t\tret :\n\t\t\tret + \"\";\n\t};\n} else if ( documentElement.currentStyle ) {\n\tgetStyles = function( elem ) {\n\t\treturn elem.currentStyle;\n\t};\n\n\tcurCSS = function( elem, name, computed ) {\n\t\tvar left, rs, rsLeft, ret,\n\t\t\tstyle = elem.style;\n\n\t\tcomputed = computed || getStyles( elem );\n\t\tret = computed ? computed[ name ] : undefined;\n\n\t\t// Avoid setting ret to empty string here\n\t\t// so we don't default to auto\n\t\tif ( ret == null && style && style[ name ] ) {\n\t\t\tret = style[ name ];\n\t\t}\n\n\t\t// From the awesome hack by Dean Edwards\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t// If we're not dealing with a regular pixel number\n\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t// but not position css attributes, as those are\n\t\t// proportional to the parent element instead\n\t\t// and we can't measure the parent instead because it\n\t\t// might trigger a \"stacking dolls\" problem\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\tleft = style.left;\n\t\t\trs = elem.runtimeStyle;\n\t\t\trsLeft = rs && rs.left;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = elem.currentStyle.left;\n\t\t\t}\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\n\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.left = left;\n\t\t\tif ( rsLeft ) {\n\t\t\t\trs.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\t// Support: IE\n\t\t// IE returns zIndex value as an integer.\n\t\treturn ret === undefined ?\n\t\t\tret :\n\t\t\tret + \"\" || \"auto\";\n\t};\n}\n\n\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t\tralpha = /alpha\\([^)]*\\)/i,\n\tropacity = /opacity\\s*=\\s*([^)]*)/i,\n\n\t// swappable if display is none or starts with table except\n\t// \"table\", \"table-cell\", or \"table-caption\"\n\t// see here for display values:\n\t// https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trnumsplit = new RegExp( \"^(\" + pnum + \")(.*)$\", \"i\" ),\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style;\n\n\n// return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// check for vendor prefixed names\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] =\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", defaultDisplay( elem.nodeName ) );\n\t\t\t}\n\t\t} else {\n\t\t\thidden = isHidden( elem );\n\n\t\t\tif ( display && display !== \"none\" || !hidden ) {\n\t\t\t\tjQuery._data(\n\t\t\t\t\telem,\n\t\t\t\t\t\"olddisplay\",\n\t\t\t\t\thidden ? display : jQuery.css( elem, \"display\" )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\tvar matches = rnumsplit.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// at this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// at this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// at this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = support.boxSizing &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test( val ) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// we need the check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\n\t\t// normalize float css property\n\t\t\"float\": support.cssFloat ? \"cssFloat\" : \"styleFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set. See: #7116\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === \"number\" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\n\t\t\t// but it would mean to define eight\n\t\t\t// (for every problematic property) identical functions\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\t// Support: IE\n\t\t\t\t// Swallow errors from 'invalid' CSS values (#5509)\n\t\t\t\ttry {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar num, val, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// gets hook for the prefixed version\n\t\t// followed by the unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t//convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\n\t\t\t\t// however, it must have a current display style that would benefit from this\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\t\t\t\t\telem.offsetWidth === 0 ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar styles = extra && getStyles( elem );\n\t\t\treturn setPositiveNumber( elem, value, extra ?\n\t\t\t\taugmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tsupport.boxSizing &&\n\t\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t) : 0\n\t\t\t);\n\t\t}\n\t};\n} );\n\nif ( !support.opacity ) {\n\tjQuery.cssHooks.opacity = {\n\t\tget: function( elem, computed ) {\n\n\t\t\t// IE uses filters for opacity\n\t\t\treturn ropacity.test( ( computed && elem.currentStyle ?\n\t\t\t\telem.currentStyle.filter :\n\t\t\t\telem.style.filter ) || \"\" ) ?\n\t\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\n\t\t\t\t\tcomputed ? \"1\" : \"\";\n\t\t},\n\n\t\tset: function( elem, value ) {\n\t\t\tvar style = elem.style,\n\t\t\t\tcurrentStyle = elem.currentStyle,\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\n\n\t\t\t// IE has trouble with opacity if it does not have layout\n\t\t\t// Force it by setting the zoom level\n\t\t\tstyle.zoom = 1;\n\n\t\t\t// if setting opacity to 1, and no other filters exist -\n\t\t\t// attempt to remove filter attribute #6652\n\t\t\t// if value === \"\", then remove inline opacity #12685\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\n\t\t\t\t\tstyle.removeAttribute ) {\n\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\n\t\t\t\tstyle.removeAttribute( \"filter\" );\n\n\t\t\t\t// if there is no filter style applied in a css rule\n\t\t\t\t// or unset inline opacity, we are done\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// otherwise, set new filter values\n\t\t\tstyle.filter = ralpha.test( filter ) ?\n\t\t\t\tfilter.replace( ralpha, opacity ) :\n\t\t\t\tfilter + \" \" + opacity;\n\t\t}\n\t};\n}\n\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t}\n\t}\n);\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn (\n\t\t\t\tparseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\n\t\t\t\t// Support: IE<=11+\n\t\t\t\t// Running getBoundingClientRect on a disconnected node in IE throws an error\n\t\t\t\t// Support: IE8 only\n\t\t\t\t// getClientRects() errors on disconnected elems\n\t\t\t\t( jQuery.contains( elem.ownerDocument, elem ) ?\n\t\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t0\n\t\t\t\t)\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\n\t\t\t// available and use plain properties where available\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9\n// Panic based approach to setting things on disconnected nodes\n\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\tattrs = { height: type },\n\t\ti = 0;\n\n\t// if we include width, step value is 1 to do all cssExpand values,\n\t// if we don't include width, step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// we're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = jQuery._data( elem, \"fxshow\" );\n\n\t// handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// doing this makes sure that the complete handler will be called\n\t\t\t// before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE does not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\n\t\t// Test default display if display is currently \"none\"\n\t\tcheckDisplay = display === \"none\" ?\n\t\t\tjQuery._data( elem, \"olddisplay\" ) || defaultDisplay( elem.nodeName ) : display;\n\n\t\tif ( checkDisplay === \"inline\" && jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t// inline-level elements accept inline-block;\n\t\t\t// block-level elements need to be inline with layout\n\t\t\tif ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === \"inline\" ) {\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t} else {\n\t\t\t\tstyle.zoom = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tif ( !support.shrinkWrapBlocks() ) {\n\t\t\tanim.always( function() {\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t\t} );\n\t\t}\n\t}\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// If there is dataShow left over from a stopped hide or show\n\t\t\t\t// and we are going to proceed with show, we should pretend to be hidden\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\n\t\t// Any non-fx value stops us from restoring the original display value\n\t\t} else {\n\t\t\tdisplay = undefined;\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = jQuery._data( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done( function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t} );\n\t\t}\n\t\tanim.done( function() {\n\t\t\tvar prop;\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t} );\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\n\t} else if ( ( display === \"none\" ? defaultDisplay( elem.nodeName ) : display ) === \"inline\" ) {\n\t\tstyle.display = display;\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// resolve when we played the last frame\n\t\t\t\t// otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tjQuery.proxy( result.stop, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnotwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\topt.duration in jQuery.fx.speeds ?\n\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = jQuery._data( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// start the next in the queue if the last step wasn't forced\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\n\t\t\t// but only if they were gotoEnd\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = jQuery._data( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ttimers = jQuery.timers,\n\t\ti = 0;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\n\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\twindow.clearInterval( timerId );\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar a,\n\t\tinput = document.createElement( \"input\" ),\n\t\tdiv = document.createElement( \"div\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tdiv.setAttribute( \"className\", \"t\" );\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\n\n\t// Support: Windows Web Apps (WWA)\n\t// `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"checkbox\" );\n\tdiv.appendChild( input );\n\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\n\n\t// First batch of tests.\n\ta.style.cssText = \"top:1px\";\n\n\t// Test setAttribute on camelCase class.\n\t// If it works, we need attrFixes when doing get/setAttribute (ie6/7)\n\tsupport.getSetAttribute = div.className !== \"t\";\n\n\t// Get the style information from getAttribute\n\t// (IE uses .cssText instead)\n\tsupport.style = /top/.test( a.getAttribute( \"style\" ) );\n\n\t// Make sure that URLs aren't manipulated\n\t// (IE normalizes it by default)\n\tsupport.hrefNormalized = a.getAttribute( \"href\" ) === \"/a\";\n\n\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\n\tsupport.checkOn = !!input.value;\n\n\t// Make sure that a selected-by-default option has a working selected property.\n\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\n\tsupport.optSelected = opt.selected;\n\n\t// Tests for enctype support on a form (#6743)\n\tsupport.enctype = !!document.createElement( \"form\" ).enctype;\n\n\t// Make sure that the options inside disabled selects aren't marked as disabled\n\t// (WebKit marks them as disabled)\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE8 only\n\t// Check if we can trust getAttribute(\"value\")\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"value\", \"\" );\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\n\n\t// Check if an input maintains its value after becoming a radio\n\tinput.value = \"t\";\n\tinput.setAttribute( \"type\", \"radio\" );\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar rreturn = /\\r/g,\n\trspaces = /[\\x20\\t\\r\\n\\f]+/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif (\n\t\t\t\t\thooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\n\t\t\t\t\t// handle most common string cases\n\t\t\t\t\tret.replace( rreturn, \"\" ) :\n\n\t\t\t\t\t// handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE10-11+\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) ).replace( rspaces, \" \" );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( support.optDisabled ?\n\t\t\t\t\t\t\t\t!option.disabled :\n\t\t\t\t\t\t\t\toption.getAttribute( \"disabled\" ) === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\tif ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {\n\n\t\t\t\t\t\t// Support: IE6\n\t\t\t\t\t\t// When new option element is added to select box we need to\n\t\t\t\t\t\t// force reflow of newly added node in order to workaround delay\n\t\t\t\t\t\t// of initialization properties\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\toption.selected = optionSet = true;\n\n\t\t\t\t\t\t} catch ( _ ) {\n\n\t\t\t\t\t\t\t// Will be executed only in IE6\n\t\t\t\t\t\t\toption.scrollHeight;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption.selected = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\n\t\t\t\treturn options;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\nvar nodeHook, boolHook,\n\tattrHandle = jQuery.expr.attrHandle,\n\truseDefault = /^(?:checked|selected)$/i,\n\tgetSetAttribute = support.getSetAttribute,\n\tgetSetInput = support.input;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\n\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE8-9\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\t\t\t\t\telem[ propName ] = false;\n\n\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate)\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\n\t\t\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t\t}\n\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\n\t\t\t\t} else {\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\n\t\t\t// IE<8 needs the *property* name\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\n\n\t\t} else {\n\n\t\t\t// Support: IE<9\n\t\t\t// Use defaultChecked and defaultSelected for oldIE\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\t\tvar ret, handle;\n\t\t\tif ( !isXML ) {\n\n\t\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\t\thandle = attrHandle[ name ];\n\t\t\t\tattrHandle[ name ] = ret;\n\t\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t\t\tattrHandle[ name ] = handle;\n\t\t\t}\n\t\t\treturn ret;\n\t\t};\n\t} else {\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\t\tif ( !isXML ) {\n\t\t\t\treturn elem[ jQuery.camelCase( \"default-\" + name ) ] ?\n\t\t\t\t\tname.toLowerCase() :\n\t\t\t\t\tnull;\n\t\t\t}\n\t\t};\n\t}\n} );\n\n// fix oldIE attroperties\nif ( !getSetInput || !getSetAttribute ) {\n\tjQuery.attrHooks.value = {\n\t\tset: function( elem, value, name ) {\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\n\n\t\t\t\t// Does not return so that setAttribute is also used\n\t\t\t\telem.defaultValue = value;\n\t\t\t} else {\n\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\n\t\t\t}\n\t\t}\n\t};\n}\n\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\nif ( !getSetAttribute ) {\n\n\t// Use this for any attribute in IE6/7\n\t// This fixes almost every IE6/7 issue\n\tnodeHook = {\n\t\tset: function( elem, value, name ) {\n\n\t\t\t// Set the existing or create a new attribute node\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( !ret ) {\n\t\t\t\telem.setAttributeNode(\n\t\t\t\t\t( ret = elem.ownerDocument.createAttribute( name ) )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tret.value = value += \"\";\n\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\n\t\t\tif ( name === \"value\" || value === elem.getAttribute( name ) ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t};\n\n\t// Some attributes are constructed with empty-string values when not defined\n\tattrHandle.id = attrHandle.name = attrHandle.coords =\n\t\tfunction( elem, name, isXML ) {\n\t\t\tvar ret;\n\t\t\tif ( !isXML ) {\n\t\t\t\treturn ( ret = elem.getAttributeNode( name ) ) && ret.value !== \"\" ?\n\t\t\t\t\tret.value :\n\t\t\t\t\tnull;\n\t\t\t}\n\t\t};\n\n\t// Fixing value retrieval on a button requires this module\n\tjQuery.valHooks.button = {\n\t\tget: function( elem, name ) {\n\t\t\tvar ret = elem.getAttributeNode( name );\n\t\t\tif ( ret && ret.specified ) {\n\t\t\t\treturn ret.value;\n\t\t\t}\n\t\t},\n\t\tset: nodeHook.set\n\t};\n\n\t// Set contenteditable to false on removals(#10429)\n\t// Setting to empty string throws an error as an invalid value\n\tjQuery.attrHooks.contenteditable = {\n\t\tset: function( elem, value, name ) {\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\n\t\t}\n\t};\n\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\n\t// This is for removals\n\tjQuery.each( [ \"width\", \"height\" ], function( i, name ) {\n\t\tjQuery.attrHooks[ name ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( value === \"\" ) {\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\nif ( !support.style ) {\n\tjQuery.attrHooks.style = {\n\t\tget: function( elem ) {\n\n\t\t\t// Return undefined in the case of empty string\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\n\t\t\t// .cssText, that would destroy case sensitivity in URL's, like in \"background\"\n\t\t\treturn elem.style.cssText || undefined;\n\t\t},\n\t\tset: function( elem, value ) {\n\t\t\treturn ( elem.style.cssText = value + \"\" );\n\t\t}\n\t};\n}\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button|object)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\tname = jQuery.propFix[ name ] || name;\n\t\treturn this.each( function() {\n\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\n\t\t\ttry {\n\t\t\t\tthis[ name ] = undefined;\n\t\t\t\tdelete this[ name ];\n\t\t\t} catch ( e ) {}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Some attributes require a special call on IE\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !support.hrefNormalized ) {\n\n\t// href/src property should get the full normalized URL (#10299/#12915)\n\tjQuery.each( [ \"href\", \"src\" ], function( i, name ) {\n\t\tjQuery.propHooks[ name ] = {\n\t\t\tget: function( elem ) {\n\t\t\t\treturn elem.getAttribute( name, 4 );\n\t\t\t}\n\t\t};\n\t} );\n}\n\n// Support: Safari, IE9+\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n// IE6/7 call enctype encoding\nif ( !support.enctype ) {\n\tjQuery.propFix.enctype = \"encoding\";\n}\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\nfunction getClass( elem ) {\n\treturn jQuery.attr( elem, \"class\" ) || \"\";\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( type === \"string\" ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// store className if set\n\t\t\t\t\tjQuery._data( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tjQuery.attr( this, \"class\",\n\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\"\" :\n\t\t\t\t\tjQuery._data( this, \"__className__\" ) || \"\"\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + getClass( elem ) + \" \" ).replace( rclass, \" \" )\n\t\t\t\t\t.indexOf( className ) > -1\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\njQuery.each( ( \"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\" ).split( \" \" ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\nvar location = window.location;\n\nvar nonce = jQuery.now();\n\nvar rquery = ( /\\?/ );\n\n\n\nvar rvalidtokens = /(,)|(\\[|{)|(}|])|\"(?:[^\"\\\\\\r\\n]|\\\\[\"\\\\\\/bfnrt]|\\\\u[\\da-fA-F]{4})*\"\\s*:?|true|false|null|-?(?!0\\d)\\d+(?:\\.\\d+|)(?:[eE][+-]?\\d+|)/g;\n\njQuery.parseJSON = function( data ) {\n\n\t// Attempt to parse using the native JSON parser first\n\tif ( window.JSON && window.JSON.parse ) {\n\n\t\t// Support: Android 2.3\n\t\t// Workaround failure to string-cast null input\n\t\treturn window.JSON.parse( data + \"\" );\n\t}\n\n\tvar requireNonComma,\n\t\tdepth = null,\n\t\tstr = jQuery.trim( data + \"\" );\n\n\t// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains\n\t// after removing valid tokens\n\treturn str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {\n\n\t\t// Force termination if we see a misplaced comma\n\t\tif ( requireNonComma && comma ) {\n\t\t\tdepth = 0;\n\t\t}\n\n\t\t// Perform no more replacements after returning to outermost depth\n\t\tif ( depth === 0 ) {\n\t\t\treturn token;\n\t\t}\n\n\t\t// Commas must not follow \"[\", \"{\", or \",\"\n\t\trequireNonComma = open || comma;\n\n\t\t// Determine new depth\n\t\t// array/object open (\"[\" or \"{\"): depth += true - false (increment)\n\t\t// array/object close (\"]\" or \"}\"): depth += false - true (decrement)\n\t\t// other cases (\",\" or primitive): depth += true - true (numeric cast)\n\t\tdepth += !close - !open;\n\n\t\t// Remove this token\n\t\treturn \"\";\n\t} ) ) ?\n\t\t( Function( \"return \" + str ) )() :\n\t\tjQuery.error( \"Invalid JSON: \" + data );\n};\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, tmp;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\ttry {\n\t\tif ( window.DOMParser ) { // Standard\n\t\t\ttmp = new window.DOMParser();\n\t\t\txml = tmp.parseFromString( data, \"text/xml\" );\n\t\t} else { // IE\n\t\t\txml = new window.ActiveXObject( \"Microsoft.XMLDOM\" );\n\t\t\txml.async = \"false\";\n\t\t\txml.loadXML( data );\n\t\t}\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\n\t// IE leaves an \\r character at EOL\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trurl = /^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Document location\n\tajaxLocation = location.href,\n\n\t// Segment location into parts\n\tajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType.charAt( 0 ) === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar deep, key,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) { // jscs:ignore requireDotNotation\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar\n\n\t\t\t// Cross-domain detection vars\n\t\t\tparts,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers as string\n\t\t\tresponseHeadersString,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\ttransport,\n\n\t\t\t// Response headers\n\t\t\tresponseHeaders,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" )\n\t\t\t.replace( rhash, \"\" )\n\t\t\t.replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// We extract error from statusText\n\t\t\t\t// then normalize statusText and status for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapAll( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( this[ 0 ] ) {\n\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\n\t\t\t\t\telem = elem.firstChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each( function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t} ).end();\n\t}\n} );\n\n\nfunction getDisplay( elem ) {\n\treturn elem.style && elem.style.display || jQuery.css( elem, \"display\" );\n}\n\nfunction filterHidden( elem ) {\n\n\t// Disconnected elements are considered hidden\n\tif ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {\n\t\treturn true;\n\t}\n\twhile ( elem && elem.nodeType === 1 ) {\n\t\tif ( getDisplay( elem ) === \"none\" || elem.type === \"hidden\" ) {\n\t\t\treturn true;\n\t\t}\n\t\telem = elem.parentNode;\n\t}\n\treturn false;\n}\n\njQuery.expr.filters.hidden = function( elem ) {\n\n\t// Support: Opera <= 12.12\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\treturn support.reliableHiddenOffsets() ?\n\t\t( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&\n\t\t\t!elem.getClientRects().length ) :\n\t\t\tfilterHidden( elem );\n};\n\njQuery.expr.filters.visible = function( elem ) {\n\treturn !jQuery.expr.filters.hidden( elem );\n};\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t} ) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\n// Create the request object\n// (This is still attached to ajaxSettings for backward compatibility)\njQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?\n\n\t// Support: IE6-IE8\n\tfunction() {\n\n\t\t// XHR cannot access local files, always use ActiveX for that case\n\t\tif ( this.isLocal ) {\n\t\t\treturn createActiveXHR();\n\t\t}\n\n\t\t// Support: IE 9-11\n\t\t// IE seems to error on cross-domain PATCH requests when ActiveX XHR\n\t\t// is used. In IE 9+ always use the native XHR.\n\t\t// Note: this condition won't catch Edge as it doesn't define\n\t\t// document.documentMode but it also doesn't support ActiveX so it won't\n\t\t// reach this code.\n\t\tif ( document.documentMode > 8 ) {\n\t\t\treturn createStandardXHR();\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// oldIE XHR does not support non-RFC2616 methods (#13240)\n\t\t// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx\n\t\t// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9\n\t\t// Although this check for six methods instead of eight\n\t\t// since IE also does not support \"trace\" and \"connect\"\n\t\treturn /^(get|post|head|put|delete|options)$/i.test( this.type ) &&\n\t\t\tcreateStandardXHR() || createActiveXHR();\n\t} :\n\n\t// For all other browsers, use the standard XMLHttpRequest object\n\tcreateStandardXHR;\n\nvar xhrId = 0,\n\txhrCallbacks = {},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\n// Support: IE<10\n// Open requests must be manually aborted on unload (#5280)\n// See https://support.microsoft.com/kb/2856746 for more info\nif ( window.attachEvent ) {\n\twindow.attachEvent( \"onunload\", function() {\n\t\tfor ( var key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]( undefined, true );\n\t\t}\n\t} );\n}\n\n// Determine support properties\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nxhrSupported = support.ajax = !!xhrSupported;\n\n// Create transport if the browser can provide an xhr\nif ( xhrSupported ) {\n\n\tjQuery.ajaxTransport( function( options ) {\n\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\n\t\tif ( !options.crossDomain || support.cors ) {\n\n\t\t\tvar callback;\n\n\t\t\treturn {\n\t\t\t\tsend: function( headers, complete ) {\n\t\t\t\t\tvar i,\n\t\t\t\t\t\txhr = options.xhr(),\n\t\t\t\t\t\tid = ++xhrId;\n\n\t\t\t\t\t// Open the socket\n\t\t\t\t\txhr.open(\n\t\t\t\t\t\toptions.type,\n\t\t\t\t\t\toptions.url,\n\t\t\t\t\t\toptions.async,\n\t\t\t\t\t\toptions.username,\n\t\t\t\t\t\toptions.password\n\t\t\t\t\t);\n\n\t\t\t\t\t// Apply custom fields if provided\n\t\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Override mime type if needed\n\t\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t\t}\n\n\t\t\t\t\t// X-Requested-With header\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set headers\n\t\t\t\t\tfor ( i in headers ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE's ActiveXObject throws a 'Type Mismatch' exception when setting\n\t\t\t\t\t\t// request header to a null-value.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// To keep consistent with other XHR implementations, cast the value\n\t\t\t\t\t\t// to string and ignore `undefined`.\n\t\t\t\t\t\tif ( headers[ i ] !== undefined ) {\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] + \"\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// This may raise an exception which is actually\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\txhr.send( ( options.hasContent && options.data ) || null );\n\n\t\t\t\t\t// Listener\n\t\t\t\t\tcallback = function( _, isAbort ) {\n\t\t\t\t\t\tvar status, statusText, responses;\n\n\t\t\t\t\t\t// Was never called and is aborted or complete\n\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\n\n\t\t\t\t\t\t\t// Clean up\n\t\t\t\t\t\t\tdelete xhrCallbacks[ id ];\n\t\t\t\t\t\t\tcallback = undefined;\n\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\n\n\t\t\t\t\t\t\t// Abort manually if needed\n\t\t\t\t\t\t\tif ( isAbort ) {\n\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\n\t\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresponses = {};\n\t\t\t\t\t\t\t\tstatus = xhr.status;\n\n\t\t\t\t\t\t\t\t// Support: IE<10\n\t\t\t\t\t\t\t\t// Accessing binary-data responseText throws an exception\n\t\t\t\t\t\t\t\t// (#11426)\n\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\n\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\n\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\n\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\n\t\t\t\t\t\t\t\t\tstatusText = \"\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\n\n\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\n\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\n\t\t\t\t\t\t\t\t// can do given current implementations)\n\t\t\t\t\t\t\t\tif ( !status && options.isLocal && !options.crossDomain ) {\n\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\n\n\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\n\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\n\t\t\t\t\t\t\t\t\tstatus = 204;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Call complete if needed\n\t\t\t\t\t\tif ( responses ) {\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, xhr.getAllResponseHeaders() );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t// Do send the request\n\t\t\t\t\t// `xhr.send` may raise an exception, but it will be\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\n\t\t\t\t\tif ( !options.async ) {\n\n\t\t\t\t\t\t// If we're in sync mode we fire the callback\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\n\t\t\t\t\t\twindow.setTimeout( callback );\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Register the callback, but delay it in case `xhr.send` throws\n\t\t\t\t\t\t// Add to the list of active xhr callbacks\n\t\t\t\t\t\txhr.onreadystatechange = xhrCallbacks[ id ] = callback;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tabort: function() {\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback( undefined, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} );\n}\n\n// Functions to create xhrs\nfunction createStandardXHR() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n}\n\nfunction createActiveXHR() {\n\ttry {\n\t\treturn new window.ActiveXObject( \"Microsoft.XMLHTTP\" );\n\t} catch ( e ) {}\n}\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and global\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t\ts.global = false;\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\n\t\tvar script,\n\t\t\thead = document.head || jQuery( \"head\" )[ 0 ] || document.documentElement;\n\n\t\treturn {\n\n\t\t\tsend: function( _, callback ) {\n\n\t\t\t\tscript = document.createElement( \"script\" );\n\n\t\t\t\tscript.async = true;\n\n\t\t\t\tif ( s.scriptCharset ) {\n\t\t\t\t\tscript.charset = s.scriptCharset;\n\t\t\t\t}\n\n\t\t\t\tscript.src = s.url;\n\n\t\t\t\t// Attach handlers for all browsers\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\n\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\n\n\t\t\t\t\t\t// Handle memory leak in IE\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\n\n\t\t\t\t\t\t// Remove the script\n\t\t\t\t\t\tif ( script.parentNode ) {\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Dereference the script\n\t\t\t\t\t\tscript = null;\n\n\t\t\t\t\t\t// Callback if not abort\n\t\t\t\t\t\tif ( !isAbort ) {\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( script ) {\n\t\t\t\t\tscript.onload( undefined, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// data: string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\tcontext = context || document;\n\n\tvar parsed = rsingleTag.exec( data ),\n\t\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n// Keep a copy of the old load method\nvar _load = jQuery.fn.load;\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = jQuery.trim( url.slice( off, url.length ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.filters.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ?\n\t\telem :\n\t\telem.nodeType === 9 ?\n\t\t\telem.defaultView || elem.parentWindow :\n\t\t\tfalse;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\tjQuery.inArray( \"auto\", [ curCSSTop, curCSSLeft ] ) > -1;\n\n\t\t// need to be able to calculate position if either top or left\n\t\t// is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\toffset: function( options ) {\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar docElem, win,\n\t\t\tbox = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ],\n\t\t\tdoc = elem && elem.ownerDocument;\n\n\t\tif ( !doc ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure it's not a disconnected DOM node\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box;\n\t\t}\n\n\t\t// If we don't have gBCR, just use 0,0 rather than error\n\t\t// BlackBerry 5, iOS 3 (original iPhone)\n\t\tif ( typeof elem.getBoundingClientRect !== \"undefined\" ) {\n\t\t\tbox = elem.getBoundingClientRect();\n\t\t}\n\t\twin = getWindow( doc );\n\t\treturn {\n\t\t\ttop: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),\n\t\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\n\t\t};\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\tparentOffset = { top: 0, left: 0 },\n\t\t\telem = this[ 0 ];\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n\t\t// because it is its only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\t\t} else {\n\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = /Y/.test( prop );\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? ( prop in win ) ? win[ prop ] :\n\t\t\t\t\twin.document.documentElement[ method ] :\n\t\t\t\t\telem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length, null );\n\t};\n} );\n\n// Support: Safari<7-8+, Chrome<37-44+\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// getComputedStyle returns percent when specified for top/left/bottom/right\n// rather than make the css module depend on the offset module, we just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// if curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\tfunction( defaultExtra, funcName ) {\n\n\t\t// margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only,\n\t\t\t\t\t// but there is currently no good, small way to fix it.\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t} );\n} );\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t}\n} );\n\n// The number of elements contained in the matched element set\njQuery.fn.size = function() {\n\treturn this.length;\n};\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\n\n\n//将jQuery对象局部暴露给layui\nlayui.define(function(exports){\n layui.$ = jQuery;\n exports('jquery', jQuery);\n});\n\nreturn jQuery;\n}));","/**\r\n * layer\r\n * 通用 Web 弹出层组件\r\n */\r\n\r\n;!function(window, undefined){\r\n\"use strict\";\r\n\r\nvar isLayui = window.layui && layui.define;\r\nvar $;\r\nvar win;\r\nvar ready = {\r\n getPath: function(){\r\n var jsPath = document.currentScript ? document.currentScript.src : function(){\r\n var js = document.scripts;\r\n var last = js.length - 1;\r\n var src;\r\n for(var i = last; i > 0; i--){\r\n if(js[i].readyState === 'interactive'){\r\n src = js[i].src;\r\n break;\r\n }\r\n }\r\n return src || js[last].src;\r\n }();\r\n var GLOBAL = window.LAYUI_GLOBAL || {};\r\n return GLOBAL.layer_dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);\r\n }(),\r\n config: {\r\n removeFocus: true\r\n }, \r\n end: {}, \r\n events: {resize: {}}, \r\n minStackIndex: 0,\r\n minStackArr: [],\r\n btn: ['&#x786E;&#x5B9A;', '&#x53D6;&#x6D88;'],\r\n\r\n // 五种原始层模式\r\n type: ['dialog', 'page', 'iframe', 'loading', 'tips'],\r\n \r\n // 获取节点的 style 属性值\r\n getStyle: function(node, name){\r\n var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null);\r\n return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);\r\n },\r\n \r\n // 载入 CSS 依赖\r\n link: function(href, fn, cssname){\r\n // 未设置路径,则不主动加载 css\r\n if(!layer.path) return;\r\n \r\n var head = document.getElementsByTagName(\"head\")[0];\r\n var link = document.createElement('link');\r\n \r\n if(typeof fn === 'string') cssname = fn;\r\n \r\n var app = (cssname || href).replace(/\\.|\\//g, '');\r\n var id = 'layuicss-'+ app;\r\n var STATUS_NAME = 'creating'\r\n var timeout = 0;\r\n \r\n link.rel = 'stylesheet';\r\n link.href = layer.path + href;\r\n link.id = id;\r\n \r\n if(!document.getElementById(id)){\r\n head.appendChild(link);\r\n }\r\n\r\n if(typeof fn !== 'function') return;\r\n\r\n // 轮询 css 是否加载完毕\r\n (function poll(status) {\r\n var delay = 100;\r\n var getLinkElem = document.getElementById(id); // 获取动态插入的 link 元素\r\n \r\n // 如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范\r\n if(++timeout > 10 * 1000 / delay){\r\n return window.console && console.error(app +'.css: Invalid');\r\n }\r\n \r\n // css 加载就绪\r\n if(parseInt(ready.getStyle(getLinkElem, 'width')) === 1989){\r\n // 如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态\r\n if(status === STATUS_NAME) getLinkElem.removeAttribute('lay-status');\r\n // 如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调\r\n getLinkElem.getAttribute('lay-status') === STATUS_NAME ? setTimeout(poll, delay) : fn();\r\n } else {\r\n getLinkElem.setAttribute('lay-status', STATUS_NAME);\r\n setTimeout(function(){\r\n poll(STATUS_NAME);\r\n }, delay);\r\n }\r\n\r\n // parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 1000);\r\n }());\r\n\r\n }\r\n};\r\n\r\n// 默认内置方法。\r\nvar layer = {\r\n v: '3.7.0',\r\n ie: function(){ // ie 版本\r\n var agent = navigator.userAgent.toLowerCase();\r\n return (!!window.ActiveXObject || \"ActiveXObject\" in window) ? (\r\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\r\n ) : false;\r\n }(),\r\n index: (window.layer && window.layer.v) ? 100000 : 0,\r\n path: ready.getPath,\r\n config: function(options, fn){\r\n options = options || {};\r\n layer.cache = ready.config = $.extend({}, ready.config, options);\r\n layer.path = ready.config.path || layer.path;\r\n typeof options.extend === 'string' && (options.extend = [options.extend]);\r\n \r\n // 如果设置了路径,则加载样式\r\n if(ready.config.path) layer.ready();\r\n \r\n if(!options.extend) return this;\r\n \r\n // 加载 css\r\n isLayui \r\n ? layui.addcss('modules/layer/' + options.extend)\r\n : ready.link('css/' + options.extend);\r\n \r\n return this;\r\n },\r\n\r\n // 主体 CSS 等待事件\r\n ready: function(callback){\r\n var cssname = 'layer';\r\n var ver = '';\r\n var path = (isLayui ? 'modules/' : 'css/') + 'layer.css?v='+ layer.v + ver;\r\n \r\n isLayui ? (\r\n layui['layui.all'] \r\n ? (typeof callback === 'function' && callback()) \r\n : layui.addcss(path, callback, cssname)\r\n ) : ready.link(path, callback, cssname);\r\n\r\n return this;\r\n },\r\n \r\n // 各种快捷引用\r\n alert: function(content, options, yes){\r\n var type = typeof options === 'function';\r\n if(type) yes = options;\r\n return layer.open($.extend({\r\n content: content,\r\n yes: yes\r\n }, type ? {} : options));\r\n }, \r\n \r\n confirm: function(content, options, yes, cancel){ \r\n var type = typeof options === 'function';\r\n if(type){\r\n cancel = yes;\r\n yes = options;\r\n }\r\n return layer.open($.extend({\r\n content: content,\r\n btn: ready.btn,\r\n yes: yes,\r\n btn2: cancel\r\n }, type ? {} : options));\r\n },\r\n \r\n msg: function(content, options, end){ // 最常用提示层\r\n var type = typeof options === 'function', rskin = ready.config.skin;\r\n var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';\r\n var anim = doms.anim.length - 1;\r\n if(type) end = options;\r\n return layer.open($.extend({\r\n content: content,\r\n time: 3000,\r\n shade: false,\r\n skin: skin,\r\n title: false,\r\n closeBtn: false,\r\n btn: false,\r\n resize: false,\r\n end: end,\r\n removeFocus: false\r\n }, (type && !ready.config.skin) ? {\r\n skin: skin + ' layui-layer-hui',\r\n anim: anim\r\n } : function(){\r\n options = options || {};\r\n if(options.icon === -1 || options.icon === undefined && !ready.config.skin){\r\n options.skin = skin + ' ' + (options.skin||'layui-layer-hui');\r\n }\r\n return options;\r\n }())); \r\n },\r\n \r\n load: function(icon, options){\r\n return layer.open($.extend({\r\n type: 3,\r\n icon: icon || 0,\r\n resize: false,\r\n shade: 0.01,\r\n removeFocus: false\r\n }, options));\r\n }, \r\n \r\n tips: function(content, follow, options){\r\n return layer.open($.extend({\r\n type: 4,\r\n content: [content, follow],\r\n closeBtn: false,\r\n time: 3000,\r\n shade: false,\r\n resize: false,\r\n fixed: false,\r\n maxWidth: 260,\r\n removeFocus: false\r\n }, options));\r\n }\r\n};\r\n\r\nvar Class = function(setings){ \r\n var that = this, creat = function(){\r\n that.creat();\r\n };\r\n that.index = ++layer.index;\r\n that.config.maxWidth = $(win).width() - 15*2; // 初始最大宽度:当前屏幕宽,左右留 15px 边距\r\n that.config = $.extend({}, that.config, ready.config, setings);\r\n document.body ? creat() : setTimeout(function(){\r\n creat();\r\n }, 30);\r\n};\r\n\r\nClass.pt = Class.prototype;\r\n\r\n// 缓存常用字符\r\nvar doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];\r\n\r\n// 内置动画类\r\ndoms.anim = {\r\n // 旧版动画\r\n 0: 'layer-anim-00', \r\n 1: 'layer-anim-01', \r\n 2: 'layer-anim-02', \r\n 3: 'layer-anim-03', \r\n 4: 'layer-anim-04', \r\n 5: 'layer-anim-05', \r\n 6: 'layer-anim-06',\r\n\r\n // 滑出方向\r\n slideDown: 'layer-anim-slide-down',\r\n slideLeft: 'layer-anim-slide-left',\r\n slideUp: 'layer-anim-slide-up',\r\n slideRight: 'layer-anim-slide-right'\r\n};\r\n\r\ndoms.SHADE = 'layui-layer-shade';\r\ndoms.MOVE = 'layui-layer-move';\r\n\r\n// 默认配置\r\nClass.pt.config = {\r\n type: 0,\r\n shade: 0.3,\r\n fixed: true,\r\n move: doms[1],\r\n title: '&#x4FE1;&#x606F;',\r\n offset: 'auto',\r\n area: 'auto',\r\n closeBtn: 1,\r\n icon: -1,\r\n time: 0, // 0 表示不自动关闭\r\n zIndex: 19891014, \r\n maxWidth: 360,\r\n anim: 0,\r\n isOutAnim: true, // 退出动画\r\n minStack: true, // 最小化堆叠\r\n moveType: 1,\r\n resize: true,\r\n scrollbar: true, // 是否允许浏览器滚动条\r\n tips: 2\r\n};\r\n\r\n// 容器\r\nClass.pt.vessel = function(conType, callback){\r\n var that = this, times = that.index, config = that.config;\r\n var zIndex = config.zIndex + times, titype = typeof config.title === 'object';\r\n var ismax = config.maxmin && (config.type === 1 || config.type === 2);\r\n var titleHTML = (config.title ? '<div class=\"layui-layer-title\" style=\"'+ (titype ? config.title[1] : '') +'\">' \r\n + (titype ? config.title[0] : config.title) \r\n + '</div>' : '');\r\n \r\n config.zIndex = zIndex;\r\n callback([\r\n // 遮罩\r\n config.shade ? ('<div class=\"'+ doms.SHADE +'\" id=\"'+ doms.SHADE + times +'\" times=\"'+ times +'\" style=\"'+ ('z-index:'+ (zIndex-1) +'; ') +'\"></div>') : '',\r\n \r\n // 主体\r\n '<div class=\"'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'\" id=\"'+ doms[0] + times +'\" type=\"'+ ready.type[config.type] +'\" times=\"'+ times +'\" showtime=\"'+ config.time +'\" conType=\"'+ (conType ? 'object' : 'string') +'\" style=\"z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + ';position:'+ (config.fixed ? 'fixed;' : 'absolute;') +'\">'\r\n + (conType && config.type != 2 ? '' : titleHTML)\r\n\r\n // 内容区\r\n + '<div'+ (config.id ? ' id=\"'+ config.id +'\"' : '') +' class=\"layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' : '') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'\">'\r\n // 表情或图标\r\n + function(){\r\n var face = [\r\n 'layui-icon-tips',\r\n 'layui-icon-success',\r\n 'layui-icon-error',\r\n 'layui-icon-question',\r\n 'layui-icon-lock',\r\n 'layui-icon-face-cry',\r\n 'layui-icon-face-smile'\r\n ];\r\n\r\n var additFaceClass;\r\n\r\n // 动画类\r\n var animClass = 'layui-anim layui-anim-rotate layui-anim-loop';\r\n\r\n // 信息框表情\r\n if(config.type == 0 && config.icon !== -1){\r\n // 加载(加载图标)\r\n if(config.icon == 16){\r\n additFaceClass = 'layui-icon layui-icon-loading '+ animClass;\r\n }\r\n return '<i class=\"layui-layer-face layui-icon '+ (\r\n additFaceClass || face[config.icon] || face[0]\r\n ) +'\"></i>';\r\n }\r\n\r\n // 加载层图标\r\n if(config.type == 3){\r\n var type = [\r\n 'layui-icon-loading', \r\n 'layui-icon-loading-1'\r\n ];\r\n // 风格 2\r\n if(config.icon == 2){\r\n return '<div class=\"layui-layer-loading-2 '+ animClass +'\"></div>';\r\n }\r\n return '<i class=\"layui-layer-loading-icon layui-icon '+ (\r\n type[config.icon] || type[0]\r\n )+' '+ animClass +'\"></i>'\r\n }\r\n\r\n return '';\r\n }()\r\n + (config.type == 1 && conType ? '' : (config.content||''))\r\n + '</div>'\r\n\r\n // 右上角按钮\r\n + '<div class=\"layui-layer-setwin\">'+ function(){\r\n var arr = [];\r\n\r\n // 最小化、最大化\r\n if(ismax){\r\n arr.push('<span class=\"layui-layer-min\"></span>');\r\n arr.push('<span class=\"layui-layer-max\"></span>');\r\n }\r\n\r\n // 关闭按钮\r\n if(config.closeBtn){\r\n arr.push('<span class=\"layui-icon layui-icon-close '+ [\r\n doms[7], \r\n doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2'))\r\n ].join(' ') +'\"></span>')\r\n }\r\n\r\n return arr.join('');\r\n }() + '</div>'\r\n\r\n // 底部按钮\r\n + (config.btn ? function(){\r\n var button = '';\r\n typeof config.btn === 'string' && (config.btn = [config.btn]);\r\n for(var i = 0, len = config.btn.length; i < len; i++){\r\n button += '<a class=\"'+ doms[6] +''+ i +'\">'+ config.btn[i] +'</a>'\r\n }\r\n return '<div class=\"'+ function(){\r\n var className = [doms[6]];\r\n if(config.btnAlign) className.push(doms[6] + '-' + config.btnAlign);\r\n return className.join(' ');\r\n }() +'\">'+ button +'</div>'\r\n }() : '')\r\n + (config.resize ? '<span class=\"layui-layer-resize\"></span>' : '')\r\n + '</div>'\r\n ], titleHTML, $('<div class=\"'+ doms.MOVE +'\" id=\"'+ doms.MOVE +'\"></div>'));\r\n return that;\r\n};\r\n\r\n// 创建骨架\r\nClass.pt.creat = function(){\r\n var that = this;\r\n var config = that.config;\r\n var times = that.index, nodeIndex;\r\n var content = config.content;\r\n var conType = typeof content === 'object';\r\n var body = $('body');\r\n \r\n // 若 id 对应的弹层已经存在,则不重新创建\r\n if(config.id && $('.'+ doms[0]).find('#'+ config.id)[0]){\r\n return (function(){\r\n var layero = $('#'+ config.id).closest('.'+ doms[0]);\r\n var index = layero.attr('times');\r\n var options = layero.data('config');\r\n var elemShade = $('#'+ doms.SHADE + index);\r\n \r\n var maxminStatus = layero.data('maxminStatus') || {};\r\n // 若弹层为最小化状态,则点击目标元素时,自动还原\r\n if(maxminStatus === 'min'){\r\n layer.restore(index);\r\n } else if(options.hideOnClose){\r\n elemShade.show();\r\n layero.show();\r\n }\r\n })();\r\n }\r\n\r\n // 是否移除活动元素的焦点\r\n if(config.removeFocus) {\r\n document.activeElement.blur(); // 将原始的聚焦节点失焦\r\n }\r\n\r\n // 初始化 area 属性\r\n if(typeof config.area === 'string'){\r\n config.area = config.area === 'auto' ? ['', ''] : [config.area, ''];\r\n }\r\n \r\n // anim 兼容旧版 shift\r\n if(config.shift){\r\n config.anim = config.shift;\r\n }\r\n \r\n if(layer.ie == 6){\r\n config.fixed = false;\r\n }\r\n \r\n switch(config.type){\r\n case 0:\r\n config.btn = ('btn' in config) ? config.btn : ready.btn[0];\r\n layer.closeAll('dialog');\r\n break;\r\n case 2:\r\n var content = config.content = conType ? config.content : [config.content||'', 'auto'];\r\n config.content = '<iframe scrolling=\"'+ (config.content[1]||'auto') +'\" allowtransparency=\"true\" id=\"'+ doms[4] +''+ times +'\" name=\"'+ doms[4] +''+ times +'\" onload=\"this.className=\\'\\';\" class=\"layui-layer-load\" frameborder=\"0\" src=\"' + config.content[0] + '\"></iframe>';\r\n break;\r\n case 3:\r\n delete config.title;\r\n delete config.closeBtn;\r\n config.icon === -1 && (config.icon === 0);\r\n layer.closeAll('loading');\r\n break;\r\n case 4:\r\n conType || (config.content = [config.content, 'body']);\r\n config.follow = config.content[1];\r\n config.content = config.content[0] + '<i class=\"layui-layer-TipsG\"></i>';\r\n delete config.title;\r\n config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];\r\n config.tipsMore || layer.closeAll('tips');\r\n break;\r\n }\r\n \r\n // 建立容器\r\n that.vessel(conType, function(html, titleHTML, moveElem){\r\n body.append(html[0]);\r\n conType ? function(){\r\n (config.type == 2 || config.type == 4) ? function(){\r\n $('body').append(html[1]);\r\n }() : function(){\r\n if(!content.parents('.'+doms[0])[0]){\r\n content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]);\r\n $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);\r\n }\r\n }();\r\n }() : body.append(html[1]);\r\n $('#'+ doms.MOVE)[0] || body.append(ready.moveElem = moveElem);\r\n \r\n that.layero = $('#'+ doms[0] + times);\r\n that.shadeo = $('#'+ doms.SHADE + times);\r\n \r\n config.scrollbar || ready.setScrollbar(times);\r\n }).auto(times);\r\n \r\n // 遮罩\r\n that.shadeo.css({\r\n 'background-color': config.shade[1] || '#000'\r\n ,'opacity': config.shade[0] || config.shade\r\n });\r\n\r\n config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);\r\n\r\n // 坐标自适应浏览器窗口尺寸\r\n config.type == 4 ? that.tips() : function(){\r\n that.offset()\r\n // 首次弹出时,若 css 尚未加载,则等待 css 加载完毕后,重新设定尺寸\r\n parseInt(ready.getStyle(document.getElementById(doms.MOVE), 'z-index')) || function(){\r\n that.layero.css('visibility', 'hidden');\r\n layer.ready(function(){\r\n that.offset();\r\n that.layero.css('visibility', 'visible');\r\n });\r\n }();\r\n }();\r\n \r\n // 若是固定定位,则跟随 resize 事件来自适应坐标\r\n if(config.fixed){\r\n if(!ready.events.resize[that.index]){\r\n ready.events.resize[that.index] = function(){\r\n that.resize();\r\n };\r\n // 此处 resize 事件不会一直叠加,当关闭弹层时会移除该事件\r\n win.on('resize', ready.events.resize[that.index]);\r\n }\r\n }\r\n \r\n config.time <= 0 || setTimeout(function(){\r\n layer.close(that.index);\r\n }, config.time);\r\n that.move().callback();\r\n \r\n // 为兼容 jQuery3.0 的 css 动画影响元素尺寸计算\r\n if(doms.anim[config.anim]){\r\n var animClass = 'layer-anim '+ doms.anim[config.anim];\r\n that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){\r\n $(this).removeClass(animClass);\r\n });\r\n }\r\n \r\n // 记录配置信息\r\n that.layero.data('config', config);\r\n};\r\n\r\n// 当前实例的 resize 事件\r\nClass.pt.resize = function(){\r\n var that = this;\r\n var config = that.config;\r\n \r\n that.offset();\r\n (/^\\d+%$/.test(config.area[0]) || /^\\d+%$/.test(config.area[1])) && that.auto(that.index);\r\n config.type == 4 && that.tips();\r\n};\r\n\r\n// 自适应\r\nClass.pt.auto = function(index){\r\n var that = this, config = that.config, layero = $('#'+ doms[0] + index);\r\n \r\n if(config.area[0] === '' && config.maxWidth > 0){\r\n // 适配 ie7\r\n if(layer.ie && layer.ie < 8 && config.btn){\r\n layero.width(layero.innerWidth());\r\n }\r\n layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);\r\n }\r\n \r\n var area = [layero.innerWidth(), layero.innerHeight()];\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n var setHeight = function(elem){\r\n elem = layero.find(elem);\r\n elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));\r\n };\r\n\r\n switch(config.type){\r\n case 2: \r\n setHeight('iframe');\r\n break;\r\n default:\r\n if(config.area[1] === ''){\r\n if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){\r\n area[1] = config.maxHeight;\r\n setHeight('.'+doms[5]);\r\n } else if(config.fixed && area[1] >= win.height()){\r\n area[1] = win.height();\r\n setHeight('.'+doms[5]);\r\n }\r\n } else {\r\n setHeight('.'+doms[5]);\r\n }\r\n break;\r\n }\r\n \r\n return that;\r\n};\r\n\r\n// 计算坐标\r\nClass.pt.offset = function(){\r\n var that = this, config = that.config, layero = that.layero;\r\n var area = [layero.outerWidth(), layero.outerHeight()];\r\n var type = typeof config.offset === 'object';\r\n that.offsetTop = (win.height() - area[1])/2;\r\n that.offsetLeft = (win.width() - area[0])/2;\r\n \r\n if(type){\r\n that.offsetTop = config.offset[0];\r\n that.offsetLeft = config.offset[1]||that.offsetLeft;\r\n } else if(config.offset !== 'auto'){\r\n \r\n if(config.offset === 't'){ // 上\r\n that.offsetTop = 0;\r\n } else if(config.offset === 'r'){ // 右\r\n that.offsetLeft = win.width() - area[0];\r\n } else if(config.offset === 'b'){ // 下\r\n that.offsetTop = win.height() - area[1];\r\n } else if(config.offset === 'l'){ // 左\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'lt'){ // 左上\r\n that.offsetTop = 0;\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'lb'){ // 左下\r\n that.offsetTop = win.height() - area[1];\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'rt'){ // 右上\r\n that.offsetTop = 0;\r\n that.offsetLeft = win.width() - area[0];\r\n } else if(config.offset === 'rb'){ // 右下\r\n that.offsetTop = win.height() - area[1];\r\n that.offsetLeft = win.width() - area[0];\r\n } else {\r\n that.offsetTop = config.offset;\r\n }\r\n \r\n }\r\n \r\n if(!config.fixed){\r\n that.offsetTop = /%$/.test(that.offsetTop) ? \r\n win.height()*parseFloat(that.offsetTop)/100\r\n : parseFloat(that.offsetTop);\r\n that.offsetLeft = /%$/.test(that.offsetLeft) ? \r\n win.width()*parseFloat(that.offsetLeft)/100\r\n : parseFloat(that.offsetLeft);\r\n that.offsetTop += win.scrollTop();\r\n that.offsetLeft += win.scrollLeft();\r\n }\r\n \r\n // 最小化窗口时的自适应\r\n if(layero.data('maxminStatus') === 'min'){\r\n that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0);\r\n that.offsetLeft = layero.css('left');\r\n }\r\n\r\n // 设置坐标\r\n layero.css({\r\n top: that.offsetTop, \r\n left: that.offsetLeft\r\n });\r\n};\r\n\r\n// Tips\r\nClass.pt.tips = function(){\r\n var that = this, config = that.config, layero = that.layero;\r\n var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);\r\n if(!follow[0]) follow = $('body');\r\n var goal = {\r\n width: follow.outerWidth(),\r\n height: follow.outerHeight(),\r\n top: follow.offset().top,\r\n left: follow.offset().left\r\n }, tipsG = layero.find('.layui-layer-TipsG');\r\n \r\n var guide = config.tips[0];\r\n config.tips[1] || tipsG.remove();\r\n \r\n goal.autoLeft = function(){\r\n if(goal.left + layArea[0] - win.width() > 0){\r\n goal.tipLeft = goal.left + goal.width - layArea[0];\r\n tipsG.css({right: 12, left: 'auto'});\r\n } else {\r\n goal.tipLeft = goal.left;\r\n }\r\n };\r\n \r\n // 辨别 tips 的方位\r\n // 21 为箭头大小 8*2 + 箭头相对父元素的top偏移 5\r\n goal.where = [function(){ // 上 \r\n goal.autoLeft();\r\n goal.tipTop = goal.top - layArea[1] - 10;\r\n tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);\r\n }, function(){ // 右\r\n goal.tipLeft = goal.left + goal.width + 10;\r\n goal.tipTop = goal.top - (goal.height * 0.75 < 21 ? 21 - goal.height * 0.5 : 0);\r\n goal.tipTop = Math.max(goal.tipTop, 0);\r\n tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]); \r\n }, function(){ // 下\r\n goal.autoLeft();\r\n goal.tipTop = goal.top + goal.height + 10;\r\n tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);\r\n }, function(){ // 左\r\n goal.tipLeft = goal.left - layArea[0] - 10;\r\n goal.tipTop = goal.top - (goal.height * 0.75 < 21 ? 21 - goal.height * 0.5 : 0);\r\n goal.tipTop = Math.max(goal.tipTop, 0);\r\n tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);\r\n }];\r\n goal.where[guide-1]();\r\n \r\n /* 8*2为小三角形占据的空间 */\r\n if(guide === 1){\r\n goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();\r\n } else if(guide === 2){\r\n win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()\r\n } else if(guide === 3){\r\n (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();\r\n } else if(guide === 4){\r\n layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()\r\n }\r\n\r\n layero.find('.'+doms[5]).css({\r\n 'background-color': config.tips[1], \r\n 'padding-right': (config.closeBtn ? '30px' : '')\r\n });\r\n layero.css({\r\n left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0), \r\n top: goal.tipTop - (config.fixed ? win.scrollTop() : 0)\r\n });\r\n}\r\n\r\n// 拖拽层\r\nClass.pt.move = function(){\r\n var that = this;\r\n var config = that.config;\r\n var _DOC = $(document);\r\n var layero = that.layero;\r\n var DATA_NAME = ['LAY_MOVE_DICT', 'LAY_RESIZE_DICT'];\r\n var moveElem = layero.find(config.move);\r\n var resizeElem = layero.find('.layui-layer-resize');\r\n \r\n // 给指定元素添加拖动光标\r\n if(config.move) moveElem.css('cursor', 'move');\r\n \r\n // 按下拖动元素\r\n moveElem.on('mousedown', function(e){\r\n if (e.button) {return;} // 不是左键不处理\r\n var othis = $(this);\r\n var dict = {};\r\n \r\n if(config.move){\r\n dict.layero = layero;\r\n dict.config = config;\r\n dict.offset = [\r\n e.clientX - parseFloat(layero.css('left')),\r\n e.clientY - parseFloat(layero.css('top'))\r\n ];\r\n \r\n othis.data(DATA_NAME[0], dict);\r\n ready.eventMoveElem = othis;\r\n ready.moveElem.css('cursor', 'move').show();\r\n }\r\n \r\n e.preventDefault();\r\n });\r\n \r\n // 按下右下角拉伸\r\n resizeElem.on('mousedown', function(e){\r\n var othis = $(this);\r\n var dict = {};\r\n \r\n if(config.resize){\r\n dict.layero = layero;\r\n dict.config = config;\r\n dict.offset = [e.clientX, e.clientY];\r\n dict.index = that.index;\r\n dict.area = [\r\n layero.outerWidth()\r\n ,layero.outerHeight()\r\n ];\r\n \r\n othis.data(DATA_NAME[1], dict);\r\n ready.eventResizeElem = othis;\r\n ready.moveElem.css('cursor', 'se-resize').show();\r\n }\r\n \r\n e.preventDefault();\r\n });\r\n \r\n // 拖动元素,避免多次调用实例造成事件叠加\r\n if(ready.docEvent) return that;\r\n _DOC.on('mousemove', function(e){\r\n // 拖拽移动\r\n if(ready.eventMoveElem){\r\n var dict = ready.eventMoveElem.data(DATA_NAME[0]) || {}\r\n ,layero = dict.layero\r\n ,config = dict.config;\r\n \r\n var X = e.clientX - dict.offset[0];\r\n var Y = e.clientY - dict.offset[1];\r\n var fixed = layero.css('position') === 'fixed';\r\n \r\n e.preventDefault();\r\n \r\n dict.stX = fixed ? 0 : win.scrollLeft();\r\n dict.stY = fixed ? 0 : win.scrollTop();\r\n\r\n // 控制元素不被拖出窗口外\r\n if(!config.moveOut){\r\n var setRig = win.width() - layero.outerWidth() + dict.stX;\r\n var setBot = win.height() - layero.outerHeight() + dict.stY; \r\n X < dict.stX && (X = dict.stX);\r\n X > setRig && (X = setRig); \r\n Y < dict.stY && (Y = dict.stY);\r\n Y > setBot && (Y = setBot);\r\n }\r\n \r\n // 拖动时跟随鼠标位置\r\n layero.css({\r\n left: X,\r\n top: Y\r\n });\r\n }\r\n \r\n // Resize\r\n if(ready.eventResizeElem){\r\n var dict = ready.eventResizeElem.data(DATA_NAME[1]) || {};\r\n var config = dict.config;\r\n \r\n var X = e.clientX - dict.offset[0];\r\n var Y = e.clientY - dict.offset[1];\r\n \r\n e.preventDefault();\r\n \r\n // 拉伸宽高\r\n layer.style(dict.index, {\r\n width: dict.area[0] + X\r\n ,height: dict.area[1] + Y\r\n });\r\n \r\n config.resizing && config.resizing(dict.layero);\r\n }\r\n }).on('mouseup', function(e){\r\n if(ready.eventMoveElem){\r\n var dict = ready.eventMoveElem.data(DATA_NAME[0]) || {};\r\n var config = dict.config;\r\n \r\n ready.eventMoveElem.removeData(DATA_NAME[0]);\r\n delete ready.eventMoveElem;\r\n ready.moveElem.hide();\r\n config.moveEnd && config.moveEnd(dict.layero);\r\n }\r\n if(ready.eventResizeElem){\r\n ready.eventResizeElem.removeData(DATA_NAME[1]);\r\n delete ready.eventResizeElem;\r\n ready.moveElem.hide();\r\n }\r\n });\r\n \r\n ready.docEvent = true; // 已给 document 执行全局事件\r\n return that;\r\n};\r\n\r\nClass.pt.callback = function(){\r\n var that = this, layero = that.layero, config = that.config;\r\n that.openLayer();\r\n if(config.success){\r\n if(config.type == 2){\r\n layero.find('iframe').on('load', function(){\r\n config.success(layero, that.index, that);\r\n });\r\n } else {\r\n config.success(layero, that.index, that);\r\n }\r\n }\r\n layer.ie == 6 && that.IE6(layero);\r\n \r\n // 按钮\r\n layero.find('.'+ doms[6]).children('a').on('click', function(){\r\n var index = $(this).index();\r\n if(index === 0){\r\n if(config.yes){\r\n config.yes(that.index, layero, that);\r\n } else if(config['btn1']){\r\n config['btn1'](that.index, layero, that);\r\n } else {\r\n layer.close(that.index);\r\n }\r\n } else {\r\n var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero, that);\r\n close === false || layer.close(that.index);\r\n }\r\n });\r\n \r\n // 取消\r\n function cancel(){\r\n var close = config.cancel && config.cancel(that.index, layero, that);\r\n close === false || layer.close(that.index);\r\n }\r\n \r\n // 右上角关闭回调\r\n layero.find('.'+ doms[7]).on('click', cancel);\r\n \r\n // 点遮罩关闭\r\n if(config.shadeClose){\r\n that.shadeo.on('click', function(){\r\n layer.close(that.index);\r\n });\r\n } \r\n \r\n // 最小化\r\n layero.find('.layui-layer-min').on('click', function(){\r\n var min = config.min && config.min(layero, that.index, that);\r\n min === false || layer.min(that.index, config);\r\n });\r\n \r\n // 全屏/还原\r\n layero.find('.layui-layer-max').on('click', function(){\r\n if($(this).hasClass('layui-layer-maxmin')){\r\n layer.restore(that.index);\r\n config.restore && config.restore(layero, that.index, that);\r\n } else {\r\n layer.full(that.index, config);\r\n setTimeout(function(){\r\n config.full && config.full(layero, that.index, that);\r\n }, 100);\r\n }\r\n });\r\n\r\n config.end && (ready.end[that.index] = config.end);\r\n};\r\n\r\n// for ie6 恢复 select\r\nready.reselect = function(){\r\n $.each($('select'), function(index , value){\r\n var sthis = $(this);\r\n if(!sthis.parents('.'+doms[0])[0]){\r\n (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show(); \r\n }\r\n sthis = null;\r\n });\r\n}; \r\n\r\nClass.pt.IE6 = function(layero){\r\n // 隐藏select\r\n $('select').each(function(index , value){\r\n var sthis = $(this);\r\n if(!sthis.parents('.'+doms[0])[0]){\r\n sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();\r\n }\r\n sthis = null;\r\n });\r\n};\r\n\r\n// 需依赖原型的对外方法\r\nClass.pt.openLayer = function(){\r\n var that = this;\r\n \r\n // 置顶当前窗口\r\n layer.zIndex = that.config.zIndex;\r\n layer.setTop = function(layero){\r\n var setZindex = function(){\r\n layer.zIndex++;\r\n layero.css('z-index', layer.zIndex + 1);\r\n };\r\n layer.zIndex = parseInt(layero[0].style.zIndex);\r\n layero.on('mousedown', setZindex);\r\n return layer.zIndex;\r\n };\r\n};\r\n\r\n// 记录宽高坐标,用于还原\r\nready.record = function(layero){\r\n if(!layero[0]) return window.console && console.error('index error');\r\n var area = [\r\n layero[0].style.width || layero.width(),\r\n layero[0].style.height || layero.height(),\r\n layero.position().top, \r\n layero.position().left + parseFloat(layero.css('margin-left'))\r\n ];\r\n layero.find('.layui-layer-max').addClass('layui-layer-maxmin');\r\n layero.attr({area: area});\r\n};\r\n\r\n// 设置页面滚动条\r\nready.setScrollbar = function(index){\r\n doms.html.css('overflow', 'hidden').attr('layer-full', index);\r\n};\r\n\r\n// 恢复页面滚动条\r\nready.restScrollbar = function(index){\r\n if(doms.html.attr('layer-full') == index){\r\n doms.html[0].style[doms.html[0].style.removeProperty \r\n ? 'removeProperty' \r\n : 'removeAttribute']('overflow');\r\n doms.html.removeAttr('layer-full');\r\n }\r\n};\r\n\r\n/** 内置成员 */\r\n\r\nwindow.layer = layer;\r\n\r\n// 获取子 iframe 的 DOM\r\nlayer.getChildFrame = function(selector, index){\r\n index = index || $('.'+doms[4]).attr('times');\r\n return $('#'+ doms[0] + index).find('iframe').contents().find(selector); \r\n};\r\n\r\n// 得到当前 iframe 层的索引,子 iframe 时使用\r\nlayer.getFrameIndex = function(name){\r\n return $('#'+ name).parents('.'+doms[4]).attr('times');\r\n};\r\n\r\n// iframe 层自适应宽高\r\nlayer.iframeAuto = function(index){\r\n if(!index) return;\r\n var heg = layer.getChildFrame('html', index).outerHeight();\r\n var layero = $('#'+ doms[0] + index);\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n layero.css({height: heg + titHeight + btnHeight});\r\n layero.find('iframe').css({height: heg});\r\n};\r\n\r\n// 重置 iframe url\r\nlayer.iframeSrc = function(index, url){\r\n $('#'+ doms[0] + index).find('iframe').attr('src', url);\r\n};\r\n\r\n// 设定层的样式\r\nlayer.style = function(index, options, limit){\r\n var layero = $('#'+ doms[0] + index);\r\n var contElem = layero.find('.layui-layer-content');\r\n var type = layero.attr('type');\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n var minLeft = layero.attr('minLeft');\r\n \r\n // loading 和 tips 层不允许更改\r\n if(type === ready.type[3] || type === ready.type[4]){\r\n return;\r\n }\r\n \r\n if(!limit){\r\n if(parseFloat(options.width) <= 260){\r\n options.width = 260;\r\n }\r\n \r\n if(parseFloat(options.height) - titHeight - btnHeight <= 64){\r\n options.height = 64 + titHeight + btnHeight;\r\n }\r\n }\r\n layero.css(options);\r\n btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n \r\n if(type === ready.type[2]){\r\n layero.find('iframe').css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n });\r\n } else {\r\n contElem.css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n - parseFloat(contElem.css('padding-top'))\r\n - parseFloat(contElem.css('padding-bottom'))\r\n })\r\n }\r\n};\r\n\r\n// 最小化\r\nlayer.min = function(index, options){\r\n var layero = $('#'+ doms[0] + index);\r\n var maxminStatus = layero.data('maxminStatus');\r\n\r\n if(maxminStatus === 'min') return; // 当前的状态是否已经是最小化\r\n if(maxminStatus === 'max') layer.restore(index); // 若当前为最大化,则先还原后再最小化\r\n\r\n layero.data('maxminStatus', 'min');\r\n options = options || layero.data('config') || {};\r\n\r\n var shadeo = $('#'+ doms.SHADE + index);\r\n var elemMin = layero.find('.layui-layer-min');\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var minLeft = layero.attr('minLeft'); // 最小化时的横坐标\r\n var hasMinLeft = typeof minLeft === 'string'; // 是否已经赋值过最小化坐标\r\n var left = hasMinLeft ? minLeft : (181*ready.minStackIndex)+'px';\r\n var position = layero.css('position');\r\n var minWidth = 180; // 最小化时的宽度\r\n var settings = {\r\n width: minWidth\r\n ,height: titHeight\r\n ,position: 'fixed'\r\n ,overflow: 'hidden'\r\n };\r\n\r\n ready.record(layero); // 记录当前尺寸、坐标,用于还原\r\n\r\n // 简易最小化补位\r\n if(ready.minStackArr.length > 0){\r\n left = ready.minStackArr[0];\r\n ready.minStackArr.shift();\r\n }\r\n\r\n // left 是否超出边界\r\n if(parseFloat(left) + minWidth > win.width()){\r\n left = win.width() - minWidth - function(){\r\n ready.minStackArr.edgeIndex = ready.minStackArr.edgeIndex || 0;\r\n return ready.minStackArr.edgeIndex += 3;\r\n }();\r\n if(left < 0) left = 0;\r\n }\r\n \r\n // 是否堆叠在左下角\r\n if(options.minStack){\r\n settings.left = left;\r\n settings.top = win.height() - titHeight;\r\n hasMinLeft || ready.minStackIndex++; // 若未赋值过最小化坐标,则最小化操作索引自增\r\n layero.attr('minLeft', left);\r\n }\r\n \r\n layero.attr('position', position);\r\n layer.style(index, settings, true);\r\n\r\n elemMin.hide();\r\n layero.attr('type') === 'page' && layero.find(doms[4]).hide();\r\n ready.restScrollbar(index);\r\n\r\n // 隐藏遮罩\r\n shadeo.hide();\r\n};\r\n\r\n// 还原\r\nlayer.restore = function(index){\r\n var layero = $('#'+ doms[0] + index);\r\n var shadeo = $('#'+ doms.SHADE + index);\r\n var area = layero.attr('area').split(',');\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n\r\n layero.removeData('maxminStatus'); // 移除最大最小状态\r\n \r\n // 恢复原来尺寸\r\n layer.style(index, {\r\n width: area[0], // 数值或百分比\r\n height: area[1],\r\n top: parseFloat(area[2]),\r\n left: parseFloat(area[3]),\r\n position: layero.attr('position'),\r\n overflow: 'visible'\r\n }, true);\r\n \r\n layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');\r\n layero.find('.layui-layer-min').show();\r\n type === 'page' && layero.find(doms[4]).show();\r\n\r\n // 恢复页面滚动条弹层打开时的状态\r\n options.scrollbar ? ready.restScrollbar(index) : ready.setScrollbar(index);\r\n \r\n // 恢复遮罩\r\n shadeo.show();\r\n // ready.events.resize[index](); // ?\r\n};\r\n\r\n// 全屏(最大化)\r\nlayer.full = function(index){\r\n var layero = $('#'+ doms[0] + index);\r\n var maxminStatus = layero.data('maxminStatus');\r\n\r\n if(maxminStatus === 'max') return // 检查当前的状态是否已经是最大化\r\n if(maxminStatus === 'min') layer.restore(index); // 若当前为最小化,则先还原后再最大化\r\n\r\n layero.data('maxminStatus', 'max');\r\n ready.record(layero); // 记录当前尺寸、坐标\r\n\r\n if(!doms.html.attr('layer-full')){\r\n ready.setScrollbar(index);\r\n }\r\n\r\n setTimeout(function(){\r\n var isfix = layero.css('position') === 'fixed';\r\n layer.style(index, {\r\n top: isfix ? 0 : win.scrollTop(),\r\n left: isfix ? 0 : win.scrollLeft(),\r\n width: '100%',\r\n height: '100%'\r\n }, true);\r\n layero.find('.layui-layer-min').hide();\r\n }, 100);\r\n};\r\n\r\n// 改变 title\r\nlayer.title = function(name, index){\r\n var title = $('#'+ doms[0] + (index || layer.index)).find(doms[1]);\r\n title.html(name);\r\n};\r\n\r\n// 关闭 layer 总方法\r\nlayer.close = function(index, callback){\r\n var layero = function(){\r\n var closest = $('.'+ doms[0]).children('#'+ index).closest('.'+ doms[0]);\r\n return closest[0] ? (\r\n index = closest.attr('times'),\r\n closest\r\n ) : $('#'+ doms[0] + index)\r\n }();\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n var hideOnClose = options.id && options.hideOnClose; // 是否关闭时移除弹层容器\r\n\r\n if(!layero[0]) return;\r\n\r\n // 关闭动画\r\n var closeAnim = ({\r\n slideDown: 'layer-anim-slide-down-out',\r\n slideLeft: 'layer-anim-slide-left-out',\r\n slideUp: 'layer-anim-slide-up-out',\r\n slideRight: 'layer-anim-slide-right-out'\r\n })[options.anim] || 'layer-anim-close';\r\n\r\n // 移除主容器\r\n var remove = function(){\r\n var WRAP = 'layui-layer-wrap';\r\n\r\n // 是否关闭时隐藏弹层容器\r\n if(hideOnClose){\r\n layero.removeClass('layer-anim '+ closeAnim);\r\n return layero.hide();\r\n }\r\n\r\n // 是否为页面捕获层\r\n if(type === ready.type[1] && layero.attr('conType') === 'object'){\r\n layero.children(':not(.'+ doms[5] +')').remove();\r\n var wrap = layero.find('.'+WRAP);\r\n for(var i = 0; i < 2; i++){\r\n wrap.unwrap();\r\n }\r\n wrap.css('display', wrap.data('display')).removeClass(WRAP);\r\n } else {\r\n // 低版本 IE 回收 iframe\r\n if(type === ready.type[2]){\r\n try {\r\n var iframe = $('#'+ doms[4] + index)[0];\r\n iframe.contentWindow.document.write('');\r\n iframe.contentWindow.close();\r\n layero.find('.'+doms[5])[0].removeChild(iframe);\r\n } catch(e){}\r\n }\r\n layero[0].innerHTML = '';\r\n layero.remove();\r\n }\r\n\r\n typeof ready.end[index] === 'function' && ready.end[index]();\r\n delete ready.end[index];\r\n typeof callback === 'function' && callback();\r\n\r\n // 移除 reisze 事件\r\n if(ready.events.resize[index]){\r\n win.off('resize', ready.events.resize[index]);\r\n delete ready.events.resize[index];\r\n }\r\n };\r\n // 移除遮罩\r\n var removeShade = (function fn(){\r\n $('#'+ doms.SHADE + index)[\r\n hideOnClose ? 'hide' : 'remove'\r\n ]();\r\n })();\r\n \r\n // 是否允许关闭动画\r\n if(options.isOutAnim){\r\n layero.addClass('layer-anim '+ closeAnim);\r\n }\r\n \r\n layer.ie == 6 && ready.reselect();\r\n ready.restScrollbar(index); \r\n \r\n // 记住被关闭层的最小化堆叠坐标\r\n if(typeof layero.attr('minLeft') === 'string'){\r\n ready.minStackIndex--;\r\n ready.minStackArr.push(layero.attr('minLeft'));\r\n }\r\n \r\n if((layer.ie && layer.ie < 10) || !options.isOutAnim){\r\n remove()\r\n } else {\r\n setTimeout(function(){\r\n remove();\r\n }, 200);\r\n }\r\n};\r\n\r\n// 关闭所有层\r\nlayer.closeAll = function(type, callback){\r\n if(typeof type === 'function'){\r\n callback = type;\r\n type = null;\r\n }\r\n var domsElem = $('.'+doms[0]);\r\n $.each(domsElem, function(_index){\r\n var othis = $(this);\r\n var is = type ? (othis.attr('type') === type) : 1;\r\n is && layer.close(othis.attr('times'), _index === domsElem.length - 1 ? callback : null);\r\n is = null;\r\n });\r\n if(domsElem.length === 0) typeof callback === 'function' && callback();\r\n};\r\n\r\n// 根据弹层类型关闭最近打开的层\r\nlayer.closeLast = function(type, callback){\r\n type = type || 'page';\r\n layer.close($('.layui-layer-'+ type +':last').attr(\"times\"), callback);\r\n};\r\n\r\n\r\n/*\r\n * 拓展模块layui 开始合并在一起\r\n */\r\n\r\n\r\nvar cache = layer.cache || {};\r\nvar skin = function(type){\r\n return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');\r\n}; \r\n \r\n// 仿系统 prompt\r\nlayer.prompt = function(options, yes){\r\n var style = '', placeholder = '';\r\n options = options || {};\r\n \r\n if(typeof options === 'function') yes = options;\r\n \r\n if(options.area){\r\n var area = options.area;\r\n style = 'style=\"width: '+ area[0] +'; height: '+ area[1] + ';\"';\r\n delete options.area;\r\n }\r\n if (options.placeholder) {\r\n placeholder = ' placeholder=\"' + options.placeholder + '\"';\r\n }\r\n var prompt, content = options.formType == 2 ? '<textarea class=\"layui-layer-input\"' + style + placeholder + '></textarea>' : function () {\r\n return '<input type=\"' + (options.formType == 1 ? 'password' : 'text') + '\" class=\"layui-layer-input\"' + placeholder + '>';\r\n }();\r\n \r\n var success = options.success;\r\n delete options.success;\r\n \r\n return layer.open($.extend({\r\n type: 1,\r\n btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;'],\r\n content: content,\r\n skin: 'layui-layer-prompt' + skin('prompt'),\r\n maxWidth: win.width(),\r\n success: function(layero){\r\n prompt = layero.find('.layui-layer-input');\r\n prompt.val(options.value || '').focus();\r\n typeof success === 'function' && success(layero);\r\n },\r\n resize: false,\r\n yes: function(index){\r\n var value = prompt.val();\r\n if(value.length > (options.maxlength||500)) {\r\n layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});\r\n } else {\r\n yes && yes(value, index, prompt);\r\n }\r\n }\r\n }, options));\r\n};\r\n\r\n// tab 层\r\nlayer.tab = function(options){\r\n options = options || {};\r\n \r\n var tab = options.tab || {};\r\n var THIS = 'layui-this';\r\n var success = options.success;\r\n \r\n delete options.success;\r\n \r\n return layer.open($.extend({\r\n type: 1,\r\n skin: 'layui-layer-tab' + skin('tab'),\r\n resize: false,\r\n title: function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = '<span class=\"'+ THIS +'\">'+ tab[0].title +'</span>';\r\n for(; ii < len; ii++){\r\n str += '<span>'+ tab[ii].title +'</span>';\r\n }\r\n }\r\n return str;\r\n }(),\r\n content: '<ul class=\"layui-layer-tabmain\">'+ function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = '<li class=\"layui-layer-tabli '+ THIS +'\">'+ (tab[0].content || 'no content') +'</li>';\r\n for(; ii < len; ii++){\r\n str += '<li class=\"layui-layer-tabli\">'+ (tab[ii].content || 'no content') +'</li>';\r\n }\r\n }\r\n return str;\r\n }() +'</ul>',\r\n success: function(layero){\r\n var btn = layero.find('.layui-layer-title').children();\r\n var main = layero.find('.layui-layer-tabmain').children();\r\n btn.on('mousedown', function(e){\r\n e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;\r\n var othis = $(this), index = othis.index();\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n main.eq(index).show().siblings().hide();\r\n typeof options.change === 'function' && options.change(index);\r\n });\r\n typeof success === 'function' && success(layero);\r\n }\r\n }, options));\r\n};\r\n\r\n// 图片层\r\nlayer.photos = function(options, loop, key){\r\n var dict = {};\r\n\r\n // 默认属性\r\n options = $.extend(true, {\r\n toolbar: true,\r\n footer: true\r\n }, options);\r\n\r\n if(!options.photos) return;\r\n \r\n // 若 photos 并非选择器或 jQuery 对象,则为普通 object\r\n var isObject = !(typeof options.photos === 'string' || options.photos instanceof $);\r\n var photos = isObject ? options.photos : {};\r\n var data = photos.data || [];\r\n var start = photos.start || 0;\r\n var success = options.success;\r\n \r\n dict.imgIndex = (start|0) + 1;\r\n options.img = options.img || 'img';\r\n delete options.success;\r\n \r\n // 若 options.photos 不是一个对象\r\n if(!isObject){ // 页面直接获取\r\n var parent = $(options.photos), pushData = function(){\r\n data = [];\r\n parent.find(options.img).each(function(index){\r\n var othis = $(this);\r\n othis.attr('layer-index', index);\r\n data.push({\r\n alt: othis.attr('alt'),\r\n pid: othis.attr('layer-pid'),\r\n src: othis.attr('lay-src') || othis.attr('layer-src') || othis.attr('src'),\r\n thumb: othis.attr('src')\r\n });\r\n });\r\n };\r\n \r\n pushData();\r\n \r\n if (data.length === 0) return;\r\n \r\n loop || parent.on('click', options.img, function(){\r\n pushData();\r\n var othis = $(this), index = othis.attr('layer-index'); \r\n layer.photos($.extend(options, {\r\n photos: {\r\n start: index,\r\n data: data,\r\n tab: options.tab\r\n },\r\n full: options.full\r\n }), true);\r\n });\r\n \r\n // 不直接弹出\r\n if (!loop) return;\r\n } else if (data.length === 0){\r\n return layer.msg('&#x6CA1;&#x6709;&#x56FE;&#x7247;');\r\n }\r\n \r\n // 上一张\r\n dict.imgprev = function(key){\r\n dict.imgIndex--;\r\n if(dict.imgIndex < 1){\r\n dict.imgIndex = data.length;\r\n }\r\n dict.tabimg(key);\r\n };\r\n \r\n // 下一张\r\n dict.imgnext = function(key,errorMsg){\r\n dict.imgIndex++;\r\n if(dict.imgIndex > data.length){\r\n dict.imgIndex = 1;\r\n if (errorMsg) {return}\r\n }\r\n dict.tabimg(key)\r\n };\r\n \r\n // 方向键\r\n dict.keyup = function(event){\r\n if(!dict.end){\r\n var code = event.keyCode;\r\n event.preventDefault();\r\n if(code === 37){\r\n dict.imgprev(true);\r\n } else if(code === 39) {\r\n dict.imgnext(true);\r\n } else if(code === 27) {\r\n layer.close(dict.index);\r\n }\r\n }\r\n }\r\n \r\n // 切换\r\n dict.tabimg = function(key){\r\n if(data.length <= 1) return;\r\n photos.start = dict.imgIndex - 1;\r\n layer.close(dict.index);\r\n return layer.photos(options, true, key);\r\n }\r\n\r\n dict.isNumber = function (n) {\r\n return typeof n === 'number' && !isNaN(n);\r\n }\r\n\r\n dict.image = {};\r\n\r\n dict.getTransform = function(opts){\r\n var transforms = [];\r\n var rotate = opts.rotate;\r\n var scaleX = opts.scaleX;\r\n var scale = opts.scale;\r\n\r\n if (dict.isNumber(rotate) && rotate !== 0) {\r\n transforms.push('rotate(' + rotate + 'deg)');\r\n }\r\n\r\n if (dict.isNumber(scaleX) && scaleX !== 1) {\r\n transforms.push('scaleX(' + scaleX + ')');\r\n }\r\n\r\n if (dict.isNumber(scale)) {\r\n transforms.push('scale(' + scale + ')');\r\n }\r\n\r\n return transforms.length ? transforms.join(' ') : 'none';\r\n }\r\n \r\n // 一些动作\r\n dict.event = function(layero, index, that){\r\n // 上一张\r\n dict.main.find('.layui-layer-photos-prev').on('click', function(event){\r\n event.preventDefault();\r\n dict.imgprev(true);\r\n }); \r\n \r\n // 下一张\r\n dict.main.find('.layui-layer-photos-next').on('click', function(event){\r\n event.preventDefault();\r\n dict.imgnext(true);\r\n });\r\n \r\n $(document).on('keyup', dict.keyup);\r\n\r\n // 头部工具栏事件\r\n layero.off('click').on('click','*[toolbar-event]', function () {\r\n var othis = $(this);\r\n var event = othis.attr('toolbar-event');\r\n switch (event) {\r\n case 'rotate':\r\n dict.image.rotate = ((dict.image.rotate || 0) + Number(othis.attr('data-option'))) % 360;\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'scalex':\r\n dict.image.scaleX = dict.image.scaleX === -1 ? 1 : -1;\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'zoom':\r\n var ratio = Number(othis.attr('data-option'));\r\n dict.image.scale = (dict.image.scale || 1) + ratio;\r\n // 缩小状态最小值\r\n if (ratio < 0 && dict.image.scale < 0 - ratio) {\r\n dict.image.scale = 0 - ratio;\r\n }\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'reset':\r\n dict.image.scaleX = 1;\r\n dict.image.scale = 1;\r\n dict.image.rotate = 0;\r\n dict.imgElem.css({\r\n transform: 'none'\r\n });\r\n break;\r\n case 'close':\r\n layer.close(index);\r\n break;\r\n }\r\n that.offset();\r\n that.auto(index);\r\n });\r\n \r\n // 鼠标滚轮缩放图片事件\r\n dict.main.on('mousewheel DOMMouseScroll', function(e) {\r\n var delta = e.originalEvent.wheelDelta || -e.originalEvent.detail;\r\n var zoomElem = dict.main.find('[toolbar-event=\"zoom\"]');\r\n if (delta > 0) {\r\n zoomElem.eq(0).trigger('click');\r\n } else {\r\n zoomElem.eq(1).trigger('click');\r\n }\r\n e.preventDefault();\r\n });\r\n\r\n };\r\n \r\n // 图片预加载\r\n function loadImage(url, callback, error) { \r\n var img = new Image();\r\n img.src = url; \r\n if(img.complete){\r\n return callback(img);\r\n }\r\n img.onload = function(){\r\n img.onload = null;\r\n callback(img);\r\n };\r\n img.onerror = function(e){\r\n img.onerror = null;\r\n error(e);\r\n }; \r\n }\r\n \r\n dict.loadi = layer.load(1, {\r\n shade: 'shade' in options ? false : 0.9,\r\n scrollbar: false\r\n });\r\n\r\n loadImage(data[start].src, function(img){\r\n layer.close(dict.loadi);\r\n \r\n var alt = data[start].alt || '';\r\n\r\n // 切换图片时不出现动画\r\n if(key) options.anim = -1;\r\n \r\n // 弹出图片层\r\n dict.index = layer.open($.extend({\r\n type: 1,\r\n id: 'layui-layer-photos',\r\n area: function(){\r\n var imgarea = [img.width, img.height];\r\n var winarea = [$(window).width() - 100, $(window).height() - 100];\r\n \r\n // 若实际图片的宽或者高比 屏幕大(那么进行缩放)\r\n if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){\r\n var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];// 取宽度缩放比例、高度缩放比例\r\n if(wh[0] > wh[1]){// 取缩放比例最大的进行缩放\r\n imgarea[0] = imgarea[0]/wh[0];\r\n imgarea[1] = imgarea[1]/wh[0];\r\n } else if(wh[0] < wh[1]){\r\n imgarea[0] = imgarea[0]/wh[1];\r\n imgarea[1] = imgarea[1]/wh[1];\r\n }\r\n }\r\n\r\n return [imgarea[0]+'px', imgarea[1]+'px']; \r\n }(),\r\n title: false,\r\n shade: 0.9,\r\n shadeClose: true,\r\n closeBtn: false,\r\n move: '.layer-layer-photos-main img',\r\n moveType: 1,\r\n scrollbar: false,\r\n moveOut: true,\r\n anim: 5,\r\n isOutAnim: false,\r\n skin: 'layui-layer-photos' + skin('photos'),\r\n content: '<div class=\"layer-layer-photos-main\">'\r\n + '<img src=\"'+ data[start].src +'\" alt=\"'+ alt +'\" layer-pid=\"'+ (data[start].pid || '') +'\">'\r\n + function(){\r\n var arr = ['<div class=\"layui-layer-photos-pointer\">'];\r\n\r\n // 左右箭头翻页\r\n if (data.length > 1) {\r\n arr.push(['<div class=\"layer-layer-photos-page\">',\r\n '<span class=\"layui-icon layui-icon-left layui-layer-photos-prev\"></span>',\r\n '<span class=\"layui-icon layui-icon-right layui-layer-photos-next\"></span>',\r\n '</div>'].join(''));\r\n }\r\n\r\n // 头部工具栏\r\n if (options.toolbar) {\r\n arr.push([\r\n '<div class=\"layui-layer-photos-toolbar layui-layer-photos-header\">',\r\n '<span toolbar-event=\"rotate\" data-option=\"90\" title=\"旋转\"><i class=\"layui-icon layui-icon-refresh\"></i></span>',\r\n '<span toolbar-event=\"scalex\" title=\"变换\"><i class=\"layui-icon layui-icon-slider\"></i></span>',\r\n '<span toolbar-event=\"zoom\" data-option=\"0.1\" title=\"放大\"><i class=\"layui-icon layui-icon-add-circle\"></i></span>',\r\n '<span toolbar-event=\"zoom\" data-option=\"-0.1\" title=\"缩小\"><i class=\"layui-icon layui-icon-reduce-circle\"></i></span>',\r\n '<span toolbar-event=\"reset\" title=\"还原\"><i class=\"layui-icon layui-icon-refresh-1\"></i></span>',\r\n '<span toolbar-event=\"close\" title=\"关闭\"><i class=\"layui-icon layui-icon-close\"></i></span>',\r\n '</div>'\r\n ].join(''));\r\n }\r\n\r\n // 底部栏\r\n if (options.footer) {\r\n arr.push(['<div class=\"layui-layer-photos-toolbar layui-layer-photos-footer\">',\r\n '<h3>'+ alt +'</h3>',\r\n '<em>'+ dict.imgIndex +' / '+ data.length +'</em>',\r\n '<a href=\"'+ data[start].src +'\" target=\"_blank\">查看原图</a>',\r\n '</div>'].join(''));\r\n }\r\n\r\n arr.push('</div>');\r\n return arr.join('');\r\n }()\r\n +'</div>',\r\n success: function(layero, index, that){\r\n dict.main = layero.find('.layer-layer-photos-main');\r\n dict.footer = layero.find('.layui-layer-photos-footer');\r\n dict.imgElem = dict.main.children('img');\r\n dict.event(layero, index, that);\r\n options.tab && options.tab(data[start], layero);\r\n typeof success === 'function' && success(layero);\r\n }, end: function(){\r\n dict.end = true;\r\n $(document).off('keyup', dict.keyup);\r\n }\r\n }, options));\r\n }, function(){\r\n layer.close(dict.loadi);\r\n layer.msg('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {\r\n time: 30000, \r\n btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'], \r\n yes: function(){\r\n data.length > 1 && dict.imgnext(true,true);\r\n }\r\n });\r\n });\r\n};\r\n\r\n// 主入口\r\nready.run = function(_$){\r\n $ = _$;\r\n win = $(window);\r\n \r\n // 移动端兼容性处理\r\n // https://gitee.com/layui/layui/issues/I81WGC\r\n // https://github.com/jquery/jquery/issues/1729\r\n var agent = navigator.userAgent.toLowerCase();\r\n var isMobile = /android|iphone|ipod|ipad|ios/.test(agent)\r\n var _win = $(window);\r\n if(isMobile){\r\n $.each({Height: \"height\", Width: \"width\"}, function(propSuffix, funcName){\r\n var propName = 'inner' + propSuffix;\r\n win[funcName] = function(){\r\n return propName in window \r\n ? window[propName]\r\n : _win[funcName]()\r\n }\r\n })\r\n }\r\n doms.html = $('html');\r\n layer.open = function(deliver){\r\n var o = new Class(deliver);\r\n return o.index;\r\n };\r\n};\r\n\r\n// 加载方式\r\nwindow.layui && layui.define ? (\r\n layer.ready(),\r\n layui.define('jquery', function(exports){ // layui\r\n layer.path = layui.cache.dir;\r\n ready.run(layui.$);\r\n\r\n // export api\r\n window.layer = layer;\r\n exports('layer', layer);\r\n })\r\n) : (\r\n (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ // requirejs\r\n ready.run(window.jQuery);\r\n return layer;\r\n }) : function(){ // 普通 script 标签引入\r\n layer.ready();\r\n ready.run(window.jQuery);\r\n }()\r\n);\r\n\r\n}(window);\r\n","/**\n * util 工具组件\n */\n\nlayui.define('jquery', function(exports){\n \"use strict\";\n\n var $ = layui.$;\n var hint = layui.hint();\n\n // 外部接口\n var util = {\n // 固定块\n fixbar: function(options){\n var ELEM = 'layui-fixbar';\n var $doc = $(document);\n\n // 默认可选项\n options = $.extend(true, {\n target: 'body', // fixbar 的插入目标选择器\n bars: [], // bar 信息\n \"default\": true, // 是否显示默认 bar\n margin: 160, // 出现 top bar 的滚动条高度临界值\n duration: 320 // top bar 等动画时长(毫秒)\n }, options);\n\n // 目标元素对象\n var $target = $(options.target);\n\n // 滚动条所在元素对象\n var $scroll = options.scroll\n ? $(options.scroll)\n : $(options.target === 'body' ? $doc : $target)\n\n // 是否提供默认图标\n if(options['default']){\n // 兼容旧版本的一些属性\n if(options.bar1){\n options.bars.push({\n type: 'bar1',\n icon: 'layui-icon-chat'\n });\n }\n if(options.bar2){\n options.bars.push({\n type: 'bar2',\n icon: 'layui-icon-help'\n });\n }\n // 默认 top bar\n options.bars.push({\n type: 'top',\n icon: 'layui-icon-top'\n });\n }\n\n var elem = $('<ul>').addClass(ELEM);\n var elemTopBar;\n\n // 遍历生成 bars 节点\n layui.each(options.bars, function(i, item){\n var elemBar = $('<li class=\"layui-icon\">');\n\n // 设置 bar 相关属性\n elemBar.addClass(item.icon).attr({\n 'lay-type': item.type,\n 'style': item.style || (options.bgcolor ? 'background-color: '+ options.bgcolor : '')\n }).html(item.content);\n\n // bar 点击事件\n elemBar.on('click', function(){\n var type = $(this).attr('lay-type');\n if(type === 'top'){\n (\n options.target === 'body'\n ? $('html,body')\n : $scroll\n ).animate({\n scrollTop : 0\n }, options.duration);\n }\n typeof options.click === 'function' && options.click.call(this, type);\n });\n\n // 自定义任意事件\n if(layui.type(options.on) === 'object'){\n layui.each(options.on, function(eventName, callback){\n elemBar.on(eventName, function(){\n var type = $(this).attr('lay-type');\n typeof callback === 'function' && callback.call(this, type);\n });\n })\n }\n\n // 获得 top bar 节点\n if(item.type === 'top'){\n elemBar.addClass('layui-fixbar-top');\n elemTopBar = elemBar;\n }\n\n elem.append(elemBar); // 插入 bar 节点\n });\n\n // 若目标元素已存在 fixbar则移除旧的节点\n $target.find('.'+ ELEM).remove();\n\n // 向目标元素插入 fixbar 节点\n typeof options.css === 'object' && elem.css(options.css);\n $target.append(elem);\n\n // top bar 的显示隐藏\n if(elemTopBar){\n var lock;\n var setTopBar = (function setTopBar(){\n var top = $scroll.scrollTop();\n if(top >= options.margin){\n lock || (elemTopBar.show(), lock = 1);\n } else {\n lock && (elemTopBar.hide(), lock = 0);\n }\n return setTopBar;\n })();\n }\n\n // 根据 scrollbar 设置 fixbar 相关状态\n var timer;\n $scroll.on('scroll', function(){\n if(!setTopBar) return;\n clearTimeout(timer);\n timer = setTimeout(function(){\n setTopBar();\n }, 100);\n });\n },\n\n // 倒计时\n countdown: function(options){\n var that = this;\n\n // 默认可选项\n options = $.extend(true, {\n date: new Date(),\n now: new Date()\n }, options);\n\n // 兼容旧版参数\n var args = arguments;\n if(args.length > 1){\n options.date = new Date(args[0]);\n options.now = new Date(args[1]);\n options.clock = args[2];\n }\n\n // 实例对象\n var inst = {\n options: options,\n clear: function(){ // 清除计时器\n clearTimeout(inst.timer);\n },\n reload: function(opts){ // 重置倒计时\n this.clear();\n $.extend(true, this.options, {\n now: new Date()\n }, opts);\n count();\n }\n };\n\n typeof options.ready === 'function' && options.ready();\n\n // 计算倒计时\n var count = (function fn(){\n var date = new Date(options.date);\n var now = new Date(options.now);\n var countTime = function(time){\n return time > 0 ? time : 0;\n }(date.getTime() - now.getTime());\n var result = {\n d: Math.floor(countTime/(1000*60*60*24)), // 天\n h: Math.floor(countTime/(1000*60*60)) % 24, // 时\n m: Math.floor(countTime/(1000*60)) % 60, // 分\n s: Math.floor(countTime/1000) % 60 // 秒\n };\n var next = function(){\n now.setTime(now.getTime() + 1000);\n options.now = now;\n count();\n };\n\n // 兼容旧版返回值\n if(args.length > 1) result = [result.d,result.h,result.m,result.s]\n\n // 计时 - 以秒间隔\n inst.timer = setTimeout(next, 1000);\n typeof options.clock === 'function' && options.clock(result, inst);\n\n // 计时完成\n if(countTime <= 0){\n clearTimeout(inst.timer);\n typeof options.done === 'function' && options.done(result, inst);\n }\n\n return fn;\n })();\n\n return inst;\n },\n\n // 某个时间在当前时间的多久前\n timeAgo: function(time, onlyDate){\n var that = this;\n var arr = [[], []];\n var stamp = new Date().getTime() - new Date(time).getTime();\n\n // 返回具体日期\n if(stamp > 1000*60*60*24*31){\n stamp = new Date(time);\n arr[0][0] = that.digit(stamp.getFullYear(), 4);\n arr[0][1] = that.digit(stamp.getMonth() + 1);\n arr[0][2] = that.digit(stamp.getDate());\n\n // 是否输出时间\n if(!onlyDate){\n arr[1][0] = that.digit(stamp.getHours());\n arr[1][1] = that.digit(stamp.getMinutes());\n arr[1][2] = that.digit(stamp.getSeconds());\n }\n return arr[0].join('-') + ' ' + arr[1].join(':');\n }\n\n // 30 天以内,返回「多久前」\n if(stamp >= 1000*60*60*24){\n return ((stamp/1000/60/60/24)|0) + ' 天前';\n } else if(stamp >= 1000*60*60){\n return ((stamp/1000/60/60)|0) + ' 小时前';\n } else if(stamp >= 1000*60*3){ // 3 分钟以内为:刚刚\n return ((stamp/1000/60)|0) + ' 分钟前';\n } else if(stamp < 0){\n return '未来';\n } else {\n return '刚刚';\n }\n },\n\n // 数字前置补零\n digit: function(num, length){\n var str = '';\n num = String(num);\n length = length || 2;\n for(var i = num.length; i < length; i++){\n str += '0';\n }\n return num < Math.pow(10, length) ? str + (num|0) : num;\n },\n\n // 转化为日期格式字符\n toDateString: function(time, format, options){\n // 若 null 或空字符,则返回空字符\n if(time === null || time === '') return '';\n\n // 引用自 dayjs\n // https://github.com/iamkun/dayjs/blob/v1.11.9/src/constant.js#L30\n var REGEX_FORMAT = /\\[([^\\]]+)]|y{1,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|SSS/g;\n var that = this;\n var date = new Date(function(){\n if(!time) return;\n return isNaN(time) ? time : (typeof time === 'string' ? parseInt(time) : time)\n }() || new Date())\n\n if(!date.getDate()) return hint.error('Invalid millisecond for \"util.toDateString(millisecond)\"'), '';\n\n var years = date.getFullYear();\n var month = date.getMonth();\n var days = date.getDate();\n var hours = date.getHours();\n var minutes = date.getMinutes();\n var seconds = date.getSeconds();\n var milliseconds = date.getMilliseconds();\n\n var defaultMeridiem = function(hours, minutes){\n var hm = hours * 100 + minutes;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1100) {\n return '上午';\n } else if (hm < 1300) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n }\n return '晚上';\n };\n\n var meridiem = (options && options.customMeridiem) || defaultMeridiem;\n\n var matches = {\n yy: function(){return String(years).slice(-2);},\n yyyy: function(){return that.digit(years, 4);},\n M: function(){return String(month + 1);},\n MM: function(){return that.digit(month + 1);},\n d: function(){return String(days);},\n dd: function(){return that.digit(days);},\n H: function(){return String(hours);},\n HH: function(){return that.digit(hours);},\n h: function(){return String(hours % 12 || 12);},\n hh: function(){return that.digit(hours % 12 || 12);},\n A: function(){return meridiem(hours, minutes);},\n m: function(){return String(minutes);},\n mm: function(){return that.digit(minutes);},\n s: function(){return String(seconds);},\n ss: function(){return that.digit(seconds);},\n SSS: function(){return that.digit(milliseconds, 3);}\n }\n\n format = format || 'yyyy-MM-dd HH:mm:ss';\n\n return format.replace(REGEX_FORMAT, function(match, $1) {\n return $1 || (matches[match] && matches[match]()) || match;\n });\n },\n\n // 转义 html\n escape: function(html){\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\n if(html === undefined || html === null) return '';\n\n html += '';\n if(!exp.test(html)) return html;\n\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&amp;')\n .replace(/</g, '&lt;').replace(/>/g, '&gt;')\n .replace(/'/g, '&#39;').replace(/\"/g, '&quot;');\n },\n\n // 还原转义的 html\n unescape: function(html){\n if(html === undefined || html === null) html = '';\n html += '';\n\n return html.replace(/\\&amp;/g, '&')\n .replace(/\\&lt;/g, '<').replace(/\\&gt;/g, '>')\n .replace(/\\&#39;/g, '\\'').replace(/\\&quot;/g, '\"');\n },\n\n // 打开新窗口\n openWin: function(options){\n var win;\n options = options || {};\n win = options.window || window.open((options.url || ''), options.target, options.specs);\n if(options.url) return;\n win.document.open('text/html', 'replace');\n win.document.write(options.content || '');\n win.document.close();\n },\n\n // 让指定的元素保持在可视区域\n toVisibleArea: function(options){\n options = $.extend({\n margin: 160, // 触发动作的边界值\n duration: 200, // 动画持续毫秒数\n type: 'y' // 触发方向x 水平、y 垂直\n }, options);\n\n if(!options.scrollElem[0] || !options.thisElem[0]) return;\n\n var scrollElem = options.scrollElem // 滚动元素\n var thisElem = options.thisElem // 目标元素\n var vertical = options.type === 'y' // 是否垂直方向\n var SCROLL_NAME = vertical ? 'scrollTop' : 'scrollLeft' // 滚动方法\n var OFFSET_NAME = vertical ? 'top' : 'left' // 坐标方式\n var scrollValue = scrollElem[SCROLL_NAME]() // 当前滚动距离\n var size = scrollElem[vertical ? 'height' : 'width']() // 滚动元素的尺寸\n var scrollOffset = scrollElem.offset()[OFFSET_NAME] // 滚动元素所处位置\n var thisOffset = thisElem.offset()[OFFSET_NAME] - scrollOffset // 目标元素当前的所在位置\n var obj = {};\n\n // 边界满足条件\n if(thisOffset > size - options.margin || thisOffset < options.margin){\n obj[SCROLL_NAME] = thisOffset - size/2 + scrollValue\n scrollElem.animate(obj, options.duration);\n }\n },\n\n /**\n * 批量事件\n * @param {string} [attr=\"lay-on\"] - 触发事件的元素属性名\n * @param {Object.<string, Function>} events - 事件集合\n * @param {Object} [options] - 参数的更多选项\n * @param {(string|HTMLElement|JQuery)} [options.elem=\"body\"] - 触发事件的委托元素\n * @param {string} [options.trigger=\"click\"] - 事件触发的方式\n * @returns {Object} 返回当前 events 参数设置的事件集合\n */\n on: function(attr, events, options) {\n // 若参数一为 object 类型,则为事件集,且省略 attr\n if (typeof attr === 'object') {\n options = events || {};\n events = attr;\n attr = options.attr || 'lay-on'; // 默认属性名\n }\n\n // 更多选项\n options = $.extend({\n elem: 'body',\n trigger: 'click'\n }, typeof options === 'object' ? options : {\n trigger: options // 兼容旧版\n });\n\n var elem = options.elem = $(options.elem);\n var attrSelector = '['+ attr +']';\n var DATANAME = 'UTIL_ON_DATA'; // 缓存在委托元素上的 data-* 属性名\n\n if (!elem[0]) return; // 若委托元素不存在\n\n // 初始化 data 默认值,以委托元素为存储单元\n if (!elem.data(DATANAME)) {\n elem.data(DATANAME, {\n events: {},\n callbacks: {}\n });\n }\n\n // 读取 data 缓存\n var dataCache = elem.data(DATANAME);\n var callbacks = dataCache.callbacks;\n\n // 根据 attr 记录事件集合\n events = dataCache.events[attr] = $.extend(true, dataCache.events[attr], events);\n\n // 清除事件委托,避免重复绑定\n elem.off(options.trigger, attrSelector, callbacks[attr]);\n\n // 绑定事件委托\n elem.on(\n options.trigger,\n attrSelector,\n callbacks[attr] = function(e) {\n var othis = $(this);\n var key = othis.attr(attr);\n typeof events[key] === 'function' && events[key].call(this, othis, e);\n }\n );\n\n return events;\n }\n };\n\n // 兼容旧版\n util.event = util.on;\n\n // 输出接口\n exports('util', util);\n});\n","/**\r\n * dropdown \r\n * 下拉菜单组件\r\n */\r\n\r\nlayui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var laytpl = layui.laytpl;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n var clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown');\r\n \r\n // 模块名\r\n var MOD_NAME = 'dropdown';\r\n var MOD_INDEX = 'layui_'+ MOD_NAME +'_index'; // 模块索引名\r\n\r\n // 外部接口\r\n var dropdown = {\r\n config: {\r\n customName: { // 自定义 data 字段名\r\n id: 'id',\r\n title: 'title',\r\n children: 'child'\r\n }\r\n },\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n reloadData: function(options){\r\n dropdown.reloadData(id, options);\r\n },\r\n close: function () {\r\n that.remove()\r\n }\r\n }\r\n };\r\n\r\n // 字符常量\r\n var STR_ELEM = 'layui-dropdown';\r\n var STR_HIDE = 'layui-hide';\r\n var STR_DISABLED = 'layui-disabled';\r\n var STR_NONE = 'layui-none';\r\n var STR_ITEM_UP = 'layui-menu-item-up';\r\n var STR_ITEM_DOWN = 'layui-menu-item-down';\r\n var STR_MENU_TITLE = 'layui-menu-body-title';\r\n var STR_ITEM_GROUP = 'layui-menu-item-group';\r\n var STR_ITEM_PARENT = 'layui-menu-item-parent';\r\n var STR_ITEM_DIV = 'layui-menu-item-divider';\r\n var STR_ITEM_CHECKED = 'layui-menu-item-checked';\r\n var STR_ITEM_CHECKED2 = 'layui-menu-item-checked2';\r\n var STR_MENU_PANEL = 'layui-menu-body-panel';\r\n var STR_MENU_PANEL_L = 'layui-menu-body-panel-left';\r\n var STR_ELEM_SHADE = 'layui-dropdown-shade';\r\n \r\n var STR_GROUP_TITLE = '.'+ STR_ITEM_GROUP + '>.'+ STR_MENU_TITLE;\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++dropdown.index;\r\n that.config = $.extend({}, that.config, dropdown.config, options);\r\n that.init();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n trigger: 'click', // 事件类型\r\n content: '', // 自定义菜单内容\r\n className: '', // 自定义样式类名\r\n style: '', // 设置面板 style 属性\r\n show: false, // 是否初始即显示菜单面板\r\n isAllowSpread: true, // 是否允许菜单组展开收缩\r\n isSpreadItem: true, // 是否初始展开子菜单\r\n data: [], // 菜单数据结构\r\n delay: 300, // 延迟关闭的毫秒数,若 trigger 为 hover 时才生效\r\n shade: 0, // 遮罩\r\n accordion: false // 手风琴效果,仅菜单组生效。基础菜单需要在容器上追加 'lay-accordion' 属性。\r\n };\r\n \r\n // 重载实例\r\n Class.prototype.reload = function(options, type){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.init(true, type);\r\n };\r\n\r\n // 初始化准备\r\n Class.prototype.init = function(rerender, type){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n dropdown.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n // 若重复执行 render则视为 reload 处理\r\n if(!rerender && elem[0] && elem.data(MOD_INDEX)){\r\n var newThat = thisModule.getThis(elem.data(MOD_INDEX));\r\n if(!newThat) return;\r\n\r\n return newThat.reload(options, type);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n \r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 初始化自定义字段名\r\n options.customName = $.extend({}, dropdown.config.customName, options.customName);\r\n\r\n if(options.show || (type === 'reloadData' && that.elemView && $('body').find(that.elemView.get(0)).length)) that.render(rerender, type); //初始即显示或者面板弹出之后执行了刷新数据\r\n that.events(); // 事件\r\n };\r\n \r\n // 渲染\r\n Class.prototype.render = function(rerender, type){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var elemBody = $('body');\r\n \r\n // 默认菜单内容\r\n var getDefaultView = function(){\r\n var elemUl = $('<ul class=\"layui-menu layui-dropdown-menu\"></ul>');\r\n if(options.data.length > 0 ){\r\n eachItemView(elemUl, options.data)\r\n } else {\r\n elemUl.html('<li class=\"layui-menu-item-none\">No data</li>');\r\n }\r\n return elemUl;\r\n };\r\n \r\n // 遍历菜单项\r\n var eachItemView = function(views, data){\r\n // var views = [];\r\n\r\n layui.each(data, function(index, item){\r\n // 是否存在子级\r\n var isChild = item[customName.children] && item[customName.children].length > 0;\r\n var isSpreadItem = ('isSpreadItem' in item) ? item.isSpreadItem : options.isSpreadItem\r\n var title = function(title){\r\n var templet = item.templet || options.templet;\r\n if(templet){\r\n title = typeof templet === 'function' \r\n ? templet(item)\r\n : laytpl(templet).render(item);\r\n }\r\n return title;\r\n }(util.escape(item[customName.title]));\r\n \r\n // 初始类型\r\n var type = function(){\r\n if(isChild){\r\n item.type = item.type || 'parent';\r\n }\r\n if(item.type){\r\n return ({\r\n group: 'group'\r\n ,parent: 'parent'\r\n ,'-': '-'\r\n })[item.type] || 'parent';\r\n }\r\n return '';\r\n }();\r\n\r\n if(type !== '-' && (!item[customName.title] && !item[customName.id] && !isChild)) return;\r\n \r\n //列表元素\r\n var viewLi = $(['<li'+ function(){\r\n var className = {\r\n group: 'layui-menu-item-group'+ (\r\n options.isAllowSpread ? (\r\n isSpreadItem ? ' layui-menu-item-down' : ' layui-menu-item-up'\r\n ) : ''\r\n )\r\n ,parent: STR_ITEM_PARENT\r\n ,'-': 'layui-menu-item-divider'\r\n };\r\n if(isChild || type){\r\n return ' class=\"'+ className[type] +'\"';\r\n }\r\n return item.disabled ? ' class=\"'+ STR_DISABLED +'\"' : '';\r\n }() +'>'\r\n \r\n //标题区\r\n ,function(){\r\n //是否超文本\r\n var viewText = ('href' in item) ? (\r\n '<a href=\"'+ item.href +'\" target=\"'+ (item.target || '_self') +'\">'+ title +'</a>'\r\n ) : title;\r\n \r\n //是否存在子级\r\n if(isChild){\r\n return '<div class=\"'+ STR_MENU_TITLE +'\">'+ viewText + function(){\r\n if(type === 'parent'){\r\n return '<i class=\"layui-icon layui-icon-right\"></i>';\r\n } else if(type === 'group' && options.isAllowSpread){\r\n return '<i class=\"layui-icon layui-icon-'+ (isSpreadItem ? 'up' : 'down') +'\"></i>';\r\n } else {\r\n return '';\r\n }\r\n }() +'</div>'\r\n \r\n }\r\n return '<div class=\"'+ STR_MENU_TITLE +'\">'+ viewText +'</div>';\r\n }()\r\n ,'</li>'].join(''));\r\n \r\n viewLi.data('item', item);\r\n \r\n //子级区\r\n if(isChild){\r\n var elemPanel = $('<div class=\"layui-panel layui-menu-body-panel\"></div>');\r\n var elemUl = $('<ul></ul>');\r\n\r\n if(type === 'parent'){\r\n elemPanel.append(eachItemView(elemUl, item[customName.children]));\r\n viewLi.append(elemPanel);\r\n } else {\r\n viewLi.append(eachItemView(elemUl, item[customName.children]));\r\n }\r\n }\r\n\r\n views.append(viewLi);\r\n });\r\n return views;\r\n };\r\n \r\n // 主模板\r\n var TPL_MAIN = ['<div class=\"layui-dropdown layui-border-box layui-panel layui-anim layui-anim-downbit\" lay-id=\"' + options.id + '\">'\r\n ,'</div>'].join('');\r\n \r\n // 如果是右键事件,则每次触发事件时,将允许重新渲染\r\n if(options.trigger === 'contextmenu' || lay.isTopElem(options.elem[0])) rerender = true;\r\n \r\n // 判断是否已经打开了下拉菜单面板\r\n if(!rerender && options.elem.data(MOD_INDEX +'_opened')) return;\r\n\r\n // 记录模板对象\r\n that.elemView = $('.' + STR_ELEM + '[lay-id=\"' + options.id + '\"]');\r\n if (type === 'reloadData' && that.elemView.length) {\r\n that.elemView.html(options.content || getDefaultView());\r\n } else {\r\n that.elemView = $(TPL_MAIN);\r\n that.elemView.append(options.content || getDefaultView());\r\n\r\n // 初始化某些属性\r\n if(options.className) that.elemView.addClass(options.className);\r\n if(options.style) that.elemView.attr('style', options.style);\r\n\r\n // 记录当前执行的实例索引\r\n dropdown.thisId = options.id;\r\n\r\n // 插入视图\r\n that.remove(); // 移除非当前绑定元素的面板\r\n elemBody.append(that.elemView);\r\n options.elem.data(MOD_INDEX +'_opened', true);\r\n\r\n // 遮罩\r\n var shade = options.shade ? ('<div class=\"'+ STR_ELEM_SHADE +'\" style=\"'+ ('z-index:'+ (that.elemView.css('z-index')-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'\"></div>') : '';\r\n that.elemView.before(shade);\r\n\r\n // 如果是鼠标移入事件,则鼠标移出时自动关闭\r\n if(options.trigger === 'mouseenter'){\r\n that.elemView.on('mouseenter', function(){\r\n clearTimeout(thisModule.timer);\r\n }).on('mouseleave', function(){\r\n that.delayRemove();\r\n });\r\n }\r\n }\r\n\r\n // 坐标定位\r\n that.position();\r\n thisModule.prevElem = that.elemView; // 记录当前打开的元素,以便在下次关闭\r\n thisModule.prevElem.data('prevElem', options.elem); // 将当前绑定的元素,记录在打开元素的 data 对象中\r\n \r\n // 阻止全局事件\r\n that.elemView.find('.layui-menu').on(clickOrMousedown, function(e){\r\n layui.stope(e);\r\n });\r\n\r\n // 触发菜单列表事件\r\n that.elemView.find('.layui-menu li').on('click', function(e){\r\n var othis = $(this);\r\n var data = othis.data('item') || {};\r\n var isChild = data[customName.children] && data[customName.children].length > 0;\r\n var isClickAllScope = options.clickScope === 'all'; // 是否所有父子菜单均触发点击事件\r\n\r\n if(data.disabled) return; // 菜单项禁用状态\r\n \r\n // 普通菜单项点击后的回调及关闭面板\r\n if((!isChild || isClickAllScope) && data.type !== '-'){\r\n var ret = typeof options.click === 'function' \r\n ? options.click(data, othis) \r\n : null;\r\n \r\n ret === false || (isChild || that.remove());\r\n layui.stope(e);\r\n }\r\n });\r\n \r\n // 触发菜单组展开收缩\r\n that.elemView.find(STR_GROUP_TITLE).on('click', function(e){\r\n var othis = $(this);\r\n var elemGroup = othis.parent();\r\n var data = elemGroup.data('item') || {};\r\n \r\n if(data.type === 'group' && options.isAllowSpread){\r\n thisModule.spread(elemGroup, options.accordion);\r\n }\r\n });\r\n\r\n // 组件打开完毕的事件\r\n typeof options.ready === 'function' && options.ready(\r\n that.elemView, \r\n options.elem\r\n );\r\n };\r\n \r\n // 位置定位\r\n Class.prototype.position = function(obj){\r\n var that = this;\r\n var options = that.config;\r\n \r\n lay.position(options.elem[0], that.elemView[0], {\r\n position: options.position,\r\n e: that.e,\r\n clickType: options.trigger === 'contextmenu' ? 'right' : null,\r\n align: options.align || null\r\n });\r\n };\r\n \r\n // 删除视图\r\n Class.prototype.remove = function(){\r\n var that = this;\r\n var options = that.config;\r\n var elemPrev = thisModule.prevElem;\r\n \r\n // 若存在已打开的面板元素,则移除\r\n if(elemPrev){\r\n elemPrev.data('prevElem') && (\r\n elemPrev.data('prevElem').data(MOD_INDEX +'_opened', false)\r\n );\r\n elemPrev.remove();\r\n }\r\n lay('.' + STR_ELEM_SHADE).remove();\r\n };\r\n \r\n // 延迟删除视图\r\n Class.prototype.delayRemove = function(){\r\n var that = this;\r\n var options = that.config;\r\n clearTimeout(thisModule.timer);\r\n\r\n thisModule.timer = setTimeout(function(){\r\n that.remove();\r\n }, options.delay);\r\n };\r\n \r\n // 事件\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 若传入 hover则解析为 mouseenter\r\n if(options.trigger === 'hover') options.trigger = 'mouseenter';\r\n\r\n // 解除上一个事件\r\n if(that.prevElem) that.prevElem.off(options.trigger, that.prevElemCallback);\r\n \r\n // 记录被绑定的元素及回调\r\n that.prevElem = options.elem;\r\n that.prevElemCallback = function(e){\r\n clearTimeout(thisModule.timer);\r\n that.e = e;\r\n that.render();\r\n e.preventDefault();\r\n };\r\n\r\n // 触发元素事件\r\n options.elem.on(options.trigger, that.prevElemCallback);\r\n \r\n // 如果是鼠标移入事件\r\n if(options.trigger === 'mouseenter'){\r\n // 直行鼠标移出事件\r\n options.elem.on('mouseleave', function(){\r\n that.delayRemove();\r\n });\r\n }\r\n };\r\n \r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n \r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 设置菜单组展开和收缩状态\r\n thisModule.spread = function(othis, isAccordion){\r\n var contentElem = othis.children('ul');\r\n var needSpread = othis.hasClass(STR_ITEM_UP);\r\n var ANIM_MS = 200;\r\n\r\n // 动画执行完成后的操作\r\n var complete = function() {\r\n $(this).css({'display': ''}); // 剔除临时 style以适配外部样式的状态重置;\r\n };\r\n\r\n // 动画是否正在执行\r\n if (contentElem.is(':animated')) return;\r\n\r\n // 展开\r\n if (needSpread) {\r\n othis.removeClass(STR_ITEM_UP).addClass(STR_ITEM_DOWN);\r\n contentElem.hide().stop().slideDown(ANIM_MS, complete);\r\n } else { // 收缩\r\n contentElem.stop().slideUp(ANIM_MS, complete);\r\n othis.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\r\n }\r\n\r\n // 手风琴\r\n if (needSpread && isAccordion) {\r\n var groupSibs = othis.siblings('.' + STR_ITEM_DOWN);\r\n groupSibs.children('ul').stop().slideUp(ANIM_MS, complete);\r\n groupSibs.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\r\n }\r\n };\r\n \r\n // 全局事件\r\n (function(){\r\n var _WIN = $(window);\r\n var _DOC = $(document);\r\n \r\n // 自适应定位\r\n _WIN.on('resize', function(){\r\n if(!dropdown.thisId) return;\r\n var that = thisModule.getThis(dropdown.thisId);\r\n if(!that) return;\r\n \r\n if((that.elemView && !that.elemView[0]) || !$('.'+ STR_ELEM)[0]){\r\n return false;\r\n }\r\n \r\n var options = that.config;\r\n \r\n if(options.trigger === 'contextmenu'){\r\n that.remove();\r\n } else {\r\n that.position();\r\n }\r\n });\r\n \r\n \r\n \r\n // 点击任意处关闭\r\n _DOC.on(clickOrMousedown, function(e){\r\n if(!dropdown.thisId) return;\r\n var that = thisModule.getThis(dropdown.thisId)\r\n if(!that) return;\r\n \r\n var options = that.config;\r\n \r\n // 若触发的是绑定的元素,或者属于绑定元素的子元素,则不关闭\r\n // 满足条件:当前绑定的元素不是 body document或者不是鼠标右键事件\r\n if(!(lay.isTopElem(options.elem[0]) || options.trigger === 'contextmenu')){\r\n if(\r\n e.target === options.elem[0] || \r\n options.elem.find(e.target)[0] ||\r\n (that.elemView && e.target === that.elemView[0]) ||\r\n (that.elemView && that.elemView.find(e.target)[0])\r\n ) return;\r\n }\r\n \r\n that.remove();\r\n });\r\n \r\n // 基础菜单的静态元素事件\r\n var ELEM_LI = '.layui-menu:not(.layui-dropdown-menu) li';\r\n _DOC.on('click', ELEM_LI, function(e){\r\n var othis = $(this);\r\n var parent = othis.parents('.layui-menu').eq(0);\r\n var isChild = othis.hasClass(STR_ITEM_GROUP) || othis.hasClass(STR_ITEM_PARENT);\r\n var filter = parent.attr('lay-filter') || parent.attr('id');\r\n var options = lay.options(this);\r\n \r\n // 非触发元素\r\n if(othis.hasClass(STR_ITEM_DIV)) return;\r\n\r\n // 非菜单组\r\n if(!isChild){\r\n // 选中\r\n parent.find('.'+ STR_ITEM_CHECKED).removeClass(STR_ITEM_CHECKED); // 清除选中样式\r\n parent.find('.'+ STR_ITEM_CHECKED2).removeClass(STR_ITEM_CHECKED2); // 清除父级菜单选中样式\r\n othis.addClass(STR_ITEM_CHECKED); //添加选中样式\r\n othis.parents('.'+ STR_ITEM_PARENT).addClass(STR_ITEM_CHECKED2); // 添加父级菜单选中样式\r\n\r\n options.title = options.title || $.trim(othis.children('.'+ STR_MENU_TITLE).text());\r\n \r\n // 触发事件\r\n layui.event.call(this, MOD_NAME, 'click('+ filter +')', options);\r\n }\r\n });\r\n \r\n // 基础菜单的展开收缩事件\r\n _DOC.on('click', (ELEM_LI + STR_GROUP_TITLE), function(e){\r\n var othis = $(this);\r\n var elemGroup = othis.parents('.'+ STR_ITEM_GROUP +':eq(0)');\r\n var options = lay.options(elemGroup[0]);\r\n var isAccordion = typeof othis.parents('.layui-menu').eq(0).attr('lay-accordion') === 'string';\r\n\r\n if(('isAllowSpread' in options) ? options.isAllowSpread : true){\r\n thisModule.spread(elemGroup, isAccordion);\r\n }\r\n });\r\n \r\n // 判断子级菜单是否超出屏幕\r\n var ELEM_LI_PAR = '.layui-menu .'+ STR_ITEM_PARENT\r\n _DOC.on('mouseenter', ELEM_LI_PAR, function(e){\r\n var othis = $(this);\r\n var elemPanel = othis.find('.'+ STR_MENU_PANEL);\r\n\r\n if(!elemPanel[0]) return;\r\n var rect = elemPanel[0].getBoundingClientRect();\r\n \r\n // 是否超出右侧屏幕\r\n if(rect.right > _WIN.width()){\r\n elemPanel.addClass(STR_MENU_PANEL_L);\r\n // 不允许超出左侧屏幕\r\n rect = elemPanel[0].getBoundingClientRect();\r\n if(rect.left < 0){\r\n elemPanel.removeClass(STR_MENU_PANEL_L);\r\n }\r\n }\r\n \r\n // 是否超出底部屏幕\r\n if(rect.bottom > _WIN.height()){\r\n elemPanel.eq(0).css('margin-top', -(rect.bottom - _WIN.height() + 5));\r\n }\r\n }).on('mouseleave', ELEM_LI_PAR, function(e){\r\n var othis = $(this)\r\n var elemPanel = othis.children('.'+ STR_MENU_PANEL);\r\n \r\n elemPanel.removeClass(STR_MENU_PANEL_L);\r\n elemPanel.css('margin-top', 0);\r\n });\r\n \r\n })();\r\n\r\n // 关闭面板\r\n dropdown.close = function(id){\r\n var that = thisModule.getThis(id);\r\n if(!that) return this;\r\n \r\n that.remove();\r\n return thisModule.call(that);\r\n };\r\n \r\n // 重载实例\r\n dropdown.reload = function(id, options, type){\r\n var that = thisModule.getThis(id);\r\n if(!that) return this;\r\n\r\n that.reload(options, type);\r\n return thisModule.call(that);\r\n };\r\n\r\n // 仅重载数据\r\n dropdown.reloadData = function(){\r\n var args = $.extend([], arguments);\r\n args[2] = 'reloadData';\r\n\r\n // 重载时,与数据相关的参数\r\n var dataParams = new RegExp('^('+ [\r\n 'data', 'templet', 'content'\r\n ].join('|') + ')$');\r\n\r\n // 过滤与数据无关的参数\r\n layui.each(args[1], function (key, value) {\r\n if(!dataParams.test(key)){\r\n delete args[1][key];\r\n }\r\n });\r\n\r\n return dropdown.reload.apply(null, args);\r\n };\r\n\r\n // 核心入口\r\n dropdown.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, dropdown);\r\n});\r\n","/**\r\n * slider 滑块组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'], function(exports){\r\n 'use strict';\r\n\r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n\r\n // 外部接口\r\n var slider = {\r\n config: {}\r\n ,index: layui.slider ? (layui.slider.index + 10000) : 0\r\n\r\n // 设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n }\r\n\r\n // 事件\r\n ,on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisSlider = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n return {\r\n setValue: function(value, index){ // 设置值\r\n value = value > options.max ? options.max : value;\r\n value = value < options.min ? options.min : value;\r\n options.value = value;\r\n return that.slide('set', value, index || 0);\r\n }\r\n ,config: options\r\n }\r\n };\r\n\r\n // 字符常量\r\n var MOD_NAME = 'slider';\r\n var DISABLED = 'layui-disabled';\r\n var ELEM_VIEW = 'layui-slider';\r\n var SLIDER_BAR = 'layui-slider-bar';\r\n var SLIDER_WRAP = 'layui-slider-wrap';\r\n var SLIDER_WRAP_BTN = 'layui-slider-wrap-btn';\r\n var SLIDER_TIPS = 'layui-slider-tips';\r\n var SLIDER_INPUT = 'layui-slider-input';\r\n var SLIDER_INPUT_TXT = 'layui-slider-input-txt';\r\n var SLIDER_INPUT_BTN = 'layui-slider-input-btn';\r\n var ELEM_HOVER = 'layui-slider-hover';\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++slider.index;\r\n that.config = $.extend({}, that.config, slider.config, options);\r\n that.render();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n type: 'default' //滑块类型垂直vertical\r\n ,min: 0 //最小值\r\n ,max: 100 //最大值默认100\r\n ,value: 0 //初始值默认为0\r\n ,step: 1 //间隔值\r\n ,showstep: false //间隔点开启\r\n ,tips: true //文字提示,开启\r\n ,input: false //输入框,关闭\r\n ,range: false //范围选择,与输入框不能同时开启,默认关闭\r\n ,height: 200 //配合 type:\"vertical\" 使用默认200px\r\n ,disabled: false //滑块禁用,默认关闭\r\n ,theme: '#16baaa' //主题颜色\r\n };\r\n\r\n //滑块渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n slider.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n //间隔值不能小于 1\r\n if(options.step < 1) options.step = 1;\r\n\r\n //最大值不能小于最小值\r\n if(options.max < options.min) options.max = options.min + options.step;\r\n\r\n\r\n\r\n //判断是否开启双滑块\r\n if(options.range){\r\n options.value = typeof(options.value) == 'object' ? options.value : [options.min, options.value];\r\n var minValue = Math.min(options.value[0], options.value[1])\r\n ,maxValue = Math.max(options.value[0], options.value[1]);\r\n options.value[0] = Math.max(minValue,options.min);\r\n options.value[1] = Math.max(maxValue,options.min);\r\n options.value[0] = Math.min(options.value[0],options.max);\r\n options.value[1] = Math.min(options.value[1],options.max);\r\n\r\n var scaleFir = Math.floor((options.value[0] - options.min) / (options.max - options.min) * 100)\r\n ,scaleSec = Math.floor((options.value[1] - options.min) / (options.max - options.min) * 100)\r\n ,scale = scaleSec - scaleFir + '%';\r\n scaleFir = scaleFir + '%';\r\n scaleSec = scaleSec + '%';\r\n } else {\r\n //如果初始值是一个数组,则获取数组的最小值\r\n if(typeof options.value == 'object'){\r\n options.value = Math.min.apply(null, options.value);\r\n }\r\n\r\n //初始值不能小于最小值且不能大于最大值\r\n if(options.value < options.min) options.value = options.min;\r\n if(options.value > options.max) options.value = options.max;\r\n\r\n var scale = Math.floor((options.value - options.min) / (options.max - options.min) * 100) + '%';\r\n }\r\n\r\n\r\n //如果禁用,颜色为统一的灰色\r\n var theme = options.disabled ? '#c2c2c2' : options.theme;\r\n\r\n //滑块\r\n var temp = '<div class=\"layui-slider '+ (options.type === 'vertical' ? 'layui-slider-vertical' : '') +'\">'+ (options.tips ? '<div class=\"'+ SLIDER_TIPS +'\"></div>' : '') +\r\n '<div class=\"layui-slider-bar\" style=\"background:'+ theme +'; '+ (options.type === 'vertical' ? 'height' : 'width') +':'+ scale +';'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ (scaleFir || 0) +';\"></div><div class=\"layui-slider-wrap\" style=\"'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ (scaleFir || scale) +';\">' +\r\n '<div class=\"layui-slider-wrap-btn\" style=\"border: 2px solid '+ theme +';\"></div></div>'+ (options.range ? '<div class=\"layui-slider-wrap\" style=\"'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ scaleSec +';\"><div class=\"layui-slider-wrap-btn\" style=\"border: 2px solid '+ theme +';\"></div></div>' : '') +'</div>';\r\n\r\n var othis = $(options.elem)\r\n ,hasRender = othis.next('.' + ELEM_VIEW);\r\n //生成替代元素\r\n hasRender[0] && hasRender.remove(); //如果已经渲染则Rerender\r\n that.elemTemp = $(temp);\r\n\r\n //把数据缓存到滑块上\r\n if(options.range){\r\n that.elemTemp.find('.' + SLIDER_WRAP).eq(0).data('value', options.value[0]);\r\n that.elemTemp.find('.' + SLIDER_WRAP).eq(1).data('value', options.value[1]);\r\n }else{\r\n that.elemTemp.find('.' + SLIDER_WRAP).data('value', options.value);\r\n }\r\n\r\n //插入替代元素\r\n othis.html(that.elemTemp);\r\n\r\n //垂直滑块\r\n if(options.type === 'vertical'){\r\n that.elemTemp.height(options.height + 'px');\r\n }\r\n\r\n //显示间断点\r\n if(options.showstep){\r\n var number = (options.max - options.min) / options.step, item = '';\r\n for(var i = 1; i < number + 1; i++) {\r\n var step = i * 100 / number;\r\n if(step < 100){\r\n item += '<div class=\"layui-slider-step\" style=\"'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ step +'%\"></div>'\r\n }\r\n }\r\n that.elemTemp.append(item);\r\n }\r\n\r\n //插入输入框\r\n if(options.input && !options.range){\r\n var elemInput = $('<div class=\"layui-slider-input\"><div class=\"layui-slider-input-txt\"><input type=\"text\" class=\"layui-input\"></div><div class=\"layui-slider-input-btn\"><i class=\"layui-icon layui-icon-up\"></i><i class=\"layui-icon layui-icon-down\"></i></div></div>');\r\n othis.css(\"position\",\"relative\");\r\n othis.append(elemInput);\r\n othis.find('.' + SLIDER_INPUT_TXT).children('input').val(options.value);\r\n if(options.type === 'vertical'){\r\n elemInput.css({\r\n left: 0\r\n ,top: -48\r\n });\r\n } else {\r\n that.elemTemp.css(\"margin-right\", elemInput.outerWidth() + 15);\r\n }\r\n }\r\n\r\n //给未禁止的滑块滑动事件\r\n if(!options.disabled){\r\n that.slide();\r\n }else{\r\n that.elemTemp.addClass(DISABLED);\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).addClass(DISABLED);\r\n }\r\n\r\n //划过滑块显示数值\r\n var timer;\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).on('mouseover', function(){\r\n var sliderWidth = options.type === 'vertical' ? options.height : that.elemTemp[0].offsetWidth\r\n ,sliderWrap = that.elemTemp.find('.' + SLIDER_WRAP)\r\n ,tipsLeft = options.type === 'vertical' ? (sliderWidth - $(this).parent()[0].offsetTop - sliderWrap.height()) : $(this).parent()[0].offsetLeft\r\n ,left = tipsLeft / sliderWidth * 100\r\n ,value = $(this).parent().data('value')\r\n ,tipsTxt = options.setTips ? options.setTips(value) : value;\r\n that.elemTemp.find('.' + SLIDER_TIPS).html(tipsTxt);\r\n\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n if(options.type === 'vertical'){\r\n that.elemTemp.find('.' + SLIDER_TIPS).css({\r\n \"bottom\": left + '%',\r\n \"margin-bottom\": \"20px\",\r\n \"display\": \"inline-block\"\r\n });\r\n } else {\r\n that.elemTemp.find('.' + SLIDER_TIPS).css({\r\n \"left\": left + '%',\r\n \"display\": \"inline-block\"\r\n });\r\n }\r\n }, 300);\r\n }).on('mouseout', function(){\r\n clearTimeout(timer);\r\n that.elemTemp.find('.' + SLIDER_TIPS).css(\"display\", \"none\");\r\n });\r\n };\r\n\r\n //滑块滑动\r\n Class.prototype.slide = function(setValue, value, i){\r\n var that = this\r\n ,options = that.config\r\n ,sliderAct = that.elemTemp\r\n ,sliderWidth = function(){\r\n return options.type === 'vertical' ? options.height : sliderAct[0].offsetWidth\r\n }\r\n ,sliderWrap = sliderAct.find('.' + SLIDER_WRAP)\r\n ,sliderTxt = sliderAct.next('.' + SLIDER_INPUT)\r\n ,inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val()\r\n ,step = 100 / ((options.max - options.min) / Math.ceil(options.step))\r\n ,change = function(offsetValue, index, from){\r\n if(Math.ceil(offsetValue) * step > 100){\r\n offsetValue = Math.ceil(offsetValue) * step\r\n }else{\r\n offsetValue = Math.round(offsetValue) * step\r\n }\r\n offsetValue = offsetValue > 100 ? 100: offsetValue;\r\n offsetValue = offsetValue < 0 ? 0: offsetValue;\r\n sliderWrap.eq(index).css((options.type === 'vertical' ?'bottom':'left'), offsetValue + '%');\r\n var firLeft = valueTo(sliderWrap[0].offsetLeft)\r\n ,secLeft = options.range ? valueTo(sliderWrap[1].offsetLeft) : 0;\r\n if(options.type === 'vertical'){\r\n sliderAct.find('.' + SLIDER_TIPS).css({\"bottom\":offsetValue + '%', \"margin-bottom\":\"20px\"});\r\n firLeft = valueTo(sliderWidth() - sliderWrap[0].offsetTop - sliderWrap.height());\r\n secLeft = options.range ? valueTo(sliderWidth() - sliderWrap[1].offsetTop - sliderWrap.height()) : 0;\r\n }else{\r\n sliderAct.find('.' + SLIDER_TIPS).css(\"left\",offsetValue + '%');\r\n }\r\n firLeft = firLeft > 100 ? 100: firLeft;\r\n secLeft = secLeft > 100 ? 100: secLeft;\r\n var minLeft = Math.min(firLeft, secLeft)\r\n ,wrapWidth = Math.abs(firLeft - secLeft);\r\n if(options.type === 'vertical'){\r\n sliderAct.find('.' + SLIDER_BAR).css({\"height\":wrapWidth + '%', \"bottom\":minLeft + '%'});\r\n }else{\r\n sliderAct.find('.' + SLIDER_BAR).css({\"width\":wrapWidth + '%', \"left\":minLeft + '%'});\r\n }\r\n var selfValue = options.min + Math.round((options.max - options.min) * offsetValue / 100);\r\n inputValue = selfValue;\r\n sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val(inputValue);\r\n sliderWrap.eq(index).data('value', selfValue);\r\n sliderAct.find('.' + SLIDER_TIPS).html(options.setTips ? options.setTips(selfValue) : selfValue);\r\n\r\n //如果开启范围选择,则返回数组值\r\n if(options.range){\r\n var arrValue = [\r\n sliderWrap.eq(0).data('value')\r\n ,sliderWrap.eq(1).data('value')\r\n ];\r\n if(arrValue[0] > arrValue[1]) arrValue.reverse(); //如果前面的圆点超过了后面的圆点值,则调换顺序\r\n }\r\n\r\n that.value = options.range ? arrValue : selfValue; // 最新值\r\n options.change && options.change(that.value); // change 回调\r\n\r\n // 值完成选中的事件\r\n if(from === 'done') options.done && options.done(that.value);\r\n }\r\n ,valueTo = function(value){\r\n var oldLeft = value / sliderWidth() * 100 / step\r\n ,left = Math.round(oldLeft) * step;\r\n if(value == sliderWidth()){\r\n left = Math.ceil(oldLeft) * step;\r\n }\r\n return left;\r\n }\r\n\r\n //拖拽元素\r\n ,elemMove = $(['<div class=\"layui-auxiliar-moving\" id=\"LAY-slider-moving\"></div'].join(''))\r\n ,createMoveElem = function(move, up){\r\n var upCall = function(){\r\n up && up();\r\n elemMove.remove();\r\n options.done && options.done(that.value);\r\n };\r\n $('#LAY-slider-moving')[0] || $('body').append(elemMove);\r\n elemMove.on('mousemove', move);\r\n elemMove.on('mouseup', upCall).on('mouseleave', upCall);\r\n };\r\n\r\n //动态赋值\r\n if(setValue === 'set') return change(value - options.min, i, 'done');\r\n\r\n //滑块滑动\r\n sliderAct.find('.' + SLIDER_WRAP_BTN).each(function(index){\r\n var othis = $(this);\r\n othis.on('mousedown', function(e){\r\n e = e || window.event;\r\n\r\n var oldleft = othis.parent()[0].offsetLeft\r\n ,oldx = e.clientX;\r\n if(options.type === 'vertical'){\r\n oldleft = sliderWidth() - othis.parent()[0].offsetTop - sliderWrap.height()\r\n oldx = e.clientY;\r\n }\r\n\r\n var move = function(e){\r\n e = e || window.event;\r\n var left = oldleft + (options.type === 'vertical' ? (oldx - e.clientY) : (e.clientX - oldx));\r\n if(left < 0)left = 0;\r\n if(left > sliderWidth())left = sliderWidth();\r\n var reaLeft = left / sliderWidth() * 100 / step;\r\n change(reaLeft, index);\r\n othis.addClass(ELEM_HOVER);\r\n sliderAct.find('.' + SLIDER_TIPS).show();\r\n e.preventDefault();\r\n };\r\n\r\n var up = function(){\r\n othis.removeClass(ELEM_HOVER);\r\n sliderAct.find('.' + SLIDER_TIPS).hide();\r\n };\r\n\r\n createMoveElem(move, up)\r\n });\r\n });\r\n\r\n // 点击滑块\r\n sliderAct.on('click', function(e){\r\n var main = $('.' + SLIDER_WRAP_BTN);\r\n var othis = $(this);\r\n if(!main.is(event.target) && main.has(event.target).length === 0 && main.length){\r\n var index;\r\n var offset = options.type === 'vertical'\r\n ? (sliderWidth() - e.clientY + othis.offset().top - $(window).scrollTop())\r\n :(e.clientX - othis.offset().left - $(window).scrollLeft());\r\n\r\n if(offset < 0)offset = 0;\r\n if(offset > sliderWidth()) offset = sliderWidth();\r\n var reaLeft = offset / sliderWidth() * 100 / step;\r\n if(options.range){\r\n if(options.type === 'vertical'){\r\n index = Math.abs(offset - parseInt($(sliderWrap[0]).css('bottom'))) > Math.abs(offset - parseInt($(sliderWrap[1]).css('bottom'))) ? 1 : 0;\r\n } else {\r\n index = Math.abs(offset - sliderWrap[0].offsetLeft) > Math.abs(offset - sliderWrap[1].offsetLeft) ? 1 : 0;\r\n }\r\n } else {\r\n index = 0;\r\n }\r\n change(reaLeft, index, 'done');\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n //点击加减输入框\r\n sliderTxt.children('.' + SLIDER_INPUT_BTN).children('i').each(function(index){\r\n $(this).on('click', function(){\r\n inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val();\r\n if(index == 1){ //减\r\n inputValue = inputValue - options.step < options.min\r\n ? options.min\r\n : Number(inputValue) - options.step;\r\n }else{\r\n inputValue = Number(inputValue) + options.step > options.max\r\n ? options.max\r\n : Number(inputValue) + options.step;\r\n }\r\n var inputScale = (inputValue - options.min) / (options.max - options.min) * 100 / step;\r\n change(inputScale, 0, 'done');\r\n });\r\n });\r\n\r\n //获取输入框值\r\n var getInputValue = function(){\r\n var realValue = this.value;\r\n realValue = isNaN(realValue) ? 0 : realValue;\r\n realValue = realValue < options.min ? options.min : realValue;\r\n realValue = realValue > options.max ? options.max : realValue;\r\n this.value = realValue;\r\n var inputScale = (realValue - options.min) / (options.max - options.min) * 100 / step;\r\n change(inputScale, 0, 'done');\r\n };\r\n sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').on('keydown', function(e){\r\n if(e.keyCode === 13){\r\n e.preventDefault();\r\n getInputValue.call(this);\r\n }\r\n }).on('change', getInputValue);\r\n };\r\n\r\n //事件处理\r\n Class.prototype.events = function(){\r\n var that = this\r\n ,options = that.config;\r\n };\r\n\r\n //核心入口\r\n slider.render = function(options){\r\n var inst = new Class(options);\r\n return thisSlider.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, slider);\r\n})\r\n","/**\r\n * colorpicker \r\n * 颜色选择组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n var clickOrMousedown = (device.mobile ? 'click' : 'mousedown');\r\n\r\n //外部接口\r\n var colorpicker = {\r\n config: {}\r\n ,index: layui.colorpicker ? (layui.colorpicker.index + 10000) : 0\r\n\r\n //设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n }\r\n \r\n //事件\r\n ,on: function(events, callback){\r\n return layui.onevent.call(this, 'colorpicker', events, callback);\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n config: options\r\n };\r\n }\r\n\r\n //字符常量\r\n ,MOD_NAME = 'colorpicker', SHOW = 'layui-show', THIS = 'layui-this', ELEM = 'layui-colorpicker'\r\n \r\n ,ELEM_MAIN = '.layui-colorpicker-main', ICON_PICKER_DOWN = 'layui-icon-down', ICON_PICKER_CLOSE = 'layui-icon-close'\r\n ,PICKER_TRIG_SPAN = 'layui-colorpicker-trigger-span', PICKER_TRIG_I = 'layui-colorpicker-trigger-i', PICKER_SIDE = 'layui-colorpicker-side', PICKER_SIDE_SLIDER = 'layui-colorpicker-side-slider'\r\n ,PICKER_BASIS = 'layui-colorpicker-basis', PICKER_ALPHA_BG = 'layui-colorpicker-alpha-bgcolor', PICKER_ALPHA_SLIDER = 'layui-colorpicker-alpha-slider', PICKER_BASIS_CUR = 'layui-colorpicker-basis-cursor', PICKER_INPUT = 'layui-colorpicker-main-input'\r\n\r\n //RGB转HSB\r\n ,RGBToHSB = function(rgb){\r\n var hsb = {h:0, s:0, b:0};\r\n var min = Math.min(rgb.r, rgb.g, rgb.b);\r\n var max = Math.max(rgb.r, rgb.g, rgb.b);\r\n var delta = max - min;\r\n hsb.b = max;\r\n hsb.s = max !== 0 ? 255*delta/max : 0;\r\n if(hsb.s !== 0){\r\n if(rgb.r == max){ // 因 rgb 中返回的数字为 string 类型\r\n hsb.h = (rgb.g - rgb.b) / delta;\r\n }else if(rgb.g == max){\r\n hsb.h = 2 + (rgb.b - rgb.r) / delta;\r\n }else{\r\n hsb.h = 4 + (rgb.r - rgb.g) / delta;\r\n }\r\n }else{\r\n hsb.h = -1;\r\n }\r\n if(max === min){\r\n hsb.h = 0;\r\n }\r\n hsb.h *= 60;\r\n if(hsb.h < 0) {\r\n hsb.h += 360;\r\n }\r\n hsb.s *= 100/255;\r\n hsb.b *= 100/255;\r\n return hsb; \r\n }\r\n\r\n //HEX转HSB\r\n ,HEXToHSB = function(hex){\r\n hex = hex.indexOf('#') > -1 ? hex.substring(1) : hex;\r\n if(hex.length === 3){\r\n var num = hex.split(\"\");\r\n hex = num[0]+num[0]+num[1]+num[1]+num[2]+num[2]\r\n }\r\n hex = parseInt(hex, 16);\r\n var rgb = {r:hex >> 16, g:(hex & 0x00FF00) >> 8, b:(hex & 0x0000FF)};\r\n return RGBToHSB(rgb);\r\n }\r\n\r\n //HSB转RGB\r\n ,HSBToRGB = function(hsb){\r\n var rgb = {};\r\n var h = hsb.h;\r\n var s = hsb.s*255/100;\r\n var b = hsb.b*255/100;\r\n if(s === 0){\r\n rgb.r = rgb.g = rgb.b = b;\r\n }else{\r\n var t1 = b;\r\n var t2 = (255 - s) * b /255;\r\n var t3 = (t1 - t2) * (h % 60) /60;\r\n if(h === 360) h = 0;\r\n if(h < 60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}\r\n else if(h < 120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}\r\n else if(h < 180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}\r\n else if(h < 240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}\r\n else if(h < 300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}\r\n else if(h < 360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}\r\n else {rgb.r=0; rgb.g=0; rgb.b=0}\r\n }\r\n return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};\r\n }\r\n\r\n //HSB转HEX\r\n ,HSBToHEX = function(hsb){\r\n var rgb = HSBToRGB(hsb);\r\n var hex = [\r\n rgb.r.toString(16)\r\n ,rgb.g.toString(16)\r\n ,rgb.b.toString(16)\r\n ];\r\n $.each(hex, function(nr, val){\r\n if(val.length === 1){\r\n hex[nr] = '0' + val;\r\n }\r\n });\r\n return hex.join('');\r\n }\r\n\r\n //转化成所需rgb格式\r\n ,RGBSTo = function(rgbs){\r\n var regexp = /[0-9]{1,3}/g;\r\n var re = rgbs.match(regexp) || [];\r\n return {r:re[0], g:re[1], b:re[2]};\r\n }\r\n \r\n ,$win = $(window)\r\n ,$doc = $(document)\r\n \r\n //构造器\r\n ,Class = function(options){\r\n var that = this;\r\n that.index = ++colorpicker.index;\r\n that.config = $.extend({}, that.config, colorpicker.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n color: '' //默认颜色,默认没有\r\n ,size: null //选择器大小\r\n ,alpha: false //是否开启透明度\r\n ,format: 'hex' //颜色显示/输入格式,可选 rgb,hex\r\n ,predefine: false //预定义颜色是否开启\r\n ,colors: [ //默认预定义颜色列表\r\n '#16baaa', '#16b777', '#1E9FFF', '#FF5722', '#FFB800', '#01AAED', '#999', '#c00', '#ff8c00','#ffd700'\r\n ,'#90ee90', '#00ced1', '#1e90ff', '#c71585', 'rgb(0, 186, 189)', 'rgb(255, 120, 0)', 'rgb(250, 212, 0)', '#393D49', 'rgba(0,0,0,.5)', 'rgba(255, 69, 0, 0.68)', 'rgba(144, 240, 144, 0.5)', 'rgba(31, 147, 255, 0.73)'\r\n ]\r\n };\r\n\r\n //初始颜色选择框\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n colorpicker.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n \r\n //颜色选择框对象\r\n var elemColorBox = $(['<div class=\"layui-unselect layui-colorpicker\">'\r\n ,'<span '+ (options.format == 'rgb' && options.alpha\r\n ? 'class=\"layui-colorpicker-trigger-bgcolor\"'\r\n : '') +'>'\r\n ,'<span class=\"layui-colorpicker-trigger-span\" '\r\n ,'lay-type=\"'+ (options.format == 'rgb' ? (options.alpha ? 'rgba' : 'torgb') : '') +'\" '\r\n ,'style=\"'+ function(){\r\n var bgstr = '';\r\n if(options.color){\r\n bgstr = options.color;\r\n \r\n if((options.color.match(/[0-9]{1,3}/g) || []).length > 3){ //需要优化\r\n if(!(options.alpha && options.format == 'rgb')){\r\n bgstr = '#' + HSBToHEX(RGBToHSB(RGBSTo(options.color)))\r\n }\r\n }\r\n \r\n return 'background: '+ bgstr;\r\n }\r\n \r\n return bgstr;\r\n }() +'\">'\r\n ,'<i class=\"layui-icon layui-colorpicker-trigger-i '+ (options.color \r\n ? ICON_PICKER_DOWN \r\n : ICON_PICKER_CLOSE) +'\"></i>'\r\n ,'</span>'\r\n ,'</span>'\r\n ,'</div>'].join(''))\r\n\r\n //初始化颜色选择框\r\n elem = options.elem = $(options.elem);\r\n options.size && elemColorBox.addClass('layui-colorpicker-'+ options.size); //初始化颜色选择框尺寸\r\n \r\n // 插入颜色选择框\r\n elem.addClass('layui-inline').html(\r\n that.elemColorBox = elemColorBox\r\n );\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n \r\n // 获取背景色值\r\n that.color = that.elemColorBox.find('.'+ PICKER_TRIG_SPAN)[0].style.background;\r\n \r\n // 相关事件\r\n that.events();\r\n };\r\n\r\n //渲染颜色选择器\r\n Class.prototype.renderPicker = function(){\r\n var that = this\r\n ,options = that.config\r\n ,elemColorBox = that.elemColorBox[0]\r\n \r\n //颜色选择器对象\r\n ,elemPicker = that.elemPicker = $(['<div id=\"layui-colorpicker'+ that.index +'\" data-index=\"'+ that.index +'\" class=\"layui-anim layui-anim-downbit layui-colorpicker-main\">'\r\n //颜色面板\r\n ,'<div class=\"layui-colorpicker-main-wrapper\">'\r\n ,'<div class=\"layui-colorpicker-basis\">'\r\n ,'<div class=\"layui-colorpicker-basis-white\"></div>'\r\n ,'<div class=\"layui-colorpicker-basis-black\"></div>'\r\n ,'<div class=\"layui-colorpicker-basis-cursor\"></div>'\r\n ,'</div>'\r\n ,'<div class=\"layui-colorpicker-side\">'\r\n ,'<div class=\"layui-colorpicker-side-slider\"></div>'\r\n ,'</div>'\r\n ,'</div>'\r\n \r\n //透明度条块\r\n ,'<div class=\"layui-colorpicker-main-alpha '+ (options.alpha ? SHOW : '') +'\">'\r\n ,'<div class=\"layui-colorpicker-alpha-bgcolor\">'\r\n ,'<div class=\"layui-colorpicker-alpha-slider\"></div>'\r\n ,'</div>'\r\n ,'</div>'\r\n \r\n //预设颜色列表\r\n ,function(){\r\n if(options.predefine){\r\n var list = ['<div class=\"layui-colorpicker-main-pre\">'];\r\n layui.each(options.colors, function(i, v){\r\n list.push(['<div class=\"layui-colorpicker-pre'+ ((v.match(/[0-9]{1,3}/g) || []).length > 3 \r\n ? ' layui-colorpicker-pre-isalpha' \r\n : '') +'\">'\r\n ,'<div style=\"background:'+ v +'\"></div>'\r\n ,'</div>'].join(''));\r\n });\r\n list.push('</div>');\r\n return list.join('');\r\n } else {\r\n return '';\r\n }\r\n }()\r\n \r\n //底部表单元素区域\r\n ,'<div class=\"layui-colorpicker-main-input\">'\r\n ,'<div class=\"layui-inline\">'\r\n ,'<input type=\"text\" class=\"layui-input\">'\r\n ,'</div>'\r\n ,'<div class=\"layui-btn-container\">'\r\n ,'<button class=\"layui-btn layui-btn-primary layui-btn-sm\" colorpicker-events=\"clear\">清空</button>'\r\n ,'<button class=\"layui-btn layui-btn-sm\" colorpicker-events=\"confirm\">确定</button>'\r\n ,'</div'\r\n ,'</div>'\r\n ,'</div>'].join(''))\r\n \r\n ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)[0];\r\n \r\n //如果当前点击的颜色盒子已经存在选择器,则关闭\r\n if($(ELEM_MAIN)[0] && $(ELEM_MAIN).data('index') == that.index){\r\n that.removePicker(Class.thisElemInd);\r\n } else { //插入颜色选择器\r\n that.removePicker(Class.thisElemInd); \r\n $('body').append(elemPicker);\r\n }\r\n\r\n // 记录当前执行的实例索引\r\n colorpicker.thisId = options.id;\r\n \r\n Class.thisElemInd = that.index; //记录最新打开的选择器索引\r\n Class.thisColor = elemColorBox.style.background //记录最新打开的选择器颜色选中值\r\n \r\n that.position();\r\n that.pickerEvents();\r\n };\r\n\r\n //颜色选择器移除\r\n Class.prototype.removePicker = function(index){\r\n var that = this;\r\n var options = that.config;\r\n var elem = $('#layui-colorpicker'+ (index || that.index));\r\n\r\n if(elem[0]){\r\n elem.remove();\r\n delete colorpicker.thisId;\r\n\r\n // 面板关闭后的回调\r\n typeof options.close === 'function' && options.close(that.color);\r\n }\r\n\r\n return that;\r\n };\r\n \r\n //定位算法\r\n Class.prototype.position = function(){\r\n var that = this\r\n ,options = that.config;\r\n lay.position(that.bindElem || that.elemColorBox[0], that.elemPicker[0], {\r\n position: options.position\r\n ,align: 'center'\r\n });\r\n return that;\r\n };\r\n\r\n //颜色选择器赋值\r\n Class.prototype.val = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,elemColorBox = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)\r\n ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT)\r\n ,e = elemColorBox[0]\r\n ,bgcolor = e.style.backgroundColor;\r\n\r\n //判断是否有背景颜色\r\n if(bgcolor){\r\n \r\n //转化成hsb格式\r\n var hsb = RGBToHSB(RGBSTo(bgcolor))\r\n ,type = elemColorBox.attr('lay-type');\r\n \r\n //同步滑块的位置及颜色选择器的选择\r\n that.select(hsb.h, hsb.s, hsb.b);\r\n \r\n // 若格式要求为rgb\r\n if(type === 'torgb'){\r\n elemPickerInput.find('input').val(bgcolor);\r\n } else if(type === 'rgba'){ // 若格式要求为 rgba\r\n var rgb = RGBSTo(bgcolor);\r\n \r\n // 若开启透明度而没有设置,则给默认值\r\n if((bgcolor.match(/[0-9]{1,3}/g) || []).length === 3){\r\n elemPickerInput.find('input').val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 1)');\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", 280);\r\n } else {\r\n elemPickerInput.find('input').val(bgcolor);\r\n var left = bgcolor.slice(bgcolor.lastIndexOf(\",\") + 1, bgcolor.length - 1) * 280;\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", left);\r\n }\r\n \r\n // 设置 span 背景色\r\n that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))'; \r\n } else {\r\n elemPickerInput.find('input').val('#'+ HSBToHEX(hsb));\r\n }\r\n } else {\r\n // 若没有背景颜色则默认到最初始的状态\r\n that.select(0,100,100);\r\n elemPickerInput.find('input').val(\"\");\r\n that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = '';\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", 280);\r\n }\r\n };\r\n\r\n //颜色选择器滑动 / 点击\r\n Class.prototype.side = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,span = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)\r\n ,type = span.attr('lay-type')\r\n\r\n ,side = that.elemPicker.find('.' + PICKER_SIDE)\r\n ,slider = that.elemPicker.find('.' + PICKER_SIDE_SLIDER)\r\n ,basis = that.elemPicker.find('.' + PICKER_BASIS)\r\n ,choose = that.elemPicker.find('.' + PICKER_BASIS_CUR)\r\n ,alphacolor = that.elemPicker.find('.' + PICKER_ALPHA_BG)\r\n ,alphaslider = that.elemPicker.find('.' + PICKER_ALPHA_SLIDER)\r\n \r\n ,_h = slider[0].offsetTop/180*360\r\n ,_b = 100 - (choose[0].offsetTop + 3)/180*100\r\n ,_s = (choose[0].offsetLeft + 3)/260*100\r\n ,_a = Math.round(alphaslider[0].offsetLeft/280*100)/100 \r\n \r\n ,i = that.elemColorBox.find('.' + PICKER_TRIG_I)\r\n ,pre = that.elemPicker.find('.layui-colorpicker-pre').children('div')\r\n\r\n ,change = function(x,y,z,a){\r\n that.select(x, y, z);\r\n var rgb = HSBToRGB({h:x, s:y, b:z});\r\n var color = HSBToHEX({h:x, s:y, b:z});\r\n var elemInput = that.elemPicker.find('.' + PICKER_INPUT).find('input');\r\n\r\n i.addClass(ICON_PICKER_DOWN).removeClass(ICON_PICKER_CLOSE);\r\n span[0].style.background = 'rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')';\r\n\r\n if(type === 'torgb'){\r\n elemInput.val('rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')');\r\n } else if(type === 'rgba'){\r\n var left = a * 280;\r\n alphaslider.css(\"left\", left);\r\n elemInput.val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')');\r\n span[0].style.background = 'rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')';\r\n alphacolor[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))'\r\n } else {\r\n elemInput.val('#'+ color);\r\n }\r\n \r\n //回调更改的颜色\r\n options.change && options.change($.trim(that.elemPicker.find('.' + PICKER_INPUT).find('input').val()));\r\n }\r\n\r\n //拖拽元素\r\n ,elemMove = $(['<div class=\"layui-auxiliar-moving\" id=\"LAY-colorpicker-moving\"></div>'].join(''))\r\n ,createMoveElem = function(call){\r\n $('#LAY-colorpicker-moving')[0] || $('body').append(elemMove);\r\n elemMove.on('mousemove', call);\r\n elemMove.on('mouseup', function(){\r\n elemMove.remove();\r\n }).on('mouseleave', function(){\r\n elemMove.remove();\r\n });\r\n };\r\n\r\n //右侧主色选择\r\n slider.on('mousedown', function(e){\r\n var oldtop = this.offsetTop\r\n ,oldy = e.clientY;\r\n var move = function(e){\r\n var top = oldtop + (e.clientY - oldy)\r\n ,maxh = side[0].offsetHeight;\r\n if(top < 0)top = 0;\r\n if(top > maxh)top = maxh;\r\n var h = top/180*360;\r\n _h = h;\r\n change(h, _s, _b, _a);\r\n e.preventDefault();\r\n };\r\n \r\n createMoveElem(move);\r\n //layui.stope(e);\r\n e.preventDefault();\r\n });\r\n \r\n side.on('click', function(e){\r\n var top = e.clientY - $(this).offset().top + $win.scrollTop();\r\n if(top < 0)top = 0;\r\n if(top > this.offsetHeight) top = this.offsetHeight; \r\n var h = top/180*360;\r\n _h = h;\r\n change(h, _s, _b, _a); \r\n e.preventDefault();\r\n });\r\n \r\n //中间小圆点颜色选择\r\n choose.on('mousedown', function(e){\r\n var oldtop = this.offsetTop\r\n ,oldleft = this.offsetLeft\r\n ,oldy = e.clientY\r\n ,oldx = e.clientX;\r\n var move = function(e){\r\n var top = oldtop + (e.clientY - oldy)\r\n ,left = oldleft + (e.clientX - oldx)\r\n ,maxh = basis[0].offsetHeight - 3\r\n ,maxw = basis[0].offsetWidth - 3;\r\n if(top < -3)top = -3;\r\n if(top > maxh)top = maxh;\r\n if(left < -3)left = -3;\r\n if(left > maxw)left = maxw;\r\n var s = (left + 3)/260*100\r\n ,b = 100 - (top + 3)/180*100;\r\n _b = b;\r\n _s = s;\r\n change(_h, s, b, _a); \r\n e.preventDefault();\r\n };\r\n layui.stope(e);\r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n \r\n basis.on('mousedown', function(e){\r\n var top = e.clientY - $(this).offset().top - 3 + $win.scrollTop()\r\n ,left = e.clientX - $(this).offset().left - 3 + $win.scrollLeft()\r\n if(top < -3)top = -3;\r\n if(top > this.offsetHeight - 3)top = this.offsetHeight - 3;\r\n if(left < -3)left = -3;\r\n if(left > this.offsetWidth - 3)left = this.offsetWidth - 3;\r\n var s = (left + 3)/260*100\r\n ,b = 100 - (top + 3)/180*100;\r\n _b = b;\r\n _s = s;\r\n change(_h, s, b, _a); \r\n layui.stope(e);\r\n e.preventDefault();\r\n choose.trigger(e, 'mousedown');\r\n });\r\n \r\n //底部透明度选择\r\n alphaslider.on('mousedown', function(e){\r\n var oldleft = this.offsetLeft\r\n ,oldx = e.clientX;\r\n var move = function(e){\r\n var left = oldleft + (e.clientX - oldx)\r\n ,maxw = alphacolor[0].offsetWidth;\r\n if(left < 0)left = 0;\r\n if(left > maxw)left = maxw;\r\n var a = Math.round(left /280*100) /100;\r\n _a = a;\r\n change(_h, _s, _b, a); \r\n e.preventDefault();\r\n };\r\n \r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n alphacolor.on('click', function(e){\r\n var left = e.clientX - $(this).offset().left\r\n if(left < 0)left = 0;\r\n if(left > this.offsetWidth)left = this.offsetWidth;\r\n var a = Math.round(left /280*100) /100;\r\n _a = a;\r\n change(_h, _s, _b, a); \r\n e.preventDefault();\r\n });\r\n \r\n //预定义颜色选择\r\n pre.each(function(){\r\n $(this).on('click', function(){\r\n $(this).parent('.layui-colorpicker-pre').addClass('selected').siblings().removeClass('selected');\r\n var color = this.style.backgroundColor\r\n ,hsb = RGBToHSB(RGBSTo(color))\r\n ,a = color.slice(color.lastIndexOf(\",\") + 1, color.length - 1),left;\r\n _h = hsb.h;\r\n _s = hsb.s;\r\n _b = hsb.b;\r\n if((color.match(/[0-9]{1,3}/g) || []).length === 3) a = 1;\r\n _a = a;\r\n left = a * 280;\r\n change(hsb.h, hsb.s, hsb.b, a);\r\n })\r\n });\r\n };\r\n\r\n //颜色选择器hsb转换\r\n Class.prototype.select = function(h, s, b, type){\r\n var that = this;\r\n var options = that.config;\r\n var hex = HSBToHEX({h:h, s:100, b:100});\r\n var color = HSBToHEX({h:h, s:s, b:b});\r\n var sidetop = h/360*180;\r\n var top = 180 - b/100*180 - 3;\r\n var left = s/100*260 - 3;\r\n \r\n that.elemPicker.find('.' + PICKER_SIDE_SLIDER).css(\"top\", sidetop); //滑块的top\r\n that.elemPicker.find('.' + PICKER_BASIS)[0].style.background = '#' + hex; //颜色选择器的背景\r\n \r\n //选择器的top left\r\n that.elemPicker.find('.' + PICKER_BASIS_CUR).css({\r\n \"top\": top\r\n ,\"left\": left\r\n });\r\n \r\n // if(type === 'change') return;\r\n\r\n // 选中的颜色\r\n // that.elemPicker.find('.' + PICKER_INPUT).find('input').val('#'+ color);\r\n };\r\n \r\n Class.prototype.pickerEvents = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN) //颜色盒子\r\n ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT + ' input') //颜色选择器表单\r\n \r\n ,pickerEvents = {\r\n //清空\r\n clear: function(othis){\r\n elemColorBoxSpan[0].style.background ='';\r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE);\r\n that.color = '';\r\n \r\n options.done && options.done('');\r\n that.removePicker();\r\n }\r\n \r\n //确认\r\n ,confirm: function(othis, change){\r\n var value = $.trim(elemPickerInput.val())\r\n ,colorValue\r\n ,hsb;\r\n \r\n if(value.indexOf(',') > -1){\r\n hsb = RGBToHSB(RGBSTo(value));\r\n that.select(hsb.h, hsb.s, hsb.b);\r\n elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); \r\n \r\n if((value.match(/[0-9]{1,3}/g) || []).length > 3 && elemColorBoxSpan.attr('lay-type') === 'rgba'){\r\n var left = value.slice(value.lastIndexOf(\",\") + 1, value.length - 1) * 280;\r\n that.elemPicker.find('.' + PICKER_ALPHA_SLIDER).css(\"left\", left);\r\n elemColorBoxSpan[0].style.background = value;\r\n colorValue = value;\r\n }\r\n } else {\r\n hsb = HEXToHSB(value);\r\n elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); \r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_CLOSE).addClass(ICON_PICKER_DOWN);\r\n }\r\n \r\n if(change === 'change'){\r\n that.select(hsb.h, hsb.s, hsb.b, change);\r\n options.change && options.change(colorValue);\r\n return;\r\n }\r\n that.color = value;\r\n \r\n options.done && options.done(value);\r\n that.removePicker(); \r\n }\r\n };\r\n \r\n //选择器面板点击事件\r\n that.elemPicker.on('click', '*[colorpicker-events]', function(){\r\n var othis = $(this)\r\n ,attrEvent = othis.attr('colorpicker-events');\r\n pickerEvents[attrEvent] && pickerEvents[attrEvent].call(this, othis);\r\n });\r\n \r\n //输入框事件\r\n elemPickerInput.on('keyup', function(e){\r\n var othis = $(this);\r\n pickerEvents.confirm.call(this, othis, e.keyCode === 13 ? null : 'change');\r\n });\r\n }\r\n\r\n // 颜色选择器输入\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 弹出颜色选择器\r\n that.elemColorBox.on('click' , function(){\r\n that.renderPicker();\r\n if($(ELEM_MAIN)[0]){\r\n that.val();\r\n that.side();\r\n }\r\n });\r\n };\r\n\r\n //全局事件\r\n (function(){\r\n //绑定关闭控件事件\r\n $doc.on(clickOrMousedown, function(e){\r\n if(!colorpicker.thisId) return;\r\n var that = thisModule.getThis(colorpicker.thisId);\r\n if(!that) return;\r\n\r\n var options = that.config;\r\n var elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN);\r\n\r\n //如果点击的元素是颜色框\r\n if($(e.target).hasClass(ELEM) \r\n || $(e.target).parents('.'+ELEM)[0]\r\n ) return; \r\n \r\n //如果点击的元素是选择器\r\n if($(e.target).hasClass(ELEM_MAIN.replace(/\\./g, '')) \r\n || $(e.target).parents(ELEM_MAIN)[0]\r\n ) return; \r\n \r\n if(!that.elemPicker) return;\r\n \r\n if(that.color){\r\n var hsb = RGBToHSB(RGBSTo(that.color));\r\n that.select(hsb.h, hsb.s, hsb.b); \r\n } else {\r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE);\r\n }\r\n elemColorBoxSpan[0].style.background = that.color || '';\r\n \r\n // 取消选择的回调\r\n typeof options.cancel === 'function' && options.cancel(that.color);\r\n\r\n // 移除面板\r\n that.removePicker();\r\n });\r\n\r\n //自适应定位\r\n $win.on('resize', function(){\r\n if(!colorpicker.thisId) return;\r\n var that = thisModule.getThis(colorpicker.thisId);\r\n if(!that) return;\r\n\r\n if(!that.elemPicker || !$(ELEM_MAIN)[0]){\r\n return false;\r\n }\r\n that.position();\r\n });\r\n })();\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n \r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n //核心入口\r\n colorpicker.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n \r\n exports(MOD_NAME, colorpicker);\r\n});\r\n","/**\r\n * element\r\n * 常用元素操作组件\r\n */\r\n \r\nlayui.define('jquery', function(exports){\r\n 'use strict';\r\n \r\n var $ = layui.$;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n \r\n var MOD_NAME = 'element';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var TITLE = '.layui-tab-title';\r\n \r\n var Element = function(){\r\n this.config = {};\r\n };\r\n \r\n // 全局设置\r\n Element.prototype.set = function(options){\r\n var that = this;\r\n $.extend(true, that.config, options);\r\n return that;\r\n };\r\n \r\n // 表单事件\r\n Element.prototype.on = function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n };\r\n \r\n // 外部 Tab 新增\r\n Element.prototype.tabAdd = function(filter, options){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var barElem = titElem.children('.layui-tab-bar');\r\n var contElem = tabElem.children('.layui-tab-content');\r\n var li = '<li'+ function(){\r\n var layAttr = [];\r\n layui.each(options, function(key, value){\r\n if(/^(title|content)$/.test(key)) return;\r\n layAttr.push('lay-'+ key +'=\"'+ value +'\"');\r\n });\r\n if(layAttr.length > 0) layAttr.unshift(''); //向前插,预留空格\r\n return layAttr.join(' ');\r\n }() +'>'+ (options.title || 'unnaming') +'</li>';\r\n \r\n barElem[0] ? barElem.before(li) : titElem.append(li);\r\n contElem.append('<div class=\"layui-tab-item\">'+ (options.content || '') +'</div>');\r\n // call.hideTabMore(true);\r\n // 是否添加即切换\r\n options.change && this.tabChange(filter, options.id);\r\n titElem.data('LAY_TAB_CHANGE', options.change);\r\n call.tabAuto(options.change ? 'change' : null);\r\n return this;\r\n };\r\n \r\n // 外部 Tab 删除\r\n Element.prototype.tabDelete = function(filter, layid){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var liElem = titElem.find('>li[lay-id=\"'+ layid +'\"]');\r\n call.tabDelete(null, liElem);\r\n return this;\r\n };\r\n \r\n // 外部 Tab 切换\r\n Element.prototype.tabChange = function(filter, layid){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var liElem = titElem.find('>li[lay-id=\"'+ layid +'\"]');\r\n\r\n call.tabClick.call(liElem[0], {\r\n liElem: liElem\r\n });\r\n return this;\r\n };\r\n \r\n // 自定义 Tab 选项卡\r\n Element.prototype.tab = function(options){\r\n options = options || {};\r\n dom.on('click', options.headerElem, function(e){\r\n var index = $(this).index();\r\n call.tabClick.call(this, {\r\n index: index,\r\n options: options\r\n });\r\n });\r\n };\r\n \r\n \r\n // 动态改变进度条\r\n Element.prototype.progress = function(filter, percent){\r\n var ELEM = 'layui-progress';\r\n var elem = $('.'+ ELEM +'[lay-filter='+ filter +']');\r\n var elemBar = elem.find('.'+ ELEM +'-bar');\r\n var text = elemBar.find('.'+ ELEM +'-text');\r\n\r\n elemBar.css('width', function(){\r\n return /^.+\\/.+$/.test(percent) \r\n ? (new Function('return '+ percent)() * 100) + '%'\r\n : percent;\r\n }).attr('lay-percent', percent);\r\n text.text(percent);\r\n return this;\r\n };\r\n \r\n var NAV_ELEM = '.layui-nav';\r\n var NAV_ITEM = 'layui-nav-item';\r\n var NAV_BAR = 'layui-nav-bar';\r\n var NAV_TREE = 'layui-nav-tree';\r\n var NAV_CHILD = 'layui-nav-child';\r\n var NAV_CHILD_C = 'layui-nav-child-c';\r\n var NAV_MORE = 'layui-nav-more';\r\n var NAV_DOWN = 'layui-icon-down';\r\n var NAV_ANIM = 'layui-anim layui-anim-upbit';\r\n \r\n // 基础事件体\r\n var call = {\r\n // Tab 点击\r\n tabClick: function(obj){\r\n obj = obj || {};\r\n var options = obj.options || {};\r\n var othis = obj.liElem || $(this);\r\n var parents = options.headerElem \r\n ? othis.parent() \r\n : othis.parents('.layui-tab').eq(0);\r\n var item = options.bodyElem \r\n ? $(options.bodyElem) \r\n : parents.children('.layui-tab-content').children('.layui-tab-item');\r\n var elemA = othis.find('a');\r\n var isJump = elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank'; // 是否存在跳转\r\n var unselect = typeof othis.attr('lay-unselect') === 'string'; // 是否禁用选中\r\n var filter = parents.attr('lay-filter');\r\n\r\n // 下标\r\n var index = 'index' in obj \r\n ? obj.index \r\n : othis.parent().children('li').index(othis);\r\n \r\n // 执行切换\r\n if(!(isJump || unselect)){\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n item.eq(index).addClass(SHOW).siblings().removeClass(SHOW);\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'tab('+ filter +')', {\r\n elem: parents,\r\n index: index\r\n });\r\n }\r\n \r\n // Tab 删除\r\n ,tabDelete: function(e, othis){\r\n var li = othis || $(this).parent();\r\n var index = li.parent().children('li').index(li);\r\n var tabElem = li.closest('.layui-tab');\r\n var item = tabElem.children('.layui-tab-content').children('.layui-tab-item');\r\n var filter = tabElem.attr('lay-filter');\r\n \r\n if(li.hasClass(THIS)){\r\n if (li.next()[0] && li.next().is('li')){\r\n call.tabClick.call(li.next()[0], {\r\n index: index + 1\r\n });\r\n } else if (li.prev()[0] && li.prev().is('li')){\r\n call.tabClick.call(li.prev()[0], null, index - 1);\r\n }\r\n }\r\n \r\n li.remove();\r\n item.eq(index).remove();\r\n setTimeout(function(){\r\n call.tabAuto();\r\n }, 50);\r\n \r\n layui.event.call(this, MOD_NAME, 'tabDelete('+ filter +')', {\r\n elem: tabElem,\r\n index: index\r\n });\r\n }\r\n \r\n // Tab 自适应\r\n ,tabAuto: function(spread){\r\n var SCROLL = 'layui-tab-scroll';\r\n var MORE = 'layui-tab-more';\r\n var BAR = 'layui-tab-bar';\r\n var CLOSE = 'layui-tab-close';\r\n var that = this;\r\n \r\n $('.layui-tab').each(function(){\r\n var othis = $(this);\r\n var title = othis.children('.layui-tab-title');\r\n var item = othis.children('.layui-tab-content').children('.layui-tab-item');\r\n var STOPE = 'lay-stope=\"tabmore\"';\r\n var span = $('<span class=\"layui-unselect layui-tab-bar\" '+ STOPE +'><i '+ STOPE +' class=\"layui-icon\">&#xe61a;</i></span>');\r\n\r\n if(that === window && device.ie != 8){\r\n // call.hideTabMore(true)\r\n }\r\n \r\n // 开启关闭图标\r\n if(othis.attr('lay-allowclose')){\r\n title.find('li').each(function(){\r\n var li = $(this);\r\n if(!li.find('.'+CLOSE)[0]){\r\n var close = $('<i class=\"layui-icon layui-icon-close layui-unselect '+ CLOSE +'\"></i>');\r\n close.on('click', call.tabDelete);\r\n li.append(close);\r\n }\r\n });\r\n }\r\n \r\n if(typeof othis.attr('lay-unauto') === 'string') return;\r\n \r\n // 响应式\r\n if(\r\n title.prop('scrollWidth') > title.outerWidth() + 1 || (\r\n title.find('li').length && title.height() > function(height){\r\n return height + height/2;\r\n }(title.find('li').eq(0).height())\r\n )\r\n ){\r\n // 若执行是来自于切换,则自动展开\r\n (\r\n spread === 'change' && title.data('LAY_TAB_CHANGE')\r\n ) && title.addClass(MORE);\r\n \r\n if(title.find('.'+BAR)[0]) return;\r\n title.append(span);\r\n othis.attr('overflow', '');\r\n\r\n // 展开图标事件\r\n span.on('click', function(e){\r\n var isSpread = title.hasClass(MORE);\r\n title[isSpread ? 'removeClass' : 'addClass'](MORE);\r\n });\r\n } else {\r\n title.find('.'+ BAR).remove();\r\n othis.removeAttr('overflow');\r\n }\r\n });\r\n }\r\n // 隐藏更多 Tab\r\n ,hideTabMore: function(e){\r\n var tsbTitle = $('.layui-tab-title');\r\n if(e === true || $(e.target).attr('lay-stope') !== 'tabmore'){\r\n tsbTitle.removeClass('layui-tab-more');\r\n tsbTitle.find('.layui-tab-bar').attr('title','');\r\n }\r\n }\r\n \r\n //点击一级菜单\r\n /*\r\n ,clickThis: function(){\r\n var othis = $(this), parents = othis.parents(NAV_ELEM)\r\n ,filter = parents.attr('lay-filter')\r\n ,elemA = othis.find('a')\r\n ,unselect = typeof othis.attr('lay-unselect') === 'string';\r\n\r\n if(othis.find('.'+NAV_CHILD)[0]) return;\r\n \r\n if(!(elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank') && !unselect){\r\n parents.find('.'+THIS).removeClass(THIS);\r\n othis.addClass(THIS);\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n )\r\n */\r\n \r\n // 点击菜单 - a 标签触发\r\n ,clickThis: function() {\r\n var othis = $(this);\r\n var parents = othis.closest(NAV_ELEM);\r\n var filter = parents.attr('lay-filter');\r\n var parent = othis.parent() ;\r\n var child = othis.siblings('.'+ NAV_CHILD);\r\n var unselect = typeof parent.attr('lay-unselect') === 'string'; // 是否禁用选中\r\n \r\n // 满足点击选中的条件\r\n if (!(othis.attr('href') !== 'javascript:;' && othis.attr('target') === '_blank') && !unselect) {\r\n if (!child[0]) {\r\n parents.find('.'+ THIS).removeClass(THIS);\r\n parent.addClass(THIS);\r\n }\r\n }\r\n \r\n // 若为垂直菜单\r\n if (parents.hasClass(NAV_TREE)) {\r\n var NAV_ITEMED = NAV_ITEM + 'ed'; // 用于标注展开状态\r\n var needExpand = !parent.hasClass(NAV_ITEMED); // 是否执行展开\r\n var ANIM_MS = 200; // 动画过渡毫秒数\r\n\r\n // 动画执行完成后的操作\r\n var complete = function() {\r\n $(this).css({\r\n \"display\": \"\" // 剔除动画生成的 style display以适配外部样式的状态重置\r\n });\r\n // 避免导航滑块错位\r\n parents.children('.'+ NAV_BAR).css({\r\n opacity: 0\r\n })\r\n };\r\n\r\n // 是否正处于动画中的状态\r\n if (child.is(':animated')) return;\r\n\r\n // 剔除可能存在的 CSS3 动画类\r\n child.removeClass(NAV_ANIM);\r\n\r\n // 若有子菜单,则对其执行展开或收缩\r\n if (child[0]) {\r\n if (needExpand) {\r\n // 先执行 slideDown 动画,再标注展开状态样式,避免元素 `block` 状态导致动画无效\r\n child.slideDown(ANIM_MS, complete);\r\n parent.addClass(NAV_ITEMED);\r\n } else {\r\n // 先取消展开状态样式,再将元素临时显示,避免 `none` 状态导致 slideUp 动画无效\r\n parent.removeClass(NAV_ITEMED);\r\n child.show().slideUp(ANIM_MS, complete);\r\n }\r\n\r\n // 手风琴 --- 收缩兄弟展开项\r\n if (typeof parents.attr('lay-accordion') === 'string' || parents.attr('lay-shrink') === 'all') {\r\n var parentSibs = parent.siblings('.'+ NAV_ITEMED);\r\n parentSibs.removeClass(NAV_ITEMED);\r\n parentSibs.children('.'+ NAV_CHILD).show().stop().slideUp(ANIM_MS, complete);\r\n }\r\n }\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n \r\n // 折叠面板\r\n ,collapse: function(){\r\n var othis = $(this);\r\n var icon = othis.find('.layui-colla-icon');\r\n var elemCont = othis.siblings('.layui-colla-content');\r\n var parents = othis.parents('.layui-collapse').eq(0);\r\n var filter = parents.attr('lay-filter');\r\n var isNone = elemCont.css('display') === 'none';\r\n \r\n // 是否手风琴\r\n if(typeof parents.attr('lay-accordion') === 'string'){\r\n var show = parents.children('.layui-colla-item').children('.'+SHOW);\r\n show.siblings('.layui-colla-title').children('.layui-colla-icon').html('&#xe602;');\r\n show.removeClass(SHOW);\r\n }\r\n \r\n elemCont[isNone ? 'addClass' : 'removeClass'](SHOW);\r\n icon.html(isNone ? '&#xe61a;' : '&#xe602;');\r\n \r\n layui.event.call(this, MOD_NAME, 'collapse('+ filter +')', {\r\n title: othis\r\n ,content: elemCont\r\n ,show: isNone\r\n });\r\n }\r\n };\r\n \r\n // 初始化元素操作\r\n Element.prototype.init = function(type, filter){\r\n var that = this, elemFilter = function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }(), items = {\r\n \r\n // Tab 选项卡\r\n tab: function(){\r\n call.tabAuto.call({});\r\n }\r\n \r\n // 导航菜单\r\n ,nav: function(){\r\n var TIME = 200;\r\n var timer = {};\r\n var timerMore = {};\r\n var timeEnd = {};\r\n var NAV_TITLE = 'layui-nav-title';\r\n \r\n // 滑块跟随\r\n var follow = function(bar, nav, index) {\r\n var othis = $(this);\r\n var child = othis.find('.'+NAV_CHILD);\r\n\r\n // 是否垂直导航菜单\r\n if (nav.hasClass(NAV_TREE)) {\r\n // 无子菜单时跟随\r\n if (!child[0]) {\r\n var thisA = othis.children('.'+ NAV_TITLE);\r\n bar.css({\r\n top: othis.offset().top - nav.offset().top,\r\n height: (thisA[0] ? thisA : othis).outerHeight(),\r\n opacity: 1\r\n });\r\n }\r\n } else {\r\n child.addClass(NAV_ANIM);\r\n \r\n // 若居中对齐\r\n if (child.hasClass(NAV_CHILD_C)) {\r\n child.css({\r\n left: -(child.outerWidth() - othis.width()) / 2\r\n });\r\n }\r\n \r\n // 滑块定位\r\n if (child[0]) { // 若有子菜单,则滑块消失\r\n bar.css({\r\n left: bar.position().left + bar.width() / 2,\r\n width: 0,\r\n opacity: 0\r\n });\r\n } else { // bar 跟随\r\n bar.css({\r\n left: othis.position().left + parseFloat(othis.css('marginLeft')),\r\n top: othis.position().top + othis.height() - bar.height()\r\n });\r\n }\r\n \r\n // 渐显滑块并适配宽度\r\n timer[index] = setTimeout(function() {\r\n bar.css({\r\n width: child[0] ? 0 : othis.width(),\r\n opacity: child[0] ? 0 : 1\r\n });\r\n }, device.ie && device.ie < 10 ? 0 : TIME);\r\n \r\n // 显示子菜单\r\n clearTimeout(timeEnd[index]);\r\n if (child.css('display') === 'block') {\r\n clearTimeout(timerMore[index]);\r\n }\r\n timerMore[index] = setTimeout(function(){\r\n child.addClass(SHOW);\r\n othis.find('.'+NAV_MORE).addClass(NAV_MORE+'d');\r\n }, 300);\r\n }\r\n };\r\n \r\n // 遍历导航\r\n $(NAV_ELEM + elemFilter).each(function(index) {\r\n var othis = $(this);\r\n var bar = $('<span class=\"'+ NAV_BAR +'\"></span>');\r\n var itemElem = othis.find('.'+NAV_ITEM);\r\n \r\n // hover 滑动效果\r\n if (!othis.find('.'+NAV_BAR)[0]) {\r\n othis.append(bar);\r\n ( othis.hasClass(NAV_TREE)\r\n ? itemElem.find('dd,>.'+ NAV_TITLE) \r\n : itemElem\r\n ).on('mouseenter', function() {\r\n follow.call(this, bar, othis, index);\r\n }).on('mouseleave', function() { // 鼠标移出\r\n // 是否为垂直导航\r\n if (othis.hasClass(NAV_TREE)) {\r\n bar.css({\r\n height: 0,\r\n opacity: 0\r\n });\r\n } else {\r\n // 隐藏子菜单\r\n clearTimeout(timerMore[index]);\r\n timerMore[index] = setTimeout(function(){\r\n othis.find('.'+ NAV_CHILD).removeClass(SHOW);\r\n othis.find('.'+ NAV_MORE).removeClass(NAV_MORE +'d');\r\n }, 300);\r\n }\r\n });\r\n\r\n // 鼠标离开当前菜单时\r\n othis.on('mouseleave', function() {\r\n clearTimeout(timer[index])\r\n timeEnd[index] = setTimeout(function() {\r\n if (!othis.hasClass(NAV_TREE)) {\r\n bar.css({\r\n width: 0,\r\n left: bar.position().left + bar.width() / 2,\r\n opacity: 0\r\n });\r\n }\r\n }, TIME);\r\n });\r\n }\r\n \r\n // 展开子菜单\r\n itemElem.find('a').each(function() {\r\n var thisA = $(this);\r\n var parent = thisA.parent();\r\n var child = thisA.siblings('.'+ NAV_CHILD);\r\n \r\n // 输出小箭头\r\n if (child[0] && !thisA.children('.'+ NAV_MORE)[0]) {\r\n thisA.append('<i class=\"layui-icon '+ NAV_DOWN +' '+ NAV_MORE +'\"></i>');\r\n }\r\n \r\n thisA.off('click', call.clickThis).on('click', call.clickThis); // 点击菜单\r\n });\r\n });\r\n }\r\n \r\n //面包屑\r\n ,breadcrumb: function(){\r\n var ELEM = '.layui-breadcrumb';\r\n \r\n $(ELEM + elemFilter).each(function(){\r\n var othis = $(this)\r\n ,ATTE_SPR = 'lay-separator'\r\n ,separator = othis.attr(ATTE_SPR) || '/'\r\n ,aNode = othis.find('a');\r\n if(aNode.next('span['+ ATTE_SPR +']')[0]) return;\r\n aNode.each(function(index){\r\n if(index === aNode.length - 1) return;\r\n $(this).after('<span '+ ATTE_SPR +'>'+ separator +'</span>');\r\n });\r\n othis.css('visibility', 'visible');\r\n });\r\n }\r\n \r\n //进度条\r\n ,progress: function(){\r\n var ELEM = 'layui-progress';\r\n $('.' + ELEM + elemFilter).each(function(){\r\n var othis = $(this)\r\n ,elemBar = othis.find('.layui-progress-bar')\r\n ,percent = elemBar.attr('lay-percent');\r\n\r\n elemBar.css('width', function(){\r\n return /^.+\\/.+$/.test(percent) \r\n ? (new Function('return '+ percent)() * 100) + '%'\r\n : percent;\r\n });\r\n \r\n if(othis.attr('lay-showpercent')){\r\n setTimeout(function(){\r\n elemBar.html('<span class=\"'+ ELEM +'-text\">'+ percent +'</span>');\r\n },350);\r\n }\r\n });\r\n }\r\n \r\n //折叠面板\r\n ,collapse: function(){\r\n var ELEM = 'layui-collapse';\r\n \r\n $('.' + ELEM + elemFilter).each(function(){\r\n var elemItem = $(this).find('.layui-colla-item')\r\n elemItem.each(function(){\r\n var othis = $(this)\r\n ,elemTitle = othis.find('.layui-colla-title')\r\n ,elemCont = othis.find('.layui-colla-content')\r\n ,isNone = elemCont.css('display') === 'none';\r\n \r\n //初始状态\r\n elemTitle.find('.layui-colla-icon').remove();\r\n elemTitle.append('<i class=\"layui-icon layui-colla-icon\">'+ (isNone ? '&#xe602;' : '&#xe61a;') +'</i>');\r\n\r\n //点击标题\r\n elemTitle.off('click', call.collapse).on('click', call.collapse);\r\n }); \r\n \r\n });\r\n }\r\n };\r\n\r\n return items[type] ? items[type]() : layui.each(items, function(index, item){\r\n item();\r\n });\r\n };\r\n \r\n Element.prototype.render = Element.prototype.init;\r\n\r\n var element = new Element();\r\n var dom = $(document);\r\n \r\n $(function(){\r\n element.render();\r\n });\r\n\r\n dom.on('click', '.layui-tab-title li', call.tabClick); // Tab 切换\r\n // dom.on('click', call.hideTabMore); // 隐藏展开的 Tab\r\n $(window).on('resize', call.tabAuto); // 自适应\r\n \r\n exports(MOD_NAME, element);\r\n});\r\n\r\n","/**\r\n * upload\r\n * 上传组件\r\n */\r\n \r\nlayui.define(['lay', 'layer'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var layer = layui.layer;\r\n var device = layui.device();\r\n\r\n // 模块名\r\n var MOD_NAME = 'upload';\r\n var MOD_INDEX = 'layui_'+ MOD_NAME +'_index'; // 模块索引名\r\n\r\n // 外部接口\r\n var upload = {\r\n config: {}, // 全局配置项\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0, // 索引\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n upload: function(files){\r\n that.upload.call(that, files);\r\n },\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n config: that.config\r\n }\r\n };\r\n \r\n // 字符常量\r\n var ELEM = 'layui-upload';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled';\r\n \r\n var ELEM_FILE = 'layui-upload-file';\r\n var ELEM_FORM = 'layui-upload-form';\r\n var ELEM_IFRAME = 'layui-upload-iframe';\r\n var ELEM_CHOOSE = 'layui-upload-choose';\r\n var ELEM_DRAG = 'layui-upload-drag';\r\n var UPLOADING = 'UPLOADING';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++upload.index;\r\n that.config = $.extend({}, that.config, upload.config, options);\r\n that.render();\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n accept: 'images', // 允许上传的文件类型images/file/video/audio\r\n exts: '', // 允许上传的文件后缀名\r\n auto: true, // 是否选完文件后自动上传\r\n bindAction: '', // 手动上传触发的元素\r\n url: '', // 上传地址\r\n force: '', // 强制规定返回的数据格式,目前只支持是否强制 json\r\n field: 'file', // 文件字段名\r\n acceptMime: '', // 筛选出的文件类型,默认为所有文件\r\n method: 'post', // 请求上传的 http 类型\r\n data: {}, // 请求上传的额外参数\r\n drag: true, // 是否允许拖拽上传\r\n size: 0, // 文件限制大小,默认不限制\r\n number: 0, // 允许同时上传的文件数,默认不限制\r\n multiple: false, // 是否允许多文件上传,不支持 ie8-9\r\n text: { // 自定义提示文本\r\n \"cross-domain\": \"Cross-domain requests are not supported\", // 跨域\r\n \"data-format-error\": \"Please return JSON data format\", // 数据格式错误\r\n \"check-error\": \"\", // 文件格式校验失败\r\n \"error\": \"\", // 上传失败\r\n \"limit-number\": null, // 限制 number 属性的提示 --- function\r\n \"limit-size\": null // 限制 size 属性的提示 --- function\r\n }\r\n };\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.render(true);\r\n };\r\n \r\n // 初始渲染\r\n Class.prototype.render = function(rerender){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if (elem.length > 1) {\r\n layui.each(elem, function() {\r\n upload.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0], {\r\n attr: elem.attr('lay-data') ? 'lay-data' : null // 兼容旧版的 lay-data 属性\r\n }));\r\n\r\n // 若重复执行 render则视为 reload 处理\r\n if (!rerender && elem[0] && elem.data(MOD_INDEX)) {\r\n var newThat = thisModule.getThis(elem.data(MOD_INDEX));\r\n if(!newThat) return;\r\n\r\n return newThat.reload(options);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n options.bindAction = $(options.bindAction);\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n that.file();\r\n that.events();\r\n };\r\n \r\n //追加文件域\r\n Class.prototype.file = function(){\r\n var that = this;\r\n var options = that.config;\r\n var elemFile = that.elemFile = $([\r\n '<input class=\"'+ ELEM_FILE +'\" type=\"file\" accept=\"'+ options.acceptMime +'\" name=\"'+ options.field +'\"'\r\n ,(options.multiple ? ' multiple' : '') \r\n ,'>'\r\n ].join(''));\r\n var next = options.elem.next();\r\n \r\n if(next.hasClass(ELEM_FILE) || next.hasClass(ELEM_FORM)){\r\n next.remove();\r\n }\r\n \r\n //包裹ie8/9容器\r\n if(device.ie && device.ie < 10){\r\n options.elem.wrap('<div class=\"layui-upload-wrap\"></div>');\r\n }\r\n \r\n that.isFile() ? (\r\n that.elemFile = options.elem,\r\n options.field = options.elem[0].name\r\n ) : options.elem.after(elemFile);\r\n \r\n //初始化ie8/9的Form域\r\n if(device.ie && device.ie < 10){\r\n that.initIE();\r\n }\r\n };\r\n \r\n //ie8-9初始化\r\n Class.prototype.initIE = function(){\r\n var that = this;\r\n var options = that.config;\r\n var iframe = $('<iframe id=\"'+ ELEM_IFRAME +'\" class=\"'+ ELEM_IFRAME +'\" name=\"'+ ELEM_IFRAME +'\" frameborder=\"0\"></iframe>');\r\n var elemForm = $(['<form target=\"'+ ELEM_IFRAME +'\" class=\"'+ ELEM_FORM +'\" method=\"post\" key=\"set-mine\" enctype=\"multipart/form-data\" action=\"'+ options.url +'\">'\r\n ,'</form>'].join(''));\r\n \r\n //插入iframe \r\n $('#'+ ELEM_IFRAME)[0] || $('body').append(iframe);\r\n\r\n //包裹文件域\r\n if(!options.elem.next().hasClass(ELEM_FORM)){\r\n that.elemFile.wrap(elemForm); \r\n \r\n //追加额外的参数\r\n options.elem.next('.'+ ELEM_FORM).append(function(){\r\n var arr = [];\r\n layui.each(options.data, function(key, value){\r\n value = typeof value === 'function' ? value() : value;\r\n arr.push('<input type=\"hidden\" name=\"'+ key +'\" value=\"'+ value +'\">')\r\n });\r\n return arr.join('');\r\n }());\r\n }\r\n };\r\n \r\n //异常提示\r\n Class.prototype.msg = function(content){\r\n return layer.msg(content, {\r\n icon: 2,\r\n shift: 6\r\n });\r\n };\r\n \r\n //判断绑定元素是否为文件域本身\r\n Class.prototype.isFile = function(){\r\n var elem = this.config.elem[0];\r\n if(!elem) return;\r\n return elem.tagName.toLocaleLowerCase() === 'input' && elem.type === 'file'\r\n }\r\n \r\n //预读图片信息\r\n Class.prototype.preview = function(callback){\r\n var that = this;\r\n if(window.FileReader){\r\n layui.each(that.chooseFiles, function(index, file){\r\n var reader = new FileReader();\r\n reader.readAsDataURL(file); \r\n reader.onload = function(){\r\n callback && callback(index, file, this.result);\r\n }\r\n });\r\n }\r\n };\r\n \r\n // 执行上传\r\n Class.prototype.upload = function(files, type){\r\n var that = this;\r\n var options = that.config;\r\n var text = options.text || {};\r\n var elemFile = that.elemFile[0];\r\n\r\n // 获取文件队列\r\n var getFiles = function(){\r\n return files || that.files || that.chooseFiles || elemFile.files;\r\n };\r\n \r\n // 高级浏览器处理方式,支持跨域\r\n var ajaxSend = function(){\r\n var successful = 0;\r\n var failed = 0;\r\n var items = getFiles();\r\n\r\n // 多文件全部上传完毕的回调\r\n var allDone = function(){\r\n if(options.multiple && successful + failed === that.fileLength){\r\n typeof options.allDone === 'function' && options.allDone({\r\n total: that.fileLength,\r\n successful: successful,\r\n failed: failed\r\n });\r\n }\r\n };\r\n\r\n // 发送请求\r\n var request = function(sets){\r\n var formData = new FormData();\r\n\r\n // 恢复文件状态\r\n var resetFileState = function(file) {\r\n if (sets.unified) {\r\n layui.each(items, function(index, file){\r\n delete file[UPLOADING];\r\n });\r\n } else {\r\n delete file[UPLOADING];\r\n }\r\n };\r\n\r\n // 追加额外的参数\r\n layui.each(options.data, function(key, value){\r\n value = typeof value === 'function' ? value() : value;\r\n formData.append(key, value);\r\n });\r\n\r\n /*\r\n * 添加 file 到表单域\r\n */\r\n\r\n // 是否统一上传\r\n if (sets.unified) {\r\n layui.each(items, function(index, file){\r\n if (file[UPLOADING]) return;\r\n file[UPLOADING] = true; // 上传中的标记\r\n formData.append(options.field, file);\r\n });\r\n } else { // 逐一上传\r\n if (sets.file[UPLOADING]) return;\r\n formData.append(options.field, sets.file);\r\n sets.file[UPLOADING] = true; // 上传中的标记\r\n }\r\n\r\n // ajax 参数\r\n var opts = {\r\n url: options.url,\r\n type: 'post', // 统一采用 post 上传\r\n data: formData,\r\n dataType: options.dataType || 'json',\r\n contentType: false,\r\n processData: false,\r\n headers: options.headers || {},\r\n success: function(res){ // 成功回调\r\n options.unified ? (successful += that.fileLength) : successful++;\r\n done(sets.index, res);\r\n allDone(sets.index);\r\n resetFileState(sets.file);\r\n },\r\n error: function(e){ // 异常回调\r\n options.unified ? (failed += that.fileLength) : failed++;\r\n that.msg(text['error'] || [\r\n 'Upload failed, please try again.',\r\n 'status: '+ (e.status || '') +' - '+ (e.statusText || 'error')\r\n ].join('<br>'));\r\n error(sets.index);\r\n allDone(sets.index);\r\n resetFileState(sets.file);\r\n }\r\n };\r\n\r\n // 进度条\r\n if(typeof options.progress === 'function'){\r\n opts.xhr = function(){\r\n var xhr = $.ajaxSettings.xhr();\r\n // 上传进度\r\n xhr.upload.addEventListener(\"progress\", function (obj) {\r\n if(obj.lengthComputable){\r\n var percent = Math.floor((obj.loaded/obj.total)* 100); // 百分比\r\n options.progress(percent, (options.item ? options.item[0] : options.elem[0]) , obj, sets.index);\r\n }\r\n });\r\n return xhr;\r\n }\r\n }\r\n $.ajax(opts);\r\n };\r\n\r\n // 多文件是否一起上传\r\n if(options.unified){\r\n request({\r\n unified: true,\r\n index: 0\r\n });\r\n } else {\r\n layui.each(items, function(index, file){\r\n request({\r\n index: index,\r\n file: file\r\n });\r\n });\r\n }\r\n };\r\n \r\n // 低版本 IE 处理方式,不支持跨域\r\n var iframeSend = function(){\r\n var iframe = $('#'+ ELEM_IFRAME);\r\n \r\n that.elemFile.parent().submit();\r\n\r\n // 获取响应信息\r\n clearInterval(Class.timer);\r\n Class.timer = setInterval(function() {\r\n var res, iframeBody = iframe.contents().find('body');\r\n try {\r\n res = iframeBody.text();\r\n } catch(e) {\r\n that.msg(text['cross-domain']); \r\n clearInterval(Class.timer);\r\n error();\r\n }\r\n if(res){\r\n clearInterval(Class.timer);\r\n iframeBody.html('');\r\n done(0, res);\r\n }\r\n }, 30); \r\n };\r\n \r\n // 统一回调\r\n var done = function(index, res){\r\n that.elemFile.next('.'+ ELEM_CHOOSE).remove();\r\n elemFile.value = '';\r\n \r\n if(options.force === 'json'){\r\n if(typeof res !== 'object'){\r\n try {\r\n res = JSON.parse(res);\r\n } catch(e){\r\n res = {};\r\n return that.msg(text['data-format-error']);\r\n }\r\n }\r\n }\r\n \r\n typeof options.done === 'function' && options.done(res, index || 0, function(files){\r\n that.upload(files);\r\n });\r\n };\r\n \r\n // 统一网络异常回调\r\n var error = function(index){\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n typeof options.error === 'function' && options.error(index || 0, function(files){\r\n that.upload(files);\r\n });\r\n };\r\n \r\n var check;\r\n var exts = options.exts;\r\n var value = function(){\r\n var arr = [];\r\n layui.each(files || that.chooseFiles, function(i, item){\r\n arr.push(item.name);\r\n });\r\n return arr;\r\n }();\r\n \r\n // 回调函数返回的参数\r\n var args = {\r\n // 预览\r\n preview: function(callback){\r\n that.preview(callback);\r\n },\r\n // 上传\r\n upload: function(index, file){\r\n var thisFile = {};\r\n thisFile[index] = file;\r\n that.upload(thisFile);\r\n },\r\n // 追加文件到队列\r\n pushFile: function(){\r\n that.files = that.files || {};\r\n layui.each(that.chooseFiles, function(index, item){\r\n that.files[index] = item;\r\n });\r\n return that.files;\r\n },\r\n // 重置文件\r\n resetFile: function(index, file, filename){\r\n var newFile = new File([file], filename);\r\n that.files = that.files || {};\r\n that.files[index] = newFile;\r\n }\r\n };\r\n \r\n // 提交上传\r\n var send = function(){\r\n // 上传前的回调 - 如果回调函数明确返回 false则停止上传\r\n if(options.before && (options.before(args) === false)) return;\r\n\r\n // IE 兼容处理\r\n if(device.ie){\r\n return device.ie > 9 ? ajaxSend() : iframeSend();\r\n }\r\n \r\n ajaxSend();\r\n };\r\n \r\n // 文件类型名称\r\n var typeName = ({\r\n file: '文件',\r\n images: '图片',\r\n video: '视频',\r\n audio: '音频'\r\n })[options.accept] || '文件';\r\n\r\n // 校验文件格式\r\n value = value.length === 0 \r\n ? ((elemFile.value.match(/[^\\/\\\\]+\\..+/g)||[]) || '')\r\n : value;\r\n \r\n // 若文件域值为空\r\n if (value.length === 0) return;\r\n \r\n // 根据文件类型校验\r\n switch(options.accept){\r\n case 'file': // 一般文件\r\n layui.each(value, function(i, item){\r\n if(exts && !RegExp('.\\\\.('+ exts +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n case 'video': // 视频文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'avi|mp4|wma|rmvb|rm|flash|3gp|flv') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n case 'audio': // 音频文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'mp3|wav|mid') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n default: // 图片文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'jpg|png|gif|bmp|jpeg|svg') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n }\r\n \r\n // 校验失败提示\r\n if(check){\r\n that.msg(text['check-error'] || ('选择的'+ typeName +'中包含不支持的格式'));\r\n return elemFile.value = '';\r\n }\r\n\r\n // 选择文件的回调 \r\n if(type === 'choose' || options.auto){\r\n options.choose && options.choose(args);\r\n if(type === 'choose'){\r\n return;\r\n }\r\n }\r\n \r\n // 检验文件数量\r\n that.fileLength = function(){\r\n var length = 0;\r\n var items = getFiles();\r\n layui.each(items, function(){\r\n length++;\r\n });\r\n return length;\r\n }();\r\n \r\n if(options.number && that.fileLength > options.number){\r\n return that.msg(typeof text['limit-number'] === 'function' \r\n ? text['limit-number'](options, that.fileLength) \r\n : (\r\n '同时最多只能上传: '+ options.number + ' 个文件'\r\n +'<br>您当前已经选择了: '+ that.fileLength +' 个文件'\r\n ));\r\n }\r\n \r\n // 检验文件大小\r\n if(options.size > 0 && !(device.ie && device.ie < 10)){\r\n var limitSize;\r\n \r\n layui.each(getFiles(), function(index, file){\r\n if(file.size > 1024*options.size){\r\n var size = options.size/1024;\r\n size = size >= 1 ? (size.toFixed(2) + 'MB') : options.size + 'KB'\r\n elemFile.value = '';\r\n limitSize = size;\r\n }\r\n });\r\n if(limitSize) return that.msg(typeof text['limit-size'] === 'function' \r\n ? text['limit-size'](options, limitSize) \r\n : '文件大小不能超过 '+ limitSize);\r\n }\r\n\r\n send();\r\n };\r\n \r\n //事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 设置当前选择的文件队列\r\n var setChooseFile = function(files){\r\n that.chooseFiles = {};\r\n layui.each(files, function(i, item){\r\n var time = new Date().getTime();\r\n that.chooseFiles[time + '-' + i] = item;\r\n });\r\n };\r\n \r\n // 设置选择的文本\r\n var setChooseText = function(files, filename){\r\n var elemFile = that.elemFile;\r\n var item = options.item ? options.item : options.elem;\r\n var value = files.length > 1 \r\n ? files.length + '个文件' \r\n : ((files[0] || {}).name || (elemFile[0].value.match(/[^\\/\\\\]+\\..+/g)||[]) || '');\r\n \r\n if(elemFile.next().hasClass(ELEM_CHOOSE)){\r\n elemFile.next().remove();\r\n }\r\n that.upload(null, 'choose');\r\n if(that.isFile() || options.choose) return;\r\n elemFile.after('<span class=\"layui-inline '+ ELEM_CHOOSE +'\">'+ value +'</span>');\r\n };\r\n\r\n // 点击上传容器\r\n options.elem.off('upload.start').on('upload.start', function(){\r\n var othis = $(this);\r\n\r\n that.config.item = othis;\r\n that.elemFile[0].click();\r\n });\r\n \r\n // 拖拽上传\r\n if(!(device.ie && device.ie < 10)){\r\n options.elem.off('upload.over').on('upload.over', function(){\r\n var othis = $(this)\r\n othis.attr('lay-over', '');\r\n })\r\n .off('upload.leave').on('upload.leave', function(){\r\n var othis = $(this)\r\n othis.removeAttr('lay-over');\r\n })\r\n .off('upload.drop').on('upload.drop', function(e, param){\r\n var othis = $(this);\r\n var files = param.originalEvent.dataTransfer.files || [];\r\n \r\n othis.removeAttr('lay-over');\r\n setChooseFile(files);\r\n\r\n options.auto ? that.upload() : setChooseText(files); // 是否自动触发上传\r\n });\r\n }\r\n \r\n // 文件选择\r\n that.elemFile.on('change', function(){\r\n var files = this.files || [];\r\n\r\n if(files.length === 0) return;\r\n\r\n setChooseFile(files);\r\n\r\n options.auto ? that.upload() : setChooseText(files); // 是否自动触发上传\r\n });\r\n \r\n // 手动触发上传\r\n options.bindAction.off('upload.action').on('upload.action', function(){\r\n that.upload();\r\n });\r\n\r\n\r\n // 防止事件重复绑定\r\n if(options.elem.data(MOD_INDEX)) return;\r\n\r\n\r\n // 目标元素 click 事件\r\n options.elem.on('click', function(){\r\n if(that.isFile()) return;\r\n $(this).trigger('upload.start');\r\n });\r\n \r\n // 目标元素 drop 事件\r\n if(options.drag){\r\n options.elem.on('dragover', function(e){\r\n e.preventDefault();\r\n $(this).trigger('upload.over');\r\n }).on('dragleave', function(e){\r\n $(this).trigger('upload.leave');\r\n }).on('drop', function(e){\r\n e.preventDefault();\r\n $(this).trigger('upload.drop', e);\r\n });\r\n }\r\n \r\n // 手动上传时触发上传的元素 click 事件\r\n options.bindAction.on('click', function(){\r\n $(this).trigger('upload.action');\r\n });\r\n \r\n // 绑定元素索引\r\n options.elem.data(MOD_INDEX, options.id);\r\n };\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n\r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 核心入口 \r\n upload.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n \r\n exports(MOD_NAME, upload);\r\n});\r\n\r\n","/**\r\n * form 表单组件\r\n */\r\n \r\nlayui.define(['lay', 'layer', 'util'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var layer = layui.layer;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n \r\n var MOD_NAME = 'form';\r\n var ELEM = '.layui-form';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled';\r\n var OUT_OF_RANGE = 'layui-input-number-out-of-range';\r\n \r\n var Form = function(){\r\n this.config = {\r\n // 内置的验证规则\r\n verify: {\r\n required: function(value) {\r\n if (!/[\\S]+/.test(value)) {\r\n return '必填项不能为空';\r\n }\r\n },\r\n phone: function(value) {\r\n var EXP = /^1\\d{10}$/;\r\n if (value && !EXP.test(value)) {\r\n return '手机号格式不正确';\r\n }\r\n },\r\n email: function(value) {\r\n var EXP = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\r\n if (value && !EXP.test(value)) {\r\n return '邮箱格式不正确';\r\n }\r\n },\r\n url: function(value) {\r\n var EXP = /^(#|(http(s?)):\\/\\/|\\/\\/)[^\\s]+\\.[^\\s]+$/;\r\n if (value && !EXP.test(value)) {\r\n return '链接格式不正确';\r\n }\r\n },\r\n number: function(value){\r\n if (value && isNaN(value)) {\r\n return '只能填写数字';\r\n }\r\n },\r\n date: function(value){\r\n var EXP = /^(\\d{4})[-\\/](\\d{1}|0\\d{1}|1[0-2])([-\\/](\\d{1}|0\\d{1}|[1-2][0-9]|3[0-1]))*$/;\r\n if (value && !EXP.test(value)) {\r\n return '日期格式不正确';\r\n }\r\n },\r\n identity: function(value) {\r\n var EXP = /(^\\d{15}$)|(^\\d{17}(x|X|\\d)$)/;\r\n if (value && !EXP.test(value)) {\r\n return '身份证号格式不正确';\r\n }\r\n }\r\n },\r\n autocomplete: null // 全局 autocomplete 状态。 null 表示不干预\r\n };\r\n };\r\n \r\n // 全局设置\r\n Form.prototype.set = function(options){\r\n var that = this;\r\n $.extend(true, that.config, options);\r\n return that;\r\n };\r\n \r\n // 验证规则设定\r\n Form.prototype.verify = function(settings){\r\n var that = this;\r\n $.extend(true, that.config.verify, settings);\r\n return that;\r\n };\r\n\r\n // 获取指定表单对象\r\n Form.prototype.getFormElem = function(filter){\r\n return $(ELEM + function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }());\r\n };\r\n \r\n // 表单事件\r\n Form.prototype.on = function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n };\r\n \r\n // 赋值/取值\r\n Form.prototype.val = function(filter, object){\r\n var that = this\r\n ,formElem = that.getFormElem(filter);\r\n \r\n // 遍历\r\n formElem.each(function(index, item){\r\n var itemForm = $(this);\r\n \r\n // 赋值\r\n layui.each(object, function(key, value){\r\n var itemElem = itemForm.find('[name=\"'+ key +'\"]')\r\n ,type;\r\n \r\n // 如果对应的表单不存在,则不执行\r\n if(!itemElem[0]) return;\r\n type = itemElem[0].type;\r\n \r\n // 如果为复选框\r\n if(type === 'checkbox'){\r\n itemElem[0].checked = value;\r\n } else if(type === 'radio') { // 如果为单选框\r\n itemElem.each(function(){\r\n this.checked = this.value == value;\r\n });\r\n } else { // 其它类型的表单\r\n itemElem.val(value);\r\n }\r\n });\r\n });\r\n \r\n form.render(null, filter);\r\n \r\n // 返回值\r\n return that.getValue(filter);\r\n };\r\n \r\n // 取值\r\n Form.prototype.getValue = function(filter, itemForm){\r\n itemForm = itemForm || this.getFormElem(filter);\r\n \r\n var nameIndex = {} // 数组 name 索引\r\n ,field = {}\r\n ,fieldElem = itemForm.find('input,select,textarea') // 获取所有表单域\r\n \r\n layui.each(fieldElem, function(_, item){ \r\n var othis = $(this)\r\n ,init_name; // 初始 name\r\n \r\n item.name = (item.name || '').replace(/^\\s*|\\s*&/, '');\r\n if(!item.name) return;\r\n \r\n // 用于支持数组 name\r\n if(/^.*\\[\\]$/.test(item.name)){\r\n var key = item.name.match(/^(.*)\\[\\]$/g)[0];\r\n nameIndex[key] = nameIndex[key] | 0;\r\n init_name = item.name.replace(/^(.*)\\[\\]$/, '$1['+ (nameIndex[key]++) +']');\r\n }\r\n \r\n if(/^(checkbox|radio)$/.test(item.type) && !item.checked) return; // 复选框和单选框未选中,不记录字段 \r\n field[init_name || item.name] = item.value;\r\n });\r\n \r\n return field;\r\n };\r\n \r\n // 表单控件渲染\r\n Form.prototype.render = function(type, filter){\r\n var that = this;\r\n var options = that.config;\r\n var elemForm = $(ELEM + function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }());\r\n var items = {\r\n // 输入框\r\n input: function(elem){\r\n var inputs = elem || elemForm.find('input,textarea');\r\n\r\n // 初始化全局的 autocomplete\r\n options.autocomplete && inputs.attr('autocomplete', options.autocomplete);\r\n\r\n var handleInputNumber = function(elem, eventType){\r\n var that = this;\r\n var rawValue = elem.val();\r\n var value = Number(rawValue);\r\n var step = Number(elem.attr('step')) || 1; // 加减的数字间隔\r\n var min = Number(elem.attr('min'));\r\n var max = Number(elem.attr('max'));\r\n var precision = Number(elem.attr('lay-precision'));\r\n var noAction = eventType !== 'click' && rawValue === ''; // 初始渲染和失焦时空值不作处理\r\n var isInit = eventType === 'init';\r\n\r\n if(isNaN(value)) return; // 若非数字,则不作处理\r\n\r\n if(eventType === 'click'){\r\n var isDecrement = !!$(that).index() // 0: icon-up, 1: icon-down\r\n value = isDecrement ? value - step : value + step;\r\n }\r\n\r\n // 获取小数点后位数\r\n var decimals = function(step){\r\n var decimals = (step.toString().match(/\\.(\\d+$)/) || [])[1] || '';\r\n return decimals.length;\r\n };\r\n\r\n precision = precision >= 0 ? precision : Math.max(decimals(step), decimals(rawValue));\r\n\r\n if(!noAction){\r\n // 初始渲染时只处理数字精度\r\n if(!isInit){\r\n if(value <= min) value = min;\r\n if(value >= max) value = max;\r\n }\r\n if(precision) value = value.toFixed(precision);\r\n elem.val(value);\r\n }\r\n\r\n // 超出范围的样式\r\n var outOfRange = value < min || value > max;\r\n elem[outOfRange && !noAction ? 'addClass' : 'removeClass'](OUT_OF_RANGE);\r\n\r\n if(isInit) return;\r\n\r\n // 更新按钮状态\r\n var controlBtn = {\r\n increment: elem.next().find('.layui-icon-up'),\r\n decrement: elem.next().find('.layui-icon-down')\r\n }\r\n controlBtn.increment[(value >= max && !noAction) ? 'addClass' : 'removeClass'](DISABLED)\r\n controlBtn.decrement[(value <= min && !noAction) ? 'addClass' : 'removeClass'](DISABLED)\r\n }\r\n\r\n // 初始化输入框动态点缀\r\n elemForm.find('input[lay-affix],textarea[lay-affix]').each(function(){\r\n var othis = $(this);\r\n var affix = othis.attr('lay-affix');\r\n var CLASS_WRAP = 'layui-input-wrap';\r\n var CLASS_SUFFIX = 'layui-input-suffix';\r\n var CLASS_AFFIX = 'layui-input-affix';\r\n var disabled = othis.is('[disabled]') || othis.is('[readonly]');\r\n\r\n // 根据是否空值来显示或隐藏元素\r\n var showAffix = function(elem, value){\r\n elem = $(elem);\r\n if(!elem[0]) return;\r\n elem[$.trim(value) ? 'removeClass' : 'addClass'](HIDE);\r\n };\r\n\r\n // 渲染动态点缀内容\r\n var renderAffix = function(opts){\r\n opts = $.extend({}, (affixOptions[affix] || {\r\n value: affix\r\n }), opts, lay.options(othis[0]));\r\n var elemAffix = $('<div class=\"'+ CLASS_AFFIX +'\">');\r\n var value = layui.isArray(opts.value) ? opts.value : [opts.value];\r\n var elemIcon = $(function(){\r\n var arr = [];\r\n layui.each(value, function(i, item){\r\n arr.push('<i class=\"layui-icon layui-icon-'+ item + (\r\n opts.disabled ? (' '+ DISABLED) : ''\r\n ) +'\"></i>');\r\n });\r\n return arr.join('');\r\n }());\r\n \r\n elemAffix.append(elemIcon); // 插入图标元素\r\n\r\n // 追加 className\r\n if(opts.split) elemAffix.addClass('layui-input-split');\r\n if(opts.className) elemAffix.addClass(opts.className);\r\n\r\n // 移除旧的元素\r\n var hasElemAffix = othis.next('.'+ CLASS_AFFIX);\r\n if(hasElemAffix[0]) hasElemAffix.remove();\r\n\r\n // 是否在规定的容器中\r\n if(!othis.parent().hasClass(CLASS_WRAP)){\r\n othis.wrap('<div class=\"'+ CLASS_WRAP +'\"></div>');\r\n }\r\n\r\n // 是否已经存在后缀元素\r\n var hasElemSuffix = othis.next('.'+ CLASS_SUFFIX);\r\n if(hasElemSuffix[0]){\r\n hasElemAffix = hasElemSuffix.find('.'+ CLASS_AFFIX);\r\n if(hasElemAffix[0]) hasElemAffix.remove();\r\n\r\n hasElemSuffix.prepend(elemAffix);\r\n\r\n othis.css('padding-right', function(){\r\n var paddingRight = othis.closest('.layui-input-group')[0] \r\n ? 0 \r\n : hasElemSuffix.outerWidth();\r\n return paddingRight + elemAffix.outerWidth()\r\n });\r\n } else {\r\n elemAffix.addClass(CLASS_SUFFIX);\r\n othis.after(elemAffix);\r\n }\r\n\r\n opts.show === 'auto' && showAffix(elemAffix, othis.val());\r\n \r\n typeof opts.init === 'function' && opts.init.call(this, othis, opts);\r\n \r\n // 输入事件\r\n othis.on('input propertychange', function(){\r\n var value = this.value;\r\n opts.show === 'auto' && showAffix(elemAffix, value);\r\n });\r\n\r\n // 失去焦点事件\r\n othis.on('blur', function(){\r\n typeof opts.blur === 'function' && opts.blur.call(this, othis, opts);\r\n });\r\n \r\n // 点击动态后缀事件\r\n elemIcon.on('click', function(){\r\n var inputFilter = othis.attr('lay-filter');\r\n if($(this).hasClass(DISABLED)) return;\r\n \r\n typeof opts.click === 'function' && opts.click.call(this, othis, opts);\r\n \r\n // 对外事件\r\n layui.event.call(this, MOD_NAME, 'input-affix('+ inputFilter +')', {\r\n elem: othis[0],\r\n affix: affix,\r\n options: opts\r\n });\r\n });\r\n };\r\n \r\n // 动态点缀配置项\r\n var affixOptions = {\r\n eye: { // 密码显隐\r\n value: 'eye-invisible',\r\n click: function(elem, opts){ // 事件\r\n var SHOW_NAME = 'LAY_FORM_INPUT_AFFIX_SHOW';\r\n var isShow = elem.data(SHOW_NAME);\r\n \r\n elem.attr('type', isShow ? 'password' : 'text').data(SHOW_NAME, !isShow);\r\n\r\n renderAffix({\r\n value: isShow ? 'eye-invisible' : 'eye'\r\n });\r\n }\r\n },\r\n clear: { // 内容清除\r\n value: 'clear',\r\n click: function(elem){\r\n elem.val('').focus();\r\n showAffix($(this).parent(), null);\r\n },\r\n show: 'auto', // 根据输入框值是否存在来显示或隐藏点缀图标\r\n disabled: disabled // 跟随输入框禁用状态\r\n },\r\n number: { // 数字输入框\r\n value: ['up', 'down'],\r\n split: true,\r\n className: 'layui-input-number',\r\n disabled: othis.is('[disabled]'), // 跟随输入框禁用状态\r\n init: function(elem){\r\n handleInputNumber.call(this, elem, 'init')\r\n },\r\n click: function(elem){\r\n handleInputNumber.call(this, elem, 'click')\r\n },\r\n blur: function(elem){\r\n handleInputNumber.call(this, elem, 'blur')\r\n },\r\n }\r\n };\r\n \r\n renderAffix();\r\n });\r\n }\r\n \r\n // 下拉选择框\r\n ,select: function(elem){\r\n var TIPS = '请选择';\r\n var CLASS = 'layui-form-select';\r\n var TITLE = 'layui-select-title';\r\n var NONE = 'layui-select-none';\r\n var initValue = '';\r\n var thatInput;\r\n var selects = elem || elemForm.find('select');\r\n\r\n // 隐藏 select\r\n var hide = function(e, clear){\r\n if(!$(e.target).parent().hasClass(TITLE) || clear){\r\n $('.'+CLASS).removeClass(CLASS+'ed ' + CLASS+'up');\r\n thatInput && initValue && thatInput.val(initValue);\r\n }\r\n thatInput = null;\r\n };\r\n \r\n // 各种事件\r\n var events = function(reElem, disabled, isSearch){\r\n var select = $(this);\r\n var title = reElem.find('.' + TITLE);\r\n var input = title.find('input');\r\n var dl = reElem.find('dl');\r\n var dds = dl.children('dd');\r\n var dts = dl.children('dt'); // select 分组dt元素\r\n var index = this.selectedIndex; // 当前选中的索引\r\n var nearElem; // select 组件当前选中的附近元素,用于辅助快捷键功能\r\n \r\n if(disabled) return;\r\n\r\n // 搜索项\r\n var laySearch = select.attr('lay-search');\r\n \r\n // 展开下拉\r\n var showDown = function(){\r\n var top = reElem.offset().top + reElem.outerHeight() + 5 - $win.scrollTop();\r\n var dlHeight = dl.outerHeight();\r\n \r\n index = select[0].selectedIndex; // 获取最新的 selectedIndex\r\n reElem.addClass(CLASS+'ed');\r\n dds.removeClass(HIDE);\r\n dts.removeClass(HIDE);\r\n nearElem = null;\r\n\r\n // 初始选中样式\r\n dds.removeClass(THIS);\r\n index >= 0 && dds.eq(index).addClass(THIS);\r\n\r\n // 上下定位识别\r\n if(top + dlHeight > $win.height() && top >= dlHeight){\r\n reElem.addClass(CLASS + 'up');\r\n }\r\n\r\n followScroll();\r\n };\r\n \r\n // 隐藏下拉\r\n var hideDown = function(choose){\r\n reElem.removeClass(CLASS+'ed ' + CLASS+'up');\r\n input.blur();\r\n nearElem = null;\r\n \r\n if(choose) return;\r\n \r\n notOption(input.val(), function(none){\r\n var selectedIndex = select[0].selectedIndex;\r\n \r\n // 未查询到相关值\r\n if(none){\r\n initValue = $(select[0].options[selectedIndex]).html(); // 重新获得初始选中值\r\n \r\n // 如果是第一项,且文本值等于 placeholder则清空初始值\r\n if(selectedIndex === 0 && initValue === input.attr('placeholder')){\r\n initValue = '';\r\n }\r\n\r\n // 如果有选中值,则将输入框纠正为该值。否则清空输入框\r\n input.val(initValue || '');\r\n }\r\n });\r\n };\r\n \r\n // 定位下拉滚动条\r\n var followScroll = function(){ \r\n var thisDd = dl.children('dd.'+ THIS);\r\n \r\n if(!thisDd[0]) return;\r\n \r\n var posTop = thisDd.position().top;\r\n var dlHeight = dl.height();\r\n var ddHeight = thisDd.height();\r\n \r\n // 若选中元素在滚动条不可见底部\r\n if(posTop > dlHeight){\r\n dl.scrollTop(posTop + dl.scrollTop() - dlHeight + ddHeight - 5);\r\n }\r\n \r\n // 若选择元素在滚动条不可见顶部\r\n if(posTop < 0){\r\n dl.scrollTop(posTop + dl.scrollTop() - 5);\r\n }\r\n };\r\n \r\n // 点击标题区域\r\n title.on('click', function(e){\r\n reElem.hasClass(CLASS+'ed') ? (\r\n hideDown()\r\n ) : (\r\n hide(e, true), \r\n showDown()\r\n );\r\n dl.find('.'+NONE).remove();\r\n }); \r\n \r\n // 点击箭头获取焦点\r\n title.find('.layui-edge').on('click', function(){\r\n input.focus();\r\n });\r\n \r\n // select 中 input 键盘事件\r\n input.on('keyup', function(e){ // 键盘松开\r\n var keyCode = e.keyCode;\r\n \r\n // Tab键展开\r\n if(keyCode === 9){\r\n showDown();\r\n }\r\n }).on('keydown', function(e){ // 键盘按下\r\n var keyCode = e.keyCode;\r\n\r\n // Tab键隐藏\r\n if(keyCode === 9){\r\n hideDown();\r\n }\r\n \r\n // 标注 dd 的选中状态\r\n var setThisDd = function(prevNext, thisElem1){\r\n var nearDd, cacheNearElem\r\n e.preventDefault();\r\n\r\n // 得到当前队列元素 \r\n var thisElem = function(){\r\n var thisDd = dl.children('dd.'+ THIS);\r\n \r\n // 如果是搜索状态,且按 Down 键,且当前可视 dd 元素在选中元素之前,\r\n // 则将当前可视 dd 元素的上一个元素作为虚拟的当前选中元素,以保证递归不中断\r\n if(dl.children('dd.'+ HIDE)[0] && prevNext === 'next'){\r\n var showDd = dl.children('dd:not(.'+ HIDE +',.'+ DISABLED +')')\r\n ,firstIndex = showDd.eq(0).index();\r\n if(firstIndex >=0 && firstIndex < thisDd.index() && !showDd.hasClass(THIS)){\r\n return showDd.eq(0).prev()[0] ? showDd.eq(0).prev() : dl.children(':last');\r\n }\r\n }\r\n\r\n if(thisElem1 && thisElem1[0]){\r\n return thisElem1;\r\n }\r\n if(nearElem && nearElem[0]){\r\n return nearElem;\r\n }\r\n \r\n return thisDd;\r\n // return dds.eq(index);\r\n }();\r\n \r\n cacheNearElem = thisElem[prevNext](); // 当前元素的附近元素\r\n nearDd = thisElem[prevNext]('dd:not(.'+ HIDE +')'); // 当前可视元素的 dd 元素\r\n\r\n // 如果附近的元素不存在,则停止执行,并清空 nearElem\r\n if(!cacheNearElem[0]) return nearElem = null;\r\n \r\n // 记录附近的元素,让其成为下一个当前元素\r\n nearElem = thisElem[prevNext]();\r\n\r\n // 如果附近不是 dd ,或者附近的 dd 元素是禁用状态,则进入递归查找\r\n if((!nearDd[0] || nearDd.hasClass(DISABLED)) && nearElem[0]){\r\n return setThisDd(prevNext, nearElem);\r\n }\r\n \r\n nearDd.addClass(THIS).siblings().removeClass(THIS); // 标注样式\r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(keyCode === 38) setThisDd('prev'); // Up 键\r\n if(keyCode === 40) setThisDd('next'); // Down 键\r\n \r\n // Enter 键\r\n if(keyCode === 13){ \r\n e.preventDefault();\r\n dl.children('dd.'+THIS).trigger('click');\r\n }\r\n });\r\n \r\n // 检测值是否不属于 select 项\r\n var notOption = function(value, callback, origin){\r\n var num = 0;\r\n layui.each(dds, function(){\r\n var othis = $(this);\r\n var text = othis.text();\r\n\r\n // 是否区分大小写\r\n if(laySearch !== 'cs'){\r\n text = text.toLowerCase();\r\n value = value.toLowerCase();\r\n }\r\n \r\n // 匹配\r\n var not = text.indexOf(value) === -1;\r\n \r\n if(value === '' || (origin === 'blur') ? value !== text : not) num++;\r\n origin === 'keyup' && othis[not ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n // 处理 select 分组元素\r\n origin === 'keyup' && layui.each(dts, function(){\r\n var othis = $(this)\r\n ,thisDds = othis.nextUntil('dt').filter('dd') // 当前分组下的dd元素\r\n ,allHide = thisDds.length == thisDds.filter('.' + HIDE).length; // 当前分组下所有dd元素都隐藏了\r\n othis[allHide ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n var none = num === dds.length;\r\n return callback(none), none;\r\n };\r\n \r\n // 搜索匹配\r\n var search = function(e){\r\n var value = this.value, keyCode = e.keyCode;\r\n \r\n if(keyCode === 9 || keyCode === 13 \r\n || keyCode === 37 || keyCode === 38 \r\n || keyCode === 39 || keyCode === 40\r\n ){\r\n return false;\r\n }\r\n \r\n notOption(value, function(none){\r\n if(none){\r\n dl.find('.'+NONE)[0] || dl.append('<p class=\"'+ NONE +'\">无匹配项</p>');\r\n } else {\r\n dl.find('.'+NONE).remove();\r\n }\r\n }, 'keyup');\r\n \r\n // 当搜索值清空时\r\n if(value === ''){\r\n // 取消选中项\r\n select.val('');\r\n dl.find('.'+ THIS).removeClass(THIS);\r\n (select[0].options[0] || {}).value || dl.children('dd:eq(0)').addClass(THIS);\r\n dl.find('.'+ NONE).remove();\r\n }\r\n \r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(isSearch){\r\n input.on('input propertychange', search).on('blur', function(e){\r\n var selectedIndex = select[0].selectedIndex;\r\n \r\n thatInput = input; // 当前的 select 中的 input 元素\r\n initValue = $(select[0].options[selectedIndex]).text(); // 重新获得初始选中值\r\n \r\n // 如果是第一项,且文本值等于 placeholder则清空初始值\r\n if(selectedIndex === 0 && initValue === input.attr('placeholder')){\r\n initValue = '';\r\n }\r\n \r\n setTimeout(function(){\r\n notOption(input.val(), function(none){\r\n initValue || input.val(''); // none && !initValue\r\n }, 'blur');\r\n }, 200);\r\n });\r\n }\r\n\r\n // 选择\r\n dds.on('click', function(){\r\n var othis = $(this), value = othis.attr('lay-value');\r\n var filter = select.attr('lay-filter'); // 获取过滤器\r\n \r\n if(othis.hasClass(DISABLED)) return false;\r\n \r\n if(othis.hasClass('layui-select-tips')){\r\n input.val('');\r\n } else {\r\n input.val(othis.text());\r\n othis.addClass(THIS);\r\n }\r\n\r\n othis.siblings().removeClass(THIS);\r\n select.val(value).removeClass('layui-form-danger');\r\n\r\n layui.event.call(this, MOD_NAME, 'select('+ filter +')', {\r\n elem: select[0]\r\n ,value: value\r\n ,othis: reElem\r\n });\r\n\r\n hideDown(true);\r\n return false;\r\n });\r\n \r\n reElem.find('dl>dt').on('click', function(e){\r\n return false;\r\n });\r\n \r\n $(document).off('click', hide).on('click', hide); // 点击其它元素关闭 select\r\n }\r\n \r\n // 初始渲染 select 组件选项\r\n selects.each(function(index, select){\r\n var othis = $(this)\r\n ,hasRender = othis.next('.'+CLASS)\r\n ,disabled = this.disabled\r\n ,value = select.value\r\n ,selected = $(select.options[select.selectedIndex]) // 获取当前选中项\r\n ,optionsFirst = select.options[0];\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n \r\n var isSearch = typeof othis.attr('lay-search') === 'string'\r\n ,placeholder = optionsFirst ? (\r\n optionsFirst.value ? TIPS : (optionsFirst.innerHTML || TIPS)\r\n ) : TIPS;\r\n\r\n // 替代元素\r\n var reElem = $(['<div class=\"'+ (isSearch ? '' : 'layui-unselect ') + CLASS \r\n ,(disabled ? ' layui-select-disabled' : '') +'\">'\r\n ,'<div class=\"'+ TITLE +'\">'\r\n ,('<input type=\"text\" placeholder=\"'+ util.escape($.trim(placeholder)) +'\" '\r\n +('value=\"'+ util.escape($.trim(value ? selected.html() : '')) +'\"') // 默认值\r\n +((!disabled && isSearch) ? '' : ' readonly') // 是否开启搜索\r\n +' class=\"layui-input'\r\n +(isSearch ? '' : ' layui-unselect') \r\n + (disabled ? (' ' + DISABLED) : '') +'\">') // 禁用状态\r\n ,'<i class=\"layui-edge\"></i></div>'\r\n ,'<dl class=\"layui-anim layui-anim-upbit'+ (othis.find('optgroup')[0] ? ' layui-select-group' : '') +'\">'\r\n ,function(options){\r\n var arr = [];\r\n layui.each(options, function(index, item){\r\n var tagName = item.tagName.toLowerCase();\r\n\r\n if(index === 0 && !item.value && tagName !== 'optgroup'){\r\n arr.push('<dd lay-value=\"\" class=\"layui-select-tips\">'+ $.trim(item.innerHTML || TIPS) +'</dd>');\r\n } else if(tagName === 'optgroup'){\r\n arr.push('<dt>'+ item.label +'</dt>'); \r\n } else {\r\n arr.push('<dd lay-value=\"'+ util.escape(item.value) +'\" class=\"'+ (value === item.value ? THIS : '') + (item.disabled ? (' '+DISABLED) : '') +'\">'+ $.trim(item.innerHTML) +'</dd>');\r\n }\r\n });\r\n arr.length === 0 && arr.push('<dd lay-value=\"\" class=\"'+ DISABLED +'\">没有选项</dd>');\r\n return arr.join('');\r\n }(othis.find('*')) +'</dl>'\r\n ,'</div>'].join(''));\r\n \r\n hasRender[0] && hasRender.remove(); // 如果已经渲染则Rerender\r\n othis.after(reElem); \r\n events.call(this, reElem, disabled, isSearch);\r\n });\r\n }\r\n \r\n // 复选框/开关\r\n ,checkbox: function(elem){\r\n var CLASS = {\r\n \"checkbox\": ['layui-form-checkbox', 'layui-form-checked', 'checkbox'],\r\n \"switch\": ['layui-form-switch', 'layui-form-onswitch', 'switch'],\r\n SUBTRA: 'layui-icon-indeterminate'\r\n };\r\n var checks = elem || elemForm.find('input[type=checkbox]');\r\n // 风格\r\n var skins = {\r\n \"primary\": true, // 默认风格\r\n \"tag\": true, // 标签风格\r\n \"switch\": true // 开关风格\r\n };\r\n // 事件\r\n var events = function(reElem, RE_CLASS){\r\n var check = $(this);\r\n \r\n // 勾选\r\n reElem.on('click', function(){\r\n var othis = $(this);\r\n var filter = check.attr('lay-filter') // 获取过滤器\r\n var title = (\r\n othis.next('*[lay-checkbox]')[0] \r\n ? othis.next().html()\r\n : check.attr('title') || ''\r\n );\r\n var skin = check.attr('lay-skin') || 'primary';\r\n\r\n // 开关\r\n title = skin === 'switch' ? title.split('|') : [title];\r\n\r\n // 禁用\r\n if(check[0].disabled) return;\r\n \r\n // 半选\r\n if (check[0].indeterminate) {\r\n check[0].indeterminate = false;\r\n reElem.find('.'+ CLASS.SUBTRA).removeClass(CLASS.SUBTRA).addClass('layui-icon-ok');\r\n }\r\n\r\n // 开关\r\n check[0].checked ? (\r\n check[0].checked = false,\r\n reElem.removeClass(RE_CLASS[1]),\r\n skin === 'switch' && reElem.children('div').html(title[1])\r\n ) : (\r\n check[0].checked = true,\r\n reElem.addClass(RE_CLASS[1]),\r\n skin === 'switch' && reElem.children('div').html(title[0])\r\n );\r\n \r\n // 事件\r\n layui.event.call(check[0], MOD_NAME, RE_CLASS[2]+'('+ filter +')', {\r\n elem: check[0],\r\n value: check[0].value,\r\n othis: reElem\r\n });\r\n });\r\n };\r\n \r\n // 遍历复选框\r\n checks.each(function(index, check){\r\n var othis = $(this);\r\n var skin = othis.attr('lay-skin') || 'primary';\r\n var title = util.escape($.trim(check.title || function(){ // 向下兼容 lay-text 属性\r\n return check.title = othis.attr('lay-text') || '';\r\n }()));\r\n var disabled = this.disabled;\r\n\r\n // if(!skins[skin]) skin = 'primary'; // 若非内置风格,则强制为默认风格\r\n var RE_CLASS = CLASS[skin] || CLASS.checkbox;\r\n\r\n // 替代元素\r\n var hasRender = othis.next('.' + RE_CLASS[0]);\r\n hasRender[0] && hasRender.remove(); // 若已经渲染,则 Rerender\r\n \r\n // 若存在标题模板,则优先读取标题模板\r\n if(othis.next('[lay-checkbox]')[0]){\r\n title = othis.next().html() || '';\r\n }\r\n\r\n // 若为开关,则对 title 进行分隔解析\r\n title = skin === 'switch' ? title.split('|') : [title];\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n \r\n // 替代元素\r\n var reElem = $(['<div class=\"layui-unselect '+ RE_CLASS[0],\r\n (check.checked ? (' '+ RE_CLASS[1]) : ''), // 选中状态\r\n (disabled ? ' layui-checkbox-disabled '+ DISABLED : ''), // 禁用状态\r\n '\"',\r\n (skin ? ' lay-skin=\"'+ skin +'\"' : ''), // 风格\r\n '>',\r\n function(){ // 不同风格的内容\r\n var type = {\r\n // 复选框\r\n \"checkbox\": [\r\n (title[0] ? ('<div>'+ title[0] +'</div>') : (skin === 'primary' ? '' : '<div></div>')),\r\n '<i class=\"layui-icon '+(skin === 'primary' && !check.checked && othis.get(0).indeterminate ? CLASS.SUBTRA : 'layui-icon-ok')+'\"></i>'\r\n ].join(''),\r\n // 开关\r\n \"switch\": '<div>'+ ((check.checked ? title[0] : title[1]) || '') +'</div><i></i>'\r\n };\r\n return type[skin] || type['checkbox'];\r\n }(),\r\n '</div>'].join(''));\r\n\r\n othis.after(reElem);\r\n events.call(this, reElem, RE_CLASS);\r\n });\r\n }\r\n \r\n // 单选框\r\n ,radio: function(elem){\r\n var CLASS = 'layui-form-radio';\r\n var ICON = ['layui-icon-radio', 'layui-icon-circle'];\r\n var radios = elem || elemForm.find('input[type=radio]');\r\n\r\n // 事件\r\n var events = function(reElem){\r\n var radio = $(this);\r\n var ANIM = 'layui-anim-scaleSpring';\r\n \r\n reElem.on('click', function(){\r\n var name = radio[0].name, forms = radio.parents(ELEM);\r\n var filter = radio.attr('lay-filter'); // 获取过滤器\r\n var sameRadio = forms.find('input[name='+ name.replace(/(\\.|#|\\[|\\])/g, '\\\\$1') +']'); // 找到相同name的兄弟\r\n \r\n if(radio[0].disabled) return;\r\n \r\n layui.each(sameRadio, function(){\r\n var next = $(this).next('.' + CLASS);\r\n this.checked = false;\r\n next.removeClass(CLASS + 'ed');\r\n next.children('.layui-icon').removeClass(ANIM + ' ' + ICON[0]).addClass(ICON[1]);\r\n });\r\n \r\n radio[0].checked = true;\r\n reElem.addClass(CLASS + 'ed');\r\n reElem.children('.layui-icon').addClass(ANIM + ' ' + ICON[0]);\r\n \r\n layui.event.call(radio[0], MOD_NAME, 'radio('+ filter +')', {\r\n elem: radio[0],\r\n value: radio[0].value,\r\n othis: reElem\r\n });\r\n });\r\n };\r\n \r\n // 初始渲染\r\n radios.each(function(index, radio){\r\n var othis = $(this), hasRender = othis.next('.' + CLASS);\r\n var disabled = this.disabled;\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染则Rerender\r\n \r\n // 替代元素\r\n var reElem = $(['<div class=\"layui-unselect '+ CLASS, \r\n (radio.checked ? (' '+ CLASS +'ed') : ''), // 选中状态\r\n (disabled ? ' layui-radio-disabled '+DISABLED : '') +'\">', // 禁用状态\r\n '<i class=\"layui-anim layui-icon '+ ICON[radio.checked ? 0 : 1] +'\"></i>',\r\n '<div>'+ function(){\r\n var title = util.escape(radio.title || '');\r\n if(othis.next('[lay-radio]')[0]){\r\n title = othis.next().html();\r\n }\r\n return title;\r\n }() +'</div>',\r\n '</div>'].join(''));\r\n\r\n othis.after(reElem);\r\n events.call(this, reElem);\r\n });\r\n }\r\n };\r\n\r\n // 执行所有渲染项\r\n var renderItem = function(){\r\n layui.each(items, function(index, item){\r\n item();\r\n });\r\n };\r\n\r\n // jquery 对象\r\n if (layui.type(type) === 'object') {\r\n // 若对象为表单域容器\r\n if($(type).is(ELEM)){\r\n elemForm = $(type);\r\n renderItem();\r\n } else { // 对象为表单项\r\n type.each(function (index, item) {\r\n var elem = $(item);\r\n if (!elem.closest(ELEM).length) {\r\n return; // 若不在 layui-form 容器中直接跳过\r\n }\r\n if (item.tagName === 'SELECT') {\r\n items['select'](elem);\r\n } else if (item.tagName === 'INPUT') {\r\n var itemType = item.type;\r\n if (itemType === 'checkbox' || itemType === 'radio') {\r\n items[itemType](elem);\r\n } else {\r\n items['input'](elem);\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n type ? (\r\n items[type] ? items[type]() : hint.error('不支持的 \"'+ type + '\" 表单渲染')\r\n ) : renderItem();\r\n }\r\n return that;\r\n };\r\n\r\n /**\r\n * 主动触发验证\r\n * @param {(string|HTMLElement|JQuery)} elem - 要验证的区域表单元素\r\n * @return {boolean} 返回结果。若验证通过,返回 `true`, 否则返回 `false`\r\n */\r\n Form.prototype.validate = function(elem) {\r\n var that = this;\r\n var intercept; // 拦截标识\r\n var options = that.config; // 获取全局配置项\r\n var verify = options.verify; // 验证规则\r\n var DANGER = 'layui-form-danger'; // 警示样式\r\n\r\n elem = $(elem);\r\n\r\n // 节点不存在可视为 true\r\n if (!elem[0]) return !0;\r\n\r\n // 若节点不存在特定属性,则查找容器内有待验证的子节点\r\n if (elem.attr('lay-verify') === undefined) {\r\n // 若校验的是一个不带验证规则的容器,校验内部的 lay-verify 节点\r\n if (that.validate(elem.find('*[lay-verify]')) === false) {\r\n return false;\r\n }\r\n }\r\n\r\n // 开始校验\r\n layui.each(elem, function(_, item) {\r\n var othis = $(this);\r\n var verifyStr = othis.attr('lay-verify') || '';\r\n var vers = verifyStr.split('|');\r\n var verType = othis.attr('lay-vertype'); // 提示方式\r\n var value = $.trim(othis.val());\r\n\r\n othis.removeClass(DANGER); // 移除警示样式\r\n \r\n // 遍历元素绑定的验证规则\r\n layui.each(vers, function(_, thisVer) {\r\n var verst; // 校验结果\r\n var errorText = ''; // 错误提示文本\r\n var rule = verify[thisVer]; // 获取校验规则\r\n \r\n // 匹配验证规则\r\n if (rule) {\r\n verst = typeof rule === 'function'\r\n ? errorText = rule(value, item) \r\n : !rule[0].test(value); // 兼容早期数组中的正则写法\r\n \r\n // 是否属于美化替换后的表单元素\r\n var isForm2Elem = item.tagName.toLowerCase() === 'select' || (\r\n /^(checkbox|radio)$/.test(item.type)\r\n );\r\n \r\n errorText = errorText || rule[1];\r\n \r\n // 获取自定义必填项提示文本\r\n if (thisVer === 'required') {\r\n errorText = othis.attr('lay-reqtext') || errorText;\r\n }\r\n \r\n // 若命中校验规则\r\n if (verst) {\r\n // 提示层风格\r\n if (verType === 'tips') {\r\n layer.tips(errorText, function(){\r\n if(typeof othis.attr('lay-ignore') !== 'string'){\r\n if(isForm2Elem){\r\n return othis.next();\r\n }\r\n }\r\n return othis;\r\n }(), {tips: 1});\r\n } else if(verType === 'alert') {\r\n layer.alert(errorText, {title: '提示', shadeClose: true});\r\n } \r\n // 若返回的为字符或数字,则自动弹出默认提示框;否则由 verify 方法中处理提示\r\n else if(/\\b(string|number)\\b/.test(typeof errorText)) {\r\n layer.msg(errorText, {icon: 5, shift: 6});\r\n }\r\n\r\n setTimeout(function() {\r\n (isForm2Elem ? othis.next().find('input') : item).focus();\r\n }, 7);\r\n \r\n othis.addClass(DANGER);\r\n return intercept = true;\r\n }\r\n }\r\n });\r\n\r\n if (intercept) return intercept;\r\n });\r\n\r\n return !intercept;\r\n };\r\n\r\n // 提交表单并校验\r\n var submit = Form.prototype.submit = function(filter, callback){\r\n var field = {}; // 字段集合\r\n var button = $(this); // 当前触发的按钮\r\n\r\n // 表单域 lay-filter 属性值\r\n var layFilter = typeof filter === 'string' \r\n ? filter \r\n : button.attr('lay-filter');\r\n\r\n // 当前所在表单域\r\n var elem = this.getFormElem \r\n ? this.getFormElem(layFilter) \r\n : button.parents(ELEM).eq(0);\r\n\r\n // 获取需要校验的元素\r\n var verifyElem = elem.find('*[lay-verify]');\r\n\r\n // 开始校验\r\n if(!form.validate(verifyElem)) return false;\r\n\r\n // 获取当前表单值\r\n field = form.getValue(null, elem);\r\n\r\n // 返回的参数\r\n var params = {\r\n elem: this.getFormElem ? (window.event && window.event.target) : this // 触发事件的对象\r\n ,form: this.getFormElem ? elem[0] : button.parents('form')[0] // 当前所在的 form 元素,如果存在的话\r\n ,field: field // 当前表单数据\r\n };\r\n \r\n // 回调\r\n typeof callback === 'function' && callback(params);\r\n \r\n // 事件\r\n return layui.event.call(this, MOD_NAME, 'submit('+ layFilter +')', params);\r\n };\r\n \r\n var form = new Form();\r\n var $dom = $(document);\r\n var $win = $(window);\r\n \r\n // 初始自动完成渲染\r\n $(function(){\r\n form.render();\r\n });\r\n \r\n // 表单 reset 重置渲染\r\n $dom.on('reset', ELEM, function(){\r\n var filter = $(this).attr('lay-filter');\r\n setTimeout(function(){\r\n form.render(null, filter);\r\n }, 50);\r\n });\r\n \r\n // 表单提交事件\r\n $dom.on('submit', ELEM, submit)\r\n .on('click', '*[lay-submit]', submit);\r\n \r\n exports(MOD_NAME, form);\r\n});\r\n\r\n \r\n","/**\r\n * layui.table\r\n * 表格组件\r\n */\r\n\r\nlayui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var laytpl = layui.laytpl;\r\n var laypage = layui.laypage;\r\n var layer = layui.layer;\r\n var form = layui.form;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n\r\n // api\r\n var table = {\r\n config: { // 全局配置项\r\n checkName: 'LAY_CHECKED', // 是否选中状态的特定字段名\r\n indexName: 'LAY_INDEX', // 初始下标索引名,用于恢复当前页表格排序\r\n numbersName: 'LAY_NUM', // 序号\r\n disabledName: 'LAY_DISABLED' // 禁用状态的特定字段名\r\n },\r\n cache: {}, // 数据缓存\r\n index: layui.table ? (layui.table.index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n\r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisTable = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || options.index;\r\n\r\n return {\r\n config: options,\r\n reload: function(options, deep){\r\n that.reload.call(that, options, deep);\r\n },\r\n reloadData: function(options, deep){\r\n table.reloadData(id, options, deep);\r\n },\r\n setColsWidth: function(){\r\n that.setColsWidth.call(that);\r\n },\r\n resize: function(){ // 重置表格尺寸/结构\r\n that.resize.call(that);\r\n }\r\n }\r\n };\r\n\r\n // 获取当前实例\r\n var getThisTable = function(id){\r\n var that = thisTable.that[id];\r\n if(!that) hint.error(id ? ('The table instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that || null;\r\n };\r\n\r\n // 获取当前实例配置项\r\n var getThisTableConfig = function(id){\r\n var config = thisTable.config[id];\r\n if(!config) hint.error(id ? ('The table instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return config || null;\r\n };\r\n\r\n // lay 函数可以处理 SelectorHTMLElementJQuery 类型\r\n // 无效的 CSS 选择器字符串,会抛出 SyntaxError 异常,此时直接返回 laytpl 模板字符串\r\n var resolveTplStr = function(templet){\r\n try{ \r\n return lay(templet).html();\r\n }catch{\r\n return templet;\r\n }\r\n }\r\n\r\n // 解析自定义模板数据\r\n var parseTempData = function(obj){\r\n obj = obj || {};\r\n\r\n var options = this.config || {};\r\n var item3 = obj.item3; // 表头数据\r\n var content = obj.content; // 原始内容\r\n if (item3.type === 'numbers') content = obj.tplData[table.config.numbersName];\r\n\r\n // 是否编码 HTML\r\n var escaped = 'escape' in item3 ? item3.escape : options.escape;\r\n if(escaped) content = util.escape(content);\r\n\r\n // 获取模板\r\n var templet = obj.text && item3.exportTemplet || (item3.templet || item3.toolbar);\r\n\r\n // 获取模板内容\r\n if(templet){\r\n content = typeof templet === 'function'\r\n ? templet.call(item3, obj.tplData, obj.obj)\r\n : laytpl(resolveTplStr(templet) || String(content)).render($.extend({\r\n LAY_COL: item3\r\n }, obj.tplData));\r\n }\r\n\r\n // 是否只返回文本\r\n return obj.text ? $('<div>'+ content +'</div>').text() : content;\r\n };\r\n\r\n // 字符\r\n var MOD_NAME = 'table';\r\n var ELEM = '.layui-table';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var HIDE_V = 'layui-hide-v';\r\n var DISABLED = 'layui-disabled';\r\n var NONE = 'layui-none';\r\n\r\n var ELEM_VIEW = 'layui-table-view';\r\n var ELEM_TOOL = '.layui-table-tool';\r\n var ELEM_BOX = '.layui-table-box';\r\n var ELEM_INIT = '.layui-table-init';\r\n var ELEM_HEADER = '.layui-table-header';\r\n var ELEM_BODY = '.layui-table-body';\r\n var ELEM_MAIN = '.layui-table-main';\r\n var ELEM_FIXED = '.layui-table-fixed';\r\n var ELEM_FIXL = '.layui-table-fixed-l';\r\n var ELEM_FIXR = '.layui-table-fixed-r';\r\n var ELEM_TOTAL = '.layui-table-total';\r\n var ELEM_PAGE = '.layui-table-page';\r\n var ELEM_PAGE_VIEW = '.layui-table-pageview';\r\n var ELEM_SORT = '.layui-table-sort';\r\n var ELEM_CHECKED = 'layui-table-checked';\r\n var ELEM_EDIT = 'layui-table-edit';\r\n var ELEM_HOVER = 'layui-table-hover';\r\n var ELEM_GROUP = 'laytable-cell-group';\r\n var ELEM_COL_SPECIAL = 'layui-table-col-special';\r\n var ELEM_TOOL_PANEL = 'layui-table-tool-panel';\r\n var ELEM_EXPAND = 'layui-table-expanded'\r\n\r\n var DATA_MOVE_NAME = 'LAY_TABLE_MOVE_DICT';\r\n\r\n // thead 区域模板\r\n var TPL_HEADER = function(options){\r\n var rowCols = '{{#var colspan = layui.type(item2.colspan2) === \\'number\\' ? item2.colspan2 : item2.colspan; if(colspan){}} colspan=\"{{=colspan}}\"{{#} if(item2.rowspan){}} rowspan=\"{{=item2.rowspan}}\"{{#}}}';\r\n\r\n options = options || {};\r\n return ['<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"layui-table\" '\r\n ,'{{# if(d.data.skin){ }}lay-skin=\"{{=d.data.skin}}\"{{# } }} {{# if(d.data.size){ }}lay-size=\"{{=d.data.size}}\"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>'\r\n ,'<thead>'\r\n ,'{{# layui.each(d.data.cols, function(i1, item1){ }}'\r\n ,'<tr>'\r\n ,'{{# layui.each(item1, function(i2, item2){ }}'\r\n ,'{{# if(item2.fixed && item2.fixed !== \"right\"){ left = true; } }}'\r\n ,'{{# if(item2.fixed === \"right\"){ right = true; } }}'\r\n ,function(){\r\n if(options.fixed && options.fixed !== 'right'){\r\n return '{{# if(item2.fixed && item2.fixed !== \"right\"){ }}';\r\n }\r\n if(options.fixed === 'right'){\r\n return '{{# if(item2.fixed === \"right\"){ }}';\r\n }\r\n return '';\r\n }()\r\n ,'{{# var isSort = !(item2.colGroup) && item2.sort; }}'\r\n ,'<th data-field=\"{{= item2.field||i2 }}\" data-key=\"{{=d.index}}-{{=i1}}-{{=i2}}\" {{# if( item2.parentKey){ }}data-parentkey=\"{{= item2.parentKey }}\"{{# } }} {{# if(item2.minWidth){ }}data-minwidth=\"{{=item2.minWidth}}\"{{# } }} {{# if(item2.maxWidth){ }}data-maxwidth=\"{{=item2.maxWidth}}\"{{# } }} {{# if(item2.style){ }}style=\"{{=item2.style}}\"{{# } }} '+ rowCols +' {{# if(item2.unresize || item2.colGroup){ }}data-unresize=\"true\"{{# } }} class=\"{{# if(item2.hide){ }}layui-hide{{# } }}{{# if(isSort){ }} layui-unselect{{# } }}{{# if(!item2.field){ }} layui-table-col-special{{# } }}\"{{# if(item2.title){ }} title=\"{{ layui.$(\\'<div>\\' + item2.title + \\'</div>\\').text() }}\"{{# } }}>'\r\n ,'<div class=\"layui-table-cell laytable-cell-'\r\n ,'{{# if(item2.colGroup){ }}'\r\n ,'group'\r\n ,'{{# } else { }}'\r\n ,'{{=d.index}}-{{=i1}}-{{=i2}}'\r\n ,'{{# if(item2.type !== \"normal\"){ }}'\r\n ,' laytable-cell-{{= item2.type }}'\r\n ,'{{# } }}'\r\n ,'{{# } }}'\r\n ,'\" {{#if(item2.align){}}align=\"{{=item2.align}}\"{{#}}}>'\r\n ,'{{# if(item2.type === \"checkbox\"){ }}' //复选框\r\n ,'<input type=\"checkbox\" name=\"layTableCheckbox\" lay-skin=\"primary\" lay-filter=\"layTableAllChoose\" {{# if(item2[d.data.checkName]){ }}checked{{# }; }}>'\r\n ,'{{# } else { }}'\r\n ,'<span>{{-item2.title||\"\"}}</span>'\r\n ,'{{# if(isSort){ }}'\r\n ,'<span class=\"layui-table-sort layui-inline\"><i class=\"layui-edge layui-table-sort-asc\" title=\"升序\"></i><i class=\"layui-edge layui-table-sort-desc\" title=\"降序\"></i></span>'\r\n ,'{{# } }}'\r\n ,'{{# } }}'\r\n ,'</div>'\r\n ,'</th>'\r\n ,(options.fixed ? '{{# }; }}' : '')\r\n ,'{{# }); }}'\r\n ,'</tr>'\r\n ,'{{# }); }}'\r\n ,'</thead>'\r\n ,'</table>'].join('');\r\n };\r\n\r\n // tbody 区域模板\r\n var TPL_BODY = ['<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"layui-table\" '\r\n ,'{{# if(d.data.skin){ }}lay-skin=\"{{=d.data.skin}}\"{{# } }} {{# if(d.data.size){ }}lay-size=\"{{=d.data.size}}\"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>'\r\n ,'<tbody></tbody>'\r\n ,'</table>'].join('');\r\n\r\n // 主模板\r\n var TPL_MAIN = [\r\n ,'{{# if(d.data.toolbar){ }}'\r\n ,'<div class=\"layui-table-tool\">'\r\n ,'<div class=\"layui-table-tool-temp\"></div>'\r\n ,'<div class=\"layui-table-tool-self\"></div>'\r\n ,'</div>'\r\n ,'{{# } }}'\r\n\r\n ,'<div class=\"layui-table-box\">'\r\n ,'{{# if(d.data.loading){ }}'\r\n ,'<div class=\"layui-table-init\" style=\"background-color: #fff;\">'\r\n ,'<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>'\r\n ,'</div>'\r\n ,'{{# } }}'\r\n\r\n ,'{{# var left, right; }}'\r\n ,'<div class=\"layui-table-header\">'\r\n ,TPL_HEADER()\r\n ,'</div>'\r\n ,'<div class=\"layui-table-body layui-table-main\">'\r\n ,TPL_BODY\r\n ,'</div>'\r\n\r\n ,'{{# if(left){ }}'\r\n ,'<div class=\"layui-table-fixed layui-table-fixed-l\">'\r\n ,'<div class=\"layui-table-header\">'\r\n ,TPL_HEADER({fixed: true})\r\n ,'</div>'\r\n ,'<div class=\"layui-table-body\">'\r\n ,TPL_BODY\r\n ,'</div>'\r\n ,'</div>'\r\n ,'{{# }; }}'\r\n\r\n ,'{{# if(right){ }}'\r\n ,'<div class=\"layui-table-fixed layui-table-fixed-r layui-hide\">'\r\n ,'<div class=\"layui-table-header\">'\r\n ,TPL_HEADER({fixed: 'right'})\r\n ,'<div class=\"layui-table-mend\"></div>'\r\n ,'</div>'\r\n ,'<div class=\"layui-table-body\">'\r\n ,TPL_BODY\r\n ,'</div>'\r\n ,'</div>'\r\n ,'{{# }; }}'\r\n ,'</div>'\r\n\r\n ,'{{# if(d.data.totalRow){ }}'\r\n ,'<div class=\"layui-table-total\">'\r\n ,'<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"layui-table\" '\r\n ,'{{# if(d.data.skin){ }}lay-skin=\"{{=d.data.skin}}\"{{# } }} {{# if(d.data.size){ }}lay-size=\"{{=d.data.size}}\"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>'\r\n ,'<tbody><tr><td><div class=\"layui-table-cell\" style=\"visibility: hidden;\">Total</div></td></tr></tbody>'\r\n , '</table>'\r\n ,'</div>'\r\n ,'{{# } }}'\r\n\r\n ,'<div class=\"layui-table-column layui-table-page layui-hide\">'\r\n ,'<div class=\"layui-inline layui-table-pageview\" id=\"layui-table-page{{=d.index}}\"></div>'\r\n ,'</div>'\r\n ].join('');\r\n\r\n var _WIN = $(window);\r\n var _DOC = $(document);\r\n\r\n // constructor\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++table.index;\r\n that.config = $.extend({}, that.config, table.config, options);\r\n that.render();\r\n };\r\n\r\n // 初始默认配置\r\n Class.prototype.config = {\r\n limit: 10, // 每页显示的数量\r\n loading: true, // 请求数据时,是否显示 loading\r\n escape: true, // 是否开启 HTML 编码功能,即转义 html 原文\r\n cellMinWidth: 60, // 所有单元格默认最小宽度\r\n cellMaxWidth: Number.MAX_VALUE, // 所有单元格默认最大宽度\r\n editTrigger: 'click', // 单元格编辑的事件触发方式\r\n defaultToolbar: ['filter', 'exports', 'print'], // 工具栏右侧图标\r\n defaultContextmenu: true, // 显示默认上下文菜单\r\n autoSort: true, // 是否前端自动排序。如果否,则需自主排序(通常为服务端处理好排序)\r\n text: {\r\n none: '无数据'\r\n },\r\n cols: []\r\n };\r\n\r\n // 表格渲染\r\n Class.prototype.render = function(type){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.elem = $(options.elem);\r\n options.where = options.where || {};\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n var id = options.id = 'id' in options ? options.id : (\r\n options.elem.attr('id') || that.index\r\n );\r\n\r\n thisTable.that[id] = that; // 记录当前实例对象\r\n thisTable.config[id] = options; // 记录当前实例配置项\r\n\r\n //请求参数的自定义格式\r\n options.request = $.extend({\r\n pageName: 'page',\r\n limitName: 'limit'\r\n }, options.request)\r\n\r\n // 响应数据的自定义格式\r\n options.response = $.extend({\r\n statusName: 'code', //规定数据状态的字段名称\r\n statusCode: 0, //规定成功的状态码\r\n msgName: 'msg', //规定状态信息的字段名称\r\n dataName: 'data', //规定数据总数的字段名称\r\n totalRowName: 'totalRow', //规定数据统计的字段名称\r\n countName: 'count'\r\n }, options.response);\r\n\r\n //如果 page 传入 laypage 对象\r\n if(options.page !== null && typeof options.page === 'object'){\r\n options.limit = options.page.limit || options.limit;\r\n options.limits = options.page.limits || options.limits;\r\n that.page = options.page.curr = options.page.curr || 1;\r\n delete options.page.elem;\r\n delete options.page.jump;\r\n }\r\n\r\n if(!options.elem[0]) return that;\r\n\r\n // 若元素未设 lay-filter 属性,则取实例 id 值\r\n if(!options.elem.attr('lay-filter')){\r\n options.elem.attr('lay-filter', options.id);\r\n }\r\n\r\n // 仅重载数据\r\n if(type === 'reloadData'){\r\n // 请求数据\r\n return that.pullData(that.page, {\r\n type: 'reloadData'\r\n });\r\n }\r\n\r\n // 初始化索引\r\n options.index = that.index;\r\n that.key = options.id || options.index;\r\n\r\n // 初始化一些其他参数\r\n that.setInit();\r\n\r\n // 高度铺满full-差距值\r\n if(options.height && /^full-.+$/.test(options.height)){\r\n that.fullHeightGap = options.height.split('-')[1];\r\n options.height = _WIN.height() - (parseFloat(that.fullHeightGap) || 0);\r\n } else if (options.height && /^#\\w+\\S*-.+$/.test(options.height)) {\r\n var parentDiv = options.height.split(\"-\");\r\n that.parentHeightGap = parentDiv.pop();\r\n that.parentDiv = parentDiv.join(\"-\");\r\n options.height = $(that.parentDiv).height() - (parseFloat(that.parentHeightGap) || 0);\r\n } else if (typeof options.height === \"function\"){\r\n that.customHeightFunc = options.height;\r\n options.height = that.customHeightFunc();\r\n }\r\n\r\n // 开始插入替代元素\r\n var othis = options.elem;\r\n var hasRender = othis.next('.' + ELEM_VIEW);\r\n\r\n // 主容器\r\n var reElem = that.elem = $('<div></div>');\r\n\r\n // 添加 className\r\n reElem.addClass(function(){\r\n var arr = [\r\n ELEM_VIEW,\r\n ELEM_VIEW +'-'+ that.index,\r\n 'layui-form',\r\n 'layui-border-box'\r\n ];\r\n if(options.className) arr.push(options.className);\r\n return arr.join(' ');\r\n }()).attr({\r\n 'lay-filter': 'LAY-TABLE-FORM-DF-'+ that.index,\r\n 'lay-id': options.id,\r\n 'style': function(){\r\n var arr = [];\r\n if(options.width) arr.push('width:'+ options.width + 'px;');\r\n // if(options.height) arr.push('height:'+ options.height + 'px;');\r\n return arr.join('')\r\n }()\r\n }).html(laytpl(TPL_MAIN, {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n }).render({\r\n data: options,\r\n index: that.index //索引\r\n }));\r\n\r\n // 初始化样式\r\n that.renderStyle();\r\n\r\n // 生成替代元素\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则 Rerender\r\n othis.after(reElem);\r\n\r\n // 各级容器\r\n that.layTool = reElem.find(ELEM_TOOL);\r\n that.layBox = reElem.find(ELEM_BOX);\r\n that.layHeader = reElem.find(ELEM_HEADER);\r\n that.layMain = reElem.find(ELEM_MAIN);\r\n that.layBody = reElem.find(ELEM_BODY);\r\n that.layFixed = reElem.find(ELEM_FIXED);\r\n that.layFixLeft = reElem.find(ELEM_FIXL);\r\n that.layFixRight = reElem.find(ELEM_FIXR);\r\n that.layTotal = reElem.find(ELEM_TOTAL);\r\n that.layPage = reElem.find(ELEM_PAGE);\r\n\r\n // 初始化头部工具栏\r\n that.renderToolbar();\r\n\r\n // 初始化底部分页栏\r\n that.renderPagebar();\r\n\r\n // 让表格平铺\r\n that.fullSize();\r\n\r\n that.pullData(that.page); // 请求数据\r\n that.events(); // 事件\r\n };\r\n\r\n // 根据列类型,定制化参数\r\n Class.prototype.initOpts = function(item){\r\n var that = this\r\n var options = that.config;\r\n var initWidth = {\r\n checkbox: 50,\r\n radio: 50,\r\n space: 30,\r\n numbers: 60\r\n };\r\n\r\n // 让 type 参数兼容旧版本\r\n if(item.checkbox) item.type = \"checkbox\";\r\n if(item.space) item.type = \"space\";\r\n if(!item.type) item.type = \"normal\";\r\n\r\n if(item.type !== \"normal\"){\r\n item.unresize = true;\r\n item.width = item.width || initWidth[item.type];\r\n }\r\n };\r\n\r\n //初始化一些参数\r\n Class.prototype.setInit = function(type){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.clientWidth = options.width || function(){ //获取容器宽度\r\n //如果父元素宽度为0一般为隐藏元素则继续查找上层元素直到找到真实宽度为止\r\n var getWidth = function(parent){\r\n var width, isNone;\r\n parent = parent || options.elem.parent()\r\n width = parent.width();\r\n try {\r\n isNone = parent.css('display') === 'none';\r\n } catch(e){}\r\n if(parent[0] && (!width || isNone)) return getWidth(parent.parent());\r\n return width;\r\n };\r\n return getWidth();\r\n }();\r\n\r\n if(type === 'width') return options.clientWidth;\r\n // 初始化高度配置,如果设置了最高高度,以最高高度形式为准\r\n options.height = options.maxHeight || options.height;\r\n\r\n // 初始化 css 参数\r\n if(options.css && options.css.indexOf(ELEM_VIEW) === -1){\r\n var css = options.css.split('}');\r\n layui.each(css, function(index, value){\r\n if(value){\r\n css[index] = '.'+ ELEM_VIEW + '-'+ that.index + ' ' + value;\r\n }\r\n });\r\n options.css = css.join('}');\r\n }\r\n\r\n // 封装对 col 的配置处理\r\n var initChildCols = function (i1, item1, i2, item2) {\r\n //如果列参数为空,则移除\r\n if (!item2) {\r\n item1.splice(i2, 1);\r\n return;\r\n }\r\n\r\n item2.key = [options.index, i1, i2].join('-');\r\n item2.colspan = item2.colspan || 0;\r\n item2.rowspan = item2.rowspan || 0;\r\n\r\n //根据列类型,定制化参数\r\n that.initOpts(item2);\r\n\r\n //设置列的父列索引\r\n //如果是组合列,则捕获对应的子列\r\n var indexChild = i1 + (parseInt(item2.rowspan) || 1);\r\n if (indexChild < options.cols.length) { // 只要不是最后一层都会有子列\r\n item2.colGroup = true;\r\n var childIndex = 0;\r\n layui.each(options.cols[indexChild], function (i22, item22) {\r\n //如果子列已经被标注为{HAS_PARENT},或者子列累计 colspan 数等于父列定义的 colspan则跳出当前子列循环\r\n if (item22.HAS_PARENT || (childIndex >= 1 && childIndex == (item2.colspan || 1))) return;\r\n\r\n item22.HAS_PARENT = true;\r\n item22.parentKey = [options.index, i1, i2].join('-') // i1 + '-' + i2;\r\n childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1);\r\n initChildCols(indexChild, options.cols[indexChild], i22, item22);\r\n });\r\n } else {\r\n item2.colGroup = false;\r\n }\r\n item2.hide = item2.hide && !item2.colGroup || false; // 初始化中中间节点的hide信息不做处理否则会出错如果需要必须将其子节点也都同步成hide\r\n };\r\n\r\n // 初始化列参数\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n if (i1) {\r\n delete item2.HAS_PARENT; // 去掉临时的计数排除标识,避免有新字段插入的时候重新计算被跳过导致下标出错的问题\r\n } else {\r\n initChildCols(i1, item1, i2, item2); // 只解析顶层节点由递归完成解析\r\n }\r\n });\r\n });\r\n\r\n };\r\n\r\n // 初始化样式\r\n Class.prototype.renderStyle = function() {\r\n var that = this;\r\n var options = that.config;\r\n var index = that.index;\r\n var text = [];\r\n\r\n // 单元格宽度\r\n layui.each(options.cols, function(i1, item1) {\r\n layui.each(item1, function(i2, item2) {\r\n var key = [index, i1, i2].join('-');\r\n var val = item2.width ? ['width: ', item2.width, 'px'].join('') : '';\r\n text.push('.laytable-cell-'+ key +'{'+ val +'}');\r\n });\r\n });\r\n\r\n // 自定义行样式\r\n (function (lineStyle) {\r\n if (!lineStyle) return;\r\n var trClassName = '.layui-table-view-'+ index +' .layui-table-body .layui-table tr';\r\n var rules = lineStyle.split(';');\r\n var cellMaxHeight = 'none';\r\n\r\n // 计算单元格最大高度\r\n layui.each(rules, function(i, rule) {\r\n rule = rule.split(':');\r\n if (rule[0] === 'height') {\r\n var val = parseFloat(rule[1]);\r\n if (!isNaN(val)) cellMaxHeight = (val - 1) + 'px';\r\n return true;\r\n }\r\n });\r\n\r\n // 多行相关样式\r\n layui.each([\r\n '{'+ lineStyle +'}',\r\n '.layui-table-cell{height: auto; max-height: '+ cellMaxHeight +'; white-space: normal; text-overflow: clip;}',\r\n '> td:hover > .layui-table-cell{overflow: auto;}'\r\n ].concat(\r\n device.ie ? [\r\n '.layui-table-edit{height: '+ cellMaxHeight +';}',\r\n 'td[data-edit]:hover:after{height: '+ cellMaxHeight +';}'\r\n ] : []\r\n ), function(i, val) {\r\n val && text.push(trClassName + ' ' + val);\r\n });\r\n })(options.lineStyle);\r\n\r\n // 自定义 css 属性\r\n if (options.css) text.push(options.css);\r\n\r\n // 生成 style\r\n lay.style({\r\n target: that.elem[0],\r\n text: text.join(''),\r\n id: 'DF-table-'+ index\r\n });\r\n };\r\n\r\n // 初始工具栏\r\n Class.prototype.renderToolbar = function(){\r\n var that = this\r\n var options = that.config\r\n\r\n // 添加工具栏左侧模板\r\n var leftDefaultTemp = [\r\n '<div class=\"layui-inline\" lay-event=\"add\"><i class=\"layui-icon layui-icon-add-1\"></i></div>',\r\n '<div class=\"layui-inline\" lay-event=\"update\"><i class=\"layui-icon layui-icon-edit\"></i></div>',\r\n '<div class=\"layui-inline\" lay-event=\"delete\"><i class=\"layui-icon layui-icon-delete\"></i></div>'\r\n ].join('');\r\n var elemToolTemp = that.layTool.find('.layui-table-tool-temp');\r\n\r\n if(options.toolbar === 'default'){\r\n elemToolTemp.html(leftDefaultTemp);\r\n } else if(typeof options.toolbar === 'string'){\r\n var toolbarHtml = $(options.toolbar).html() || '';\r\n toolbarHtml && elemToolTemp.html(\r\n laytpl(toolbarHtml).render(options)\r\n );\r\n }\r\n\r\n // 添加工具栏右侧面板\r\n var layout = {\r\n filter: {\r\n title: '筛选列',\r\n layEvent: 'LAYTABLE_COLS',\r\n icon: 'layui-icon-cols'\r\n },\r\n exports: {\r\n title: '导出',\r\n layEvent: 'LAYTABLE_EXPORT',\r\n icon: 'layui-icon-export'\r\n },\r\n print: {\r\n title: '打印',\r\n layEvent: 'LAYTABLE_PRINT',\r\n icon: 'layui-icon-print'\r\n }\r\n }, iconElem = [];\r\n\r\n if(typeof options.defaultToolbar === 'object'){\r\n layui.each(options.defaultToolbar, function(i, item){\r\n var thisItem = typeof item === 'string' ? layout[item] : item;\r\n if(thisItem){\r\n iconElem.push('<div class=\"layui-inline\" title=\"'+ thisItem.title +'\" lay-event=\"'+ thisItem.layEvent +'\">'\r\n +'<i class=\"layui-icon '+ thisItem.icon +'\"></i>'\r\n +'</div>');\r\n }\r\n });\r\n }\r\n that.layTool.find('.layui-table-tool-self').html(iconElem.join(''));\r\n };\r\n\r\n // 分页栏\r\n Class.prototype.renderPagebar = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var layPagebar = that.layPagebar = $('<div class=\"layui-inline layui-table-pagebar\"></div>');\r\n\r\n // 开启分页栏自定义模板\r\n if(options.pagebar){\r\n var pagebarHtml = $(options.pagebar).html() || '';\r\n pagebarHtml && layPagebar.append(laytpl(pagebarHtml).render(options));\r\n that.layPage.append(layPagebar);\r\n }\r\n };\r\n\r\n // 同步表头父列的相关值\r\n Class.prototype.setParentCol = function(hide, parentKey){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var parentTh = that.layHeader.find('th[data-key=\"'+ parentKey +'\"]'); // 获取父列元素\r\n var parentColspan = parseInt(parentTh.attr('colspan')) || 0;\r\n\r\n if(parentTh[0]){\r\n var arrParentKey = parentKey.split('-');\r\n var getThisCol = options.cols[arrParentKey[1]][arrParentKey[2]];\r\n\r\n hide ? parentColspan-- : parentColspan++;\r\n\r\n parentTh.attr('colspan', parentColspan);\r\n parentTh[parentColspan ? 'removeClass' : 'addClass'](HIDE); // 如果子列显示,父列必然需要显示\r\n\r\n getThisCol.colspan2 = parentColspan; // 更新实际的 colspan 数\r\n getThisCol.hide = parentColspan < 1; // 同步 hide 参数\r\n\r\n // 递归,继续往上查询是否有父列\r\n var nextParentKey = parentTh.data('parentkey');\r\n nextParentKey && that.setParentCol(hide, nextParentKey);\r\n }\r\n };\r\n\r\n // 多级表头补丁\r\n Class.prototype.setColsPatch = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 同步表头父列的相关值\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n if(item2.hide){\r\n that.setParentCol(item2.hide, item2.parentKey);\r\n }\r\n });\r\n });\r\n };\r\n\r\n // 设置组合表头的最大宽度\r\n Class.prototype.setGroupWidth = function(th){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(options.cols.length <= 1) return;\r\n\r\n // 获取表头组合\r\n var groups = that.layHeader.find((\r\n // 根据当前活动的表头 parentkey 属性查找其组合表头\r\n th ? ('th[data-key='+ th.data('parentkey') +']>') : ''\r\n ) + '.' + ELEM_GROUP); // 若无指向当前活动表头,则自下而上获取所有组合表头\r\n\r\n groups.css('width', 0);\r\n layui.each(groups.get().reverse(), function(){\r\n var othis = $(this);\r\n var key = othis.parent().data('key');\r\n var maxWidth = 0;\r\n\r\n that.layHeader.eq(0).find('th[data-parentkey='+ key +']').width(function(i, width){\r\n var oTh = $(this);\r\n if(oTh.hasClass(HIDE)) return;\r\n width > 0 && (maxWidth += width);\r\n });\r\n\r\n // 给组合表头赋值最大宽度\r\n if(maxWidth) othis.css('max-width', maxWidth - 1);\r\n\r\n // 若当前活动的组合表头仍存在上级,则继续向上设置\r\n if(th && othis.parent().data('parentkey')){\r\n that.setGroupWidth(othis.parent());\r\n }\r\n });\r\n groups.css('width', 'auto');\r\n };\r\n\r\n // 动态分配列宽\r\n Class.prototype.setColsWidth = function(){\r\n var that = this;\r\n var options = that.config;\r\n var colNums = 0; // 列个数\r\n var autoColNums = 0; // 自动列宽的列个数\r\n var autoWidth = 0; // 自动列分配的宽度\r\n var countWidth = 0; // 所有列总宽度和\r\n var cntrWidth = that.setInit('width');\r\n\r\n // 统计列个数\r\n that.eachCols(function(i, item){\r\n item.hide || colNums++;\r\n });\r\n\r\n // 减去边框差和滚动条宽\r\n cntrWidth = cntrWidth - function(){\r\n return (options.skin === 'line' || options.skin === 'nob') ? 2 : colNums + 1;\r\n }() - that.getScrollWidth(that.layMain[0]) - 1;\r\n\r\n // 计算自动分配的宽度\r\n var getAutoWidth = function(back){\r\n // 遍历所有列\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n var width = 0;\r\n var minWidth = item2.minWidth || options.cellMinWidth; // 最小宽度\r\n var maxWidth = item2.maxWidth || options.cellMaxWidth; // 最大宽度\r\n\r\n if(!item2){\r\n item1.splice(i2, 1);\r\n return;\r\n }\r\n\r\n if(item2.colGroup || item2.hide) return;\r\n\r\n if(!back){\r\n width = item2.width || 0;\r\n if(/\\d+%$/.test(width)){ // 列宽为百分比\r\n width = Math.floor((parseFloat(width) / 100) * cntrWidth);\r\n width < minWidth && (width = minWidth);\r\n width > maxWidth && (width = maxWidth);\r\n } else if(!width){ // 列宽未填写\r\n item2.width = width = 0;\r\n autoColNums++;\r\n } else if(item2.type === 'normal'){\r\n // 若 width 小于 minWidth 则将 width 值自动设为 minWidth 的值\r\n width < minWidth && (item2.width = width = minWidth);\r\n // 若 width 大于 maxWidth 则将 width 值自动设为 maxWidth 的值\r\n width > maxWidth && (item2.width = width = maxWidth);\r\n }\r\n } else if(autoWidth && autoWidth < minWidth){\r\n autoColNums--;\r\n width = minWidth;\r\n } else if(autoWidth && autoWidth > maxWidth){\r\n autoColNums--;\r\n width = maxWidth;\r\n }\r\n\r\n if(item2.hide) width = 0;\r\n countWidth = countWidth + width;\r\n });\r\n });\r\n\r\n // 如果未填充满,则将剩余宽度平分\r\n (cntrWidth > countWidth && autoColNums > 0) && (\r\n autoWidth = (cntrWidth - countWidth) / autoColNums\r\n );\r\n }\r\n\r\n getAutoWidth();\r\n getAutoWidth(true); // 重新检测分配的宽度是否低于最小列宽\r\n\r\n // 记录自动列数\r\n that.autoColNums = autoColNums = autoColNums > 0 ? autoColNums : 0;\r\n\r\n // 设置列宽\r\n that.eachCols(function(i3, item3){\r\n var minWidth = item3.minWidth || options.cellMinWidth;\r\n var maxWidth = item3.maxWidth || options.cellMaxWidth;\r\n\r\n if(item3.colGroup || item3.hide) return;\r\n\r\n // 给未分配宽的列平均分配宽\r\n if(item3.width === 0){\r\n that.cssRules(item3.key, function(item){\r\n item.style.width = Math.floor(function(){\r\n if(autoWidth < minWidth) return minWidth;\r\n if(autoWidth > maxWidth) return maxWidth;\r\n return autoWidth;\r\n }()) + 'px';\r\n });\r\n }\r\n\r\n // 给设定百分比的列分配列宽\r\n else if(/\\d+%$/.test(item3.width)){\r\n that.cssRules(item3.key, function(item){\r\n var width = Math.floor((parseFloat(item3.width) / 100) * cntrWidth);\r\n width < minWidth && (width = minWidth);\r\n width > maxWidth && (width = maxWidth);\r\n item.style.width = width + 'px';\r\n });\r\n }\r\n\r\n // 给拥有普通 width 值的列分配最新列宽\r\n else {\r\n that.cssRules(item3.key, function(item){\r\n item.style.width = item3.width + 'px';\r\n });\r\n }\r\n });\r\n\r\n // 填补 Math.floor 造成的数差\r\n var patchNums = that.layMain.width() - that.getScrollWidth(that.layMain[0])\r\n - that.layMain.children('table').outerWidth();\r\n\r\n if(that.autoColNums > 0 && patchNums >= -colNums && patchNums <= colNums){\r\n var getEndTh = function(th){\r\n var field;\r\n th = th || that.layHeader.eq(0).find('thead > tr:first-child > th:last-child')\r\n field = th.data('field');\r\n if(!field && th.prev()[0]){\r\n return getEndTh(th.prev())\r\n }\r\n return th;\r\n };\r\n var th = getEndTh();\r\n var key = th.data('key');\r\n\r\n that.cssRules(key, function(item){\r\n var width = item.style.width || th.outerWidth();\r\n item.style.width = (parseFloat(width) + patchNums) + 'px';\r\n\r\n // 二次校验,如果仍然出现横向滚动条(通常是 1px 的误差导致)\r\n if(that.layMain.height() - that.layMain.prop('clientHeight') > 0){\r\n item.style.width = (parseFloat(item.style.width) - 1) + 'px';\r\n }\r\n });\r\n }\r\n\r\n that.setGroupWidth();\r\n\r\n // 如果表格内容为空(无数据 或 请求异常)\r\n if (that.layMain.find('tbody').is(\":empty\")) {\r\n // 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段\r\n var headerWidth = that.layHeader.first().children('table').width()\r\n that.layMain.find('table').width(headerWidth);\r\n } else {\r\n that.layMain.find('table').width('auto');\r\n }\r\n\r\n that.loading(!0);\r\n };\r\n\r\n // 重置表格尺寸/结构\r\n Class.prototype.resize = function(){\r\n var that = this;\r\n\r\n if (!that.layMain) return;\r\n\r\n that.fullSize(); // 让表格铺满\r\n that.setColsWidth(); // 自适应列宽\r\n that.scrollPatch(); // 滚动条补丁\r\n };\r\n\r\n // 表格重载\r\n Class.prototype.reload = function(options, deep, type){\r\n var that = this;\r\n\r\n options = options || {};\r\n delete that.haveInit;\r\n\r\n // 防止数组深度合并\r\n layui.each(options, function(key, item){\r\n if(layui.type(item) === 'array') delete that.config[key];\r\n });\r\n\r\n // 对参数进行深度或浅扩展\r\n that.config = $.extend(deep, {}, that.config, options);\r\n if (type !== 'reloadData') {\r\n layui.each(that.config.cols, function (i1, item1) {\r\n layui.each(item1, function (i2, item2) {\r\n delete item2.colspan2;\r\n })\r\n })\r\n delete that.config.HAS_SET_COLS_PATCH;\r\n }\r\n // 执行渲染\r\n that.render(type);\r\n };\r\n\r\n // 异常提示\r\n Class.prototype.errorView = function(html){\r\n var that = this\r\n ,elemNone = that.layMain.find('.'+ NONE)\r\n ,layNone = $('<div class=\"'+ NONE +'\">'+ (html || 'Error') +'</div>');\r\n\r\n if(elemNone[0]){\r\n that.layNone.remove();\r\n elemNone.remove();\r\n }\r\n\r\n that.layFixed.addClass(HIDE);\r\n that.layMain.find('tbody').html('');\r\n\r\n that.layMain.append(that.layNone = layNone);\r\n\r\n // 异常情况下对 page 和 total 的内容处理\r\n that.layTotal.addClass(HIDE_V);\r\n that.layPage.find(ELEM_PAGE_VIEW).addClass(HIDE_V);\r\n\r\n table.cache[that.key] = []; //格式化缓存数据\r\n\r\n that.syncCheckAll();\r\n that.renderForm();\r\n that.setColsWidth();\r\n };\r\n\r\n // 初始页码\r\n Class.prototype.page = 1;\r\n\r\n // 获得数据\r\n Class.prototype.pullData = function(curr, opts){\r\n var that = this;\r\n var options = that.config;\r\n // 同步表头父列的相关值\r\n options.HAS_SET_COLS_PATCH || that.setColsPatch();\r\n options.HAS_SET_COLS_PATCH = true;\r\n var request = options.request;\r\n var response = options.response;\r\n var res;\r\n var sort = function(){\r\n if(typeof options.initSort === 'object'){\r\n that.sort({\r\n field: options.initSort.field,\r\n type: options.initSort.type,\r\n reloadType: opts.type\r\n });\r\n }\r\n };\r\n var done = function(res, origin){\r\n that.setColsWidth();\r\n typeof options.done === 'function' && options.done(\r\n res, curr, res[response.countName], origin\r\n );\r\n };\r\n\r\n opts = opts || {};\r\n\r\n // 数据拉取前的回调\r\n typeof options.before === 'function' && options.before(\r\n options\r\n );\r\n that.startTime = new Date().getTime(); // 渲染开始时间\r\n\r\n if (opts.renderData) { // 将 cache 信息重新渲染\r\n res = {};\r\n res[response.dataName] = table.cache[that.key];\r\n res[response.countName] = options.url ? (layui.type(options.page) === 'object' ? options.page.count : res[response.dataName].length) : options.data.length;\r\n\r\n // 记录合计行数据\r\n if(typeof options.totalRow === 'object'){\r\n res[response.totalRowName] = $.extend({}, that.totalRow);\r\n }\r\n\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type,\r\n sort: true\r\n }), done(res, 'renderData');\r\n } else if(options.url){ // Ajax请求\r\n var params = {};\r\n // 当 page 开启,默认自动传递 page、limit 参数\r\n if(options.page){\r\n params[request.pageName] = curr;\r\n params[request.limitName] = options.limit;\r\n }\r\n\r\n // 参数\r\n var data = $.extend(params, options.where);\r\n if(options.contentType && options.contentType.indexOf(\"application/json\") == 0){ // 提交 json 格式\r\n data = JSON.stringify(data);\r\n }\r\n\r\n that.loading();\r\n\r\n $.ajax({\r\n type: options.method || 'get',\r\n url: options.url,\r\n contentType: options.contentType,\r\n data: data,\r\n dataType: options.dataType || 'json',\r\n jsonpCallback: options.jsonpCallback,\r\n headers: options.headers || {},\r\n complete: typeof options.complete === 'function' ? options.complete : undefined,\r\n success: function(res){\r\n // 若有数据解析的回调,则获得其返回的数据\r\n if(typeof options.parseData === 'function'){\r\n res = options.parseData(res) || res;\r\n }\r\n // 检查数据格式是否符合规范\r\n if(res[response.statusName] != response.statusCode){\r\n that.errorView(\r\n res[response.msgName] ||\r\n ('返回的数据不符合规范,正确的成功状态码应为:\"'+ response.statusName +'\": '+ response.statusCode)\r\n );\r\n } else {\r\n that.totalRow = res[response.totalRowName];\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type\r\n }), sort();\r\n\r\n // 耗时(接口请求+视图渲染)\r\n options.time = (new Date().getTime() - that.startTime) + ' ms';\r\n }\r\n done(res);\r\n },\r\n error: function(e, msg){\r\n that.errorView('请求异常,错误提示:'+ msg);\r\n typeof options.error === 'function' && options.error(e, msg);\r\n }\r\n });\r\n } else if(layui.type(options.data) === 'array'){ //已知数据\r\n res = {};\r\n var startLimit = curr*options.limit - options.limit;\r\n var newData = options.data.concat();\r\n\r\n res[response.dataName] = options.page\r\n ? newData.splice(startLimit, options.limit)\r\n : newData;\r\n res[response.countName] = options.data.length;\r\n\r\n // 记录合计行数据\r\n if(typeof options.totalRow === 'object'){\r\n res[response.totalRowName] = $.extend({}, options.totalRow);\r\n }\r\n that.totalRow = res[response.totalRowName];\r\n\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type\r\n }), sort();\r\n\r\n done(res);\r\n }\r\n };\r\n\r\n // 遍历表头\r\n Class.prototype.eachCols = function(callback){\r\n var that = this;\r\n table.eachCols(null, callback, that.config.cols);\r\n return that;\r\n };\r\n\r\n // 获取表头参数项\r\n Class.prototype.col = function(key){\r\n try {\r\n key = key.split('-');\r\n return this.config.cols[key[1]][key[2]] || {};\r\n } catch(e){\r\n hint.error(e);\r\n return {};\r\n }\r\n };\r\n\r\n Class.prototype.getTrHtml = function(data, sort, curr, trsObj) {\r\n var that = this;\r\n var options = that.config;\r\n var trs = trsObj && trsObj.trs || [];\r\n var trs_fixed = trsObj && trsObj.trs_fixed || [];\r\n var trs_fixed_r = trsObj && trsObj.trs_fixed_r || [];\r\n curr = curr || 1\r\n\r\n layui.each(data, function(i1, item1){\r\n var tds = [];\r\n var tds_fixed = [];\r\n var tds_fixed_r = [];\r\n var numbers = i1 + options.limit*(curr - 1) + 1; // 序号\r\n\r\n // 数组值是否为 object如果不是则自动转为 object\r\n if(typeof item1 !== 'object'){\r\n data[i1] = item1 = {LAY_KEY: item1};\r\n try {\r\n table.cache[that.key][i1] = item1;\r\n } catch(e) {}\r\n }\r\n\r\n //若数据项为空数组,则不往下执行(因为删除数据时,会将原有数据设置为 []\r\n if(layui.type(item1) === 'array' && item1.length === 0) return;\r\n\r\n // 加入序号保留字段\r\n item1[table.config.numbersName] = numbers;\r\n\r\n // 记录下标索引,用于恢复排序\r\n if(!sort) item1[table.config.indexName] = i1;\r\n\r\n // 遍历表头\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3;\r\n var key = item3.key;\r\n var content = item1[field];\r\n\r\n if(content === undefined || content === null) content = '';\r\n if(item3.colGroup) return;\r\n\r\n // td 内容\r\n var td = ['<td data-field=\"'+ field +'\" data-key=\"'+ key +'\" '+ function(){\r\n // 追加各种属性\r\n var attr = [];\r\n // 是否开启编辑。若 edit 传入函数,则根据函数的返回结果判断是否开启编辑\r\n (function(edit){\r\n if(edit) attr.push('data-edit=\"'+ edit +'\"'); // 添加单元格编辑属性标识\r\n })(typeof item3.edit === 'function' ? item3.edit(item1) : item3.edit);\r\n if(item3.templet) attr.push('data-content=\"'+ util.escape(content) +'\"'); // 自定义模板\r\n if(item3.toolbar) attr.push('data-off=\"true\"'); // 行工具列关闭单元格事件\r\n if(item3.event) attr.push('lay-event=\"'+ item3.event +'\"'); //自定义事件\r\n if(item3.minWidth) attr.push('data-minwidth=\"'+ item3.minWidth +'\"'); // 单元格最小宽度\r\n if(item3.maxWidth) attr.push('data-maxwidth=\"'+ item3.maxWidth +'\"'); // 单元格最大宽度\r\n if(item3.style) attr.push('style=\"'+ item3.style +'\"'); // 自定义单元格样式\r\n return attr.join(' ');\r\n }() +' class=\"'+ function(){ // 追加样式\r\n var classNames = [];\r\n if(item3.hide) classNames.push(HIDE); // 插入隐藏列样式\r\n if(!item3.field) classNames.push(ELEM_COL_SPECIAL); // 插入特殊列样式\r\n return classNames.join(' ');\r\n }() +'\">'\r\n ,'<div class=\"layui-table-cell laytable-cell-'+ function(){ // 返回对应的CSS类标识\r\n return item3.type === 'normal' ? key\r\n : (key + ' laytable-cell-' + item3.type);\r\n }() +'\"'\r\n + (item3.align ? ' align=\"'+ item3.align +'\"' : '')\r\n +'>'\r\n + function(){\r\n var tplData = $.extend(true, {\r\n LAY_COL: item3\r\n }, item1);\r\n var checkName = table.config.checkName;\r\n var disabledName = table.config.disabledName;\r\n\r\n // 渲染不同风格的列\r\n switch(item3.type){\r\n case 'checkbox': // 复选\r\n return '<input type=\"checkbox\" name=\"layTableCheckbox\" lay-skin=\"primary\" '+ function(){\r\n // 其他属性\r\n var arr = [];\r\n\r\n //如果是全选\r\n if(item3[checkName]){\r\n item1[checkName] = item3[checkName];\r\n if(item3[checkName]) arr[0] = 'checked';\r\n }\r\n if(tplData[checkName]) arr[0] = 'checked';\r\n\r\n // 禁选\r\n if(tplData[disabledName]) arr.push('disabled');\r\n\r\n return arr.join(' ');\r\n }() +' lay-type=\"layTableCheckbox\">';\r\n //break;\r\n case 'radio': // 单选\r\n return '<input type=\"radio\" name=\"layTableRadio_'+ options.index +'\" '\r\n + function(){\r\n var arr = [];\r\n if(tplData[checkName]) arr[0] = 'checked';\r\n if(tplData[disabledName]) arr.push('disabled');\r\n return arr.join(' ');\r\n }() +' lay-type=\"layTableRadio\">';\r\n //break;\r\n case 'numbers':\r\n return numbers;\r\n //break;\r\n }\r\n\r\n //解析工具列模板\r\n if(item3.toolbar){\r\n return laytpl($(item3.toolbar).html()||'').render(tplData);\r\n }\r\n return parseTempData.call(that, {\r\n item3: item3\r\n ,content: content\r\n ,tplData: tplData\r\n });\r\n }()\r\n ,'</div></td>'].join('');\r\n\r\n tds.push(td);\r\n if(item3.fixed && item3.fixed !== 'right') tds_fixed.push(td);\r\n if(item3.fixed === 'right') tds_fixed_r.push(td);\r\n });\r\n\r\n // 添加 tr 属性\r\n var trAttr = function(){\r\n var arr = ['data-index=\"'+ i1 +'\"'];\r\n if(item1[table.config.checkName]) arr.push('class=\"'+ ELEM_CHECKED +'\"');\r\n return arr.join(' ');\r\n }();\r\n\r\n trs.push('<tr '+ trAttr +'>'+ tds.join('') + '</tr>');\r\n trs_fixed.push('<tr '+ trAttr +'>'+ tds_fixed.join('') + '</tr>');\r\n trs_fixed_r.push('<tr '+ trAttr +'>'+ tds_fixed_r.join('') + '</tr>');\r\n });\r\n\r\n return {\r\n trs: trs,\r\n trs_fixed: trs_fixed,\r\n trs_fixed_r: trs_fixed_r\r\n }\r\n }\r\n\r\n // 返回行节点代码\r\n table.getTrHtml = function (id, data) {\r\n var that = getThisTable(id);\r\n return that.getTrHtml(data, null, that.page);\r\n }\r\n\r\n // 数据渲染\r\n Class.prototype.renderData = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var res = opts.res;\r\n var curr = opts.curr;\r\n var count = that.count = opts.count;\r\n var sort = opts.sort;\r\n\r\n var data = res[options.response.dataName] || []; //列表数据\r\n var totalRowData = res[options.response.totalRowName]; //合计行数据\r\n var trs = [];\r\n var trs_fixed = [];\r\n var trs_fixed_r = [];\r\n\r\n // 渲染视图\r\n var render = function(){ // 后续性能提升的重点\r\n if(!sort && that.sortKey){\r\n return that.sort({\r\n field: that.sortKey.field,\r\n type: that.sortKey.sort,\r\n pull: true,\r\n reloadType: opts.type\r\n });\r\n }\r\n that.getTrHtml(data, sort, curr, {\r\n trs: trs,\r\n trs_fixed: trs_fixed,\r\n trs_fixed_r: trs_fixed_r\r\n });\r\n\r\n // 容器的滚动条位置\r\n if(!(options.scrollPos === 'fixed' && opts.type === 'reloadData')){\r\n that.layBody.scrollTop(0);\r\n }\r\n if(options.scrollPos === 'reset'){\r\n that.layBody.scrollLeft(0);\r\n }\r\n\r\n that.layMain.find('.'+ NONE).remove();\r\n that.layMain.find('tbody').html(trs.join(''));\r\n that.layFixLeft.find('tbody').html(trs_fixed.join(''));\r\n that.layFixRight.find('tbody').html(trs_fixed_r.join(''));\r\n\r\n // 渲染表单\r\n that.syncCheckAll();\r\n that.renderForm();\r\n\r\n // 因为 page 参数有可能发生变化 先重新铺满\r\n that.fullSize();\r\n\r\n // 滚动条补丁\r\n that.haveInit ? that.scrollPatch() : setTimeout(function(){\r\n that.scrollPatch();\r\n }, 50);\r\n that.haveInit = true;\r\n\r\n layer.close(that.tipsIndex);\r\n };\r\n\r\n table.cache[that.key] = data; //记录数据\r\n\r\n //显示隐藏合计栏\r\n that.layTotal[data.length == 0 ? 'addClass' : 'removeClass'](HIDE_V);\r\n\r\n //显示隐藏分页栏\r\n that.layPage[(options.page || options.pagebar) ? 'removeClass' : 'addClass'](HIDE);\r\n that.layPage.find(ELEM_PAGE_VIEW)[\r\n (!options.page || count == 0 || (data.length === 0 && curr == 1))\r\n ? 'addClass'\r\n : 'removeClass'\r\n ](HIDE_V);\r\n\r\n //如果无数据\r\n if(data.length === 0){\r\n return that.errorView(options.text.none);\r\n } else {\r\n that.layFixLeft.removeClass(HIDE);\r\n }\r\n\r\n //如果执行初始排序\r\n if(sort){\r\n return render();\r\n }\r\n\r\n //正常初始化数据渲染\r\n render(); //渲染数据\r\n that.renderTotal(data, totalRowData); //数据合计\r\n that.layTotal && that.layTotal.removeClass(HIDE);\r\n\r\n //同步分页状态\r\n if(options.page){\r\n options.page = $.extend({\r\n elem: 'layui-table-page' + options.index,\r\n count: count,\r\n limit: options.limit,\r\n limits: options.limits || [10,20,30,40,50,60,70,80,90],\r\n groups: 3,\r\n layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],\r\n prev: '<i class=\"layui-icon\">&#xe603;</i>',\r\n next: '<i class=\"layui-icon\">&#xe602;</i>',\r\n jump: function(obj, first){\r\n if(!first){\r\n //分页本身并非需要做以下更新,下面参数的同步,主要是因为其它处理统一用到了它们\r\n //而并非用的是 options.page 中的参数(以确保分页未开启的情况仍能正常使用)\r\n that.page = obj.curr; //更新页码\r\n options.limit = obj.limit; //更新每页条数\r\n\r\n that.pullData(obj.curr);\r\n }\r\n }\r\n }, options.page);\r\n options.page.count = count; //更新总条数\r\n laypage.render(options.page);\r\n }\r\n };\r\n\r\n // 重新渲染数据\r\n table.renderData = function (id) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n that.pullData(that.page, {\r\n renderData: true,\r\n type: 'reloadData'\r\n });\r\n }\r\n\r\n // 数据合计行\r\n Class.prototype.renderTotal = function(data, totalRowData){\r\n var that = this;\r\n var options = that.config;\r\n var totalNums = {};\r\n\r\n if(!options.totalRow) return;\r\n\r\n layui.each(data, function(i1, item1){\r\n // 若数据项为空数组,则不往下执行(因为删除数据时,会将原有数据设置为 []\r\n if(layui.type(item1) === 'array' && item1.length === 0) return;\r\n\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3\r\n ,content = item1[field];\r\n\r\n if(item3.totalRow){\r\n totalNums[field] = (totalNums[field] || 0) + (parseFloat(content) || 0);\r\n }\r\n });\r\n });\r\n\r\n that.dataTotal = []; // 记录合计行结果\r\n\r\n var tds = [];\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3;\r\n\r\n // 合计数据的特定字段\r\n var TOTAL_NUMS = totalRowData && totalRowData[item3.field];\r\n\r\n // 合计数据的小数点位数处理\r\n var decimals = 'totalRowDecimals' in item3 ? item3.totalRowDecimals : 2;\r\n var thisTotalNum = totalNums[field]\r\n ? parseFloat(totalNums[field] || 0).toFixed(decimals)\r\n : '';\r\n\r\n // td 显示内容\r\n var content = function(){\r\n var text = item3.totalRowText || '';\r\n var tplData = {\r\n LAY_COL: item3\r\n };\r\n\r\n tplData[field] = thisTotalNum;\r\n\r\n // 获取自动计算的合并内容\r\n var getContent = item3.totalRow ? (parseTempData.call(that, {\r\n item3: item3,\r\n content: thisTotalNum,\r\n tplData: tplData\r\n }) || text) : text;\r\n\r\n // 如果直接传入了合计行数据,则不输出自动计算的结果\r\n return TOTAL_NUMS || getContent;\r\n }();\r\n\r\n // 合计原始结果\r\n var total = TOTAL_NUMS || thisTotalNum || '';\r\n item3.field && that.dataTotal.push({\r\n field: item3.field,\r\n total: $('<div>'+ content +'</div>').text()\r\n });\r\n\r\n // td 容器\r\n var td = ['<td data-field=\"'+ field +'\" data-key=\"'+ item3.key +'\" '+ function(){\r\n var attr = [];\r\n if(item3.minWidth) attr.push('data-minwidth=\"'+ item3.minWidth +'\"'); // 单元格最小宽度\r\n if(item3.maxWidth) attr.push('data-maxwidth=\"'+ item3.maxWidth +'\"'); // 单元格最小宽度\r\n if(item3.style) attr.push('style=\"'+ item3.style +'\"'); // 自定义单元格样式\r\n return attr.join(' ');\r\n }() +' class=\"'+ function(){ // 追加样式\r\n var classNames = [];\r\n if(item3.hide) classNames.push(HIDE); // 插入隐藏列样式\r\n if(!item3.field) classNames.push(ELEM_COL_SPECIAL); // 插入特殊列样式\r\n return classNames.join(' ');\r\n }() +'\">',\r\n '<div class=\"layui-table-cell laytable-cell-'+ function(){ // 返回对应的CSS类标识\r\n var key = item3.key;\r\n return item3.type === 'normal' ? key\r\n : (key + ' laytable-cell-' + item3.type);\r\n }() +'\"'+ function(){\r\n var attr = [];\r\n if(item3.align) attr.push('align=\"'+ item3.align +'\"'); // 对齐方式\r\n return attr.join(' ');\r\n }() +'>' + function(){\r\n var totalRow = item3.totalRow || options.totalRow;\r\n\r\n // 如果 totalRow 参数为字符类型,则解析为自定义模版\r\n if(typeof totalRow === 'string'){\r\n return laytpl(totalRow).render($.extend({\r\n TOTAL_NUMS: TOTAL_NUMS || totalNums[field],\r\n TOTAL_ROW: totalRowData || {},\r\n LAY_COL: item3\r\n }, item3));\r\n }\r\n return content;\r\n }(),\r\n '</div></td>'].join('');\r\n\r\n tds.push(td);\r\n });\r\n\r\n var patchElem = that.layTotal.find('.layui-table-patch'); // 可能存在滚动条补丁\r\n that.layTotal.find('tbody').html('<tr>' + tds.join('') + (patchElem.length ? patchElem.get(0).outerHTML : '') + '</tr>');\r\n };\r\n\r\n //找到对应的列元素\r\n Class.prototype.getColElem = function(parent, key){\r\n var that = this;\r\n //var options = that.config;\r\n return parent.eq(0).find('.laytable-cell-'+ key + ':eq(0)');\r\n };\r\n\r\n // 渲染表单\r\n Class.prototype.renderForm = function(type){\r\n var that = this;\r\n var options = that.config;\r\n var filter = that.elem.attr('lay-filter');\r\n form.render(type, filter);\r\n };\r\n\r\n // 同步全选按钮状态\r\n Class.prototype.syncCheckAll = function(){\r\n var that = this;\r\n var options = that.config;\r\n var checkAllElem = that.layHeader.find('input[name=\"layTableCheckbox\"]');\r\n var syncColsCheck = function(checked){\r\n that.eachCols(function(i, item){\r\n if(item.type === 'checkbox'){\r\n item[options.checkName] = checked;\r\n }\r\n });\r\n return checked;\r\n };\r\n var checkStatus = table.checkStatus(that.key);\r\n\r\n if(!checkAllElem[0]) return;\r\n\r\n // 选中状态\r\n syncColsCheck(checkStatus.isAll);\r\n checkAllElem.prop({\r\n checked: checkStatus.isAll,\r\n indeterminate: !checkStatus.isAll && checkStatus.data.length // 半选\r\n });\r\n form.render(checkAllElem);\r\n };\r\n\r\n // 标记当前活动行背景色\r\n Class.prototype.setRowActive = function(index, className, removeClass){\r\n var that = this;\r\n var options = that.config;\r\n var tr = that.layBody.find('tr[data-index=\"'+ index +'\"]');\r\n className = className || 'layui-table-click';\r\n\r\n if(removeClass) return tr.removeClass(className);\r\n\r\n tr.addClass(className);\r\n tr.siblings('tr').removeClass(className);\r\n };\r\n\r\n // 设置行选中状态\r\n Class.prototype.setRowChecked = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n var isCheckAll = opts.index === 'all'; // 是否操作全部\r\n var isCheckMult = layui.type(opts.index) === 'array'; // 是否操作多个\r\n\r\n // 匹配行元素\r\n var tr = function(tr) {\r\n return isCheckAll ? tr : tr.filter(isCheckMult ? function() {\r\n var dataIndex = $(this).data('index');\r\n return opts.index.indexOf(dataIndex) !== -1;\r\n } : '[data-index=\"'+ opts.index +'\"]');\r\n }(that.layBody.find('tr'));\r\n\r\n // 默认属性\r\n opts = $.extend({\r\n type: 'checkbox' // 选中方式\r\n }, opts);\r\n\r\n // 同步数据选中属性值\r\n var thisData = table.cache[that.key];\r\n var existChecked = 'checked' in opts;\r\n\r\n // 若为单选框,则单向选中;若为复选框,则切换选中。\r\n var getChecked = function(value){\r\n return opts.type === 'radio' ? true : (existChecked ? opts.checked : !value)\r\n };\r\n\r\n // 设置选中状态\r\n layui.each(thisData, function(i, item){\r\n // 绕过空项和禁用项\r\n if(layui.type(item) === 'array' || item[options.disabledName]) return;\r\n\r\n // 匹配条件\r\n var matched = isCheckAll || (\r\n isCheckMult ? opts.index.indexOf(i) !== -1 : Number(opts.index) === i\r\n );\r\n\r\n // 设置匹配项的选中值\r\n if(matched){\r\n // 标记数据选中状态\r\n var checked = item[options.checkName] = getChecked(item[options.checkName]);\r\n\r\n // 标记当前行背景色\r\n var currTr = tr.filter('[data-index=\"'+ i +'\"]');\r\n currTr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED);\r\n\r\n // 若为 radio 类型,则取消其他行选中背景色\r\n if(opts.type === 'radio'){\r\n currTr.siblings().removeClass(ELEM_CHECKED);\r\n }\r\n } else if(opts.type === 'radio') {\r\n delete item[options.checkName];\r\n }\r\n });\r\n\r\n // 若存在复选框或单选框,则标注选中状态样式\r\n var checkedElem = tr.find('input[lay-type=\"'+ ({\r\n radio: 'layTableRadio',\r\n checkbox: 'layTableCheckbox'\r\n }[opts.type] || 'checkbox') +'\"]:not(:disabled)');\r\n var checkedSameElem = checkedElem.last();\r\n var fixRElem = checkedSameElem.closest(ELEM_FIXR);\r\n\r\n ( opts.type === 'radio' && fixRElem.hasClass(HIDE)\r\n ? checkedElem.first()\r\n : checkedElem ).prop('checked', getChecked(checkedSameElem.prop('checked')));\r\n\r\n that.syncCheckAll();\r\n that.renderForm(opts.type);\r\n };\r\n\r\n // 数据排序\r\n Class.prototype.sort = function(opts){ // field, type, pull, fromEvent\r\n var that = this;\r\n var field;\r\n var res = {};\r\n var options = that.config;\r\n var filter = options.elem.attr('lay-filter');\r\n var data = table.cache[that.key], thisData;\r\n\r\n opts = opts || {};\r\n\r\n // 字段匹配\r\n if(typeof opts.field === 'string'){\r\n field = opts.field;\r\n that.layHeader.find('th').each(function(i, item){\r\n var othis = $(this);\r\n var _field = othis.data('field');\r\n if(_field === opts.field){\r\n opts.field = othis;\r\n field = _field;\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n try {\r\n field = field || opts.field.data('field');\r\n var key = opts.field.data('key');\r\n\r\n // 如果欲执行的排序已在状态中,则不执行渲染\r\n if(that.sortKey && !opts.pull){\r\n if(field === that.sortKey.field && opts.type === that.sortKey.sort){\r\n return;\r\n }\r\n }\r\n\r\n var elemSort = that.layHeader.find('th .laytable-cell-'+ key).find(ELEM_SORT);\r\n that.layHeader.find('th').find(ELEM_SORT).removeAttr('lay-sort'); // 清除其它标题排序状态\r\n elemSort.attr('lay-sort', opts.type || null);\r\n that.layFixed.find('th')\r\n } catch(e){\r\n hint.error('Table modules: sort field \\''+ field +'\\' not matched');\r\n }\r\n\r\n // 记录排序索引和类型\r\n that.sortKey = {\r\n field: field,\r\n sort: opts.type\r\n };\r\n\r\n // 默认为前端自动排序。如果否,则需自主排序(通常为服务端处理好排序)\r\n if(options.autoSort){\r\n if(opts.type === 'asc'){ //升序\r\n thisData = layui.sort(data, field, null, true);\r\n } else if(opts.type === 'desc'){ //降序\r\n thisData = layui.sort(data, field, true, true);\r\n } else { // 清除排序\r\n thisData = layui.sort(data, table.config.indexName, null, true);\r\n delete that.sortKey;\r\n delete options.initSort;\r\n }\r\n }\r\n\r\n res[options.response.dataName] = thisData || data;\r\n\r\n // 重载数据\r\n that.renderData({\r\n res: res,\r\n curr: that.page,\r\n count: that.count,\r\n sort: true,\r\n type: opts.reloadType\r\n });\r\n\r\n // 排序是否来自于点击表头事件触发\r\n if(opts.fromEvent){\r\n options.initSort = {\r\n field: field,\r\n type: opts.type\r\n };\r\n layui.event.call(opts.field, MOD_NAME, 'sort('+ filter +')', $.extend({\r\n config: options\r\n }, options.initSort));\r\n }\r\n };\r\n\r\n // 请求 loading\r\n Class.prototype.loading = function(hide){\r\n var that = this;\r\n var options = that.config;\r\n if(options.loading){\r\n if(hide){\r\n that.layInit && that.layInit.remove();\r\n delete that.layInit;\r\n that.layBox.find(ELEM_INIT).remove();\r\n } else {\r\n that.layInit = $(['<div class=\"layui-table-init\">',\r\n '<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>',\r\n '</div>'].join(''));\r\n that.layBox.append(that.layInit);\r\n }\r\n }\r\n };\r\n\r\n // 获取对应单元格的 cssRules\r\n Class.prototype.cssRules = function(key, callback){\r\n var that = this;\r\n var style = that.elem.children('style')[0];\r\n\r\n lay.getStyleRules(style, function(item){\r\n if (item.selectorText === ('.laytable-cell-'+ key)) {\r\n return callback(item), true;\r\n }\r\n });\r\n };\r\n\r\n // 让表格铺满\r\n Class.prototype.fullSize = function(){\r\n var that = this;\r\n var options = that.config;\r\n var height = options.height;\r\n var bodyHeight;\r\n var MIN_HEIGHT = 135;\r\n\r\n if(that.fullHeightGap){\r\n height = _WIN.height() - that.fullHeightGap;\r\n if(height < MIN_HEIGHT) height = MIN_HEIGHT;\r\n // that.elem.css('height', height);\r\n } else if (that.parentDiv && that.parentHeightGap) {\r\n height = $(that.parentDiv).height() - that.parentHeightGap;\r\n if(height < MIN_HEIGHT) height = MIN_HEIGHT;\r\n // that.elem.css(\"height\", height);\r\n } else if (that.customHeightFunc) {\r\n height = that.customHeightFunc();\r\n if(height < MIN_HEIGHT) height = MIN_HEIGHT;\r\n }\r\n\r\n // 如果多级表头,则填补表头高度\r\n if(options.cols.length > 1){\r\n // 补全高度\r\n var th = that.layFixed.find(ELEM_HEADER).find('th');\r\n // 固定列表头同步跟本体 th 一致高度\r\n var headerMain = that.layHeader.first();\r\n layui.each(th, function (thIndex, thElem) {\r\n thElem = $(thElem);\r\n thElem.height(headerMain.find('th[data-key=\"' + thElem.attr('data-key') + '\"]').height() + 'px');\r\n })\r\n }\r\n\r\n if(!height) return;\r\n\r\n // 减去列头区域的高度 --- 此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,只对默认尺寸表格做支持\r\n bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 39)\r\n\r\n // 减去工具栏的高度\r\n if(options.toolbar){\r\n bodyHeight -= (that.layTool.outerHeight() || 51);\r\n }\r\n\r\n // 减去统计栏的高度\r\n if(options.totalRow){\r\n bodyHeight -= (that.layTotal.outerHeight() || 40);\r\n }\r\n\r\n // 减去分页栏的高度\r\n if(options.page || options.pagebar){\r\n bodyHeight -= (that.layPage.outerHeight() || 43);\r\n }\r\n\r\n if (options.maxHeight) {\r\n layui.each({elem: height, layMain: bodyHeight}, function (elemName, elemHeight) {\r\n that[elemName].css({\r\n height: 'auto',\r\n maxHeight: elemHeight + 'px'\r\n });\r\n });\r\n } else {\r\n that.layMain.outerHeight(bodyHeight);\r\n }\r\n };\r\n\r\n //获取滚动条宽度\r\n Class.prototype.getScrollWidth = function(elem){\r\n var width;\r\n if(elem){\r\n width = elem.offsetWidth - elem.clientWidth;\r\n } else {\r\n elem = document.createElement('div');\r\n elem.style.width = '100px';\r\n elem.style.height = '100px';\r\n elem.style.overflowY = 'scroll';\r\n\r\n document.body.appendChild(elem);\r\n width = elem.offsetWidth - elem.clientWidth;\r\n document.body.removeChild(elem);\r\n }\r\n return width;\r\n };\r\n\r\n // 滚动条补丁\r\n Class.prototype.scrollPatch = function(){\r\n var that = this;\r\n var layMainTable = that.layMain.children('table');\r\n var scrollWidth = that.layMain.width() - that.layMain.prop('clientWidth'); // 纵向滚动条宽度\r\n var scrollHeight = that.layMain.height() - that.layMain.prop('clientHeight'); // 横向滚动条高度\r\n var getScrollWidth = that.getScrollWidth(that.layMain[0]); // 获取主容器滚动条宽度,如果有的话\r\n var outWidth = layMainTable.outerWidth() - that.layMain.width(); // 表格内容器的超出宽度\r\n\r\n // 添加补丁\r\n var addPatch = function(elem){\r\n if(scrollWidth && scrollHeight){\r\n elem = elem.eq(0);\r\n if(!elem.find('.layui-table-patch')[0]){\r\n var patchElem = $('<th class=\"layui-table-patch\"><div class=\"layui-table-cell\"></div></th>'); // 补丁元素\r\n patchElem.find('div').css({\r\n width: scrollWidth\r\n });\r\n elem.find('tr').append(patchElem);\r\n }\r\n } else {\r\n elem.find('.layui-table-patch').remove();\r\n }\r\n };\r\n\r\n addPatch(that.layHeader);\r\n addPatch(that.layTotal);\r\n\r\n // 固定列区域高度\r\n var mainHeight = that.layMain.height();\r\n var fixHeight = mainHeight - scrollHeight;\r\n\r\n that.layFixed.find(ELEM_BODY).css(\r\n 'height',\r\n layMainTable.height() >= fixHeight ? fixHeight : 'auto'\r\n ).scrollTop(that.layMain.scrollTop()); // 固定列滚动条高度\r\n\r\n // 表格宽度小于容器宽度时,隐藏固定列\r\n that.layFixRight[\r\n (table.cache[that.key] && table.cache[that.key].length) && outWidth > 0\r\n ? 'removeClass'\r\n : 'addClass'\r\n ](HIDE);\r\n\r\n // 操作栏\r\n that.layFixRight.css('right', scrollWidth - 1);\r\n };\r\n\r\n // 事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var filter = options.elem.attr('lay-filter');\r\n var th = that.layHeader.find('th');\r\n var ELEM_CELL = '.layui-table-cell';\r\n\r\n var _BODY = $('body');\r\n var dict = {};\r\n\r\n // 头部工具栏操作事件\r\n that.layTool.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n var data = table.cache[options.id];\r\n var openPanel = function(sets){\r\n var list = $(sets.list);\r\n var panel = $('<ul class=\"' + ELEM_TOOL_PANEL + '\"></ul>');\r\n\r\n panel.html(list);\r\n\r\n // 限制最大高度\r\n if(options.height){\r\n panel.css('max-height', options.height - (that.layTool.outerHeight() || 50));\r\n }\r\n\r\n // 插入元素\r\n othis.find('.' + ELEM_TOOL_PANEL)[0] || othis.append(panel);\r\n that.renderForm();\r\n\r\n panel.on('click', function(e){\r\n layui.stope(e);\r\n });\r\n\r\n sets.done && sets.done(panel, list)\r\n };\r\n\r\n layui.stope(e);\r\n _DOC.trigger('table.tool.panel.remove');\r\n layer.close(that.tipsIndex);\r\n\r\n switch(events){\r\n case 'LAYTABLE_COLS': // 筛选列\r\n openPanel({\r\n list: function(){\r\n var lis = [];\r\n that.eachCols(function(i, item){\r\n if(item.field && item.type == 'normal'){\r\n lis.push('<li><input type=\"checkbox\" name=\"'+ item.field +'\" data-key=\"'+ item.key +'\" data-parentkey=\"'+ (item.parentKey||'') +'\" lay-skin=\"primary\" '+ (item.hide ? '' : 'checked') +' title=\"'+ util.escape($('<div>' + (item.fieldTitle || item.title || item.field) + '</div>').text()) +'\" lay-filter=\"LAY_TABLE_TOOL_COLS\"></li>');\r\n }\r\n });\r\n return lis.join('');\r\n }()\r\n ,done: function(){\r\n form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(obj){\r\n var othis = $(obj.elem);\r\n var checked = this.checked;\r\n var key = othis.data('key');\r\n var col = that.col(key);\r\n var hide = col.hide;\r\n var parentKey = othis.data('parentkey');\r\n\r\n if(!col.key) return;\r\n\r\n // 同步勾选列的 hide 值和隐藏样式\r\n col.hide = !checked;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n checked ? 'removeClass' : 'addClass'\r\n ](HIDE);\r\n\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n if(hide != col.hide){\r\n that.setParentCol(!checked, parentKey);\r\n }\r\n\r\n // 重新适配尺寸\r\n that.resize();\r\n\r\n // 列筛选(显示或隐藏)后的事件\r\n layui.event.call(this, MOD_NAME, 'colToggled('+ filter +')', {\r\n col: col,\r\n config: options\r\n });\r\n });\r\n }\r\n });\r\n break;\r\n case 'LAYTABLE_EXPORT': // 导出\r\n if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3});\r\n if(device.ie){\r\n layer.tips('导出功能不支持 IE请用 Chrome 等高级浏览器导出', this, {\r\n tips: 3\r\n });\r\n } else {\r\n openPanel({\r\n list: function(){\r\n return [\r\n '<li data-type=\"csv\">导出 csv 格式文件</li>',\r\n '<li data-type=\"xls\">导出 xls 格式文件</li>'\r\n ].join('')\r\n }(),\r\n done: function(panel, list){\r\n list.on('click', function(){\r\n var type = $(this).data('type')\r\n table.exportFile.call(that, options.id, null, type);\r\n });\r\n }\r\n });\r\n }\r\n break;\r\n case 'LAYTABLE_PRINT': // 打印\r\n if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3});\r\n var printWin = window.open('about:blank', '_blank');\r\n var style = ['<style>',\r\n 'body{font-size: 12px; color: #5F5F5F;}',\r\n 'table{width: 100%; border-collapse: collapse; border-spacing: 0;}',\r\n 'th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #5F5F5F;}',\r\n 'a{color: #5F5F5F; text-decoration:none;}',\r\n 'img{max-height: 100%;}',\r\n '*.layui-hide{display: none}',\r\n '</style>'].join('')\r\n var html = $(that.layHeader.html()); // 输出表头\r\n\r\n html.append(that.layMain.find('table').html()); // 输出表体\r\n html.append(that.layTotal.find('table').html()) // 输出合计行\r\n\r\n html.find('th.layui-table-patch').remove(); // 移除补丁\r\n // 移除表头特殊列\r\n html.find('thead>tr>th.'+ ELEM_COL_SPECIAL).filter(function(i, thElem){\r\n return !$(thElem).children('.'+ ELEM_GROUP).length; // 父级表头除外\r\n }).remove();\r\n html.find('tbody>tr>td.'+ ELEM_COL_SPECIAL).remove(); // 移除表体特殊列\r\n\r\n printWin.document.write(style + html.prop('outerHTML'));\r\n printWin.document.close();\r\n\r\n if(layui.device('edg').edg){\r\n printWin.onafterprint = printWin.close;\r\n printWin.print();\r\n }else{\r\n printWin.print();\r\n printWin.close();\r\n }\r\n break;\r\n }\r\n\r\n layui.event.call(this, MOD_NAME, 'toolbar('+ filter +')', $.extend({\r\n event: events,\r\n config: options\r\n },{}));\r\n });\r\n\r\n // 表头自定义元素事件\r\n that.layHeader.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n var th = othis.closest('th');\r\n var key = th.data('key');\r\n var col = that.col(key);\r\n\r\n layui.event.call(this, MOD_NAME, 'colTool('+ filter +')', $.extend({\r\n event: events,\r\n config: options,\r\n col: col\r\n },{}));\r\n });\r\n\r\n // 分页栏操作事件\r\n that.layPagebar.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n\r\n layui.event.call(this, MOD_NAME, 'pagebar('+ filter +')', $.extend({\r\n event: events,\r\n config: options\r\n },{}));\r\n });\r\n\r\n // 拖拽调整宽度\r\n th.on('mousemove', function(e){\r\n var othis = $(this);\r\n var oLeft = othis.offset().left;\r\n var pLeft = e.clientX - oLeft;\r\n if(othis.data('unresize') || thisTable.eventMoveElem){\r\n return;\r\n }\r\n dict.allowResize = othis.width() - pLeft <= 10; //是否处于拖拽允许区域\r\n _BODY.css('cursor', (dict.allowResize ? 'col-resize' : ''));\r\n }).on('mouseleave', function(){\r\n var othis = $(this);\r\n if(thisTable.eventMoveElem) return;\r\n _BODY.css('cursor', '');\r\n }).on('mousedown', function(e){\r\n var othis = $(this);\r\n if(dict.allowResize){\r\n var key = othis.data('key');\r\n e.preventDefault();\r\n dict.offset = [e.clientX, e.clientY]; //记录初始坐标\r\n\r\n that.cssRules(key, function(item){\r\n var width = item.style.width || othis.outerWidth();\r\n dict.rule = item;\r\n dict.ruleWidth = parseFloat(width);\r\n dict.minWidth = othis.data('minwidth') || options.cellMinWidth;\r\n dict.maxWidth = othis.data('maxwidth') || options.cellMaxWidth;\r\n });\r\n\r\n // 临时记录当前拖拽信息\r\n othis.data(DATA_MOVE_NAME, dict);\r\n thisTable.eventMoveElem = othis;\r\n }\r\n });\r\n\r\n // 拖拽中\r\n if(!thisTable.docEvent){\r\n _DOC.on('mousemove', function(e){\r\n if(thisTable.eventMoveElem){\r\n var dict = thisTable.eventMoveElem.data(DATA_MOVE_NAME) || {};\r\n\r\n thisTable.eventMoveElem.data('resizing', 1);\r\n e.preventDefault();\r\n\r\n if(dict.rule){\r\n var setWidth = dict.ruleWidth + e.clientX - dict.offset[0];\r\n var id = thisTable.eventMoveElem.closest('.' + ELEM_VIEW).attr('lay-id');\r\n var thatTable = getThisTable(id);\r\n\r\n if(!thatTable) return;\r\n\r\n if(setWidth < dict.minWidth) setWidth = dict.minWidth;\r\n if(setWidth > dict.maxWidth) setWidth = dict.maxWidth;\r\n\r\n dict.rule.style.width = setWidth + 'px';\r\n thatTable.setGroupWidth(thisTable.eventMoveElem);\r\n layer.close(that.tipsIndex);\r\n }\r\n }\r\n }).on('mouseup', function(e){\r\n if(thisTable.eventMoveElem){\r\n var th = thisTable.eventMoveElem; // 当前触发拖拽的 th 元素\r\n var id = th.closest('.' + ELEM_VIEW).attr('lay-id');\r\n var thatTable = getThisTable(id);\r\n\r\n if(!thatTable) return;\r\n\r\n var key = th.data('key');\r\n var col = thatTable.col(key);\r\n var filter = thatTable.config.elem.attr('lay-filter');\r\n\r\n // 重置过度信息\r\n dict = {};\r\n _BODY.css('cursor', '');\r\n thatTable.scrollPatch();\r\n\r\n // 清除当前拖拽信息\r\n th.removeData(DATA_MOVE_NAME);\r\n delete thisTable.eventMoveElem;\r\n\r\n // 列拖拽宽度后的事件\r\n thatTable.cssRules(key, function(item){\r\n col.width = parseFloat(item.style.width);\r\n layui.event.call(th[0], MOD_NAME, 'colResized('+ filter +')', {\r\n col: col,\r\n config: thatTable.config\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n // 已给 document 执行全局事件,避免重复绑定\r\n thisTable.docEvent = true;\r\n\r\n\r\n // 排序\r\n th.on('click', function(e){\r\n var othis = $(this);\r\n var elemSort = othis.find(ELEM_SORT);\r\n var nowType = elemSort.attr('lay-sort');\r\n var type;\r\n\r\n // 排序不触发的条件\r\n if(!elemSort[0] || othis.data('resizing') === 1){\r\n return othis.removeData('resizing');\r\n }\r\n\r\n if(nowType === 'asc'){\r\n type = 'desc';\r\n } else if(nowType === 'desc'){\r\n type = null;\r\n } else {\r\n type = 'asc';\r\n }\r\n that.sort({\r\n field: othis,\r\n type: type,\r\n fromEvent: true\r\n });\r\n }).find(ELEM_SORT+' .layui-edge ').on('click', function(e){\r\n var othis = $(this);\r\n var index = othis.index();\r\n var field = othis.parents('th').eq(0).data('field');\r\n layui.stope(e);\r\n if(index === 0){\r\n that.sort({\r\n field: field,\r\n type: 'asc',\r\n fromEvent: true\r\n });\r\n } else {\r\n that.sort({\r\n field: field,\r\n type: 'desc',\r\n fromEvent: true\r\n });\r\n }\r\n });\r\n\r\n //数据行中的事件返回的公共对象成员\r\n var commonMember = that.commonMember = function(sets){\r\n var othis = $(this);\r\n var index = othis.parents('tr').eq(0).data('index');\r\n var tr = that.layBody.find('tr[data-index=\"'+ index +'\"]');\r\n var data = table.cache[that.key] || [];\r\n\r\n data = data[index] || {};\r\n\r\n // 事件返回的公共成员\r\n var obj = {\r\n tr: tr, // 行元素\r\n config: options,\r\n data: table.clearCacheKey(data), // 当前行数据\r\n dataCache: data, // 当前行缓存中的数据\r\n index: index,\r\n del: function(){ // 删除行数据\r\n table.cache[that.key][index] = [];\r\n tr.remove();\r\n that.scrollPatch();\r\n },\r\n update: function(fields, related){ // 修改行数据\r\n fields = fields || {};\r\n layui.each(fields, function(key, value){\r\n var td = tr.children('td[data-field=\"'+ key +'\"]');\r\n var cell = td.children(ELEM_CELL); // 获取当前修改的列\r\n\r\n // 更新缓存中的数据\r\n data[key] = obj.data[key] = value;\r\n\r\n // 更新相应列视图\r\n that.eachCols(function(i, item3){\r\n if(item3.field == key){\r\n cell.html(parseTempData.call(that, {\r\n item3: item3\r\n ,content: value\r\n ,tplData: $.extend({\r\n LAY_COL: item3\r\n }, data)\r\n }));\r\n td.data('content', value);\r\n }\r\n // 更新其他包含自定义模板且可能有所关联的列视图\r\n else if(related && (item3.templet || item3.toolbar)){\r\n var thisTd = tr.children('td[data-field=\"'+ (item3.field || i) +'\"]');\r\n var content = data[item3.field];\r\n\r\n thisTd.children(ELEM_CELL).html(parseTempData.call(that, {\r\n item3: item3\r\n ,content: content\r\n ,tplData: $.extend({\r\n LAY_COL: item3\r\n }, data)\r\n }));\r\n thisTd.data('content', content);\r\n }\r\n });\r\n });\r\n\r\n that.renderForm();\r\n },\r\n // 设置行选中状态\r\n setRowChecked: function(opts){\r\n that.setRowChecked($.extend({\r\n index: index\r\n }, opts));\r\n }\r\n // 获取当前列\r\n };\r\n\r\n return $.extend(obj, sets);\r\n };\r\n\r\n // 复选框选择(替代元素的 click 事件)\r\n that.elem.on('click', 'input[name=\"layTableCheckbox\"]+', function(e){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var checkbox = othis.prev();\r\n var children = that.layBody.find('input[name=\"layTableCheckbox\"]');\r\n var index = checkbox.parents('tr').eq(0).data('index');\r\n var checked = checkbox[0].checked;\r\n var isAll = checkbox.attr('lay-filter') === 'layTableAllChoose';\r\n\r\n if(checkbox[0].disabled) return;\r\n\r\n // 全选\r\n if(isAll){\r\n that.setRowChecked({\r\n index: 'all',\r\n checked: checked\r\n });\r\n } else {\r\n that.setRowChecked({\r\n index: index,\r\n checked: checked\r\n });\r\n layui.stope(e);\r\n }\r\n\r\n // 事件\r\n layui.event.call(\r\n checkbox[0],\r\n MOD_NAME, 'checkbox('+ filter +')',\r\n commonMember.call(checkbox[0], {\r\n checked: checked,\r\n type: isAll ? 'all' : 'one',\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n });\r\n\r\n // 单选框选择\r\n that.elem.on('click', 'input[lay-type=\"layTableRadio\"]+', function(e){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var radio = othis.prev();\r\n var checked = radio[0].checked;\r\n var index = radio.parents('tr').eq(0).data('index');\r\n\r\n layui.stope(e);\r\n if(radio[0].disabled) return false;\r\n\r\n // 标注选中样式\r\n that.setRowChecked({\r\n type: 'radio',\r\n index: index\r\n });\r\n\r\n // 事件\r\n layui.event.call(\r\n radio[0],\r\n MOD_NAME, 'radio('+ filter +')',\r\n commonMember.call(radio[0], {\r\n checked: checked,\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n });\r\n\r\n // 行事件\r\n that.layBody.on('mouseenter', 'tr', function(){ // 鼠标移入行\r\n var othis = $(this);\r\n var index = othis.index();\r\n if(othis.data('off')) return; // 不触发事件\r\n that.layBody.find('tr:eq('+ index +')').addClass(ELEM_HOVER)\r\n }).on('mouseleave', 'tr', function(){ // 鼠标移出行\r\n var othis = $(this);\r\n var index = othis.index();\r\n if(othis.data('off')) return; // 不触发事件\r\n that.layBody.find('tr:eq('+ index +')').removeClass(ELEM_HOVER)\r\n }).on('click', 'tr', function(e){ // 单击行\r\n // 不支持行单击事件的元素\r\n var UNROW = [\r\n '.layui-form-checkbox',\r\n '.layui-form-switch',\r\n '.layui-form-radio',\r\n '[lay-unrow]'\r\n ].join(',');\r\n if( $(e.target).is(UNROW) || $(e.target).closest(UNROW)[0]){\r\n return;\r\n }\r\n setRowEvent.call(this, 'row');\r\n }).on('dblclick', 'tr', function(){ // 双击行\r\n setRowEvent.call(this, 'rowDouble');\r\n }).on('contextmenu', 'tr', function(e){ // 菜单\r\n if (!options.defaultContextmenu) e.preventDefault();\r\n setRowEvent.call(this, 'rowContextmenu');\r\n });\r\n\r\n // 创建行单击、双击、菜单事件\r\n var setRowEvent = function(eventType){\r\n var othis = $(this);\r\n if(othis.data('off')) return; //不触发事件\r\n layui.event.call(this,\r\n MOD_NAME, eventType + '('+ filter +')',\r\n commonMember.call(othis.children('td')[0])\r\n );\r\n };\r\n\r\n // 渲染单元格编辑状态\r\n var renderGridEdit = function(othis, e){\r\n othis = $(othis);\r\n\r\n if(othis.data('off')) return; // 不触发事件\r\n\r\n var field = othis.data('field');\r\n var key = othis.data('key');\r\n var col = that.col(key);\r\n var index = othis.closest('tr').data('index');\r\n var data = table.cache[that.key][index];\r\n var elemCell = othis.children(ELEM_CELL);\r\n\r\n // 是否开启编辑\r\n // 若 edit 传入函数,则根据函数的返回结果判断是否开启编辑\r\n var editType = typeof col.edit === 'function'\r\n ? col.edit(data)\r\n : col.edit;\r\n\r\n // 显示编辑表单\r\n if(editType){\r\n var input = $(function(){\r\n var inputElem = '<input class=\"layui-input '+ ELEM_EDIT +'\" lay-unrow>';\r\n if(editType === 'textarea') {\r\n inputElem = '<textarea class=\"layui-input ' + ELEM_EDIT + '\" lay-unrow></textarea>';\r\n }\r\n return inputElem;\r\n }());\r\n input[0].value = function(val) {\r\n return (val === undefined || val === null) ? '' : val;\r\n }(othis.data('content') || data[field]);\r\n othis.find('.'+ELEM_EDIT)[0] || othis.append(input);\r\n input.focus();\r\n e && layui.stope(e);\r\n }\r\n };\r\n\r\n // 单元格编辑 - 输入框内容被改变的事件\r\n that.layBody.on('change', '.'+ ELEM_EDIT, function(){\r\n var othis = $(this);\r\n var td = othis.parent();\r\n var value = this.value;\r\n var field = othis.parent().data('field');\r\n var index = othis.closest('tr').data('index');\r\n var data = table.cache[that.key][index];\r\n\r\n //事件回调的参数对象\r\n var params = commonMember.call(td[0], {\r\n value: value,\r\n field: field,\r\n oldValue: data[field], // 编辑前的值\r\n td: td,\r\n reedit: function(){ // 重新编辑\r\n setTimeout(function(){\r\n // 重新渲染为编辑状态\r\n renderGridEdit(params.td);\r\n\r\n // 将字段缓存的值恢复到编辑之前的值\r\n var obj = {};\r\n obj[field] = params.oldValue;\r\n params.update(obj);\r\n });\r\n },\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n });\r\n\r\n // 更新缓存中的值\r\n var obj = {}; //变更的键值\r\n obj[field] = value;\r\n params.update(obj);\r\n\r\n // 执行 API 编辑事件\r\n layui.event.call(td[0], MOD_NAME, 'edit('+ filter +')', params);\r\n }).on('blur', '.'+ ELEM_EDIT, function(){ // 单元格编辑 - 恢复非编辑状态事件\r\n $(this).remove(); // 移除编辑状态\r\n });\r\n\r\n // 表格主体单元格触发编辑的事件\r\n that.layBody.on(options.editTrigger, 'td', function(e){\r\n renderGridEdit(this, e)\r\n }).on('mouseenter', 'td', function(){\r\n showGridExpandIcon.call(this)\r\n }).on('mouseleave', 'td', function(){\r\n showGridExpandIcon.call(this, 'hide');\r\n });\r\n\r\n // 表格合计栏单元格 hover 显示展开图标\r\n that.layTotal.on('mouseenter', 'td', function(){\r\n showGridExpandIcon.call(this)\r\n }).on('mouseleave', 'td', function(){\r\n showGridExpandIcon.call(this, 'hide');\r\n });\r\n\r\n // 显示单元格展开图标\r\n var ELEM_GRID = 'layui-table-grid';\r\n var ELEM_GRID_DOWN = 'layui-table-grid-down';\r\n var ELEM_GRID_PANEL = 'layui-table-grid-panel';\r\n var showGridExpandIcon = function(hide){\r\n var othis = $(this);\r\n var elemCell = othis.children(ELEM_CELL);\r\n\r\n if(othis.data('off')) return; // 不触发事件\r\n if(othis.parent().hasClass(ELEM_EXPAND)) return; // 是否已为展开状态\r\n\r\n if(hide){\r\n othis.find('.layui-table-grid-down').remove();\r\n } else if((\r\n elemCell.prop('scrollWidth') > elemCell.outerWidth() ||\r\n elemCell.find(\"br\").length > 0\r\n ) && !options.lineStyle){\r\n if(elemCell.find('.'+ ELEM_GRID_DOWN)[0]) return;\r\n othis.append('<div class=\"'+ ELEM_GRID_DOWN +'\"><i class=\"layui-icon layui-icon-down\"></i></div>');\r\n }\r\n };\r\n // 展开单元格内容\r\n var gridExpand = function(e, expandedMode){\r\n var othis = $(this);\r\n var td = othis.parent();\r\n var key = td.data('key');\r\n var col = that.col(key);\r\n var index = td.parent().data('index');\r\n var elemCell = td.children(ELEM_CELL);\r\n var ELEM_CELL_C = 'layui-table-cell-c';\r\n var elemCellClose = $('<i class=\"layui-icon layui-icon-up '+ ELEM_CELL_C +'\">');\r\n\r\n expandedMode = expandedMode || col.expandedMode || options.cellExpandedMode;\r\n\r\n // 展开风格\r\n if (expandedMode === 'tips') { // TIPS 展开风格\r\n that.tipsIndex = layer.tips([\r\n '<div class=\"layui-table-tips-main\" style=\"margin-top: -'+ (elemCell.height() + 23) +'px;'+ function(){\r\n if(options.size === 'sm'){\r\n return 'padding: 4px 15px; font-size: 12px;';\r\n }\r\n if(options.size === 'lg'){\r\n return 'padding: 14px 15px;';\r\n }\r\n return '';\r\n }() +'\">',\r\n elemCell.html(),\r\n '</div>',\r\n '<i class=\"layui-icon layui-table-tips-c layui-icon-close\"></i>'\r\n ].join(''), elemCell[0], {\r\n tips: [3, ''],\r\n time: -1,\r\n anim: -1,\r\n maxWidth: (device.ios || device.android) ? 300 : that.elem.width()/2,\r\n isOutAnim: false,\r\n skin: 'layui-table-tips',\r\n success: function(layero, index){\r\n layero.find('.layui-table-tips-c').on('click', function(){\r\n layer.close(index);\r\n });\r\n }\r\n });\r\n } else { // 多行展开风格\r\n // 恢复其他已经展开的单元格\r\n that.elem.find('.'+ ELEM_CELL_C).trigger('click');\r\n\r\n // 设置当前单元格展开宽度\r\n that.cssRules(key, function(item){\r\n var width = item.style.width;\r\n var expandedWidth = col.expandedWidth || options.cellExpandedWidth;\r\n\r\n // 展开后的宽度不能小于当前宽度\r\n if(expandedWidth < parseFloat(width)) expandedWidth = parseFloat(width);\r\n\r\n elemCellClose.data('cell-width', width);\r\n item.style.width = expandedWidth + 'px';\r\n\r\n setTimeout(function(){\r\n that.scrollPatch(); // 滚动条补丁\r\n });\r\n });\r\n\r\n // 设置当前单元格展开样式\r\n that.setRowActive(index, ELEM_EXPAND);\r\n\r\n // 插入关闭按钮\r\n if(!elemCell.next('.'+ ELEM_CELL_C)[0]){\r\n elemCell.after(elemCellClose);\r\n }\r\n\r\n // 关闭展开状态\r\n elemCellClose.on('click', function(){\r\n var $this = $(this);\r\n that.setRowActive(index, [ELEM_EXPAND, ELEM_HOVER].join(' '), true); // 移除单元格展开样式\r\n that.cssRules(key, function(item){\r\n item.style.width = $this.data('cell-width'); // 恢复单元格展开前的宽度\r\n setTimeout(function(){\r\n that.resize(); // 滚动条补丁\r\n });\r\n });\r\n $this.remove();\r\n });\r\n }\r\n\r\n othis.remove();\r\n layui.stope(e);\r\n };\r\n\r\n // 表格主体单元格展开事件\r\n that.layBody.on('click', '.'+ ELEM_GRID_DOWN, function(e){\r\n gridExpand.call(this, e);\r\n });\r\n // 表格合计栏单元格展开事件\r\n that.layTotal.on('click', '.'+ ELEM_GRID_DOWN, function(e){\r\n gridExpand.call(this, e, 'tips'); // 强制采用 tips 风格\r\n });\r\n\r\n // 行工具条操作事件\r\n var toolFn = function(type){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var index = othis.parents('tr').eq(0).data('index');\r\n // 标记当前活动行\r\n that.setRowActive(index);\r\n\r\n // 执行事件\r\n layui.event.call(\r\n this,\r\n MOD_NAME,\r\n (type || 'tool') + '('+ filter +')',\r\n commonMember.call(this, {\r\n event: othis.attr('lay-event'),\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n };\r\n\r\n // 行工具条单击事件\r\n that.layBody.on('click', '*[lay-event]', function(e){\r\n toolFn.call(this);\r\n layui.stope(e);\r\n }).on('dblclick', '*[lay-event]', function(e){ //行工具条双击事件\r\n toolFn.call(this, 'toolDouble');\r\n layui.stope(e);\r\n });\r\n\r\n // 同步滚动条\r\n that.layMain.on('scroll', function(){\r\n var othis = $(this);\r\n var scrollLeft = othis.scrollLeft();\r\n var scrollTop = othis.scrollTop();\r\n\r\n that.layHeader.scrollLeft(scrollLeft);\r\n that.layTotal.scrollLeft(scrollLeft);\r\n that.layFixed.find(ELEM_BODY).scrollTop(scrollTop);\r\n\r\n layer.close(that.tipsIndex);\r\n });\r\n\r\n // 固定列滚轮事件 - 临时兼容方案\r\n that.layFixed.find(ELEM_BODY).on('mousewheel DOMMouseScroll', function(e) {\r\n var delta = e.originalEvent.wheelDelta || -e.originalEvent.detail;\r\n var scrollTop = that.layMain.scrollTop();\r\n var step = 30;\r\n\r\n e.preventDefault();\r\n that.layMain.scrollTop(scrollTop + (delta > 0 ? -step : step));\r\n });\r\n };\r\n\r\n // 全局事件\r\n (function(){\r\n // 自适应尺寸\r\n _WIN.on('resize', function(){\r\n layui.each(thisTable.that, function(){\r\n this.resize();\r\n });\r\n });\r\n\r\n // 全局点击\r\n _DOC.on('click', function(){\r\n _DOC.trigger('table.remove.tool.panel');\r\n });\r\n\r\n // 工具面板移除事件\r\n _DOC.on('table.remove.tool.panel', function(){\r\n $('.' + ELEM_TOOL_PANEL).remove();\r\n });\r\n })();\r\n\r\n // 初始化\r\n table.init = function(filter, settings){\r\n settings = settings || {};\r\n var that = this;\r\n var inst = null;\r\n var elemTable = typeof filter === 'object' ? filter : (\r\n typeof filter === 'string'\r\n ? $('table[lay-filter=\"'+ filter +'\"]')\r\n : $(ELEM + '[lay-data], '+ ELEM + '[lay-options]')\r\n );\r\n var errorTips = 'Table element property lay-data configuration item has a syntax error: ';\r\n\r\n //遍历数据表格\r\n elemTable.each(function(){\r\n var othis = $(this);\r\n var attrData = othis.attr('lay-data');\r\n var tableData = lay.options(this, {\r\n attr: attrData ? 'lay-data' : null,\r\n errorText: errorTips + (attrData || othis.attr('lay-options'))\r\n });\r\n\r\n var options = $.extend({\r\n elem: this\r\n ,cols: []\r\n ,data: []\r\n ,skin: othis.attr('lay-skin') //风格\r\n ,size: othis.attr('lay-size') //尺寸\r\n ,even: typeof othis.attr('lay-even') === 'string' //偶数行背景\r\n }, table.config, settings, tableData);\r\n\r\n filter && othis.hide();\r\n\r\n //获取表头数据\r\n othis.find('thead>tr').each(function(i){\r\n options.cols[i] = [];\r\n $(this).children().each(function(ii){\r\n var th = $(this);\r\n var attrData = th.attr('lay-data');\r\n var itemData = lay.options(this, {\r\n attr: attrData ? 'lay-data' : null,\r\n errorText: errorTips + (attrData || th.attr('lay-options'))\r\n });\r\n\r\n var row = $.extend({\r\n title: th.text()\r\n ,colspan: parseInt(th.attr('colspan')) || 1 //列单元格\r\n ,rowspan: parseInt(th.attr('rowspan')) || 1 //行单元格\r\n }, itemData);\r\n\r\n options.cols[i].push(row);\r\n });\r\n });\r\n\r\n //缓存静态表体数据\r\n var trElem = othis.find('tbody>tr');\r\n\r\n //执行渲染\r\n var tableIns = table.render(options);\r\n\r\n //获取表体数据\r\n if (trElem.length && !settings.data && !tableIns.config.url) {\r\n var tdIndex = 0;\r\n table.eachCols(tableIns.config.id, function (i3, item3) {\r\n trElem.each(function(i1){\r\n options.data[i1] = options.data[i1] || {};\r\n var tr = $(this);\r\n var field = item3.field;\r\n options.data[i1][field] = tr.children('td').eq(tdIndex).html();\r\n });\r\n tdIndex++;\r\n })\r\n\r\n tableIns.reloadData({\r\n data: options.data\r\n });\r\n }\r\n });\r\n\r\n return that;\r\n };\r\n\r\n //记录所有实例\r\n thisTable.that = {}; //记录所有实例对象\r\n thisTable.config = {}; //记录所有实例配置项\r\n\r\n var eachChildCols = function (index, cols, i1, item2) {\r\n //如果是组合列,则捕获对应的子列\r\n if (item2.colGroup) {\r\n var childIndex = 0;\r\n index++;\r\n item2.CHILD_COLS = [];\r\n // 找到它的子列所在cols的下标\r\n var i2 = i1 + (parseInt(item2.rowspan) || 1);\r\n layui.each(cols[i2], function (i22, item22) {\r\n if (item22.parentKey) { // 如果字段信息中包含了parentKey和key信息\r\n if (item22.parentKey === item2.key) {\r\n item22.PARENT_COL_INDEX = index;\r\n item2.CHILD_COLS.push(item22);\r\n eachChildCols(index, cols, i2, item22);\r\n }\r\n } else {\r\n // 没有key信息以colspan数量所谓判断标准\r\n //如果子列已经被标注为{PARENT_COL_INDEX},或者子列累计 colspan 数等于父列定义的 colspan则跳出当前子列循环\r\n if (item22.PARENT_COL_INDEX || (childIndex >= 1 && childIndex == (item2.colspan || 1))) return;\r\n item22.PARENT_COL_INDEX = index;\r\n item2.CHILD_COLS.push(item22);\r\n childIndex = childIndex + (parseInt(item22.colspan > 1 ? item22.colspan : 1));\r\n eachChildCols(index, cols, i2, item22);\r\n }\r\n });\r\n }\r\n };\r\n\r\n // 遍历表头\r\n table.eachCols = function(id, callback, cols){\r\n var config = thisTable.config[id] || {};\r\n var arrs = [], index = 0;\r\n\r\n cols = $.extend(true, [], cols || config.cols);\r\n\r\n //重新整理表头结构\r\n layui.each(cols, function(i1, item1){\r\n if (i1) return true; // 只需遍历第一层\r\n layui.each(item1, function(i2, item2){\r\n eachChildCols(index, cols, i1, item2);\r\n if(item2.PARENT_COL_INDEX) return; //如果是子列,则不进行追加,因为已经存储在父列中\r\n arrs.push(item2)\r\n });\r\n });\r\n\r\n //重新遍历列,如果有子列,则进入递归\r\n var eachArrs = function(obj){\r\n layui.each(obj || arrs, function(i, item){\r\n if(item.CHILD_COLS) return eachArrs(item.CHILD_COLS);\r\n typeof callback === 'function' && callback(i, item);\r\n });\r\n };\r\n\r\n eachArrs();\r\n };\r\n\r\n // 获取表格选中状态\r\n table.checkStatus = function(id){\r\n var nums = 0;\r\n var invalidNum = 0;\r\n var arr = [];\r\n var data = table.cache[id] || [];\r\n\r\n //计算全选个数\r\n layui.each(data, function(i, item){\r\n if(layui.type(item) === 'array' || item[table.config.disabledName]){\r\n invalidNum++; // 无效数据,或已删除的\r\n return;\r\n }\r\n if(item[table.config.checkName]){\r\n nums++;\r\n if(!item[table.config.disabledName]){\r\n arr.push(table.clearCacheKey(item));\r\n }\r\n }\r\n });\r\n return {\r\n data: arr, // 选中的数据\r\n isAll: data.length ? (nums === (data.length - invalidNum)) : false // 是否全选\r\n };\r\n };\r\n\r\n // 设置行选中状态\r\n table.setRowChecked = function(id, opts){\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n that.setRowChecked(opts);\r\n };\r\n\r\n // 获取表格当前页的所有行数据\r\n table.getData = function(id){\r\n var arr = [];\r\n var data = table.cache[id] || [];\r\n layui.each(data, function(i, item){\r\n if(layui.type(item) === 'array'){\r\n return;\r\n }\r\n arr.push(table.clearCacheKey(item));\r\n });\r\n return arr;\r\n };\r\n\r\n // 重置表格尺寸结构\r\n table.resize = function(id){\r\n // 若指定表格唯一 id则只执行该 id 对应的表格实例\r\n if(id){\r\n var config = getThisTableConfig(id); // 获取当前实例配置项\r\n if(!config) return;\r\n\r\n getThisTable(id).resize();\r\n\r\n } else { // 否则重置所有表格实例尺寸\r\n layui.each(thisTable.that, function(){\r\n this.resize();\r\n });\r\n }\r\n };\r\n\r\n // 表格导出\r\n table.exportFile = function(id, data, opts){\r\n data = data || table.clearCacheKey(table.cache[id]);\r\n opts = typeof opts === 'object' ? opts : function(){\r\n var obj = {};\r\n opts && (obj.type = opts);\r\n return obj;\r\n }();\r\n\r\n var type = opts.type || 'csv';\r\n var thatTable = thisTable.that[id];\r\n var config = thisTable.config[id] || {};\r\n var textType = ({\r\n csv: 'text/csv',\r\n xls: 'application/vnd.ms-excel'\r\n })[type];\r\n var alink = document.createElement(\"a\");\r\n\r\n if(device.ie) return hint.error('IE_NOT_SUPPORT_EXPORTS');\r\n\r\n // 处理 treeTable 数据\r\n if (config.tree && config.tree.view) {\r\n try {\r\n data = $.extend(true, [], table.cache[id]);\r\n data = (function fn(data) {\r\n return data.reduce(function (acc, obj){\r\n var children = obj.children || [];\r\n delete obj.children;\r\n return acc.concat(obj, fn(children));\r\n }, []);\r\n })(Array.from(data));\r\n } catch (e) {}\r\n }\r\n\r\n alink.href = 'data:'+ textType +';charset=utf-8,\\ufeff'+ encodeURIComponent(function(){\r\n var dataTitle = [];\r\n var dataMain = [];\r\n var dataTotal = [];\r\n var fieldsIsHide = {};\r\n\r\n // 表头和表体\r\n layui.each(data, function(i1, item1){\r\n var vals = [];\r\n if(typeof id === 'object'){ // 若 id 参数直接为表头数据\r\n layui.each(id, function(i, item){\r\n i1 == 0 && dataTitle.push(item || '');\r\n });\r\n layui.each(layui.isArray(item1) ? $.extend([], item1) : table.clearCacheKey(item1), function(i2, item2){\r\n vals.push('\"'+ (item2 || '') +'\"');\r\n });\r\n } else {\r\n table.eachCols(id, function(i3, item3){\r\n if(item3.ignoreExport === false || item3.field && item3.type == 'normal'){\r\n // 不导出隐藏列,除非设置 ignoreExport 强制导出\r\n if (\r\n (item3.hide && item3.ignoreExport !== false) ||\r\n item3.ignoreExport === true // 忽略导出\r\n ) {\r\n if(i1 == 0) fieldsIsHide[item3.field] = true; // 记录隐藏列\r\n return;\r\n }\r\n\r\n var content = item1[item3.field];\r\n if(content === undefined || content === null) content = '';\r\n\r\n i1 == 0 && dataTitle.push(item3.fieldTitle || item3.title || item3.field || '');\r\n\r\n // 解析内容\r\n content = parseTempData.call(thatTable, {\r\n item3: item3,\r\n content: content,\r\n tplData: item1,\r\n text: 'text',\r\n obj: {\r\n td: function(field){\r\n var td = thatTable.layBody.find('tr[data-index=\"'+ i1 +'\"]>td');\r\n return td.filter('[data-field=\"'+ field +'\"]');\r\n }\r\n }\r\n });\r\n\r\n // 异常处理\r\n content = content.replace(/\"/g, '\"\"'); // 避免内容存在「双引号」导致异常分隔\r\n // content += '\\t'; // 加「水平制表符」 避免内容被转换格式\r\n content = '\"'+ content +'\"'; // 避免内容存在「逗号」导致异常分隔\r\n\r\n // 插入内容\r\n vals.push(content);\r\n }\r\n });\r\n }\r\n dataMain.push(vals.join(','));\r\n });\r\n\r\n // 表合计\r\n thatTable && layui.each(thatTable.dataTotal, function(i, o){\r\n fieldsIsHide[o.field] || dataTotal.push('\"' + (o.total || '') + '\"');\r\n });\r\n\r\n return dataTitle.join(',') + '\\r\\n' + dataMain.join('\\r\\n') + '\\r\\n' + dataTotal.join(',');\r\n }());\r\n\r\n alink.download = (opts.title || config.title || 'table_'+ (config.index || '')) + '.' + type;\r\n document.body.appendChild(alink);\r\n alink.click();\r\n document.body.removeChild(alink);\r\n };\r\n\r\n // 获取表格配置信息\r\n table.getOptions = function (id) {\r\n return getThisTableConfig(id);\r\n }\r\n\r\n // 显示或隐藏列\r\n table.hideCol = function (id, cols) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n if (layui.type(cols) === 'boolean') {\r\n // 显示全部或者隐藏全部\r\n that.eachCols(function (i2, item2) {\r\n var key = item2.key;\r\n var col = that.col(key);\r\n var parentKey = item2.parentKey;\r\n // 同步勾选列的 hide 值和隐藏样式\r\n if (col.hide != cols) {\r\n var hide = col.hide = cols;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n hide ? 'addClass' : 'removeClass'\r\n ](HIDE);\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n that.setParentCol(hide, parentKey);\r\n }\r\n })\r\n } else {\r\n cols = layui.isArray(cols) ? cols : [cols];\r\n layui.each(cols, function (i1, item1) {\r\n that.eachCols(function (i2, item2) {\r\n if (item1.field === item2.field) {\r\n var key = item2.key;\r\n var col = that.col(key);\r\n var parentKey = item2.parentKey;\r\n // 同步勾选列的 hide 值和隐藏样式\r\n if ('hide' in item1 && col.hide != item1.hide) {\r\n var hide = col.hide = !!item1.hide;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n hide ? 'addClass' : 'removeClass'\r\n ](HIDE);\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n that.setParentCol(hide, parentKey);\r\n }\r\n }\r\n })\r\n });\r\n }\r\n $('.' + ELEM_TOOL_PANEL).remove(); // 关闭字段筛选面板如果打开的话\r\n // 重新适配尺寸\r\n that.resize();\r\n }\r\n\r\n // 重载\r\n table.reload = function(id, options, deep, type){\r\n var config = getThisTableConfig(id); //获取当前实例配置项\r\n if(!config) return;\r\n\r\n var that = getThisTable(id);\r\n that.reload(options, deep, type);\r\n\r\n return thisTable.call(that);\r\n };\r\n\r\n // 仅重载数据\r\n table.reloadData = function(){\r\n var args = $.extend([], arguments);\r\n args[3] = 'reloadData';\r\n\r\n // 重载时,影响整个结构的参数,不适合更新的参数\r\n var dataParams = new RegExp('^('+ [\r\n 'elem', 'id', 'cols', 'width', 'height', 'maxHeight',\r\n 'toolbar', 'defaultToolbar',\r\n 'className', 'css', 'pagebar'\r\n ].join('|') + ')$');\r\n\r\n // 过滤与数据无关的参数\r\n layui.each(args[1], function (key, value) {\r\n if(dataParams.test(key)){\r\n delete args[1][key];\r\n }\r\n });\r\n\r\n return table.reload.apply(null, args);\r\n };\r\n\r\n // 核心入口\r\n table.render = function(options){\r\n var inst = new Class(options);\r\n return thisTable.call(inst);\r\n };\r\n\r\n // 清除临时 Key\r\n table.clearCacheKey = function(data){\r\n data = $.extend({}, data);\r\n delete data[table.config.checkName];\r\n delete data[table.config.indexName];\r\n delete data[table.config.numbersName];\r\n delete data[table.config.disabledName];\r\n return data;\r\n };\r\n\r\n // 自动完成渲染\r\n $(function(){\r\n table.init();\r\n });\r\n\r\n exports(MOD_NAME, table);\r\n});\r\n","/**\n * layui.treeTable\n * 树表组件\n */\n\nlayui.define(['table'], function (exports) {\n \"use strict\";\n\n var $ = layui.$;\n var form = layui.form;\n var table = layui.table;\n var hint = layui.hint();\n\n // api\n var treeTable = {\n config: {},\n // 事件\n on: table.on,\n // 遍历字段\n eachCols: table.eachCols,\n index: table.index,\n set: function (options) {\n var that = this;\n that.config = $.extend({}, that.config, options);\n return that;\n },\n resize: table.resize,\n getOptions: table.getOptions,\n hideCol: table.hideCol,\n renderData: table.renderData\n };\n\n // 操作当前实例\n var thisTreeTable = function () {\n var that = this;\n var options = that.config\n var id = options.id || options.index;\n\n return {\n config: options,\n reload: function (options, deep) {\n that.reload.call(that, options, deep);\n },\n reloadData: function (options, deep) {\n treeTable.reloadData(id, options, deep);\n }\n }\n }\n\n // 获取当前实例\n var getThisTable = function (id) {\n var that = thisTreeTable.that[id];\n if (!that) hint.error(id ? ('The treeTable instance with ID \\'' + id + '\\' not found') : 'ID argument required');\n return that || null;\n }\n\n // 字符\n var MOD_NAME = 'treeTable';\n var HIDE = 'layui-hide';\n\n var ELEM_VIEW = '.layui-table-view';\n var ELEM_TREE = '.layui-table-tree';\n var ELEM_TOOL = '.layui-table-tool';\n var ELEM_BOX = '.layui-table-box';\n var ELEM_HEADER = '.layui-table-header';\n var ELEM_BODY = '.layui-table-body';\n var ELEM_MAIN = '.layui-table-main';\n var ELEM_FIXED = '.layui-table-fixed';\n var ELEM_FIXL = '.layui-table-fixed-l';\n var ELEM_FIXR = '.layui-table-fixed-r';\n var ELEM_CHECKED = 'layui-table-checked';\n\n var TABLE_TREE = 'layui-table-tree';\n var LAY_DATA_INDEX = 'LAY_DATA_INDEX';\n var LAY_DATA_INDEX_HISTORY = 'LAY_DATA_INDEX_HISTORY';\n var LAY_PARENT_INDEX = 'LAY_PARENT_INDEX';\n var LAY_CHECKBOX_HALF = 'LAY_CHECKBOX_HALF';\n var LAY_EXPAND = 'LAY_EXPAND';\n var LAY_HAS_EXPANDED = 'LAY_HAS_EXPANDED';\n var LAY_ASYNC_STATUS = 'LAY_ASYNC_STATUS';\n var LAY_CASCADE = ['all', 'parent', 'children', 'none'];\n\n // 构造器\n var Class = function (options) {\n var that = this;\n that.index = ++treeTable.index;\n that.config = $.extend(true, {}, that.config, treeTable.config, options);\n // 处理一些属性\n that.init();\n that.render();\n };\n\n var updateCache = function (id, childrenKey, data) {\n var tableCache = table.cache[id];\n layui.each(data || tableCache, function (index, item) {\n var itemDataIndex = item[LAY_DATA_INDEX] || '';\n if (itemDataIndex.indexOf('-') !== -1) {\n tableCache[itemDataIndex] = item\n }\n item[childrenKey] && updateCache(id, childrenKey, item[childrenKey]);\n })\n }\n\n var updateOptions = function (id, options, reload) {\n var that = getThisTable(id);\n reload === 'reloadData' || (that.status = { // 用于记录一些状态信息\n expand: {} // 折叠状态\n });\n var thatOptionsTemp = $.extend(true, {}, that.getOptions(), options);\n var treeOptions = thatOptionsTemp.tree;\n var childrenKey = treeOptions.customName.children;\n var idKey = treeOptions.customName.id;\n // 处理属性\n delete options.hasNumberCol;\n delete options.hasChecboxCol;\n delete options.hasRadioCol;\n table.eachCols(null, function (i1, item1) {\n if (item1.type === 'numbers') {\n options.hasNumberCol = true;\n } else if (item1.type === 'checkbox') {\n options.hasChecboxCol = true;\n } else if (item1.type === 'radio') {\n options.hasRadioCol = true;\n }\n }, thatOptionsTemp.cols)\n\n var parseData = options.parseData;\n var done = options.done;\n\n if (thatOptionsTemp.url) {\n // 异步加载的时候需要处理parseData进行转换\n if (!reload || (reload && parseData && !parseData.mod)) {\n options.parseData = function () {\n var parseDataThat = this;\n var args = arguments;\n var retData = args[0];\n if (layui.type(parseData) === 'function') {\n retData = parseData.apply(parseDataThat, args) || args[0];\n }\n var dataName = parseDataThat.response.dataName;\n // 处理 isSimpleData\n if (treeOptions.data.isSimpleData && !treeOptions.async.enable) { // 异步加载和 isSimpleData 不应该一起使用\n retData[dataName] = that.flatToTree(retData[dataName]);\n }\n // 处理节点状态\n updateStatus(retData[dataName], function (item) {\n item[LAY_EXPAND] = LAY_EXPAND in item ? item[LAY_EXPAND] : (item[idKey] !== undefined && that.status.expand[item[idKey]])\n }, childrenKey);\n\n if (parseDataThat.autoSort && parseDataThat.initSort && parseDataThat.initSort.type) {\n layui.sort(retData[dataName], parseDataThat.initSort.field, parseDataThat.initSort.type === 'desc', true)\n }\n\n that.initData(retData[dataName]);\n\n return retData;\n }\n options.parseData.mod = true\n }\n } else {\n options.data = options.data || [];\n // 处理 isSimpleData\n if (treeOptions.data.isSimpleData) {\n options.data = that.flatToTree(options.data);\n }\n that.initData(options.data);\n }\n\n if (!reload || (reload && done && !done.mod)) {\n options.done = function () {\n var args = arguments;\n var doneThat = this;\n var isRenderData = args[3]; // 是否是 renderData\n if (!isRenderData) {\n delete that.isExpandAll;\n }\n\n var tableView = this.elem.next();\n that.updateStatus(null, {\n LAY_HAS_EXPANDED: false // 去除已经打开过的状态\n });\n // 更新cache中的内容 将子节点也存到cache中\n updateCache(id, childrenKey);\n // 更新全选框的状态\n var layTableAllChooseElem = tableView.find('[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]');\n if (layTableAllChooseElem.length) {\n var checkStatus = treeTable.checkStatus(id);\n layTableAllChooseElem.prop({\n checked: checkStatus.isAll && checkStatus.data.length,\n indeterminate: !checkStatus.isAll && checkStatus.data.length\n })\n }\n if (!isRenderData && thatOptionsTemp.autoSort && thatOptionsTemp.initSort && thatOptionsTemp.initSort.type) {\n treeTable.sort(id);\n }\n\n that.renderTreeTable(tableView);\n\n if (layui.type(done) === 'function') {\n return done.apply(doneThat, args);\n }\n }\n options.done.mod = true;\n }\n }\n\n Class.prototype.init = function () {\n var that = this;\n var options = that.config;\n var cascade = options.tree.data.cascade;\n if (LAY_CASCADE.indexOf(cascade) === -1) {\n options.tree.data.cascade = 'all'; // 超出范围的都重置为全联动\n }\n\n // 先初始一个空的表格以便拿到对应的表格实例信息\n var tableIns = table.render($.extend({}, options, {\n data: [],\n url: '',\n done: null\n }))\n var id = tableIns.config.id;\n thisTreeTable.that[id] = that; // 记录当前实例对象\n that.tableIns = tableIns;\n\n updateOptions(id, options);\n }\n\n // 初始默认配置\n Class.prototype.config = {\n tree: {\n customName: {\n children: \"children\", // 节点数据中保存子节点数据的属性名称\n isParent: \"isParent\", // 节点数据保存节点是否为父节点的属性名称\n name: \"name\", // 节点数据保存节点名称的属性名称\n id: \"id\", // 唯一标识的属性名称\n pid: \"parentId\", // 父节点唯一标识的属性名称\n icon: \"icon\" // 图标的属性名称\n },\n view: {\n indent: 14, // 层级缩进量\n flexIconClose: '<i class=\"layui-icon layui-icon-triangle-r\"></i>', // 关闭时候的折叠图标\n flexIconOpen: '<i class=\"layui-icon layui-icon-triangle-d\"></i>', // 打开时候的折叠图标\n showIcon: true, // 是否显示图标(节点类型图标)\n icon: '', // 节点图标,如果设置了这个属性或者数据中有这个字段信息,不管打开还是关闭都以这个图标的值为准\n iconClose: '<i class=\"layui-icon layui-icon-folder\"></i>', // 关闭时候的图标\n iconOpen: '<i class=\"layui-icon layui-icon-folder-open\"></i>', // 打开时候的图标\n iconLeaf: '<i class=\"layui-icon layui-icon-leaf\"></i>', // 叶子节点的图标\n showFlexIconIfNotParent: false, // 当节点不是父节点的时候是否显示折叠图标\n dblClickExpand: true, // 双击节点时,是否自动展开父节点的标识\n expandAllDefault: false // 默认展开所有节点\n },\n data: {\n isSimpleData: false, // 是否简单数据模式\n rootPid: null, // 根节点的父 ID 值\n cascade: 'all' // 级联方式 默认全部级联all 可选 级联父 parent 级联子 children\n },\n async: {\n enable: false, // 是否开启异步加载模式,只有开启的时候其他参数才起作用\n url: '', // 异步加载的接口,可以根据需要设置与顶层接口不同的接口,如果相同可以不设置该参数\n type: null, // 请求的接口类型,设置可缺省同上\n contentType: null, // 提交参数的数据类型,设置可缺省同上\n headers: null, // 设置可缺省同上\n where: null, // 设置可缺省同上\n autoParam: [] // 自动参数\n },\n callback: {\n beforeExpand: null, // 展开前的回调 return false 可以阻止展开的动作\n onExpand: null // 展开之后的回调\n }\n },\n };\n\n Class.prototype.getOptions = function () {\n var that = this;\n if (that.tableIns) {\n return table.getOptions(that.tableIns.config.id); // 获取表格的实时配置信息\n } else {\n return that.config;\n }\n };\n\n function flatToTree(flatArr, idKey, pIdKey, childrenKey, rootPid) {\n idKey = idKey || 'id';\n pIdKey = pIdKey || 'parentId';\n childrenKey = childrenKey || 'children';\n // 创建一个空的 nodes 对象,用于保存所有的节点\n var nodes = {};\n // 遍历所有节点,将其加入 nodes 对象中\n var idTemp = '';\n layui.each(flatArr, function (index, item) {\n idTemp = idKey + item[idKey];\n nodes[idTemp] = $.extend({}, item);\n nodes[idTemp][childrenKey] = [];\n })\n // 遍历所有节点,将其父子关系加入 nodes 对象\n var pidTemp = '';\n layui.each(nodes, function (index, item) {\n pidTemp = idKey + item[pIdKey];\n if (pidTemp && nodes[pidTemp]) {\n nodes[pidTemp][childrenKey].push(item);\n }\n })\n // 返回顶层节点\n return Object.keys(nodes)\n .map(function(k) {\n return nodes[k];\n })\n .filter(function (item) {\n return rootPid ? item[pIdKey] === rootPid : !item[pIdKey];\n })\n }\n\n Class.prototype.flatToTree = function (tableData) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var tableId = options.id;\n\n tableData = tableData || table.cache[tableId];\n\n return flatToTree(tableData, customName.id, customName.pid, customName.children, treeOptions.data.rootPid)\n }\n\n Class.prototype.treeToFlat = function (tableData, parentId, parentIndex) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var childrenKey = customName.children;\n var pIdKey = customName.pid;\n\n var flat = [];\n layui.each(tableData, function (i1, item1) {\n var dataIndex = (parentIndex ? parentIndex + '-' : '') + i1;\n var dataNew = $.extend({}, item1);\n dataNew[pIdKey] = item1[pIdKey] || parentId;\n flat.push(dataNew);\n flat = flat.concat(that.treeToFlat(item1[childrenKey], item1[customName.id], dataIndex));\n });\n\n return flat;\n }\n\n // 通过当前行数据返回 treeNode 信息\n Class.prototype.getTreeNode = function (data) {\n var that = this;\n if (!data) {\n return hint.error('找不到节点数据');\n }\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var customName = treeOptions.customName;\n\n // 带上一些常用的方法\n return {\n data: data,\n dataIndex: data[LAY_DATA_INDEX],\n getParentNode: function () {\n return that.getNodeByIndex(data[LAY_PARENT_INDEX])\n },\n };\n }\n\n // 通过 index 返回节点信息\n Class.prototype.getNodeByIndex = function (index) {\n var that = this;\n var treeNodeData = that.getNodeDataByIndex(index);\n if (!treeNodeData) {\n return hint.error('找不到节点数据');\n }\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var parentKey = customName.parent;\n var tableId = options.id;\n\n var treeNode = {\n data: treeNodeData,\n dataIndex: treeNodeData[LAY_DATA_INDEX],\n getParentNode: function () {\n return that.getNodeByIndex(treeNodeData[LAY_PARENT_INDEX])\n },\n update: function (data) {\n return treeTable.updateNode(tableId, index, data)\n },\n remove: function () {\n return treeTable.removeNode(tableId, index)\n },\n expand: function (opts) {\n return treeTable.expandNode(tableId, $.extend({}, opts, {\n index: index\n }))\n },\n setChecked: function (opts) {\n return treeTable.setRowChecked(tableId, $.extend({}, opts, {\n index: index\n }))\n }\n };\n\n treeNode.dataIndex = index;\n return treeNode;\n }\n\n // 通过 id 获取节点信息\n Class.prototype.getNodeById = function (id) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var idKey = customName.id;\n\n // 通过 id 拿到数据的 dataIndex\n var dataIndex = '';\n var tableDataFlat = treeTable.getData(options.id, true);\n layui.each(tableDataFlat, function (i1, item1) {\n if (item1[idKey] === id) {\n dataIndex = item1[LAY_DATA_INDEX];\n return true;\n }\n })\n if (!dataIndex) {\n return;\n }\n\n // 用 index\n return that.getNodeByIndex(dataIndex);\n }\n\n // 通过 index 获取节点数据\n Class.prototype.getNodeDataByIndex = function (index, clone, newValue) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var tableCache = table.cache[tableId];\n\n // 获取当前行中的数据\n var dataCache = tableCache[index];\n\n // 若非删除操作,则返回合并后的数据\n if (newValue !== 'delete' && dataCache) {\n $.extend(dataCache, newValue);\n return clone ? $.extend({}, dataCache) : dataCache;\n }\n\n // 删除操作\n var dataRet = tableCache;\n var indexArr = String(index).split('-');\n\n // if (options.url || indexArr.length > 1) tableCache = null // 只有在删除根节点的时候才需要处理\n\n // 根据 index 进行数据处理\n for (var i = 0, childrenKey = treeOptions.customName.children; i < indexArr.length; i++) {\n if (newValue && i === indexArr.length - 1) {\n if (newValue === 'delete') { // 删除并返回当前数据\n // 同步 cache --- 此段代码注释缘由data 属性模式造成数据重复执行 splice (@Gitee: #I7Z0A/I82E2S)\n /*if (tableCache) {\n layui.each(tableCache, function (i1, item1) {\n if (item1[LAY_DATA_INDEX] === index) {\n tableCache.splice(i1, 1);\n return true;\n }\n })\n }*/\n return (i ? dataRet[childrenKey] : dataRet).splice(indexArr[i], 1)[0];\n } else { // 更新值\n $.extend((i ? dataRet[childrenKey] : dataRet)[indexArr[i]], newValue);\n }\n }\n dataRet = i ? dataRet[childrenKey][indexArr[i]] : dataRet[indexArr[i]];\n }\n return clone ? $.extend({}, dataRet) : dataRet;\n }\n\n treeTable.getNodeDataByIndex = function (id, index) {\n var that = getThisTable(id);\n if(!that) return;\n return that.getNodeDataByIndex(index, true);\n }\n\n // 判断是否是父节点\n var checkIsParent = function (data, isParentKey, childrenKey) {\n isParentKey = isParentKey || 'isParent';\n childrenKey = childrenKey || 'children';\n layui.each(data, function (i1, item1) {\n if (!(isParentKey in item1)) {\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\n checkIsParent(item1[childrenKey]);\n }\n })\n }\n\n Class.prototype.initData = function (data, parentIndex) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n\n data = data || that.getTableData();\n\n var customName = treeOptions.customName;\n var isParentKey = customName.isParent;\n var childrenKey = customName.children;\n\n layui.each(data, function (i1, item1) {\n if (!(isParentKey in item1)) {\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\n }\n item1[LAY_DATA_INDEX_HISTORY] = item1[LAY_DATA_INDEX];\n item1[LAY_PARENT_INDEX] = parentIndex = parentIndex || '';\n var dataIndex = item1[LAY_DATA_INDEX] = (parentIndex ? parentIndex + '-' : '') + i1;\n that.initData(item1[childrenKey] || [], dataIndex);\n });\n\n updateCache(tableId, childrenKey, data);\n\n return data;\n }\n\n // 与 tableId 有关带防抖的方法\n var debounceFn = (function () {\n var fn = {};\n return function (tableId, func, wait) {\n if (!fn[tableId]) {\n fn[tableId] = layui.debounce(func, wait);\n }\n return fn[tableId];\n }\n })()\n\n // 优化参数,添加一个 getNodeByIndex 方法 只传 表格id 和行 dataIndex 分几步优化 todo\n var expandNode = function (treeNode, expandFlag, sonSign, focus, callbackFlag) {\n // treeNode // 需要展开的节点\n var trElem = treeNode.trElem;\n var tableViewElem = treeNode.tableViewElem || trElem.closest(ELEM_VIEW);\n var tableId = treeNode.tableId || tableViewElem.attr('lay-id');\n var options = treeNode.options || table.getOptions(tableId);\n var dataIndex = treeNode.dataIndex || trElem.attr('lay-data-index'); // 可能出现多层\n var treeTableThat = getThisTable(tableId);\n\n var treeOptions = options.tree || {};\n var customName = treeOptions.customName || {};\n var isParentKey = customName.isParent;\n\n var trData = treeTableThat.getNodeDataByIndex(dataIndex);\n\n // 后续调优:对已经展开的节点进行展开和已经关闭的节点进行关闭应该做优化减少不必要的代码执行 todo\n var isToggle = layui.type(expandFlag) !== 'boolean';\n var trExpand = isToggle ? !trData[LAY_EXPAND] : expandFlag;\n var retValue = trData[isParentKey] ? trExpand : null;\n\n if (callbackFlag && trExpand != trData[LAY_EXPAND] && (!trData[LAY_ASYNC_STATUS] || trData[LAY_ASYNC_STATUS] === 'local')) {\n var beforeExpand = treeOptions.callback.beforeExpand;\n if (layui.type(beforeExpand) === 'function') {\n if (beforeExpand(tableId, trData, expandFlag) === false) {\n return retValue;\n }\n }\n }\n\n var trExpanded = trData[LAY_HAS_EXPANDED]; // 展开过,包括异步加载\n\n // 找到表格中的同类节点需要找到lay-data-index一致的所有行\n var trsElem = tableViewElem.find('tr[lay-data-index=\"' + dataIndex + '\"]');\n // 处理折叠按钮图标\n var flexIconElem = trsElem.find('.layui-table-tree-flexIcon');\n flexIconElem.html(trExpand ? treeOptions.view.flexIconOpen : treeOptions.view.flexIconClose)\n trData[isParentKey] && flexIconElem.css('visibility', 'visible');\n // 处理节点图标\n treeOptions.view.showIcon && trsElem\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\n .html(trExpand ? treeOptions.view.iconOpen : treeOptions.view.iconClose);\n trData[LAY_EXPAND] = trExpand;\n var trDataId = trData[customName.id];\n trDataId !== undefined && (treeTableThat.status.expand[trDataId] = trExpand);\n if (retValue === null) {\n return retValue;\n }\n\n var childNodes = trData[customName.children] || [];\n // 处理子节点展示与否\n if (trExpand) {\n // 展开\n if (trExpanded) { // 已经展开过\n if (!childNodes.length) return ;//异步如果子节点没有数据情况下双点行展开所有已展开的节点问题解决\n trsElem.nextAll(childNodes.map(function (value, index, array) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).removeClass(HIDE);\n layui.each(childNodes, function (i1, item1) {\n if (!item1[isParentKey]) {\n return;\n }\n\n if (sonSign && !isToggle && !item1[LAY_EXPAND]) { // 非状态切换的情况下\n // 级联展开子节点\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, expandFlag, sonSign, focus, callbackFlag);\n } else if (item1[LAY_EXPAND]) { // 初始化级联展开\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, true);\n }\n });\n } else {\n var asyncSetting = treeOptions.async || {};\n var asyncUrl = asyncSetting.url || options.url;\n if (asyncSetting.enable && trData[isParentKey] && !trData[LAY_ASYNC_STATUS]) {\n trData[LAY_ASYNC_STATUS] = 'loading';\n flexIconElem.html('<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-loop layui-anim-rotate\"></i>');\n\n // 异步获取子节点数据成功之后处理方法\n var asyncSuccessFn = function (data) {\n trData[LAY_ASYNC_STATUS] = 'success';\n trData[customName.children] = data;\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX])\n expandNode(treeNode, true, isToggle ? false : sonSign, focus, callbackFlag);\n }\n\n var format = asyncSetting.format; // 自定义数据返回方法\n if (layui.type(format) === 'function') {\n format(trData, options, asyncSuccessFn);\n return retValue;\n }\n\n var params = {};\n // 参数\n var data = $.extend(params, asyncSetting.where || options.where);\n var asyncAutoParam = asyncSetting.autoParam;\n layui.each(asyncAutoParam, function (index, item) {\n var itemStr = item;\n var itemArr = item.split('=');\n data[itemArr[0].trim()] = trData[(itemArr[1] || itemArr[0]).trim()]\n })\n\n var asyncContentType = asyncSetting.contentType || options.contentType;\n if (asyncContentType && asyncContentType.indexOf(\"application/json\") == 0) { // 提交 json 格式\n data = JSON.stringify(data);\n }\n var asyncType = asyncSetting.method || options.method;\n var asyncDataType = asyncSetting.dataType || options.dataType;\n var asyncJsonpCallback = asyncSetting.jsonpCallback || options.jsonpCallback;\n var asyncHeaders = asyncSetting.headers || options.headers;\n var asyncParseData = asyncSetting.parseData || options.parseData;\n var asyncResponse = asyncSetting.response || options.response;\n\n $.ajax({\n type: asyncType || 'get',\n url: asyncUrl,\n contentType: asyncContentType,\n data: data,\n dataType: asyncDataType || 'json',\n jsonpCallback: asyncJsonpCallback,\n headers: asyncHeaders || {},\n success: function (res) {\n // 若有数据解析的回调,则获得其返回的数据\n if (typeof asyncParseData === 'function') {\n res = asyncParseData.call(options, res) || res;\n }\n // 检查数据格式是否符合规范\n if (res[asyncResponse.statusName] != asyncResponse.statusCode) {\n trData[LAY_ASYNC_STATUS] = 'error';\n // 异常处理 todo\n flexIconElem.html('<i class=\"layui-icon layui-icon-refresh\"></i>');\n // 事件\n } else {\n // 正常返回\n asyncSuccessFn(res[asyncResponse.dataName]);\n }\n },\n error: function (e, msg) {\n trData[LAY_ASYNC_STATUS] = 'error';\n // 异常处理 todo\n typeof options.error === 'function' && options.error(e, msg);\n }\n });\n return retValue;\n }\n trExpanded = trData[LAY_HAS_EXPANDED] = true;\n if (childNodes.length) {\n // 判断是否需要排序\n if (options.initSort && (!options.url || options.autoSort)) {\n var initSort = options.initSort;\n if (initSort.type) {\n layui.sort(childNodes, initSort.field, initSort.type === 'desc', true);\n } else {\n // 恢复默认\n layui.sort(childNodes, table.config.indexName, null, true);\n }\n }\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX]);\n // 将数据通过模板得出节点的html代码\n var str2 = table.getTrHtml(tableId, childNodes, null, null, dataIndex);\n\n var str2Obj = {\n trs: $(str2.trs.join('')),\n trs_fixed: $(str2.trs_fixed.join('')),\n trs_fixed_r: $(str2.trs_fixed_r.join(''))\n }\n var dataLevel = dataIndex.split('-').length - 1;\n var dataLevelNew = (dataLevel || 0) + 1;\n layui.each(childNodes, function (childIndex, childItem) {\n str2Obj.trs.eq(childIndex).attr({\n 'data-index': childItem[LAY_DATA_INDEX],\n 'lay-data-index': childItem[LAY_DATA_INDEX],\n 'data-level': dataLevelNew\n })\n str2Obj.trs_fixed.eq(childIndex).attr({\n 'data-index': childItem[LAY_DATA_INDEX],\n 'lay-data-index': childItem[LAY_DATA_INDEX],\n 'data-level': dataLevelNew\n })\n str2Obj.trs_fixed_r.eq(childIndex).attr({\n 'data-index': childItem[LAY_DATA_INDEX],\n 'lay-data-index': childItem[LAY_DATA_INDEX],\n 'data-level': dataLevelNew\n })\n })\n\n tableViewElem.find(ELEM_MAIN).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs);\n tableViewElem.find(ELEM_FIXL).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed);\n tableViewElem.find(ELEM_FIXR).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed_r);\n\n // 初始化新增的节点中的内容\n treeTableThat.renderTreeTable(str2Obj.trs, dataLevelNew);\n\n if (sonSign && !isToggle) { // 非状态切换的情况下\n // 级联展开/关闭子节点\n layui.each(childNodes, function (i1, item1) {\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, expandFlag, sonSign, focus, callbackFlag);\n })\n }\n }\n }\n } else {\n treeTableThat.isExpandAll = false;\n // 关闭\n if (sonSign && !isToggle) { // 非状态切换的情况下\n layui.each(childNodes, function (i1, item1) {\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, expandFlag, sonSign, focus, callbackFlag);\n });\n tableViewElem.find(childNodes.map(function (value, index, array) { // 只隐藏直接子节点,其他由递归的处理\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).addClass(HIDE);\n } else {\n var childNodesFlat = treeTableThat.treeToFlat(childNodes, trData[customName.id], dataIndex);\n tableViewElem.find(childNodesFlat.map(function (value, index, array) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).addClass(HIDE);\n }\n }\n\n\n debounceFn('resize-' + tableId, function () {\n treeTable.resize(tableId);\n }, 0)();\n\n if (callbackFlag && trData[LAY_ASYNC_STATUS] !== 'loading') {\n var onExpand = treeOptions.callback.onExpand;\n layui.type(onExpand) === 'function' && onExpand(tableId, trData, trExpand);\n }\n\n return retValue;\n }\n\n /**\n * 展开或关闭一个节点\n * @param {String} id 树表id\n * @param {Object} opts\n * @param {Number|String} opts.index 展开行的数据下标\n * @param {Boolean} [opts.expandFlag] 展开、关闭、切换\n * @param {Boolean} [opts.inherit] 是否级联子节点\n * @param {Boolean} [opts.callbackFlag] 是否触发事件\n * @return [{Boolean}] 状态结果\n * */\n treeTable.expandNode = function (id, opts) {\n var that = getThisTable(id);\n if (!that) return;\n\n opts = opts || {};\n\n var index = opts.index;\n var expandFlag = opts.expandFlag;\n var sonSign = opts.inherit;\n var callbackFlag = opts.callbackFlag;\n\n var options = that.getOptions();\n var tableViewElem = options.elem.next();\n return expandNode({\n trElem: tableViewElem.find('tr[lay-data-index=\"' + index + '\"]').first()\n }, expandFlag, sonSign, null, callbackFlag)\n };\n\n /**\n * 展开或关闭全部节点\n * @param {String} id 树表id\n * @param {Boolean} expandFlag 展开或关闭\n * */\n treeTable.expandAll = function (id, expandFlag) {\n if (layui.type(expandFlag) !== 'boolean') {\n return hint.error('expandAll 的展开状态参数只接收true/false')\n }\n\n var that = getThisTable(id);\n if (!that) return;\n\n that.isExpandAll = expandFlag;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableView = options.elem.next();\n var isParentKey = treeOptions.customName.isParent;\n var idKey = treeOptions.customName.id;\n var showFlexIconIfNotParent = treeOptions.view.showFlexIconIfNotParent;\n\n if (!expandFlag) {\n // 关闭所有\n // 将所有已经打开的节点的状态设置为关闭,\n that.updateStatus(null, function (d) {\n if (d[isParentKey] || showFlexIconIfNotParent) {\n d[LAY_EXPAND] = false;\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = false);\n }\n }) // 只处理当前页如果需要处理全部表格需要用treeTable.updateStatus\n // 隐藏所有非顶层的节点\n tableView.find('.layui-table-box tbody tr[data-level!=\"0\"]').addClass(HIDE);\n\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconClose);\n treeOptions.view.showIcon && tableView\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\n .html(treeOptions.view.iconClose);\n } else {\n var tableDataFlat = treeTable.getData(id, true);\n // 展开所有\n // 存在异步加载\n if (treeOptions.async.enable) {\n // 判断是否有未加载过的节点\n var isAllAsyncDone = true;\n layui.each(tableDataFlat, function (i1, item1) {\n if (item1[isParentKey] && !item1[LAY_ASYNC_STATUS]) {\n isAllAsyncDone = false;\n return true;\n }\n })\n // 有未加载过的节点\n if (!isAllAsyncDone) {\n // 逐个展开\n layui.each(treeTable.getData(id), function (i1, item1) {\n treeTable.expandNode(id, {\n index: item1[LAY_DATA_INDEX],\n expandFlag: true,\n inherit: true\n })\n })\n return;\n }\n }\n\n // 先判断是否全部打开过了\n var isAllExpanded = true;\n layui.each(tableDataFlat, function (i1, item1) {\n if (item1[isParentKey] && !item1[LAY_HAS_EXPANDED]) {\n isAllExpanded = false;\n return true;\n }\n })\n // 如果全部节点已经都打开过,就可以简单处理跟隐藏所有节点反操作\n if (isAllExpanded) {\n that.updateStatus(null, function (d) {\n if (d[isParentKey] || showFlexIconIfNotParent) {\n d[LAY_EXPAND] = true;\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\n }\n });\n // 显示所有子节点\n tableView.find('tbody tr[data-level!=\"0\"]').removeClass(HIDE);\n // 处理节点的图标\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconOpen);\n treeOptions.view.showIcon && tableView\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\n .html(treeOptions.view.iconOpen);\n } else {\n // 如果有未打开过的父节点,将 tr 内容全部重新生成\n that.updateStatus(null, function (d) {\n if (d[isParentKey] || showFlexIconIfNotParent) {\n d[LAY_EXPAND] = true;\n d[LAY_HAS_EXPANDED] = true;\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\n }\n });\n if (options.initSort && options.initSort.type && options.autoSort) {\n return treeTable.sort(id);\n }\n var trAll = table.getTrHtml(id, tableDataFlat);\n\n var trAllObj = {\n trs: $(trAll.trs.join('')),\n trs_fixed: $(trAll.trs_fixed.join('')),\n trs_fixed_r: $(trAll.trs_fixed_r.join(''))\n }\n var props;\n layui.each(tableDataFlat, function (dataIndex, dataItem) {\n var dataLevel = dataItem[LAY_DATA_INDEX].split('-').length - 1;\n props = {\n 'data-index': dataItem[LAY_DATA_INDEX],\n 'lay-data-index': dataItem[LAY_DATA_INDEX],\n 'data-level': dataLevel\n };\n trAllObj.trs.eq(dataIndex).attr(props)\n trAllObj.trs_fixed.eq(dataIndex).attr(props)\n trAllObj.trs_fixed_r.eq(dataIndex).attr(props)\n })\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\n tableView.find('.layui-table-' + item + ' tbody').html(trAllObj[['trs', 'trs_fixed', 'trs_fixed_r'][i]]);\n });\n that.renderTreeTable(tableView, 0, false);\n }\n }\n treeTable.resize(id);\n }\n\n Class.prototype.renderTreeTable = function (tableView, level, sonSign) {\n var that = this;\n var options = that.getOptions();\n var tableViewElem = options.elem.next();\n !tableViewElem.hasClass(TABLE_TREE) && tableViewElem.addClass(TABLE_TREE);\n var tableId = options.id;\n var treeOptions = options.tree || {};\n var treeOptionsData = treeOptions.data || {};\n var treeOptionsView = treeOptions.view || {};\n var customName = treeOptions.customName || {};\n var isParentKey = customName.isParent;\n var tableFilterId = tableViewElem.attr('lay-filter');\n var treeTableThat = that;\n // var tableData = treeTableThat.getTableData();\n\n level = level || 0;\n\n if (!level) {\n // 初始化的表格里面没有level信息可以作为顶层节点的判断\n tableViewElem.find('.layui-table-body tr:not([data-level])').attr('data-level', level);\n layui.each(table.cache[tableId], function (dataIndex, dataItem) {\n tableViewElem.find('.layui-table-main tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\n tableViewElem.find('.layui-table-fixed-l tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\n tableViewElem.find('.layui-table-fixed-r tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\n })\n }\n\n var dataExpand = null; // 记录需要展开的数据\n var nameKey = customName.name;\n var indent = treeOptionsView.indent || 14;\n layui.each(tableView.find('td[data-field=\"' + nameKey + '\"]'), function (index, item) {\n item = $(item);\n var trElem = item.closest('tr');\n var itemCell = item.children('.layui-table-cell');\n if (itemCell.hasClass('layui-table-tree-item')) {\n return;\n }\n var trIndex = trElem.attr('lay-data-index');\n if (!trIndex) { // 排除在统计行中的节点\n return;\n }\n trElem = tableViewElem.find('tr[lay-data-index=\"' + trIndex + '\"]');\n var trData = treeTableThat.getNodeDataByIndex(trIndex);\n\n if (trData[LAY_EXPAND] && trData[isParentKey]) {\n // 需要展开\n dataExpand = dataExpand || {};\n dataExpand[trIndex] = true;\n }\n if (trData[LAY_CHECKBOX_HALF]) {\n trElem.find('input[type=\"checkbox\"][name=\"layTableCheckbox\"]').prop('indeterminate', true);\n }\n\n var htmlTemp = itemCell.html();\n itemCell = trElem.find('td[data-field=\"' + nameKey + '\"]>div.layui-table-cell');\n itemCell.addClass('layui-table-tree-item');\n var flexIconElem = itemCell\n .html(['<div class=\"layui-inline layui-table-tree-flexIcon\" ',\n 'style=\"',\n 'margin-left: ' + (indent * trElem.attr('data-level')) + 'px;',\n (trData[isParentKey] || treeOptionsView.showFlexIconIfNotParent) ? '' : ' visibility: hidden;',\n '\">',\n trData[LAY_EXPAND] ? treeOptionsView.flexIconOpen : treeOptionsView.flexIconClose, // 折叠图标\n '</div>',\n treeOptionsView.showIcon ? '<div class=\"layui-inline layui-table-tree-nodeIcon' +\n ((trData[customName.icon] || treeOptionsView.icon) ? ' layui-table-tree-iconCustom' : '') +\n (trData[isParentKey] ? '' : ' layui-table-tree-iconLeaf') +\n '\">' +\n (trData[customName.icon] || treeOptionsView.icon ||\n (trData[isParentKey] ?\n (trData[LAY_EXPAND] ? treeOptionsView.iconOpen : treeOptionsView.iconClose) :\n treeOptionsView.iconLeaf) ||\n '') + '</div>' : '', // 区分父子节点\n htmlTemp].join('')) // 图标要可定制\n .find('.layui-table-tree-flexIcon');\n\n // 添加展开按钮的事件\n flexIconElem.on('click', function (event) {\n layui.stope(event);\n // 处理数据\n // var trElem = item.closest('tr');\n expandNode({trElem: trElem}, null, null, null, true);\n });\n });\n\n if (!level && treeOptions.view.expandAllDefault && that.isExpandAll === undefined) {\n return treeTable.expandAll(tableId, true); // 默认展开全部\n }\n\n // 当前层的数据看看是否需要展开\n if (sonSign !== false && dataExpand) {\n layui.each(dataExpand, function (index, item) {\n var trDefaultExpand = tableViewElem.find('tr[lay-data-index=\"' + index + '\"]');\n trDefaultExpand.find('.layui-table-tree-flexIcon').html(treeOptionsView.flexIconOpen);\n expandNode({trElem: trDefaultExpand.first()}, true);\n });\n } else {\n debounceFn('renderTreeTable-' + tableId, function () {\n options.hasNumberCol && formatNumber(that);\n form.render($('.layui-table-tree[lay-id=\"' + tableId + '\"]'));\n }, 0)();\n }\n }\n\n var formatNumber = function (that) {\n var options = that.getOptions();\n var tableViewElem = options.elem.next();\n\n var num = 0;\n var trMain = tableViewElem.find('.layui-table-main tbody tr');\n var trFixedL = tableViewElem.find('.layui-table-fixed-l tbody tr');\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr');\n layui.each(that.treeToFlat(table.cache[options.id]), function (i1, item1) {\n if (item1['LAY_HIDE']) return;\n var itemData = that.getNodeDataByIndex(item1[LAY_DATA_INDEX]);\n itemData['LAY_NUM'] = ++num;\n trMain.eq(i1).find('.laytable-cell-numbers').html(num);\n trFixedL.eq(i1).find('.laytable-cell-numbers').html(num);\n trFixedR.eq(i1).find('.laytable-cell-numbers').html(num);\n })\n }\n\n // 树表渲染\n Class.prototype.render = function (type) {\n var that = this;\n that.tableIns = table[type === 'reloadData' ? 'reloadData' : 'reload'](that.tableIns.config.id, $.extend(true, {}, that.config));\n that.config = that.tableIns.config;\n };\n\n // 表格重载\n Class.prototype.reload = function (options, deep, type) {\n var that = this;\n\n options = options || {};\n delete that.haveInit;\n\n // 防止数组深度合并\n layui.each(options, function (key, item) {\n if (layui.type(item) === 'array') delete that.config[key];\n });\n\n // 根据需要处理options中的一些参数\n updateOptions(that.getOptions().id, options, type || true);\n\n // 对参数进行深度或浅扩展\n that.config = $.extend(deep, {}, that.config, options);\n\n // 执行渲染\n that.render(type);\n };\n\n // 仅重载数据\n treeTable.reloadData = function () {\n var args = $.extend(true, [], arguments);\n args[3] = 'reloadData';\n\n return treeTable.reload.apply(null, args);\n };\n\n var updateStatus = function (data, statusObj, childrenKey, notCascade) {\n var dataUpdated = [];\n layui.each(data, function (i1, item1) {\n if (layui.type(statusObj) === 'function') {\n statusObj(item1);\n } else {\n $.extend(item1, statusObj);\n }\n dataUpdated.push($.extend({}, item1));\n notCascade || (dataUpdated = dataUpdated.concat(updateStatus(item1[childrenKey], statusObj, childrenKey, notCascade)));\n });\n return dataUpdated;\n }\n\n Class.prototype.updateStatus = function (data, statusObj, notCascade) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n data = data || table.cache[options.id];\n\n return updateStatus(data, statusObj, treeOptions.customName.children, notCascade);\n }\n\n Class.prototype.getTableData = function () {\n var that = this;\n var options = that.getOptions();\n // return options.url ? table.cache[options.id] : options.data;\n return table.cache[options.id];\n }\n\n treeTable.updateStatus = function (id, statusObj, data) {\n var that = getThisTable(id);\n var options = that.getOptions();\n if (!data) {\n if (options.url) {\n data = table.cache[options.id];\n } else {\n data = options.data;\n }\n }\n return that.updateStatus(data, statusObj);\n }\n\n treeTable.sort = function (id) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n if (options.autoSort) {\n that.initData();\n treeTable.renderData(id);\n }\n }\n\n // 处理事件\n var updateObjParams = function (obj) {\n var tableId = obj.config.id;\n var tableThat = getThisTable(tableId);\n var trData = obj.data = treeTable.getNodeDataByIndex(tableId, obj.index); // 克隆的\n var trIndex = trData[LAY_DATA_INDEX];\n obj.dataIndex = trIndex;\n\n // 处理update方法\n var updateFn = obj.update;\n obj.update = function () {\n var updateThat = this;\n var args = arguments;\n $.extend(tableThat.getNodeDataByIndex(trIndex), args[0]);\n var ret = updateFn.apply(updateThat, args); // 主要负责更新节点内容\n var nameKey = obj.config.tree.customName.name;\n nameKey in args[0] && obj.tr.find('td[data-field=\"' + nameKey + '\"]').children('div.layui-table-cell').removeClass('layui-table-tree-item');\n tableThat.renderTreeTable(obj.tr, obj.tr.attr('data-level'), false);\n return ret;\n }\n\n // 处理del方法\n obj.del = function () {\n treeTable.removeNode(tableId, trData);\n }\n\n // 处理setRowChecked\n obj.setRowChecked = function (checked) {\n treeTable.setRowChecked(tableId, {\n index: trData,\n checked: checked\n });\n }\n }\n\n // 更新数据\n treeTable.updateNode = function (id, index, newNode) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableView = options.elem.next();\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\n var trIndex = trElem.attr('data-index');\n var trLevel = trElem.attr('data-level')\n\n if (!newNode) {\n return;\n }\n // 更新值\n var newNodeTemp = that.getNodeDataByIndex(index, false, newNode);\n // 获取新的tr替换\n var trNew = table.getTrHtml(id, [newNodeTemp]);\n // 重新渲染tr\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\n tableView.find('.layui-table-' + item + ' tbody tr[lay-data-index=\"' + index + '\"]').replaceWith($(trNew[['trs', 'trs_fixed', 'trs_fixed_r'][i]].join('')).attr({\n 'data-index': trIndex,\n 'lay-data-index': index,\n 'data-level': trLevel\n }));\n });\n that.renderTreeTable(tableView.find('tr[lay-data-index=\"' + index + '\"]'), trLevel);\n }\n\n // 删除数据\n treeTable.removeNode = function (id, node) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableView = options.elem.next();\n var delNode;\n var indexArr = [];\n delNode = that.getNodeDataByIndex(layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX], false, 'delete');\n var nodeP = that.getNodeDataByIndex(delNode[LAY_PARENT_INDEX]);\n that.updateCheckStatus(nodeP);\n var delNodesFlat = that.treeToFlat([delNode], delNode[treeOptions.customName.pid], delNode[LAY_PARENT_INDEX]);\n layui.each(delNodesFlat, function (i2, item2) {\n indexArr.push('tr[lay-data-index=\"' + item2[LAY_DATA_INDEX] + '\"]');\n })\n\n tableView.find(indexArr.join(',')).remove(); // 删除行\n // 重新整理数据\n var tableData = that.initData();\n // index发生变化需要更新页面tr中对应的lay-data-index 新增和删除都要注意数据结构变动之后的index问题\n layui.each(that.treeToFlat(tableData), function (i3, item3) {\n if (item3[LAY_DATA_INDEX_HISTORY] && item3[LAY_DATA_INDEX_HISTORY] !== item3[LAY_DATA_INDEX]) {\n tableView.find('tr[lay-data-index=\"' + item3[LAY_DATA_INDEX_HISTORY] + '\"]').attr({\n 'data-index': item3[LAY_DATA_INDEX],\n 'lay-data-index': item3[LAY_DATA_INDEX],\n });\n // item3[LAY_DATA_INDEX_HISTORY] = item3[LAY_DATA_INDEX]\n }\n });\n // 重新更新顶层节点的data-index;\n layui.each(table.cache[id], function (i4, item4) {\n tableView.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]').attr('data-index', i4);\n })\n options.hasNumberCol && formatNumber(that);\n\n // 重新适配尺寸\n treeTable.resize(id);\n }\n\n /**\n * 新增数据节点\n * @param {String} id 树表id\n * @param {Object} opts\n * @param {String|Number} opts.parentIndex 指定的父节点,如果增加根节点,请设置 parentIndex 为 null 即可\n * @param {Number} opts.index 新节点插入的位置(从 0 开始index = -1(默认) 时,插入到最后\n * @param {Object|Array} opts.data 新增的节点,单个或者多个\n * @param {Boolean} opts.focus 新增的节点,单个或者多个\n * @return {Array} 新增的节点\n * */\n treeTable.addNodes = function (id, opts) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableViewElem = options.elem.next();\n var checkName = table.config.checkName;\n\n opts = opts || {};\n\n var parentIndex = opts.parentIndex;\n var index = opts.index;\n var newNodes = opts.data;\n var focus = opts.focus;\n\n parentIndex = layui.type(parentIndex) === 'number' ? parentIndex.toString() : parentIndex;\n var parentNode = parentIndex ? that.getNodeDataByIndex(parentIndex) : null;\n index = layui.type(index) === 'number' ? index : -1;\n\n // 添加数据\n newNodes = $.extend(true, [], (layui.isArray(newNodes) ? newNodes : [newNodes]));\n\n // 若未传入 LAY_CHECKED 属性,则继承父节点的 checked 状态\n layui.each(newNodes, function(i, item){\n if(!(checkName in item) && parentNode){\n item[checkName] = parentNode[checkName];\n }\n })\n\n var tableData = that.getTableData(), dataAfter;\n if (!parentNode) {\n // 添加到根节点\n dataAfter = table.cache[id].splice(index === -1 ? table.cache[id].length : index);\n table.cache[id] = table.cache[id].concat(newNodes, dataAfter);\n if (!options.url) {\n // 静态data模式\n if (!options.page) {\n options.data = table.cache[id];\n } else {\n var pageOptions = options.page;\n options.data.splice.apply(options.data, [pageOptions.limit * (pageOptions.curr - 1), pageOptions.limit].concat(table.cache[id]))\n }\n }\n // 将新节点添加到页面\n tableData = that.initData();\n\n if (tableViewElem.find('.layui-none').length) {\n table.renderData(id);\n return newNodes;\n }\n\n var newNodesHtml = table.getTrHtml(id, newNodes);\n var newNodesHtmlObj = {\n trs: $(newNodesHtml.trs.join('')),\n trs_fixed: $(newNodesHtml.trs_fixed.join('')),\n trs_fixed_r: $(newNodesHtml.trs_fixed_r.join(''))\n }\n\n var attrs = {};\n layui.each(newNodes, function (newNodeIndex, newNodeItem) {\n attrs = {\n 'data-index': newNodeItem[LAY_DATA_INDEX],\n 'lay-data-index': newNodeItem[LAY_DATA_INDEX],\n 'data-level': '0'\n };\n newNodesHtmlObj.trs.eq(newNodeIndex).attr(attrs)\n newNodesHtmlObj.trs_fixed.eq(newNodeIndex).attr(attrs)\n newNodesHtmlObj.trs_fixed_r.eq(newNodeIndex).attr(attrs)\n })\n var trIndexPrev = parseInt(newNodes[0][LAY_DATA_INDEX]) - 1;\n var tableViewElemMAIN = tableViewElem.find(ELEM_MAIN);\n var tableViewElemFIXL = tableViewElem.find(ELEM_FIXL);\n var tableViewElemFIXR = tableViewElem.find(ELEM_FIXR);\n if (trIndexPrev === -1) {\n // 插入到开头\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs);\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed);\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed_r);\n } else {\n if (index === -1) {\n // 追加到最后\n tableViewElemMAIN.find('tbody').append(newNodesHtmlObj.trs);\n tableViewElemFIXL.find('tbody').append(newNodesHtmlObj.trs_fixed);\n tableViewElemFIXR.find('tbody').append(newNodesHtmlObj.trs_fixed_r);\n } else {\n var trIndexNext = dataAfter[0][LAY_DATA_INDEX_HISTORY];\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs);\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed);\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed_r);\n }\n\n }\n\n // 重新更新顶层节点的data-index;\n layui.each(table.cache[id], function (i4, item4) {\n tableViewElem.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]').attr('data-index', i4);\n })\n\n that.renderTreeTable(tableViewElem.find(newNodes.map(function (value, index, array) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')));\n } else {\n var isParentKey = treeOptions.customName.isParent;\n var childKey = treeOptions.customName.children;\n\n parentNode[isParentKey] = true;\n var childrenNodes = parentNode[childKey];\n if (!childrenNodes) {\n childrenNodes = parentNode[childKey] = newNodes;\n } else {\n dataAfter = childrenNodes.splice(index === -1 ? childrenNodes.length : index);\n childrenNodes = parentNode[childKey] = childrenNodes.concat(newNodes, dataAfter);\n }\n // 删除已经存在的同级节点以及他们的子节点并且把中间节点的已展开过的状态设置为false\n that.updateStatus(childrenNodes, function (d) {\n if (d[isParentKey] || treeOptions.view.showFlexIconIfNotParent) {\n d[LAY_HAS_EXPANDED] = false;\n }\n });\n var childrenNodesFlat = that.treeToFlat(childrenNodes);\n tableViewElem.find(childrenNodesFlat.map(function (value) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).remove();\n\n tableData = that.initData();\n // 去掉父节点的已经展开过的状态,重新执行一次展开的方法\n parentNode[LAY_HAS_EXPANDED] = false;\n parentNode[LAY_ASYNC_STATUS] = 'local'; // 转为本地数据应该规定异步加载子节点的时候addNodes的规则\n expandNode({trElem: tableViewElem.find('tr[lay-data-index=\"' + parentIndex + '\"]')}, true)\n }\n that.updateCheckStatus(parentNode);\n treeTable.resize(id);\n if (focus) {\n // 滚动到第一个新增的节点\n tableViewElem.find(ELEM_MAIN).find('tr[lay-data-index=\"' + newNodes[0][LAY_DATA_INDEX] + '\"]').get(0).scrollIntoViewIfNeeded();\n }\n\n return newNodes;\n }\n\n // 获取表格选中状态\n treeTable.checkStatus = function (id, includeHalfCheck) {\n var that = getThisTable(id);\n if (!that) return;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var checkName = table.config.checkName;\n\n // 需要区分单双选\n var tableData = treeTable.getData(id, true);\n var checkedData = tableData.filter(function (value, index, array) {\n return value[checkName] || (includeHalfCheck && value[LAY_CHECKBOX_HALF]);\n });\n\n var isAll = true;\n layui.each(treeOptions.data.cascade === 'all' ? table.cache[id] : treeTable.getData(id, true), function (i1, item1) {\n if (!item1[checkName]) {\n isAll = false;\n return true;\n }\n })\n\n return {\n data: checkedData,\n isAll: isAll\n }\n }\n\n // 排序之后重新渲染成树表\n treeTable.on('sort', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n treeTable.sort(tableId);\n }\n });\n\n // 行点击\n treeTable.on('row', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n }\n })\n\n // 行双击\n treeTable.on('rowDouble', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n\n var treeOptions = options.tree || {};\n if (treeOptions.view.dblClickExpand) {\n expandNode({trElem: obj.tr.first()}, null, null, null, true);\n }\n }\n })\n\n // 菜单\n treeTable.on('rowContextmenu', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n }\n })\n\n // tr中带lay-event节点点击\n treeTable.on('tool', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n }\n })\n\n // 行内编辑\n treeTable.on('edit', function (obj) {\n // 如果编辑涉及到关键的name字段需要重新更新一下tr节点\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n if (obj.field === options.tree.customName.name) {\n var updateData = {};\n updateData[obj.field] = obj.value;\n obj.update(updateData); // 通过update调用执行tr节点的更新\n }\n }\n });\n\n // 单选\n treeTable.on('radio', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n var that = getThisTable(tableId);\n updateObjParams(obj);\n checkNode.call(that, obj.tr, obj.checked)\n }\n })\n\n // 设置或取消行选中样式\n Class.prototype.setRowCheckedClass = function(tr, checked){\n var that = this;\n var options = that.getOptions();\n\n var index = tr.data('index');\n var tableViewElem = options.elem.next();\n \n tr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED); // 主体行\n\n // 右侧固定行\n tr.each(function(){\n var index = $(this).data('index');\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr[data-index=\"'+ index +'\"]');\n trFixedR[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED);\n });\n };\n\n // 更新表格的复选框状态\n Class.prototype.updateCheckStatus = function (dataP, checked) {\n var that = this;\n var options = that.getOptions();\n if (!options.hasChecboxCol) {\n return false; // 如果没有复选列则不需要更新状态\n }\n var treeOptions = options.tree;\n var tableId = options.id;\n var tableView = options.elem.next();\n\n var checkName = table.config.checkName;\n\n var cascade = treeOptions.data.cascade;\n var isCascadeParent = cascade === 'all' || cascade === 'parent';\n\n // 如有必要更新父节点们的状态\n if (isCascadeParent && dataP) {\n var trsP = that.updateParentCheckStatus(dataP, layui.type(checked) === 'boolean' ? checked : null);\n layui.each(trsP, function (indexP, itemP) {\n var checkboxElem = tableView.find('tr[lay-data-index=\"' + itemP[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)');\n var checked = itemP[checkName];\n\n // 标记父节点行背景色\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked);\n \n // 设置原始复选框 checked 属性值并渲染\n form.render(checkboxElem.prop({\n checked: checked,\n indeterminate: itemP[LAY_CHECKBOX_HALF]\n }))\n })\n }\n\n // 更新全选的状态\n var isAll = true;\n var isIndeterminate = false;\n var data = treeOptions.data.cascade === 'all' ? table.cache[tableId] : treeTable.getData(tableId, true);\n data = data.filter(function (item) {\n return !item[options.disabledName];\n });\n layui.each(data, function (i1, item1) {\n if (item1[checkName] || item1[LAY_CHECKBOX_HALF]) {\n isIndeterminate = true;\n }\n if (!item1[checkName]) {\n isAll = false;\n }\n if (isIndeterminate && !isAll) {\n return true;\n }\n })\n isIndeterminate = isIndeterminate && !isAll;\n form.render(tableView.find('input[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]').prop({\n 'checked': isAll,\n indeterminate: isIndeterminate\n }));\n\n return isAll\n }\n\n // 更新父节点的选中状态\n Class.prototype.updateParentCheckStatus = function (dataP, checked) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var checkName = table.config.checkName;\n var childrenKey = treeOptions.customName.children;\n\n var dataRet = [];\n dataP[LAY_CHECKBOX_HALF] = false; // 先设置为非半选,是否为半选又下面逻辑判断\n if (checked === true) {\n // 为真需要判断子节点的情况\n if (!dataP[childrenKey].length) {\n checked = false;\n } else {\n layui.each(dataP[childrenKey], function (index, item) {\n if (!item[checkName]) { // 只要有一个子节点为false\n checked = false;\n dataP[LAY_CHECKBOX_HALF] = true;\n return true; // 跳出循环\n }\n });\n }\n } else if (checked === false) {\n // 判断是否为半选\n layui.each(dataP[childrenKey], function (index, item) {\n if (item[checkName] || item[LAY_CHECKBOX_HALF]) { // 只要有一个子节点为选中或者半选状态\n dataP[LAY_CHECKBOX_HALF] = true;\n return true;\n }\n });\n } else {\n // 状态不确定的情况下根据子节点的信息\n checked = false;\n var checkedNum = 0;\n layui.each(dataP[childrenKey], function (index, item) {\n if (item[checkName]) {\n checkedNum++;\n }\n });\n checked = dataP[childrenKey].length ? dataP[childrenKey].length === checkedNum : dataP[checkName]; // 如果没有子节点保留原来的状态;\n dataP[LAY_CHECKBOX_HALF] = checked ? false : checkedNum > 0;\n }\n dataP[checkName] = checked;\n dataRet.push($.extend({}, dataP));\n if (dataP[LAY_PARENT_INDEX]) {\n dataRet = dataRet.concat(that.updateParentCheckStatus(table.cache[tableId][dataP[LAY_PARENT_INDEX]], checked));\n }\n return dataRet\n }\n\n var checkNode = function (trElem, checked, callbackFlag) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var tableView = options.elem.next();\n var inputElem = (trElem.length ? trElem : tableView).find('.laytable-cell-radio, .laytable-cell-checkbox').children('input').last();\n // 判断是单选还是多选 不应该同时存在radio列和checkbox列\n var isRadio = inputElem.attr('type') === 'radio';\n\n if (callbackFlag) {\n var triggerEvent = function () {\n var fn = function (event) {\n layui.stope(event);\n }\n inputElem.parent().on('click', fn); // 添加临时的阻止冒泡事件\n inputElem.next().click();\n inputElem.parent().off('click', fn);\n }\n // 如果需要触发事件可以简单的触发对应节点的click事件\n if (isRadio) {\n // 单选只能选中或者切换其他的不能取消选中 后续看是否有支持的必要 todo\n if (checked && !inputElem.prop('checked')) {\n triggerEvent()\n }\n } else {\n if (layui.type(checked) === 'boolean') {\n if (inputElem.prop('checked') !== checked) {\n // 如果当前已经是想要修改的状态则不做处理\n triggerEvent()\n }\n } else {\n // 切换\n triggerEvent()\n }\n }\n } else {\n var trData = that.getNodeDataByIndex(trElem.attr('data-index'));\n var checkName = table.config.checkName;\n // 如果不触发事件应该有一个方法可以更新数据以及页面的节点\n if (isRadio) {\n if (!trData) {\n // 单选必须是一个存在的行\n return;\n }\n var statusChecked = {};\n statusChecked[checkName] = false;\n // that.updateStatus(null, statusChecked); // 取消其他的选中状态\n that.updateStatus(null, function (d) {\n if (d[checkName]) {\n var radioElem = tableView.find('tr[lay-data-index=\"' + d[LAY_DATA_INDEX] + '\"] input[type=\"radio\"][lay-type=\"layTableRadio\"]');\n d[checkName] = false;\n\n // 取消当前选中行背景色\n that.setRowCheckedClass(radioElem.closest('tr'), false);\n form.render(radioElem.prop('checked', false));\n }\n }); // 取消其他的选中状态\n trData[checkName] = checked;\n\n that.setRowCheckedClass(trElem, checked); // 标记当前选中行背景色\n that.setRowCheckedClass(trElem.siblings(), false); // 取消其他行背景色\n\n form.render(trElem.find('input[type=\"radio\"][lay-type=\"layTableRadio\"]').prop('checked', checked));\n } else {\n // 切换只能用到单条,全选到这一步的时候应该是一个确定的状态\n checked = layui.type(checked) === 'boolean' ? checked : !trData[checkName]; // 状态切换,如果遇到不可操作的节点待处理 todo\n // 全选或者是一个父节点,将子节点的状态同步为当前节点的状态\n // 处理不可操作的信息\n var checkedStatusFn = function (d) {\n if (!d[table.config.disabledName]) { // 节点不可操作的不处理\n d[checkName] = checked;\n d[LAY_CHECKBOX_HALF] = false;\n }\n }\n\n var trs = that.updateStatus(trData ? [trData] : table.cache[tableId], checkedStatusFn, trData && ['parent', 'none'].indexOf(treeOptions.data.cascade) !== -1);\n var checkboxElem = tableView.find(trs.map(function (value) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)';\n }).join(','));\n\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked); // 标记当前选中行背景色\n form.render(checkboxElem.prop({checked: checked, indeterminate: false}));\n\n var trDataP;\n\n // 更新父节点以及更上层节点的状态\n if (trData && trData[LAY_PARENT_INDEX]) {\n // 找到父节点,然后判断父节点的子节点是否全部选中\n trDataP = that.getNodeDataByIndex(trData[LAY_PARENT_INDEX]);\n }\n\n return that.updateCheckStatus(trDataP, checked);\n }\n }\n }\n\n // 多选\n treeTable.on('checkbox', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n var that = getThisTable(tableId);\n var checked = obj.checked;\n updateObjParams(obj)\n obj.isAll = checkNode.call(that, obj.tr, checked);\n }\n })\n\n /**\n * 设置行选中状态\n * @param {String} id 树表id\n * @param {Object} opts\n * @param {Object|String} opts.index 节点下标\n * @param {Boolean} opts.checked 选中或取消\n * @param {Boolean} [opts.callbackFlag] 是否触发事件回调\n * */\n treeTable.setRowChecked = function (id, opts) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var tableView = options.elem.next();\n\n opts = opts || {};\n\n var node = opts.index;\n var checked = opts.checked;\n var callbackFlag = opts.callbackFlag;\n\n var dataIndex = layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX];\n // 判断是否在当前页面中\n var nodeData = that.getNodeDataByIndex(dataIndex);\n if (!nodeData) {\n // 目前只能处理当前页的数据\n return;\n }\n\n var collectNeedExpandNodeIndex = function(index){\n needExpandIndex.push(index);\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\n if (!trElem.length) {\n var nodeData = that.getNodeDataByIndex(index);\n var parentIndex = nodeData[LAY_PARENT_INDEX];\n parentIndex && collectNeedExpandNodeIndex(parentIndex);\n }\n }\n\n // 判断是否展开过\n var trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\n if (!trElem.length) {\n var parentIndex = nodeData[LAY_PARENT_INDEX];\n var needExpandIndex = [];\n collectNeedExpandNodeIndex(parentIndex);\n // 如果还没有展开没有渲染的要先渲染出来\n layui.each(needExpandIndex.reverse(),function(index, nodeIndex){\n treeTable.expandNode(id, {\n index: nodeIndex,\n expandFlag: true\n });\n })\n trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\n }\n checkNode.call(that, trElem, checked, callbackFlag);\n }\n\n treeTable.checkAllNodes = function (id, checked) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var tableView = options.elem.next();\n\n checkNode.call(that, tableView.find('tr[data-index=\"NONE\"]'), !!checked)\n }\n\n /**\n * 获得数据\n * @param {String} id 表格id\n * @param {Boolean} [isSimpleData] 是否返回平铺结构的数据\n * @return {Array} 表格数据\n * */\n treeTable.getData = function (id, isSimpleData) {\n var that = getThisTable(id);\n if (!that) return;\n\n var tableData = [];\n layui.each($.extend(true, [], table.cache[id] || []), function (index, item) {\n // 遍历排除掉临时的数据\n tableData.push(item);\n })\n return isSimpleData ? that.treeToFlat(tableData) : tableData;\n }\n\n /**\n * 重新加载子节点\n * @param {String} id 表格id\n * @param {String} dataIndex 父节点的dataIndex\n * */\n treeTable.reloadAsyncNode = function (id, dataIndex) {\n var that = getThisTable(id);\n if (!that) {\n return;\n }\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n if (!treeOptions.async || !treeOptions.async.enable) {\n return;\n }\n var dataP = that.getNodeDataByIndex(dataIndex);\n if (!dataP) {\n return;\n }\n dataP[LAY_HAS_EXPANDED] = false;\n dataP[LAY_EXPAND] = false;\n dataP[LAY_ASYNC_STATUS] = false;\n layui.each(that.treeToFlat(dataP[treeOptions.customName.children]).reverse(), function (i1, item1) {\n treeTable.removeNode(id, item1[LAY_DATA_INDEX]);\n })\n // 重新展开\n treeTable.expandNode(id, {\n index: dataIndex,\n expandFlag: true,\n callbackFlag: true,\n })\n }\n\n /**\n * 通过数据id获取节点对象\n * */\n treeTable.getNodeById = function (id, dataId) {\n var that = getThisTable(id);\n if (!that) return;\n\n return that.getNodeById(dataId);\n }\n\n /**\n * 根据自定义规则搜索节点数据\n * @param {String} id 树表id\n * @param {Function} filter 自定义过滤器函数\n * @param {Object} [opts]\n * @param {Boolean} [opts.isSingle] 是否只找到第一个\n * @param {Object} [opts.parentNode] 在指定在某个父节点下的子节点中搜索\n * @return {Object} 节点对象\n * */\n treeTable.getNodesByFilter = function (id, filter, opts) {\n var that = getThisTable(id);\n if (!that) return;\n var options = that.getOptions();\n\n opts = opts || {};\n var isSingle = opts.isSingle;\n var parentNode = opts.parentNode;\n var dataP = parentNode && parentNode.data;\n // dataP = dataP || table.cache[id];\n var nodes = that.treeToFlat(dataP ? (dataP[options.tree.customName.children] || []) : table.cache[id]).filter(filter);\n var nodesResult = [];\n layui.each(nodes, function (i1, item1) {\n nodesResult.push(that.getNodeByIndex(item1[LAY_DATA_INDEX]));\n if (isSingle) {\n return true;\n }\n });\n\n return nodesResult;\n }\n\n\n // 记录所有实例\n thisTreeTable.that = {}; // 记录所有实例对象\n // thisTreeTable.config = {}; // 记录所有实例配置项\n\n // 重载\n treeTable.reload = function (id, options, deep, type) {\n // deep = deep !== false; // 默认采用深拷贝\n var that = getThisTable(id);\n if (!that) return;\n that.reload(options, deep, type);\n return thisTreeTable.call(that);\n };\n\n // 核心入口\n treeTable.render = function (options) {\n var inst = new Class(options);\n return thisTreeTable.call(inst);\n };\n\n exports(MOD_NAME, treeTable);\n});\n","/**\r\n * tree 树组件\r\n */\r\n\r\nlayui.define(['form','util'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var form = layui.form;\r\n var layer = layui.layer;\r\n var util = layui.util;\r\n \r\n // 模块名\r\n var MOD_NAME = 'tree';\r\n\r\n // 外部接口\r\n var tree = {\r\n config: {\r\n customName: { // 自定义 data 字段名\r\n id: 'id',\r\n title: 'title',\r\n children: 'children'\r\n }\r\n },\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || that.index;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n thisModule.config[id] = options; // 记录当前实例配置项\r\n \r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n getChecked: function(){\r\n return that.getChecked.call(that);\r\n },\r\n setChecked: function(id){// 设置值\r\n return that.setChecked.call(that, id);\r\n }\r\n }\r\n };\r\n \r\n // 获取当前实例配置项\r\n var getThisModuleConfig = function(id){\r\n var config = thisModule.config[id];\r\n if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance');\r\n return config || null;\r\n }\r\n\r\n // 字符常量\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var NONE = 'layui-none';\r\n var DISABLED = 'layui-disabled';\r\n \r\n var ELEM_VIEW = 'layui-tree';\r\n var ELEM_SET = 'layui-tree-set';\r\n var ICON_CLICK = 'layui-tree-iconClick';\r\n var ICON_ADD = 'layui-icon-addition';\r\n var ICON_SUB = 'layui-icon-subtraction';\r\n var ELEM_ENTRY = 'layui-tree-entry';\r\n var ELEM_MAIN = 'layui-tree-main';\r\n var ELEM_TEXT = 'layui-tree-txt';\r\n var ELEM_PACK = 'layui-tree-pack';\r\n var ELEM_SPREAD = 'layui-tree-spread';\r\n var ELEM_LINE_SHORT = 'layui-tree-setLineShort';\r\n var ELEM_SHOW = 'layui-tree-showLine';\r\n var ELEM_EXTEND = 'layui-tree-lineExtend';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++tree.index;\r\n that.config = $.extend({}, that.config, tree.config, options);\r\n that.render();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n data: [], // 数据\r\n \r\n showCheckbox: false, // 是否显示复选框\r\n showLine: true, // 是否开启连接线\r\n accordion: false, // 是否开启手风琴模式\r\n onlyIconControl: false, // 是否仅允许节点左侧图标控制展开收缩\r\n isJump: false, // 是否允许点击节点时弹出新窗口跳转\r\n edit: false, // 是否开启节点的操作图标\r\n \r\n text: {\r\n defaultNodeName: '未命名', // 节点默认名称\r\n none: '无数据' // 数据为空时的文本提示\r\n }\r\n };\r\n \r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n \r\n layui.each(options, function(key, item){\r\n if(layui.type(item) === 'array') delete that.config[key];\r\n });\r\n \r\n that.config = $.extend(true, {}, that.config, options);\r\n that.render();\r\n };\r\n\r\n // 主体渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 初始化自定义字段名\r\n options.customName = $.extend({}, tree.config.customName, options.customName);\r\n \r\n that.checkids = [];\r\n\r\n var temp = $('<div class=\"layui-tree layui-border-box'+ (options.showCheckbox ? \" layui-form\" : \"\") + (options.showLine ? \" layui-tree-line\" : \"\") +'\" lay-filter=\"LAY-tree-'+ that.index +'\"></div>');\r\n that.tree(temp);\r\n\r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return;\r\n\r\n // 索引\r\n that.key = options.id || that.index;\r\n \r\n // 插入组件结构\r\n that.elem = temp;\r\n that.elemNone = $('<div class=\"layui-tree-emptyText\">'+ options.text.none +'</div>');\r\n othis.html(that.elem);\r\n\r\n if(that.elem.find('.layui-tree-set').length == 0){\r\n return that.elem.append(that.elemNone);\r\n };\r\n \r\n // 复选框渲染\r\n if(options.showCheckbox){\r\n that.renderForm('checkbox');\r\n };\r\n\r\n that.elem.find('.layui-tree-set').each(function(){\r\n var othis = $(this);\r\n // 最外层\r\n if(!othis.parent('.layui-tree-pack')[0]){\r\n othis.addClass('layui-tree-setHide');\r\n };\r\n\r\n // 没有下一个节点 上一层父级有延伸线\r\n if(!othis.next()[0] && othis.parents('.layui-tree-pack').eq(1).hasClass('layui-tree-lineExtend')){\r\n othis.addClass(ELEM_LINE_SHORT);\r\n };\r\n \r\n // 没有下一个节点 外层最后一个\r\n if(!othis.next()[0] && !othis.parents('.layui-tree-set').eq(0).next()[0]){\r\n othis.addClass(ELEM_LINE_SHORT);\r\n };\r\n });\r\n\r\n that.events();\r\n };\r\n \r\n // 渲染表单\r\n Class.prototype.renderForm = function(type){\r\n form.render(type, 'LAY-tree-'+ this.index);\r\n };\r\n\r\n // 节点解析\r\n Class.prototype.tree = function(elem, children){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var data = children || options.data;\r\n\r\n // 遍历数据\r\n layui.each(data, function(index, item){\r\n var hasChild = item[customName.children] && item[customName.children].length > 0;\r\n var packDiv = $('<div class=\"layui-tree-pack\" '+ (item.spread ? 'style=\"display: block;\"' : '') +'></div>');\r\n var entryDiv = $(['<div data-id=\"'+ item[customName.id] +'\" class=\"layui-tree-set'+ (item.spread ? \" layui-tree-spread\" : \"\") + (item.checked ? \" layui-tree-checkedFirst\" : \"\") +'\">'\r\n ,'<div class=\"layui-tree-entry\">'\r\n ,'<div class=\"layui-tree-main\">'\r\n // 箭头\r\n ,function(){\r\n if(options.showLine){\r\n if(hasChild){\r\n return '<span class=\"layui-tree-iconClick layui-tree-icon\"><i class=\"layui-icon '+ (item.spread ? \"layui-icon-subtraction\" : \"layui-icon-addition\") +'\"></i></span>';\r\n }else{\r\n return '<span class=\"layui-tree-iconClick\"><i class=\"layui-icon layui-icon-file\"></i></span>';\r\n };\r\n }else{\r\n return '<span class=\"layui-tree-iconClick\"><i class=\"layui-tree-iconArrow '+ (hasChild ? \"\": HIDE) +'\"></i></span>';\r\n };\r\n }()\r\n \r\n // 复选框\r\n ,function(){\r\n return options.showCheckbox ? '<input type=\"checkbox\" name=\"'+ (item.field || ('layuiTreeCheck_'+ item[customName.id])) +'\" same=\"layuiTreeCheck\" lay-skin=\"primary\" '+ (item.disabled ? \"disabled\" : \"\") +' value=\"'+ item[customName.id] +'\">' : '';\r\n }()\r\n \r\n // 节点\r\n ,function(){\r\n if(options.isJump && item.href){\r\n return '<a href=\"'+ item.href +'\" target=\"_blank\" class=\"'+ ELEM_TEXT +'\">'+ (item[customName.title] || item.label || options.text.defaultNodeName) +'</a>';\r\n }else{\r\n return '<span class=\"'+ ELEM_TEXT + (item.disabled ? ' '+ DISABLED : '') +'\">'+ (item[customName.title] || item.label || options.text.defaultNodeName) +'</span>';\r\n }\r\n }()\r\n ,'</div>'\r\n \r\n // 节点操作图标\r\n ,function(){\r\n if(!options.edit) return '';\r\n \r\n var editIcon = {\r\n add: '<i class=\"layui-icon layui-icon-add-1\" data-type=\"add\"></i>'\r\n ,update: '<i class=\"layui-icon layui-icon-edit\" data-type=\"update\"></i>'\r\n ,del: '<i class=\"layui-icon layui-icon-delete\" data-type=\"del\"></i>'\r\n }, arr = ['<div class=\"layui-btn-group layui-tree-btnGroup\">'];\r\n \r\n if(options.edit === true){\r\n options.edit = ['update', 'del']\r\n }\r\n \r\n if(typeof options.edit === 'object'){\r\n layui.each(options.edit, function(i, val){\r\n arr.push(editIcon[val] || '')\r\n });\r\n return arr.join('') + '</div>';\r\n }\r\n }()\r\n ,'</div></div>'].join(''));\r\n\r\n // 如果有子节点,则递归继续生成树\r\n if(hasChild){\r\n entryDiv.append(packDiv);\r\n that.tree(packDiv, item[customName.children]);\r\n };\r\n\r\n elem.append(entryDiv);\r\n \r\n // 若有前置节点,前置节点加连接线\r\n if(entryDiv.prev('.'+ELEM_SET)[0]){\r\n entryDiv.prev().children('.layui-tree-pack').addClass('layui-tree-showLine');\r\n };\r\n \r\n // 若无子节点,则父节点加延伸线\r\n if(!hasChild){\r\n entryDiv.parent('.layui-tree-pack').addClass('layui-tree-lineExtend');\r\n };\r\n\r\n // 展开节点操作\r\n that.spread(entryDiv, item);\r\n \r\n // 选择框\r\n if(options.showCheckbox){\r\n item.checked && that.checkids.push(item[customName.id]);\r\n that.checkClick(entryDiv, item);\r\n }\r\n \r\n // 操作节点\r\n options.edit && that.operate(entryDiv, item);\r\n \r\n });\r\n };\r\n\r\n // 展开节点\r\n Class.prototype.spread = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var entry = elem.children('.'+ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n var elemCheckbox = elemMain.find('input[same=\"layuiTreeCheck\"]');\r\n var elemIcon = entry.find('.'+ ICON_CLICK);\r\n var elemText = entry.find('.'+ ELEM_TEXT);\r\n var touchOpen = options.onlyIconControl ? elemIcon : elemMain; // 判断展开通过节点还是箭头图标\r\n var state = '';\r\n \r\n // 展开收缩\r\n touchOpen.on('click', function(e){\r\n var packCont = elem.children('.'+ELEM_PACK)\r\n ,iconClick = touchOpen.children('.layui-icon')[0] ? touchOpen.children('.layui-icon') : touchOpen.find('.layui-tree-icon').children('.layui-icon');\r\n\r\n // 若没有子节点\r\n if(!packCont[0]){\r\n state = 'normal';\r\n }else{\r\n if(elem.hasClass(ELEM_SPREAD)){\r\n elem.removeClass(ELEM_SPREAD);\r\n packCont.slideUp(200);\r\n iconClick.removeClass(ICON_SUB).addClass(ICON_ADD); \r\n that.updateFieldValue(item, 'spread', false);\r\n }else{\r\n elem.addClass(ELEM_SPREAD);\r\n packCont.slideDown(200);\r\n iconClick.addClass(ICON_SUB).removeClass(ICON_ADD);\r\n that.updateFieldValue(item, 'spread', true);\r\n\r\n // 是否手风琴\r\n if(options.accordion){\r\n var sibls = elem.siblings('.'+ELEM_SET);\r\n sibls.removeClass(ELEM_SPREAD);\r\n sibls.children('.'+ELEM_PACK).slideUp(200);\r\n sibls.find('.layui-tree-icon').children('.layui-icon').removeClass(ICON_SUB).addClass(ICON_ADD);\r\n };\r\n };\r\n };\r\n });\r\n \r\n // 点击回调\r\n elemText.on('click', function(){\r\n var othis = $(this);\r\n \r\n // 判断是否禁用状态\r\n if(othis.hasClass(DISABLED)) return;\r\n \r\n // 判断展开收缩状态\r\n if(elem.hasClass(ELEM_SPREAD)){\r\n state = options.onlyIconControl ? 'open' : 'close';\r\n } else {\r\n state = options.onlyIconControl ? 'close' : 'open';\r\n }\r\n\r\n // 获取选中状态\r\n if(elemCheckbox[0]){\r\n that.updateFieldValue(item, 'checked', elemCheckbox.prop('checked'));\r\n }\r\n \r\n // 点击产生的回调\r\n options.click && options.click({\r\n elem: elem,\r\n state: state,\r\n data: item\r\n });\r\n });\r\n };\r\n\r\n // 更新数据源 checked,spread 字段值\r\n Class.prototype.updateFieldValue = function(obj, field, value){\r\n if(field in obj) obj[field] = value;\r\n };\r\n \r\n // 计算复选框选中状态\r\n Class.prototype.setCheckbox = function(elem, item, elemCheckbox){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var checked = elemCheckbox.prop('checked');\r\n \r\n if(elemCheckbox.prop('disabled')) return;\r\n\r\n // 同步子节点选中状态\r\n if(typeof item[customName.children] === 'object' || elem.find('.'+ELEM_PACK)[0]){\r\n var elemCheckboxs = elem.find('.'+ ELEM_PACK).find('input[same=\"layuiTreeCheck\"]');\r\n elemCheckboxs.each(function(index){\r\n if(this.disabled) return; // 不可点击则跳过\r\n var children = item[customName.children][index];\r\n if(children) that.updateFieldValue(children, 'checked', checked);\r\n that.updateFieldValue(this, 'checked', checked);\r\n });\r\n };\r\n\r\n // 同步父节点选中状态\r\n var setParentsChecked = function(thisNodeElem){\r\n // 若无父节点,则终止递归\r\n if(!thisNodeElem.parents('.'+ ELEM_SET)[0]) return;\r\n\r\n var state;\r\n var parentPack = thisNodeElem.parent('.'+ ELEM_PACK);\r\n var parentNodeElem = parentPack.parent();\r\n var parentCheckbox = parentPack.prev().find('input[same=\"layuiTreeCheck\"]');\r\n\r\n // 如果子节点有任意一条选中,则父节点为选中状态\r\n if(checked){\r\n parentCheckbox.prop('checked', checked);\r\n } else { // 如果当前节点取消选中,则根据计算“兄弟和子孙”节点选中状态,来同步父节点选中状态\r\n parentPack.find('input[same=\"layuiTreeCheck\"]').each(function(){\r\n if(this.checked){\r\n state = true;\r\n }\r\n });\r\n \r\n // 如果兄弟子孙节点全部未选中,则父节点也应为非选中状态\r\n state || parentCheckbox.prop('checked', false);\r\n }\r\n \r\n // 向父节点递归\r\n setParentsChecked(parentNodeElem);\r\n };\r\n \r\n setParentsChecked(elem);\r\n\r\n that.renderForm('checkbox');\r\n };\r\n \r\n // 复选框选择\r\n Class.prototype.checkClick = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var entry = elem.children('.'+ ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n \r\n \r\n \r\n // 点击复选框\r\n elemMain.on('click', 'input[same=\"layuiTreeCheck\"]+', function(e){\r\n layui.stope(e); // 阻止点击节点事件\r\n\r\n var elemCheckbox = $(this).prev();\r\n var checked = elemCheckbox.prop('checked');\r\n \r\n if(elemCheckbox.prop('disabled')) return;\r\n \r\n that.setCheckbox(elem, item, elemCheckbox);\r\n that.updateFieldValue(item, 'checked', checked);\r\n\r\n // 复选框点击产生的回调\r\n options.oncheck && options.oncheck({\r\n elem: elem,\r\n checked: checked,\r\n data: item\r\n });\r\n });\r\n };\r\n\r\n // 节点操作\r\n Class.prototype.operate = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var entry = elem.children('.'+ ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n\r\n entry.children('.layui-tree-btnGroup').on('click', '.layui-icon', function(e){\r\n layui.stope(e); // 阻止节点操作\r\n\r\n var type = $(this).data(\"type\");\r\n var packCont = elem.children('.'+ELEM_PACK);\r\n var returnObj = {\r\n data: item,\r\n type: type,\r\n elem:elem\r\n };\r\n // 增加\r\n if(type == 'add'){\r\n // 若节点本身无子节点\r\n if(!packCont[0]){\r\n // 若开启连接线,更改图标样式\r\n if(options.showLine){\r\n elemMain.find('.'+ICON_CLICK).addClass('layui-tree-icon');\r\n elemMain.find('.'+ICON_CLICK).children('.layui-icon').addClass(ICON_ADD).removeClass('layui-icon-file');\r\n // 若未开启连接线,显示箭头\r\n } else {\r\n elemMain.find('.layui-tree-iconArrow').removeClass(HIDE);\r\n };\r\n // 节点添加子节点容器\r\n elem.append('<div class=\"layui-tree-pack\"></div>');\r\n };\r\n\r\n // 新增节点\r\n var key = options.operate && options.operate(returnObj);\r\n var obj = {};\r\n\r\n obj[customName.title] = options.text.defaultNodeName;\r\n obj[customName.id] = key;\r\n that.tree(elem.children('.'+ELEM_PACK), [obj]);\r\n \r\n // 放在新增后面,因为要对元素进行操作\r\n if(options.showLine){\r\n // 节点本身无子节点\r\n if(!packCont[0]){\r\n // 遍历兄弟节点,判断兄弟节点是否有子节点\r\n var siblings = elem.siblings('.'+ELEM_SET)\r\n var num = 1;\r\n var parentPack = elem.parent('.'+ELEM_PACK);\r\n\r\n layui.each(siblings, function(index, i){\r\n if(!$(i).children('.'+ELEM_PACK)[0]){\r\n num = 0;\r\n };\r\n });\r\n\r\n // 若兄弟节点都有子节点\r\n if(num == 1){\r\n // 兄弟节点添加连接线\r\n siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT);\r\n elem.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n // 父级移除延伸线\r\n parentPack.removeClass(ELEM_EXTEND);\r\n // 同层节点最后一个更改线的状态\r\n parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n } else {\r\n elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).addClass(ELEM_LINE_SHORT);\r\n };\r\n } else {\r\n // 添加延伸线\r\n if(!packCont.hasClass(ELEM_EXTEND)){\r\n packCont.addClass(ELEM_EXTEND);\r\n };\r\n // 子节点添加延伸线\r\n elem.find('.'+ELEM_PACK).each(function(){\r\n $(this).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n });\r\n // 如果前一个节点有延伸线\r\n if(packCont.children('.'+ELEM_SET).last().prev().hasClass(ELEM_LINE_SHORT)){\r\n packCont.children('.'+ELEM_SET).last().prev().removeClass(ELEM_LINE_SHORT);\r\n }else{\r\n // 若之前的没有,说明处于连接状态\r\n packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT);\r\n };\r\n // 若是最外层,要始终保持相连的状态\r\n if(!elem.parent('.'+ELEM_PACK)[0] && elem.next()[0]){\r\n packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT);\r\n };\r\n };\r\n };\r\n if(!options.showCheckbox) return;\r\n // 若开启复选框,同步新增节点状态\r\n if(elemMain.find('input[same=\"layuiTreeCheck\"]')[0].checked){\r\n var packLast = elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).last();\r\n packLast.find('input[same=\"layuiTreeCheck\"]')[0].checked = true;\r\n };\r\n that.renderForm('checkbox');\r\n \r\n // 修改\r\n } else if(type == 'update') {\r\n var text = elemMain.children('.'+ ELEM_TEXT).html();\r\n elemMain.children('.'+ ELEM_TEXT).html('');\r\n // 添加输入框,覆盖在文字上方\r\n elemMain.append('<input type=\"text\" class=\"layui-tree-editInput\">');\r\n // 获取焦点\r\n elemMain.children('.layui-tree-editInput').val(util.unescape(text)).focus();\r\n // 嵌入文字移除输入框\r\n var getVal = function(input){\r\n var textNew = input.val().trim();\r\n textNew = textNew ? textNew : options.text.defaultNodeName;\r\n input.remove();\r\n elemMain.children('.'+ ELEM_TEXT).html(textNew);\r\n \r\n // 同步数据\r\n returnObj.data[customName.title] = textNew;\r\n \r\n // 节点修改的回调\r\n options.operate && options.operate(returnObj);\r\n };\r\n // 失去焦点\r\n elemMain.children('.layui-tree-editInput').blur(function(){\r\n getVal($(this));\r\n });\r\n // 回车\r\n elemMain.children('.layui-tree-editInput').on('keydown', function(e){\r\n if(e.keyCode === 13){\r\n e.preventDefault();\r\n getVal($(this));\r\n };\r\n });\r\n\r\n // 删除\r\n } else {\r\n layer.confirm('确认删除该节点 \"<span style=\"color: #999;\">'+ (item[customName.title] || '') +'</span>\" 吗?', function(index){\r\n options.operate && options.operate(returnObj); // 节点删除的回调\r\n returnObj.status = 'remove'; // 标注节点删除\r\n \r\n layer.close(index);\r\n \r\n // 若删除最后一个,显示空数据提示\r\n if(!elem.prev('.'+ELEM_SET)[0] && !elem.next('.'+ELEM_SET)[0] && !elem.parent('.'+ELEM_PACK)[0]){\r\n elem.remove();\r\n that.elem.append(that.elemNone);\r\n return;\r\n };\r\n // 若有兄弟节点\r\n if(elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY)[0]){\r\n // 若开启复选框\r\n if(options.showCheckbox){\r\n // 若开启复选框,进行下步操作\r\n var elemDel = function(elem){\r\n // 若无父结点,则不执行\r\n if(!elem.parents('.'+ELEM_SET)[0]) return;\r\n var siblingTree = elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY);\r\n var parentTree = elem.parent('.'+ELEM_PACK).prev();\r\n var checkState = parentTree.find('input[same=\"layuiTreeCheck\"]')[0];\r\n var state = 1;\r\n var num = 0;\r\n\r\n // 若父节点未勾选\r\n if(checkState.checked == false){\r\n // 遍历兄弟节点\r\n siblingTree.each(function(i, item1){\r\n var input = $(item1).find('input[same=\"layuiTreeCheck\"]')[0]\r\n if(input.checked == false && !input.disabled){\r\n state = 0;\r\n };\r\n // 判断是否全为不可勾选框\r\n if(!input.disabled){\r\n num = 1;\r\n };\r\n });\r\n // 若有可勾选选择框并且已勾选\r\n if(state == 1 && num == 1){\r\n // 勾选父节点\r\n checkState.checked = true;\r\n that.renderForm('checkbox');\r\n // 向上遍历祖先节点\r\n elemDel(parentTree.parent('.'+ELEM_SET));\r\n };\r\n };\r\n };\r\n elemDel(elem);\r\n };\r\n // 若开启连接线\r\n if(options.showLine){\r\n // 遍历兄弟节点,判断兄弟节点是否有子节点\r\n var siblings = elem.siblings('.'+ELEM_SET);\r\n var num = 1;\r\n var parentPack = elem.parent('.'+ELEM_PACK);\r\n\r\n layui.each(siblings, function(index, i){\r\n if(!$(i).children('.'+ELEM_PACK)[0]){\r\n num = 0;\r\n };\r\n });\r\n // 若兄弟节点都有子节点\r\n if(num == 1){\r\n // 若节点本身无子节点\r\n if(!packCont[0]){\r\n // 父级去除延伸线,因为此时子节点里没有空节点\r\n parentPack.removeClass(ELEM_EXTEND);\r\n siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT);\r\n };\r\n // 若为最后一个节点\r\n if(!elem.next()[0]){\r\n elem.prev().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n }else{\r\n parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n };\r\n // 若为最外层最后一个节点,去除前一个结点的连接线\r\n if(!elem.next()[0] && !elem.parents('.'+ELEM_SET)[1] && !elem.parents('.'+ELEM_SET).eq(0).next()[0]){\r\n elem.prev('.'+ELEM_SET).addClass(ELEM_LINE_SHORT);\r\n };\r\n }else{\r\n // 若为最后一个节点且有延伸线\r\n if(!elem.next()[0] && elem.hasClass(ELEM_LINE_SHORT)){\r\n elem.prev().addClass(ELEM_LINE_SHORT);\r\n };\r\n };\r\n };\r\n \r\n } else {\r\n // 若无兄弟节点\r\n var prevDiv = elem.parent('.'+ELEM_PACK).prev();\r\n // 若开启了连接线\r\n if(options.showLine){\r\n prevDiv.find('.'+ICON_CLICK).removeClass('layui-tree-icon');\r\n prevDiv.find('.'+ICON_CLICK).children('.layui-icon').removeClass(ICON_SUB).addClass('layui-icon-file');\r\n // 父节点所在层添加延伸线\r\n var pare = prevDiv.parents('.'+ELEM_PACK).eq(0);\r\n pare.addClass(ELEM_EXTEND);\r\n\r\n // 兄弟节点最后子节点添加延伸线\r\n pare.children('.'+ELEM_SET).each(function(){\r\n $(this).children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n });\r\n }else{\r\n // 父节点隐藏箭头\r\n prevDiv.find('.layui-tree-iconArrow').addClass(HIDE);\r\n };\r\n // 移除展开属性\r\n elem.parents('.'+ELEM_SET).eq(0).removeClass(ELEM_SPREAD);\r\n // 移除节点容器\r\n elem.parent('.'+ELEM_PACK).remove();\r\n };\r\n\r\n elem.remove();\r\n });\r\n \r\n };\r\n });\r\n };\r\n\r\n // 部分事件\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n var checkWarp = that.elem.find('.layui-tree-checkedFirst');\r\n \r\n // 初始选中\r\n that.setChecked(that.checkids);\r\n \r\n // 搜索\r\n that.elem.find('.layui-tree-search').on('keyup', function(){\r\n var input = $(this);\r\n var val = input.val();\r\n var pack = input.nextAll();\r\n var arr = [];\r\n\r\n // 遍历所有的值\r\n pack.find('.'+ ELEM_TEXT).each(function(){\r\n var entry = $(this).parents('.'+ELEM_ENTRY);\r\n // 若值匹配,加一个类以作标识\r\n if($(this).html().indexOf(val) != -1){\r\n arr.push($(this).parent());\r\n \r\n var select = function(div){\r\n div.addClass('layui-tree-searchShow');\r\n // 向上父节点渲染\r\n if(div.parent('.'+ELEM_PACK)[0]){\r\n select(div.parent('.'+ELEM_PACK).parent('.'+ELEM_SET));\r\n };\r\n };\r\n select(entry.parent('.'+ELEM_SET));\r\n };\r\n });\r\n\r\n // 根据标志剔除\r\n pack.find('.'+ELEM_ENTRY).each(function(){\r\n var parent = $(this).parent('.'+ELEM_SET);\r\n if(!parent.hasClass('layui-tree-searchShow')){\r\n parent.addClass(HIDE);\r\n };\r\n });\r\n if(pack.find('.layui-tree-searchShow').length == 0){\r\n that.elem.append(that.elemNone);\r\n };\r\n\r\n // 节点过滤的回调\r\n options.onsearch && options.onsearch({\r\n elem: arr\r\n });\r\n });\r\n\r\n // 还原搜索初始状态\r\n that.elem.find('.layui-tree-search').on('keydown', function(){\r\n $(this).nextAll().find('.'+ELEM_ENTRY).each(function(){\r\n var parent = $(this).parent('.'+ELEM_SET);\r\n parent.removeClass('layui-tree-searchShow '+ HIDE);\r\n });\r\n if($('.layui-tree-emptyText')[0]) $('.layui-tree-emptyText').remove();\r\n });\r\n };\r\n\r\n // 得到选中节点\r\n Class.prototype.getChecked = function(){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var checkId = [];\r\n var checkData = [];\r\n \r\n // 遍历节点找到选中索引\r\n that.elem.find('.layui-form-checked').each(function(){\r\n checkId.push($(this).prev()[0].value);\r\n });\r\n \r\n // 遍历节点\r\n var eachNodes = function(data, checkNode){\r\n layui.each(data, function(index, item){\r\n layui.each(checkId, function(index2, item2){\r\n if(item[customName.id] == item2){\r\n that.updateFieldValue(item, 'checked', true);\r\n\r\n var cloneItem = $.extend({}, item);\r\n delete cloneItem[customName.children];\r\n\r\n checkNode.push(cloneItem);\r\n \r\n if(item[customName.children]){\r\n cloneItem[customName.children] = [];\r\n eachNodes(item[customName.children], cloneItem[customName.children]);\r\n }\r\n return true\r\n }\r\n });\r\n });\r\n };\r\n\r\n eachNodes($.extend({}, options.data), checkData);\r\n \r\n return checkData;\r\n };\r\n\r\n // 设置选中节点\r\n Class.prototype.setChecked = function(checkedId){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 初始选中\r\n that.elem.find('.'+ELEM_SET).each(function(i, item){\r\n var thisId = $(this).data('id');\r\n var input = $(item).children('.'+ELEM_ENTRY).find('input[same=\"layuiTreeCheck\"]');\r\n var reInput = input.next();\r\n \r\n // 若返回数字\r\n if(typeof checkedId === 'number'){\r\n if(thisId.toString() == checkedId.toString()){\r\n if(!input[0].checked){\r\n reInput.click();\r\n };\r\n return false;\r\n };\r\n } \r\n // 若返回数组\r\n else if(typeof checkedId === 'object'){\r\n layui.each(checkedId, function(index, value){\r\n if(value.toString() == thisId.toString() && !input[0].checked){\r\n reInput.click();\r\n return true;\r\n }\r\n });\r\n };\r\n });\r\n };\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n thisModule.config = {}; // 记录所有实例配置项\r\n \r\n // 重载实例\r\n tree.reload = function(id, options){\r\n var that = thisModule.that[id];\r\n that.reload(options);\r\n \r\n return thisModule.call(that);\r\n };\r\n \r\n // 获得选中的节点数据\r\n tree.getChecked = function(id){\r\n var that = thisModule.that[id];\r\n return that.getChecked();\r\n };\r\n \r\n // 设置选中节点\r\n tree.setChecked = function(id, checkedId){\r\n var that = thisModule.that[id];\r\n return that.setChecked(checkedId);\r\n };\r\n \r\n // 核心入口\r\n tree.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, tree);\r\n})","/**\r\n * transfer 穿梭框组件\r\n */\r\n\r\nlayui.define(['laytpl', 'form'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var laytpl = layui.laytpl;\r\n var form = layui.form;\r\n \r\n // 模块名\r\n var MOD_NAME = 'transfer';\r\n\r\n // 外部接口\r\n var transfer = {\r\n config: {},\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || that.index;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n thisModule.config[id] = options; // 记录当前实例配置项\r\n \r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n // 获取右侧数据\r\n getData: function(){\r\n return that.getData.call(that);\r\n }\r\n }\r\n };\r\n \r\n // 获取当前实例配置项\r\n var getThisModuleConfig = function(id){\r\n var config = thisModule.config[id];\r\n if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance');\r\n return config || null;\r\n };\r\n\r\n // 字符常量\r\n var ELEM = 'layui-transfer';\r\n var HIDE = 'layui-hide'; \r\n var DISABLED = 'layui-btn-disabled';\r\n var NONE = 'layui-none';\r\n var ELEM_BOX = 'layui-transfer-box';\r\n var ELEM_HEADER = 'layui-transfer-header';\r\n var ELEM_SEARCH = 'layui-transfer-search';\r\n var ELEM_ACTIVE = 'layui-transfer-active';\r\n var ELEM_DATA = 'layui-transfer-data';\r\n \r\n // 穿梭框模板\r\n var TPL_BOX = function(obj){\r\n obj = obj || {};\r\n return ['<div class=\"layui-transfer-box\" data-index=\"'+ obj.index +'\">'\r\n ,'<div class=\"layui-transfer-header\">'\r\n ,'<input type=\"checkbox\" name=\"'+ obj.checkAllName +'\" lay-filter=\"layTransferCheckbox\" lay-type=\"all\" lay-skin=\"primary\" title=\"{{= d.data.title['+ obj.index +'] || \\'list'+ (obj.index + 1) +'\\' }}\">'\r\n ,'</div>'\r\n ,'{{# if(d.data.showSearch){ }}'\r\n ,'<div class=\"layui-transfer-search\">'\r\n ,'<i class=\"layui-icon layui-icon-search\"></i>'\r\n ,'<input type=\"text\" class=\"layui-input\" placeholder=\"关键词搜索\">'\r\n ,'</div>'\r\n ,'{{# } }}'\r\n ,'<ul class=\"layui-transfer-data\"></ul>'\r\n ,'</div>'].join('');\r\n };\r\n \r\n // 主模板\r\n var TPL_MAIN = ['<div class=\"layui-transfer layui-form layui-border-box\" lay-filter=\"LAY-transfer-{{= d.index }}\">'\r\n ,TPL_BOX({\r\n index: 0\r\n ,checkAllName: 'layTransferLeftCheckAll'\r\n })\r\n ,'<div class=\"layui-transfer-active\">'\r\n ,'<button type=\"button\" class=\"layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled\" data-index=\"0\">'\r\n ,'<i class=\"layui-icon layui-icon-next\"></i>'\r\n ,'</button>'\r\n ,'<button type=\"button\" class=\"layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled\" data-index=\"1\">'\r\n ,'<i class=\"layui-icon layui-icon-prev\"></i>'\r\n ,'</button>'\r\n ,'</div>'\r\n ,TPL_BOX({\r\n index: 1\r\n ,checkAllName: 'layTransferRightCheckAll'\r\n })\r\n ,'</div>'].join('');\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++transfer.index;\r\n that.config = $.extend({}, that.config, transfer.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n title: ['列表一', '列表二'],\r\n width: 200,\r\n height: 360,\r\n data: [], // 数据源\r\n value: [], // 选中的数据\r\n showSearch: false, // 是否开启搜索\r\n id: '', // 唯一索引,默认自增 index\r\n text: {\r\n none: '无数据',\r\n searchNone: '无匹配数据'\r\n }\r\n };\r\n \r\n //重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.render();\r\n };\r\n\r\n //渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n //解析模板\r\n var thisElem = that.elem = $(laytpl(TPL_MAIN, {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n }).render({\r\n data: options\r\n ,index: that.index //索引\r\n }));\r\n \r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return;\r\n \r\n //初始化属性\r\n options.data = options.data || [];\r\n options.value = options.value || [];\r\n \r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n that.key = options.id;\r\n \r\n //插入组件结构\r\n othis.html(that.elem);\r\n \r\n //各级容器\r\n that.layBox = that.elem.find('.'+ ELEM_BOX)\r\n that.layHeader = that.elem.find('.'+ ELEM_HEADER)\r\n that.laySearch = that.elem.find('.'+ ELEM_SEARCH)\r\n that.layData = thisElem.find('.'+ ELEM_DATA);\r\n that.layBtn = thisElem.find('.'+ ELEM_ACTIVE + ' .layui-btn');\r\n \r\n //初始化尺寸\r\n that.layBox.css({\r\n width: options.width\r\n ,height: options.height\r\n });\r\n that.layData.css({\r\n height: function(){\r\n var height = options.height - that.layHeader.outerHeight();\r\n if(options.showSearch){\r\n height -= that.laySearch.outerHeight();\r\n }\r\n return height - 2;\r\n }()\r\n });\r\n \r\n that.renderData(); //渲染数据\r\n that.events(); //事件\r\n };\r\n \r\n // 渲染数据\r\n Class.prototype.renderData = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 左右穿梭框差异数据\r\n var arr = [{\r\n checkName: 'layTransferLeftCheck',\r\n views: []\r\n }, {\r\n checkName: 'layTransferRightCheck',\r\n views: []\r\n }];\r\n \r\n // 解析格式\r\n that.parseData(function(item){ \r\n // 标注为 selected 的为右边的数据\r\n var _index = item.selected ? 1 : 0\r\n var listElem = ['<li>',\r\n '<input type=\"checkbox\" name=\"'+ arr[_index].checkName +'\" lay-skin=\"primary\" lay-filter=\"layTransferCheckbox\" title=\"'+ item.title +'\"'+ (item.disabled ? ' disabled' : '') + (item.checked ? ' checked' : '') +' value=\"'+ item.value +'\">',\r\n '</li>'].join('');\r\n // 按照 options.value 顺序排列右侧数据\r\n if(_index){\r\n layui.each(options.value, function(i, v){\r\n if(v == item.value && item.selected){\r\n arr[_index].views[i] = listElem;\r\n }\r\n });\r\n } else {\r\n arr[_index].views.push(listElem);\r\n }\r\n delete item.selected;\r\n });\r\n \r\n that.layData.eq(0).html(arr[0].views.join(''));\r\n that.layData.eq(1).html(arr[1].views.join(''));\r\n \r\n that.renderCheckBtn();\r\n };\r\n \r\n //渲染表单\r\n Class.prototype.renderForm = function(type){\r\n form.render(type, 'LAY-transfer-'+ this.index);\r\n };\r\n \r\n //同步复选框和按钮状态\r\n Class.prototype.renderCheckBtn = function(obj){\r\n var that = this\r\n ,options = that.config;\r\n \r\n obj = obj || {};\r\n \r\n that.layBox.each(function(_index){\r\n var othis = $(this)\r\n ,thisDataElem = othis.find('.'+ ELEM_DATA)\r\n ,allElemCheckbox = othis.find('.'+ ELEM_HEADER).find('input[type=\"checkbox\"]')\r\n ,listElemCheckbox = thisDataElem.find('input[type=\"checkbox\"]');\r\n \r\n //同步复选框和按钮状态\r\n var nums = 0\r\n ,haveChecked = false;\r\n listElemCheckbox.each(function(){\r\n var isHide = $(this).data('hide');\r\n if(this.checked || this.disabled || isHide){\r\n nums++;\r\n }\r\n if(this.checked && !isHide){\r\n haveChecked = true;\r\n }\r\n });\r\n \r\n allElemCheckbox.prop('checked', haveChecked && nums === listElemCheckbox.length); //全选复选框状态\r\n that.layBtn.eq(_index)[haveChecked ? 'removeClass' : 'addClass'](DISABLED); //对应的按钮状态\r\n \r\n //无数据视图\r\n if(!obj.stopNone){\r\n var isNone = thisDataElem.children('li:not(.'+ HIDE +')').length\r\n that.noneView(thisDataElem, isNone ? '' : options.text.none);\r\n }\r\n });\r\n \r\n that.renderForm('checkbox');\r\n };\r\n \r\n //无数据视图\r\n Class.prototype.noneView = function(thisDataElem, text){\r\n var createNoneElem = $('<p class=\"layui-none\">'+ (text || '') +'</p>');\r\n if(thisDataElem.find('.'+ NONE)[0]){\r\n thisDataElem.find('.'+ NONE).remove();\r\n }\r\n text.replace(/\\s/g, '') && thisDataElem.append(createNoneElem);\r\n };\r\n \r\n //同步 value 属性值\r\n Class.prototype.setValue = function(){\r\n var that = this\r\n ,options = that.config\r\n ,arr = [];\r\n that.layBox.eq(1).find('.'+ ELEM_DATA +' input[type=\"checkbox\"]').each(function(){\r\n var isHide = $(this).data('hide');\r\n isHide || arr.push(this.value);\r\n });\r\n options.value = arr;\r\n \r\n return that;\r\n };\r\n\r\n //解析数据\r\n Class.prototype.parseData = function(callback){\r\n var that = this\r\n ,options = that.config\r\n ,newData = [];\r\n \r\n layui.each(options.data, function(index, item){\r\n //解析格式\r\n item = (typeof options.parseData === 'function' \r\n ? options.parseData(item) \r\n : item) || item;\r\n \r\n newData.push(item = $.extend({}, item))\r\n \r\n layui.each(options.value, function(index2, item2){\r\n if(item2 == item.value){\r\n item.selected = true;\r\n }\r\n });\r\n callback && callback(item);\r\n });\r\n \r\n options.data = newData;\r\n return that;\r\n };\r\n \r\n //获得右侧面板数据\r\n Class.prototype.getData = function(value){\r\n var that = this\r\n ,options = that.config\r\n ,selectedData = [];\r\n \r\n that.setValue();\r\n \r\n layui.each(value || options.value, function(index, item){\r\n layui.each(options.data, function(index2, item2){\r\n delete item2.selected;\r\n if(item == item2.value){\r\n selectedData.push(item2);\r\n };\r\n });\r\n });\r\n return selectedData;\r\n };\r\n\r\n //执行穿梭\r\n Class.prototype.transfer = function (_index, elem) {\r\n var that = this\r\n ,options = that.config\r\n ,thisBoxElem = that.layBox.eq(_index)\r\n ,arr = []\r\n\r\n if (!elem) {\r\n //通过按钮触发找到选中的进行移动\r\n thisBoxElem.each(function(_index){\r\n var othis = $(this)\r\n ,thisDataElem = othis.find('.'+ ELEM_DATA);\r\n\r\n thisDataElem.children('li').each(function(){\r\n var thisList = $(this)\r\n ,thisElemCheckbox = thisList.find('input[type=\"checkbox\"]')\r\n ,isHide = thisElemCheckbox.data('hide');\r\n\r\n if(thisElemCheckbox[0].checked && !isHide){\r\n thisElemCheckbox[0].checked = false;\r\n thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone());\r\n thisList.remove();\r\n\r\n //记录当前穿梭的数据\r\n arr.push(thisElemCheckbox[0].value);\r\n }\r\n\r\n that.setValue();\r\n });\r\n });\r\n } else {\r\n //双击单条记录移动\r\n var thisList = elem\r\n ,thisElemCheckbox = thisList.find('input[type=\"checkbox\"]')\r\n\r\n thisElemCheckbox[0].checked = false;\r\n thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone());\r\n thisList.remove();\r\n\r\n //记录当前穿梭的数据\r\n arr.push(thisElemCheckbox[0].value);\r\n\r\n that.setValue();\r\n }\r\n\r\n that.renderCheckBtn();\r\n\r\n //穿梭时,如果另外一个框正在搜索,则触发匹配\r\n var siblingInput = thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_SEARCH +' input')\r\n siblingInput.val() === '' || siblingInput.trigger('keyup');\r\n\r\n //穿梭时的回调\r\n options.onchange && options.onchange(that.getData(arr), _index);\r\n }\r\n\r\n //事件\r\n Class.prototype.events = function(){\r\n var that = this\r\n ,options = that.config;\r\n \r\n //左右复选框\r\n that.elem.on('click', 'input[lay-filter=\"layTransferCheckbox\"]+', function(){ \r\n var thisElemCheckbox = $(this).prev()\r\n ,checked = thisElemCheckbox[0].checked\r\n ,thisDataElem = thisElemCheckbox.parents('.'+ ELEM_BOX).eq(0).find('.'+ ELEM_DATA);\r\n \r\n if(thisElemCheckbox[0].disabled) return;\r\n \r\n //判断是否全选\r\n if(thisElemCheckbox.attr('lay-type') === 'all'){\r\n thisDataElem.find('input[type=\"checkbox\"]').each(function(){\r\n if(this.disabled) return;\r\n this.checked = checked;\r\n });\r\n }\r\n\r\n setTimeout(function () {\r\n that.renderCheckBtn({stopNone: true});\r\n }, 0)\r\n });\r\n\r\n // 双击穿梭\r\n that.elem.on('dblclick', '.' + ELEM_DATA + '>li', function(event){\r\n var elemThis = $(this)\r\n ,thisElemCheckbox = elemThis.children('input[type=\"checkbox\"]')\r\n ,thisDataElem = elemThis.parent()\r\n ,thisBoxElem = thisDataElem.parent()\r\n\r\n if(thisElemCheckbox[0].disabled) return;\r\n\r\n that.transfer(thisBoxElem.data('index'), elemThis);\r\n })\r\n\r\n // 穿梭按钮事件\r\n that.layBtn.on('click', function(){\r\n var othis = $(this)\r\n ,_index = othis.data('index')\r\n if(othis.hasClass(DISABLED)) return;\r\n\r\n that.transfer(_index);\r\n });\r\n \r\n //搜索\r\n that.laySearch.find('input').on('keyup', function(){\r\n var value = this.value;\r\n var thisDataElem = $(this).parents('.'+ ELEM_SEARCH).eq(0).siblings('.'+ ELEM_DATA);\r\n var thisListElem = thisDataElem.children('li');\r\n\r\n thisListElem.each(function(){\r\n var thisList = $(this);\r\n var thisElemCheckbox = thisList.find('input[type=\"checkbox\"]');\r\n var title = thisElemCheckbox[0].title;\r\n\r\n // 是否区分大小写\r\n if(options.showSearch !== 'cs'){\r\n title = title.toLowerCase();\r\n value = value.toLowerCase();\r\n }\r\n\r\n var isMatch = title.indexOf(value) !== -1;\r\n\r\n thisList[isMatch ? 'removeClass': 'addClass'](HIDE);\r\n thisElemCheckbox.data('hide', isMatch ? false : true);\r\n });\r\n\r\n that.renderCheckBtn();\r\n \r\n //无匹配数据视图\r\n var isNone = thisListElem.length === thisDataElem.children('li.'+ HIDE).length;\r\n that.noneView(thisDataElem, isNone ? options.text.searchNone : '');\r\n });\r\n };\r\n \r\n //记录所有实例\r\n thisModule.that = {}; //记录所有实例对象\r\n thisModule.config = {}; //记录所有实例配置项\r\n \r\n //重载实例\r\n transfer.reload = function(id, options){\r\n var that = thisModule.that[id];\r\n that.reload(options);\r\n \r\n return thisModule.call(that);\r\n };\r\n \r\n //获得选中的数据(右侧面板)\r\n transfer.getData = function(id){\r\n var that = thisModule.that[id];\r\n return that.getData();\r\n };\r\n\r\n //核心入口\r\n transfer.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, transfer);\r\n});\r\n","/**\r\n * carousel 轮播模块\r\n * MIT Licensed \r\n */\r\n \r\nlayui.define(['jquery', 'lay'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n\r\n // 外部接口\r\n var carousel = {\r\n config: {}, // 全局配置项\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n \r\n // 字符常量\r\n var MOD_NAME = 'carousel';\r\n var ELEM = '.layui-carousel';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled'\r\n \r\n var ELEM_ITEM = '>*[carousel-item]>*';\r\n var ELEM_LEFT = 'layui-carousel-left';\r\n var ELEM_RIGHT = 'layui-carousel-right';\r\n var ELEM_PREV = 'layui-carousel-prev';\r\n var ELEM_NEXT = 'layui-carousel-next';\r\n var ELEM_ARROW = 'layui-carousel-arrow';\r\n var ELEM_IND = 'layui-carousel-ind';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, carousel.config, options);\r\n that.render();\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n width: '600px',\r\n height: '280px',\r\n full: false, // 是否全屏\r\n arrow: 'hover', // 切换箭头默认显示状态hover/always/none\r\n indicator: 'inside', // 指示器位置inside/outside/none\r\n autoplay: true, // 是否自动切换\r\n interval: 3000, // 自动切换的时间间隔不能低于800ms\r\n anim: '', // 动画类型default/updown/fade\r\n trigger: 'click', // 指示器的触发方式click/hover\r\n index: 0 // 初始开始的索引\r\n };\r\n \r\n // 轮播渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n carousel.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n options.elem = $(options.elem);\r\n if(!options.elem[0]) return;\r\n that.elemItem = options.elem.find(ELEM_ITEM);\r\n \r\n if(options.index < 0) options.index = 0;\r\n if(options.index >= that.elemItem.length) options.index = that.elemItem.length - 1;\r\n if(options.interval < 800) options.interval = 800;\r\n\r\n // 是否全屏模式\r\n if(options.full){\r\n options.elem.css({\r\n position: 'fixed',\r\n width: '100%',\r\n height: '100%',\r\n zIndex: 9999\r\n });\r\n } else {\r\n options.elem.css({\r\n width: options.width,\r\n height: options.height\r\n });\r\n }\r\n \r\n options.elem.attr('lay-anim', options.anim);\r\n \r\n // 初始焦点状态\r\n that.elemItem.eq(options.index).addClass(THIS);\r\n\r\n // 指示器等动作\r\n if(that.elemItem.length <= 1) return;\r\n\r\n that.indicator();\r\n that.arrow();\r\n that.autoplay();\r\n that.events();\r\n };\r\n \r\n // 重置轮播\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n clearInterval(that.timer);\r\n that.config = $.extend({}, that.config, options);\r\n that.render();\r\n };\r\n \r\n // 获取上一个等待条目的索引\r\n Class.prototype.prevIndex = function(){\r\n var that = this;\r\n var options = that.config;\r\n var prevIndex = options.index - 1;\r\n\r\n if(prevIndex < 0){\r\n prevIndex = that.elemItem.length - 1;\r\n }\r\n\r\n return prevIndex;\r\n };\r\n \r\n // 获取下一个等待条目的索引\r\n Class.prototype.nextIndex = function(){\r\n var that = this;\r\n var options = that.config;\r\n var nextIndex = options.index + 1;\r\n\r\n if(nextIndex >= that.elemItem.length){\r\n nextIndex = 0;\r\n }\r\n\r\n return nextIndex;\r\n };\r\n \r\n // 索引递增\r\n Class.prototype.addIndex = function(num){\r\n var that = this;\r\n var options = that.config;\r\n \r\n num = num || 1;\r\n options.index = options.index + num;\r\n \r\n // index 不能超过轮播总数量\r\n if(options.index >= that.elemItem.length){\r\n options.index = 0;\r\n }\r\n };\r\n \r\n // 索引递减\r\n Class.prototype.subIndex = function(num){\r\n var that = this;\r\n var options = that.config;\r\n \r\n num = num || 1;\r\n options.index = options.index - num;\r\n \r\n // index 不能超过轮播总数量\r\n if(options.index < 0){\r\n options.index = that.elemItem.length - 1;\r\n }\r\n };\r\n \r\n // 自动轮播\r\n Class.prototype.autoplay = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n if(!options.autoplay) return;\r\n clearInterval(that.timer);\r\n \r\n that.timer = setInterval(function(){\r\n that.slide();\r\n }, options.interval);\r\n };\r\n \r\n // 箭头\r\n Class.prototype.arrow = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 模板\r\n var tplArrow = $([\r\n '<button class=\"layui-icon '+ ELEM_ARROW +'\" lay-type=\"sub\">'+ (options.anim === 'updown' ? '&#xe619;' : '&#xe603;') +'</button>',\r\n '<button class=\"layui-icon '+ ELEM_ARROW +'\" lay-type=\"add\">'+ (options.anim === 'updown' ? '&#xe61a;' : '&#xe602;') +'</button>'\r\n ].join(''));\r\n \r\n // 预设基础属性\r\n options.elem.attr('lay-arrow', options.arrow);\r\n \r\n // 避免重复插入\r\n if(options.elem.find('.'+ELEM_ARROW)[0]){\r\n options.elem.find('.'+ELEM_ARROW).remove();\r\n }\r\n options.elem.append(tplArrow);\r\n \r\n // 事件\r\n tplArrow.on('click', function(){\r\n var othis = $(this);\r\n var type = othis.attr('lay-type')\r\n that.slide(type);\r\n });\r\n };\r\n\r\n // 跳转到特定下标\r\n Class.prototype.goto = function(index){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(index > options.index){\r\n that.slide('add', index - options.index);\r\n } else if(index < options.index){\r\n that.slide('sub', options.index - index);\r\n }\r\n }\r\n \r\n // 指示器\r\n Class.prototype.indicator = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 模板\r\n var tplInd = that.elemInd = $(['<div class=\"'+ ELEM_IND +'\"><ul>',\r\n function(){\r\n var li = [];\r\n layui.each(that.elemItem, function(index){\r\n li.push('<li'+ (options.index === index ? ' class=\"layui-this\"' : '') +'></li>');\r\n });\r\n return li.join('');\r\n }(),\r\n '</ul></div>'].join(''));\r\n \r\n // 预设基础属性\r\n options.elem.attr('lay-indicator', options.indicator);\r\n \r\n // 避免重复插入\r\n if(options.elem.find('.'+ELEM_IND)[0]){\r\n options.elem.find('.'+ELEM_IND).remove();\r\n }\r\n options.elem.append(tplInd);\r\n \r\n if(options.anim === 'updown'){\r\n tplInd.css('margin-top', -(tplInd.height()/2));\r\n }\r\n \r\n // 事件\r\n tplInd.find('li').on(options.trigger === 'hover' ? 'mouseover' : options.trigger, function(){\r\n that.goto($(this).index());\r\n });\r\n };\r\n \r\n // 滑动切换\r\n Class.prototype.slide = function(type, num){\r\n var that = this;\r\n var elemItem = that.elemItem;\r\n var options = that.config;\r\n var thisIndex = options.index;\r\n var filter = options.elem.attr('lay-filter');\r\n \r\n if(that.haveSlide) return;\r\n \r\n // 滑动方向\r\n if(type === 'sub'){\r\n that.subIndex(num);\r\n elemItem.eq(options.index).addClass(ELEM_PREV);\r\n setTimeout(function(){\r\n elemItem.eq(thisIndex).addClass(ELEM_RIGHT);\r\n elemItem.eq(options.index).addClass(ELEM_RIGHT);\r\n }, 50);\r\n } else { // 默认递增滑\r\n that.addIndex(num);\r\n elemItem.eq(options.index).addClass(ELEM_NEXT);\r\n setTimeout(function(){\r\n elemItem.eq(thisIndex).addClass(ELEM_LEFT);\r\n elemItem.eq(options.index).addClass(ELEM_LEFT);\r\n }, 50); \r\n }\r\n \r\n // 移除过渡类\r\n setTimeout(function(){\r\n elemItem.removeClass(THIS + ' ' + ELEM_PREV + ' ' + ELEM_NEXT + ' ' + ELEM_LEFT + ' ' + ELEM_RIGHT);\r\n elemItem.eq(options.index).addClass(THIS);\r\n that.haveSlide = false; // 解锁\r\n }, 350);\r\n \r\n // 指示器焦点\r\n that.elemInd.find('li').eq(options.index).addClass(THIS)\r\n .siblings().removeClass(THIS);\r\n \r\n that.haveSlide = true;\r\n \r\n // 回调返回的参数\r\n var params = {\r\n index: options.index,\r\n prevIndex: thisIndex,\r\n item: elemItem.eq(options.index)\r\n };\r\n \r\n typeof options.change === 'function' && options.change(params);\r\n layui.event.call(this, MOD_NAME, 'change('+ filter +')', params);\r\n };\r\n \r\n // 事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n if(options.elem.data('haveEvents')) return;\r\n \r\n // 移入移出容器\r\n options.elem.on('mouseenter', function(){\r\n if (that.config.autoplay === 'always') return;\r\n clearInterval(that.timer);\r\n }).on('mouseleave', function(){\r\n if (that.config.autoplay === 'always') return;\r\n that.autoplay();\r\n });\r\n \r\n options.elem.data('haveEvents', true);\r\n };\r\n \r\n // 核心入口\r\n carousel.render = function(options){\r\n return new Class(options);\r\n };\r\n \r\n exports(MOD_NAME, carousel);\r\n});\r\n\r\n \r\n","/**\r\n * rate 评分评星组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'],function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.jquery;\r\n var lay = layui.lay;\r\n\r\n // 外部接口\r\n var rate = {\r\n config: {},\r\n index: layui.rate ? (layui.rate.index + 10000) : 0,\r\n\r\n //设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n\r\n //事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n }\r\n\r\n // 操作当前实例\r\n var thisRate = function () {\r\n var that = this;\r\n var options = that.config;\r\n\r\n return {\r\n setvalue: function (value) {\r\n that.setvalue.call(that, value);\r\n },\r\n config: options\r\n }\r\n };\r\n\r\n //字符常量\r\n var MOD_NAME = 'rate';\r\n var ELEM_VIEW = 'layui-rate';\r\n var ICON_RATE = 'layui-icon-rate';\r\n var ICON_RATE_SOLID = 'layui-icon-rate-solid';\r\n var ICON_RATE_HALF = 'layui-icon-rate-half';\r\n var ICON_SOLID_HALF = 'layui-icon-rate-solid layui-icon-rate-half';\r\n var ICON_SOLID_RATE = 'layui-icon-rate-solid layui-icon-rate';\r\n var ICON_HALF_RATE = 'layui-icon-rate layui-icon-rate-half';\r\n\r\n //构造器\r\n var Class = function (options) {\r\n var that = this;\r\n that.index = ++rate.index;\r\n that.config = $.extend({}, that.config, rate.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n length: 5, //初始长度\r\n text: false, //是否显示评分等级\r\n readonly: false, //是否只读\r\n half: false, //是否可以半星\r\n value: 0, //星星选中个数\r\n theme: '' //主题颜色\r\n };\r\n\r\n //评分渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n rate.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n // 自定义主题\r\n var style = options.theme ? ('style=\"color: '+ options.theme + ';\"') : '';\r\n\r\n options.elem = $(options.elem);\r\n\r\n //最大值不能大于总长度\r\n if(options.value > options.length){\r\n options.value = options.length;\r\n }\r\n\r\n //如果没有选择半星的属性,却给了小数的数值,统一向上或向下取整\r\n if(parseInt(options.value) !== options.value){\r\n if(!options.half){\r\n options.value = (Math.ceil(options.value) - options.value) < 0.5 ? Math.ceil(options.value): Math.floor(options.value)\r\n }\r\n }\r\n\r\n //组件模板\r\n var temp = '<ul class=\"layui-rate\" '+ (options.readonly ? 'readonly' : '') +'>';\r\n for(var i = 1;i <= options.length;i++){\r\n var item = '<li class=\"layui-inline\"><i class=\"layui-icon '\r\n + (i>Math.floor(options.value)?ICON_RATE:ICON_RATE_SOLID)\r\n + '\" '+ style +'></i></li>';\r\n\r\n if(options.half&&parseInt(options.value) !== options.value&&i == Math.ceil(options.value)){\r\n temp = temp + '<li><i class=\"layui-icon layui-icon-rate-half\" '+ style +'></i></li>';\r\n }else{\r\n temp = temp +item;\r\n }\r\n }\r\n temp += '</ul>' + (options.text ? ('<span class=\"layui-inline\">'+ options.value + '星') : '') + '</span>';\r\n\r\n //开始插入替代元素\r\n var othis = options.elem;\r\n var hasRender = othis.next('.' + ELEM_VIEW);\r\n\r\n //生成替代元素\r\n hasRender[0] && hasRender.remove(); //如果已经渲染则Rerender\r\n\r\n that.elemTemp = $(temp);\r\n\r\n options.span = that.elemTemp.next('span');\r\n\r\n options.setText && options.setText(options.value);\r\n\r\n othis.html(that.elemTemp);\r\n\r\n othis.addClass(\"layui-inline\");\r\n\r\n //如果不是只读,那么进行触控事件\r\n if(!options.readonly) that.action();\r\n\r\n };\r\n\r\n //评分重置\r\n Class.prototype.setvalue = function(value){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.value = value ;\r\n that.render();\r\n };\r\n\r\n //li触控事件\r\n Class.prototype.action = function(){\r\n var that = this;\r\n var options = that.config;\r\n var _ul = that.elemTemp;\r\n var wide = _ul.find(\"i\").width();\r\n\r\n _ul.children(\"li\").each(function(index){\r\n var ind = index + 1;\r\n var othis = $(this);\r\n\r\n //点击\r\n othis.on('click', function(e){\r\n //将当前点击li的索引值赋给value\r\n options.value = ind;\r\n if(options.half){\r\n //获取鼠标在li上的位置\r\n var x = e.pageX - $(this).offset().left;\r\n if(x <= wide / 2){\r\n options.value = options.value - 0.5;\r\n }\r\n }\r\n\r\n if(options.text) _ul.next(\"span\").text(options.value + \"星\");\r\n\r\n options.choose && options.choose(options.value);\r\n options.setText && options.setText(options.value);\r\n });\r\n\r\n //移入\r\n othis.on('mousemove', function(e){\r\n _ul.find(\"i\").each(function(){\r\n $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF)\r\n });\r\n _ul.find(\"i:lt(\" + ind + \")\").each(function(){\r\n $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE)\r\n });\r\n // 如果设置可选半星那么判断鼠标相对li的位置\r\n if(options.half){\r\n var x = e.pageX - $(this).offset().left;\r\n if(x <= wide / 2){\r\n othis.children(\"i\").addClass(ICON_RATE_HALF).removeClass(ICON_RATE_SOLID)\r\n }\r\n }\r\n })\r\n\r\n //移出\r\n othis.on('mouseleave', function(){\r\n _ul.find(\"i\").each(function(){\r\n $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF)\r\n });\r\n _ul.find(\"i:lt(\" + Math.floor(options.value) + \")\").each(function(){\r\n $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE)\r\n });\r\n //如果设置可选半星,根据分数判断是否有半星\r\n if(options.half){\r\n if(parseInt(options.value) !== options.value){\r\n _ul.children(\"li:eq(\" + Math.floor(options.value) + \")\").children(\"i\").addClass(ICON_RATE_HALF).removeClass(ICON_SOLID_RATE)\r\n }\r\n }\r\n })\r\n\r\n })\r\n };\r\n\r\n //事件处理\r\n Class.prototype.events = function () {\r\n var that = this;\r\n //var options = that.config;\r\n };\r\n\r\n //核心入口\r\n rate.render = function(options){\r\n var inst = new Class(options);\r\n return thisRate.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, rate);\r\n})\r\n","/**\r\n * flow 流加载组件\r\n */\r\n\r\n\r\nlayui.define('jquery', function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$, Flow = function(options){}\r\n ,ELEM_MORE = 'layui-flow-more'\r\n ,ELEM_LOAD = '<i class=\"layui-anim layui-anim-rotate layui-anim-loop layui-icon \">&#xe63e;</i>';\r\n\r\n //主方法\r\n Flow.prototype.load = function(options){\r\n var that = this, page = 0, lock, isOver, lazyimg, timer;\r\n options = options || {};\r\n\r\n var elem = $(options.elem); if(!elem[0]) return;\r\n var scrollElem = $(options.scrollElem || document); //滚动条所在元素\r\n var mb = options.mb || 50; //与底部的临界距离\r\n var isAuto = 'isAuto' in options ? options.isAuto : true; //是否自动滚动加载\r\n var end = options.end || '没有更多了'; //“末页”显示文案\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //加载更多\r\n var ELEM_TEXT = '<cite>加载更多</cite>'\r\n ,more = $('<div class=\"layui-flow-more\"><a href=\"javascript:;\">'+ ELEM_TEXT +'</a></div>');\r\n\r\n if(!elem.find('.layui-flow-more')[0]){\r\n elem.append(more);\r\n }\r\n\r\n //加载下一个元素\r\n var next = function(html, over){\r\n html = $(html);\r\n more.before(html);\r\n over = over == 0 ? true : null;\r\n over ? more.html(end) : more.find('a').html(ELEM_TEXT);\r\n isOver = over;\r\n lock = null;\r\n lazyimg && lazyimg();\r\n };\r\n\r\n //触发请求\r\n var done = function(){\r\n lock = true;\r\n more.find('a').html(ELEM_LOAD);\r\n typeof options.done === 'function' && options.done(++page, next);\r\n };\r\n\r\n done();\r\n\r\n //不自动滚动加载\r\n more.find('a').on('click', function(){\r\n var othis = $(this);\r\n if(isOver) return;\r\n lock || done();\r\n });\r\n\r\n //如果允许图片懒加载\r\n if(options.isLazyimg){\r\n lazyimg = that.lazyimg({\r\n elem: options.elem + ' img'\r\n ,scrollElem: options.scrollElem\r\n });\r\n }\r\n\r\n if(!isAuto) return that;\r\n\r\n scrollElem.on('scroll', function(){\r\n var othis = $(this), top = othis.scrollTop();\r\n\r\n if(timer) clearTimeout(timer);\r\n if(isOver || !elem.width()) return; //如果已经结束,或者元素处于隐藏状态,则不执行滚动加载\r\n\r\n timer = setTimeout(function(){\r\n //计算滚动所在容器的可视高度\r\n var height = notDocument ? othis.height() : $(window).height();\r\n\r\n //计算滚动所在容器的实际高度\r\n var scrollHeight = notDocument\r\n ? othis.prop('scrollHeight')\r\n : document.documentElement.scrollHeight;\r\n\r\n //临界点\r\n if(scrollHeight - top - height <= mb){\r\n lock || done();\r\n }\r\n }, 100);\r\n });\r\n\r\n return that;\r\n };\r\n\r\n //图片懒加载\r\n Flow.prototype.lazyimg = function(options){\r\n var that = this, index = 0, haveScroll;\r\n options = options || {};\r\n\r\n var scrollElem = $(options.scrollElem || document); //滚动条所在元素\r\n var elem = options.elem || 'img';\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //显示图片\r\n var show = function(item, height){\r\n var start = scrollElem.scrollTop(), end = start + height;\r\n var elemTop = notDocument ? function(){\r\n return item.offset().top - scrollElem.offset().top + start;\r\n }() : item.offset().top;\r\n\r\n /* 始终只加载在当前屏范围内的图片 */\r\n if(elemTop >= start && elemTop <= end){\r\n if(item.attr('lay-src')){\r\n var src = item.attr('lay-src');\r\n layui.img(src, function(){\r\n var next = that.lazyimg.elem.eq(index);\r\n item.attr('src', src).removeAttr('lay-src');\r\n\r\n /* 当前图片加载就绪后,检测下一个图片是否在当前屏 */\r\n next[0] && render(next);\r\n index++;\r\n }, function(){\r\n var next = that.lazyimg.elem.eq(index);\r\n item.removeAttr('lay-src');\r\n });\r\n }\r\n }\r\n }, render = function(othis, scroll){\r\n\r\n //计算滚动所在容器的可视高度\r\n var height = notDocument ? (scroll||scrollElem).height() : $(window).height();\r\n var start = scrollElem.scrollTop(), end = start + height;\r\n\r\n that.lazyimg.elem = $(elem);\r\n\r\n if(othis){\r\n show(othis, height);\r\n } else {\r\n //计算未加载过的图片\r\n for(var i = 0; i < that.lazyimg.elem.length; i++){\r\n var item = that.lazyimg.elem.eq(i), elemTop = notDocument ? function(){\r\n return item.offset().top - scrollElem.offset().top + start;\r\n }() : item.offset().top;\r\n\r\n show(item, height);\r\n index = i;\r\n\r\n //如果图片的top坐标超出了当前屏则终止后续图片的遍历\r\n if(elemTop > end) break;\r\n }\r\n }\r\n };\r\n\r\n render();\r\n\r\n if(!haveScroll){\r\n var timer;\r\n scrollElem.on('scroll', function(){\r\n var othis = $(this);\r\n if(timer) clearTimeout(timer)\r\n timer = setTimeout(function(){\r\n render(null, othis);\r\n }, 50);\r\n });\r\n haveScroll = true;\r\n }\r\n return render;\r\n };\r\n\r\n //暴露接口\r\n exports('flow', new Flow());\r\n});\r\n","/**\r\n * code\r\n * Code 预览组件\r\n */\r\n\r\nlayui.define(['lay', 'util', 'element', 'form'], function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var util = layui.util;\r\n var element = layui.element;\r\n var form = layui.form;\r\n var layer = layui.layer;\r\n var hint = layui.hint();\r\n\r\n // 常量\r\n var CONST = {\r\n ELEM_VIEW: 'layui-code-view',\r\n ELEM_TAB: 'layui-tab',\r\n ELEM_HEADER: 'layui-code-header',\r\n ELEM_FULL: 'layui-code-full',\r\n ELEM_PREVIEW: 'layui-code-preview',\r\n ELEM_ITEM: 'layui-code-item',\r\n ELEM_SHOW: 'layui-show',\r\n ELEM_LINE: 'layui-code-line',\r\n ELEM_LINE_NUM: 'layui-code-line-number',\r\n ELEM_LN_MODE: 'layui-code-ln-mode',\r\n CDDE_DATA_CLASS: 'LayuiCodeDataClass',\r\n LINE_RAW_WIDTH: 45, // 行号初始宽度,需与 css 保持一致\r\n };\r\n\r\n // 默认参数项\r\n var config = {\r\n elem: '', // 元素选择器\r\n about: '', // 代码栏右上角信息\r\n ln: true, // 代码区域是否显示行号\r\n header: false, // 是否显示代码栏头部区域\r\n encode: true, // 是否对 code 进行编码(若开启预览,则强制开启)\r\n copy: true, // 是否开启代码区域复制功能图标\r\n // 默认文本\r\n text: {\r\n code: util.escape('</>'),\r\n preview: 'Preview',\r\n },\r\n wordWrap: true, // 是否自动换行\r\n lang: 'text', // 指定语言类型\r\n highlighter: false, // 是否开启语法高亮,'hljs','prism','shiki'\r\n langMarker: false, // 代码区域是否显示语言类型标记\r\n };\r\n\r\n // 初始索引\r\n var codeIndex = layui.code ? (layui.code.index + 10000) : 0;\r\n\r\n // 去除尾部空格\r\n var trimEnd = function(str){\r\n return String(str).replace(/\\s+$/, '');\r\n }\r\n // 保留首行缩进\r\n var trim = function(str){\r\n return trimEnd(str).replace(/^\\n|\\n$/, '');\r\n };\r\n\r\n // export api\r\n exports('code', function(options, mode){\r\n options = $.extend(true, {}, config, options);\r\n\r\n // 返回对象\r\n var ret = {\r\n config: options,\r\n reload: function(opts) { // 重载\r\n layui.code(this.updateOptions(opts));\r\n },\r\n updateOptions: function(opts) { // 更新属性(选项)\r\n opts = opts || {};\r\n delete opts.elem;\r\n return $.extend(true, options, opts);\r\n },\r\n reloadCode: function(opts) { // 仅重载 code\r\n layui.code(this.updateOptions(opts), 'reloadCode');\r\n }\r\n };\r\n\r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n // 是否正向渲染\r\n layui.each(options.obverse ? elem : elem.get().reverse(), function(){\r\n layui.code($.extend({}, options, {\r\n elem: this\r\n }), mode);\r\n });\r\n return ret;\r\n }\r\n\r\n // 目标元素是否存在\r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return ret;\r\n\r\n // 合并属性上的参数,并兼容旧版本属性写法 lay-*\r\n $.extend(true, options, lay.options(othis[0]), function(obj){\r\n var attrs = ['title', 'height', 'encode', 'skin', 'about'];\r\n layui.each(attrs, function(i, attr){\r\n var value = othis.attr('lay-'+ attr);\r\n if(typeof value === 'string'){\r\n obj[attr] = value;\r\n }\r\n })\r\n return obj;\r\n }({}));\r\n\r\n // codeRender 需要关闭编码\r\n // 未使用 codeRender 时若开启了预览,则强制开启编码\r\n options.encode = (options.encode || options.preview) && !options.codeRender;\r\n\r\n // 获得初始 code\r\n options.code = options.code || function(){\r\n var arr = [];\r\n var textarea = othis.children('textarea');\r\n\r\n // 若内容放置在 textarea 中\r\n textarea.each(function(){\r\n arr.push(trim(this.value));\r\n });\r\n\r\n // 内容直接放置在元素外层\r\n if(arr.length === 0){\r\n arr.push(trim(othis.html()));\r\n }\r\n\r\n return arr.join('');\r\n }();\r\n\r\n // 创建 code 行结构\r\n var createCode = function(html) {\r\n // codeRender\r\n if(typeof options.codeRender === 'function') {\r\n html = options.codeRender(String(html), options);\r\n }\r\n\r\n // code 行\r\n var lines = String(html).split(/\\r?\\n/g);\r\n\r\n // 包裹 code 行结构\r\n html = $.map(lines, function(line, num) {\r\n return [\r\n '<div class=\"'+ CONST.ELEM_LINE +'\">',\r\n (\r\n options.ln ? [\r\n '<div class=\"'+ CONST.ELEM_LINE_NUM +'\">',\r\n (util.digit(num + 1) + '.'),\r\n '</div>',\r\n ].join('') : ''\r\n ),\r\n '<div class=\"layui-code-line-content\">',\r\n (line || ' '),\r\n '</div>',\r\n '</div>'\r\n ].join('');\r\n });\r\n\r\n return {\r\n lines: lines,\r\n html: html\r\n };\r\n };\r\n\r\n // 原始 code\r\n var rawCode = options.code;\r\n\r\n // 最终 code\r\n var finalCode = function(code) {\r\n return typeof options.codeParse === 'function' ?\r\n options.codeParse(code, options) :\r\n code;\r\n };\r\n\r\n // 仅重载 code\r\n if (mode === 'reloadCode') {\r\n return othis.children('.layui-code-wrap').html(\r\n createCode(finalCode(rawCode)).html\r\n ), ret;\r\n }\r\n\r\n // 自增索引\r\n var index = layui.code.index = ++codeIndex;\r\n othis.attr('lay-code-index', index);\r\n\r\n // 初始化 className\r\n var hasDataClass = CONST.CDDE_DATA_CLASS in othis.data();\r\n if (hasDataClass) {\r\n othis.attr('class', othis.data(CONST.CDDE_DATA_CLASS) || '');\r\n }\r\n\r\n // 记录初始 className\r\n if (!hasDataClass) {\r\n othis.data(CONST.CDDE_DATA_CLASS, othis.attr('class'));\r\n }\r\n\r\n // 工具栏\r\n var tools = {\r\n copy: {\r\n className: 'file-b',\r\n title: ['复制代码'],\r\n event: function(obj){\r\n var code = util.unescape(finalCode(options.code));\r\n\r\n // 写入剪切板\r\n lay.clipboard.writeText({\r\n text: code,\r\n done: function() {\r\n layer.msg('已复制', {icon: 1});\r\n },\r\n error: function() {\r\n layer.msg('复制失败', {icon: 2});\r\n }\r\n });\r\n\r\n typeof options.onCopy === 'function' && options.onCopy(code);\r\n }\r\n }\r\n };\r\n\r\n // 移除包裹结构\r\n var unwrap = (function fn() {\r\n var elemViewHas = othis.parent('.' + CONST.ELEM_PREVIEW);\r\n var elemTabHas = elemViewHas.children('.'+ CONST.ELEM_TAB);\r\n var elemPreviewViewHas = elemViewHas.children('.' + CONST.ELEM_ITEM +'-preview');\r\n\r\n // 移除旧结构\r\n elemTabHas.remove(); // 移除 tab\r\n elemPreviewViewHas.remove(); // 移除预览区域\r\n if (elemViewHas[0]) othis.unwrap(); // 移除外层容器\r\n\r\n return fn;\r\n })();\r\n\r\n // 是否开启预览\r\n if(options.preview){\r\n var FILTER_VALUE = 'LAY-CODE-DF-'+ index;\r\n var layout = options.layout || ['code', 'preview'];\r\n var isIframePreview = options.preview === 'iframe';\r\n\r\n // 追加 Tab 组件\r\n var elemView = $('<div class=\"'+ CONST.ELEM_PREVIEW +'\">');\r\n var elemTabView = $('<div class=\"layui-tab layui-tab-brief\">');\r\n var elemHeaderView = $('<div class=\"layui-tab-title\">');\r\n var elemPreviewView = $('<div class=\"'+ [\r\n CONST.ELEM_ITEM,\r\n CONST.ELEM_ITEM +'-preview',\r\n 'layui-border'\r\n ].join(' ') +'\">');\r\n var elemToolbar = $('<div class=\"layui-code-tools\"></div>');\r\n\r\n\r\n if(options.id) elemView.attr('id', options.id);\r\n elemView.addClass(options.className);\r\n elemTabView.attr('lay-filter', FILTER_VALUE);\r\n\r\n // 标签头\r\n layui.each(layout, function(i, v){\r\n var li = $('<li lay-id=\"'+ v +'\">');\r\n if(i === 0) li.addClass('layui-this');\r\n li.html(options.text[v]);\r\n elemHeaderView.append(li);\r\n });\r\n\r\n // 工具栏\r\n $.extend(tools, {\r\n 'full': {\r\n className: 'screen-full',\r\n title: ['最大化显示', '还原显示'],\r\n event: function(obj){\r\n var el = obj.elem;\r\n var elemView = el.closest('.'+ CONST.ELEM_PREVIEW);\r\n var classNameFull = 'layui-icon-'+ this.className;\r\n var classNameRestore = 'layui-icon-screen-restore';\r\n var title = this.title;\r\n var htmlElem = $('html,body');\r\n var ELEM_SCROLLBAR_HIDE = 'layui-scrollbar-hide';\r\n\r\n if(el.hasClass(classNameFull)){\r\n elemView.addClass(CONST.ELEM_FULL);\r\n el.removeClass(classNameFull).addClass(classNameRestore);\r\n el.attr('title', title[1]);\r\n htmlElem.addClass(ELEM_SCROLLBAR_HIDE);\r\n } else {\r\n elemView.removeClass(CONST.ELEM_FULL);\r\n el.removeClass(classNameRestore).addClass(classNameFull);\r\n el.attr('title', title[0]);\r\n htmlElem.removeClass(ELEM_SCROLLBAR_HIDE);\r\n }\r\n }\r\n },\r\n 'window': {\r\n className: 'release',\r\n title: ['在新窗口预览'],\r\n event: function(obj){\r\n util.openWin({\r\n content: finalCode(options.code)\r\n });\r\n }\r\n }\r\n });\r\n\r\n // copy\r\n if(options.copy){\r\n if(layui.type(options.tools) === 'array'){\r\n // 若 copy 未存在于 tools 中,则追加到最前\r\n if(options.tools.indexOf('copy') === -1){\r\n options.tools.unshift('copy');\r\n }\r\n } else {\r\n options.tools = ['copy'];\r\n }\r\n }\r\n\r\n // 工具栏事件\r\n elemToolbar.on('click', '>i', function(){\r\n var oi = $(this);\r\n var type = oi.data('type');\r\n var parameters = {\r\n elem: oi,\r\n type: type,\r\n options: options, // 当前属性选项\r\n rawCode: options.code, // 原始 code\r\n finalCode: util.unescape(finalCode(options.code)) // 最终 code\r\n };\r\n\r\n // 内部 tools event\r\n tools[type] && typeof tools[type].event === 'function' && tools[type].event(parameters);\r\n\r\n // 外部 tools event\r\n typeof options.toolsEvent === 'function' && options.toolsEvent(parameters);\r\n });\r\n\r\n // 增加工具栏\r\n if (options.addTools && options.tools) {\r\n options.tools = [].concat(options.tools, options.addTools);\r\n }\r\n\r\n // 渲染工具栏\r\n layui.each(options.tools, function(i, v){\r\n var viso = typeof v === 'object'; // 若为 object 值,则可自定义更多属性\r\n var tool = viso ? v : (\r\n tools[v] || {\r\n className: v,\r\n title: [v]\r\n }\r\n );\r\n\r\n var className = tool.className || tool.type;\r\n var title = tool.title || [''];\r\n var type = viso ? ( tool.type || className ) : v;\r\n\r\n if (!type) return;\r\n\r\n // 若非内置 tool则合并到 tools 中\r\n if (!tools[type]) {\r\n var obj = {};\r\n obj[type] = tool;\r\n $.extend(tools, obj);\r\n }\r\n\r\n elemToolbar.append(\r\n '<i class=\"layui-icon layui-icon-'+ className +'\" data-type=\"'+ type +'\" title=\"'+ title[0] +'\"></i>'\r\n );\r\n });\r\n\r\n othis.addClass(CONST.ELEM_ITEM).wrap(elemView); // 包裹外层容器\r\n elemTabView.append(elemHeaderView); // 追加标签头\r\n options.tools && elemTabView.append(elemToolbar); // 追加工具栏\r\n othis.before(elemTabView); // 追加标签结构\r\n\r\n // 追加预览\r\n if(isIframePreview){\r\n elemPreviewView.html('<iframe allowtransparency=\"true\" frameborder=\"0\"></iframe>');\r\n }\r\n\r\n // 执行预览\r\n var runPreview = function(thisItemBody){\r\n var iframe = thisItemBody.children('iframe')[0];\r\n\r\n // 是否 iframe 方式预览\r\n if(isIframePreview && iframe){\r\n iframe.srcdoc = finalCode(options.code);\r\n } else {\r\n thisItemBody.html(options.code);\r\n }\r\n\r\n // 当前实例预览完毕后的回调\r\n setTimeout(function(){\r\n typeof options.done === 'function' && options.done({\r\n container: thisItemBody,\r\n options: options,\r\n render: function(){\r\n form.render(thisItemBody.find('.layui-form'));\r\n element.render();\r\n }\r\n });\r\n },3);\r\n };\r\n\r\n if(layout[0] === 'preview'){\r\n elemPreviewView.addClass(CONST.ELEM_SHOW);\r\n othis.before(elemPreviewView);\r\n runPreview(elemPreviewView);\r\n } else {\r\n othis.addClass(CONST.ELEM_SHOW).after(elemPreviewView);\r\n }\r\n\r\n // 内容项初始化样式\r\n options.previewStyle = [options.style, options.previewStyle].join('');\r\n elemPreviewView.attr('style', options.previewStyle);\r\n\r\n // tab change\r\n element.on('tab('+ FILTER_VALUE +')', function(data){\r\n var $this = $(this);\r\n var thisElem = $(data.elem).closest('.'+ CONST.ELEM_PREVIEW);\r\n var elemItemBody = thisElem.find('.'+ CONST.ELEM_ITEM);\r\n var thisItemBody = elemItemBody.eq(data.index);\r\n\r\n elemItemBody.removeClass(CONST.ELEM_SHOW);\r\n thisItemBody.addClass(CONST.ELEM_SHOW);\r\n\r\n if($this.attr('lay-id') === 'preview'){\r\n runPreview(thisItemBody);\r\n }\r\n\r\n setCodeLayout();\r\n });\r\n }\r\n\r\n // 创建 code 容器\r\n var codeElem = $('<code class=\"layui-code-wrap\"></code>'); // 此处的闭合标签是为了兼容 IE8\r\n\r\n // 添加主容器 className\r\n othis.addClass(function(arr) {\r\n if (!options.wordWrap) arr.push('layui-code-nowrap');\r\n return arr.join(' ')\r\n }(['layui-code-view layui-border-box']));\r\n\r\n // code 主题风格\r\n var theme = options.theme || options.skin;\r\n if (theme) {\r\n othis.removeClass('layui-code-theme-dark layui-code-theme-light');\r\n othis.addClass('layui-code-theme-'+ theme);\r\n }\r\n\r\n // 添加高亮必要的 className\r\n if (options.highlighter) {\r\n othis.addClass([\r\n options.highlighter,\r\n 'language-' + options.lang,\r\n 'layui-code-hl'\r\n ].join(' '));\r\n }\r\n\r\n // 获取 code 行结构\r\n var createCodeRst = createCode(\r\n options.encode ? util.escape(finalCode(rawCode)) : rawCode // 是否编码\r\n );\r\n var lines = createCodeRst.lines;\r\n\r\n // 插入 code\r\n othis.html(codeElem.html(createCodeRst.html));\r\n\r\n // 插入行号边栏\r\n if (options.ln) {\r\n othis.append('<div class=\"layui-code-ln-side\"></div>');\r\n }\r\n\r\n // 兼容旧版本 height 属性\r\n if (options.height) {\r\n codeElem.css('max-height', options.height);\r\n }\r\n\r\n // code 区域样式\r\n options.codeStyle = [options.style, options.codeStyle].join('');\r\n if (options.codeStyle) {\r\n codeElem.attr('style', function(i, val) {\r\n return (val || '') + options.codeStyle;\r\n });\r\n }\r\n\r\n // 动态设置样式\r\n var cssRules = [\r\n {\r\n selector: '>.layui-code-wrap>.layui-code-line{}',\r\n setValue: function(item, value) {\r\n item.style['padding-left'] = value + 'px';\r\n }\r\n },\r\n {\r\n selector: '>.layui-code-wrap>.layui-code-line>.layui-code-line-number{}',\r\n setValue: function(item, value) {\r\n item.style.width = value + 'px';\r\n }\r\n },\r\n {\r\n selector: '>.layui-code-ln-side{}',\r\n setValue: function(item, value) {\r\n item.style.width = value + 'px';\r\n }\r\n }\r\n ];\r\n\r\n // 生成初始 style 元素\r\n var styleElem = lay.style({\r\n target: othis[0],\r\n id: 'DF-code-'+ index,\r\n text: $.map($.map(cssRules, function(val){\r\n return val.selector;\r\n }), function(val, i) {\r\n return ['.layui-code-view[lay-code-index=\"'+ index + '\"]', val].join(' ');\r\n }).join('')\r\n })\r\n\r\n // 动态设置 code 布局\r\n var setCodeLayout = (function fn() {\r\n if (options.ln) {\r\n var multiLine = Math.floor(lines.length / 100);\r\n var lineElem = codeElem.children('.'+ CONST.ELEM_LINE);\r\n var width = lineElem.last().children('.'+ CONST.ELEM_LINE_NUM).outerWidth();\r\n\r\n othis.addClass(CONST.ELEM_LN_MODE);\r\n\r\n // 若超出 100 行\r\n if (multiLine && width > CONST.LINE_RAW_WIDTH) {\r\n lay.getStyleRules(styleElem, function(item, i) {\r\n try {\r\n cssRules[i].setValue(item, width);\r\n } catch(e) { }\r\n });\r\n }\r\n }\r\n\r\n return fn;\r\n })();\r\n\r\n // 创建 code header\r\n if (options.header) {\r\n var headerElem = $('<div class=\"'+ CONST.ELEM_HEADER +'\"></div>');\r\n headerElem.html(options.title || options.text.code);\r\n othis.prepend(headerElem);\r\n }\r\n\r\n // 创建 code 区域固定条\r\n var elemFixbar = $('<div class=\"layui-code-fixbar\"></div>');\r\n\r\n // 若开启复制,且未开启预览,则单独生成复制图标\r\n if(options.copy && !options.preview){\r\n var copyElem = $(['<span class=\"layui-code-copy\">',\r\n '<i class=\"layui-icon layui-icon-file-b\" title=\"复制\"></i>',\r\n '</span>'].join(''));\r\n\r\n // 点击复制\r\n copyElem.on('click', function(){\r\n tools.copy.event();\r\n });\r\n\r\n elemFixbar.append(copyElem);\r\n }\r\n\r\n // 创建 language marker\r\n if (options.langMarker) {\r\n elemFixbar.append('<span class=\"layui-code-lang-marker\">' + options.lang + '</span>');\r\n }\r\n\r\n // 创建 about 自定义内容\r\n if (options.about) {\r\n elemFixbar.append(options.about);\r\n }\r\n\r\n // 生成 code fixbar\r\n othis.append(elemFixbar);\r\n\r\n // code 渲染完毕后的回调\r\n if (!options.preview) {\r\n setTimeout(function(){\r\n typeof options.done === 'function' && options.done({});\r\n },3);\r\n }\r\n\r\n // 所有实例渲染完毕后的回调\r\n if(options.elem.length === index + 1){\r\n typeof options.allDone === 'function' && options.allDone();\r\n }\r\n\r\n return ret;\r\n });\r\n});\r\n\r\n// 若为源码版,则自动加载该组件依赖的 css 文件\r\nif(!layui['layui.all']){\r\n layui.addcss('modules/code.css?v=6', 'skincodecss');\r\n}\r\n"]}