layui/dist/layui.js.map
2025-03-30 23:49:40 +08:00

1 line
1.6 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/component.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/tabs.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","tagName","toUpperCase","src","js","getElementsByTagName","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","tabs","element","rate","colorpicker","slider","carousel","flow","util","code","jquery","component","all","layui.all","EV_REMOVE","prototype","cache","define","deps","factory","use","setApp","app","exports","layui","callback","apps","from","node","url","that","head","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","getAttribute","_","c","link","href","cssname","id","STAUTS_NAME","debug","rel","media","getElementById","getLinkElem","parseInt","removeAttribute","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","hasOwnProperty","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","top","offsetX","offsetY","rect1","clickType","rect","left","clientX","clientY","right","bottom","getBoundingClientRect","elemWidth","offsetWidth","elemHeight","offsetHeight","align","allowBottomOut","offset","SYSTEM_RELOAD","othis","attrName","attrValue","Function","ev","errorText","join","isTopElem","topElems","matched","clipboard","writeText","legacyCopy","opacity","select","execCommand","done","err","then","passiveSupported","defineProperty","get","removeEventListener","touchEventsSupported","touchSwipe","state","onMove","onEnd","targetElem","pointerStart","x","y","pointerEnd","distanceX","distanceY","direction","timeStart","onStart","touches","passive","now","onTouchStart","preventDefault","abs","onTouchMove","onTouchEnd","__lay_touchswipe_cb_","addEvent","eventsCacheName","listener","include","_rawFn","removeEvent","newEvents","detachEvent","onClickOutside","handler","eventType","scopeTarget","scope","ignore","useCapture","capture","el","eventTarget","eventPath","composedPath","undefined","concat","getParents","memo","parentNode","shouldIgnore","targetElements","j","targetEl","hasOwn","prop","addStr","new_str","ii","removeStr","isObject","children","contains","child","addClass","className","removeClass","hasClass","has","css","parseValue","thisKey","thisValue","width","height","removeAttr","html","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","invalidDate","formatError","preview","en","markerOfChineseFestivals","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","isStatic","date","datetime","eventElem","fullPanel","rangeStr","rangeLinked","autoCalendarModel","startDate","endDate","auto","rangeElem","EXP_IF","EXP_SPLIT","EXP","EXP_IF_ONE","isInput","ymd","hms","day","tDate","newDate","getFullYear","getMonth","getDate","hours","minutes","seconds","thisDate","getHours","getMinutes","getSeconds","elemID","formatToDisplay","setValue","systemDate","themeStr","shortcutBtns","colorTheme","class","elemMain","elemHeader","elemCont","elemTable","divFooter","footer","divShortcut","shortcut","divHeader","headerChild","divContent","thead","theadTr","tr","insertRow","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","markRender","tdElem","YMD","markers","markText","keys","td","holidaysRender","insertHtml","idx","dayStr","ymdStr2","ymd1","ymd2","ymdStr1","cellRender","dateObj","panelMode","originElem","startOfYear","setFullYear","setHours","endOfYear","startOfMonth","setDate","endOfMonth","addDays","amount","isDisabledYearOrMonth","startDay","endDay","numOfDays","disabledCount","disabledDate","isDisabledDate","rangeType","disabledType","normalizedDate","isDisabledTime","isDisabledItem","disabledTime","compareVal","rangeFn","rangeFnParam","isDisabledDateTime","timestamp","isOut","thisDateTime","startWeek","prevMaxDate","isAlone","tds","elemYM","firstDate","getDay","index_","st","panelYM","list","setBtnStatus","timeParams","stampRange","yearNum","setTimeStatus","showHour","liElem","hideCount","scroll","haveSpan","ul","haveList","isCN","startY","li","lay-ym","ol","childUL","showMinute","showSecond","isShow","isYearOrMonth","isChangeMonth","ym","closeList","choose","span","scrollTop","olElem","overflowY","touchAction","tips","elemBtn","displayValueCallback","props","getOwnPropertyDescriptor","HTMLInputElement","displayValue","elemPreview","color","thisTime","param","checkPanelDate","panelMonth","startPanel","firstRenderIndex","needFullRender","panelIndex","isChange","dateTimeTemp","renderMode","checkState","panelIdx","active","addSubYear","isYear","isMonth","prevYear","prevMonth","YM","nextMonth","nextYear","header","layYM","layType","toLocaleLowerCase","showEvent","eventHandler","unbind","run","closeStop","getInst","one","amd","global","module","w","Error","noGlobal","getProto","getPrototypeOf","flat","array","class2type","fnToString","ObjectFunctionString","support","isFunction","nodeType","isWindow","preservedScriptAttributes","nonce","noModule","DOMEval","script","toType","rhtmlSuffix","isArrayLike","toArray","pushStack","elems","ret","merge","prevObject","map","eq","grep","_elem","odd","copy","copyIsArray","deep","isPlainObject","expando","random","isReady","noop","proto","Ctor","isEmptyObject","globalEval","textContent","nodeValue","makeArray","results","inArray","isXMLDoc","namespace","namespaceURI","docElem","ownerDocument","second","invert","matches","callbackExpect","arg","guid","Symbol","iterator","pop","whitespace","rtrimCSS","rcssescape","a","b","bup","compareDocumentPosition","fcssescape","ch","asCodePoint","charCodeAt","escapeSelector","sel","Expr","outermostContext","sortInput","hasDuplicate","documentIsHTML","rbuggyQSA","preferredDoc","pushNative","dirruns","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","booleans","identifier","attributes","pseudos","rwhitespace","rcomma","rleadingCombinator","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rquickExpr","rsibling","runescape","funescape","nonHex","high","fromCharCode","unloadHandler","setDocument","inDisabledFieldset","addCombinator","disabled","childNodes","els","seed","m","nid","newSelector","newContext","exec","getElementsByClassName","testContext","tokenize","toSelector","qsaError","cacheLength","shift","markFunction","assert","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","webkitMatchesSelector","msMatchesSelector","subWindow","defaultView","getById","getElementsByName","disconnectedMatch","cssHas","querySelector","attrId","getAttributeNode","compare","sortDetached","expr","elements","matchesSelector","attrHandle","uniqueSort","duplicates","sortStable","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","expectedNodeName","pattern","operator","check","what","_argument","simple","forward","ofType","_context","xml","outerCache","nodeIndex","parent","useCache","diff","firstChild","lastChild","pseudo","setFilters","not","matcher","compile","unmatched","elemLang","root","focus","activeElement","hasFocus","tabIndex","enabled","checked","selected","selectedIndex","empty","nextSibling","button","_matchIndexes","lt","gt","nth","radio","checkbox","file","password","image","submit","reset","parseOnly","tokens","soFar","preFilters","cached","combinator","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","matcherOut","preMap","postMap","preexisting","contexts","matcherIn","elementMatchers","setMatchers","bySet","byElement","superMatcher","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","filters","unique","getText","isXML","selectors","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","rparentsprev","parseHTML","guaranteedUnique","contents","sibling","cur","targets","l","closest","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","rnothtmlwhite","Identity","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","Callbacks","object","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","disable","lock","fireWith","Deferred","tuples","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","rejectWith","getErrorHook","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","readyList","asyncError","warn","message","stack","readyException","completed","readyWait","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","uid","configurable","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","removeData","_data","_removeData","attrs","dequeue","startLength","hooks","_queueHooks","unshift","stop","setter","clearQueue","tmp","defer","pnum","rcssNum","cssExpand","isAttached","composed","isHiddenWithinTree","getRootNode","display","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","values","hide","toggle","rcheckableType","rtagName","rscriptType","wrapMap","createDocumentFragment","checkClone","cloneNode","noCloneChecked","defaultValue","option","col","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","optgroup","rhtml","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","types","origFn","leverageNative","isSetup","saved","isTrigger","delegateType","stopImmediatePropagation","isImmediatePropagationStopped","handleObjIn","eventHandle","t","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","handleObj","delegateCount","setup","mappedTypes","origCount","teardown","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","Event","enumerable","originalEvent","writable","noBubble","beforeunload","returnValue","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","char","charCode","buttons","pointerId","pointerType","screenX","screenY","targetTouches","toElement","which","blur","focusMappedHandler","documentMode","simulate","attaches","dataHolder","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","prepend","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","pixelPositionVal","boxSizingReliableVal","scrollboxSizeVal","pixelBoxStylesVal","reliableTrDimensionsVal","reliableMarginLeftVal","container","rnumnonpx","rcustomProp","getStyles","opener","swap","old","rboxStyle","computeStyleTests","divStyle","roundPixelMeasures","marginLeft","measure","round","curCSS","computed","isCustomProp","pixelBoxStyles","minWidth","maxWidth","addGetHookIf","conditionFn","hookFn","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","trStyle","trChild","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","marginDelta","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity","origName","setProperty","isFinite","scrollboxSizeBuggy","padding","border","prefix","suffix","expand","expanded","parts","propHooks","percent","eased","duration","pos","step","fx","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","tweens","specialEasing","originalProperties","originalOptions","gotoEnd","bind","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","checkOn","optSelected","radioValue","boolHook","rfocusable","nType","attrHooks","attrNames","getter","lowercaseName","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","classNames","curValue","finalValue","toggleClass","stateVal","isValidValue","rreturn","valHooks","optionSet","rquery","rfocusMorph","parseXML","parserErrorElem","DOMParser","parseFromString","stopPropagationCallback","rbracket","onlyHandlers","bubbleType","ontype","lastElement","parentWindow","triggerHandler","rCRLF","rsubmitterTypes","rsubmittable","traditional","s","valueOrFunction","encodeURIComponent","buildParams","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxConvert","response","isSuccess","conv2","current","conv","converters","responseFields","dataFilter","throws","lastModified","etag","isLocal","protocol","processData","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","abort","statusText","finalText","crossDomain","urlAnchor","hasContent","uncached","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","ct","finalDataType","firstDataType","modified","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","oldCallbacks","cors","errorCallback","username","xhrFields","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","scriptCharset","evt","rjsonp","rtrim","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","animated","setOffset","curCSSTop","curTop","curOffset","curCSSLeft","curElem","curLeft","curPosition","using","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","trim","isRenderWithoutElem","isRenderOnEvent","isDeepReload","CONST","CLASS_THIS","CLASS_SHOW","CLASS_HIDE","CLASS_HIDEV","CLASS_DISABLED","CLASS_NONE","instance","extendsInstance","beforeInit","rerender","layOptions","beforeRender","MOD_CACHE_NAME","removeCache","getAllInst","removeInst","layer_dir","removeFocus","beforeEnd","resize","minStackIndex","minStackArr","STATUS_NAME","alert","yes","cancel","btn2","rskin","skin","doms","closeBtn","icon","follow","fixed","setings","creat","pt","SHADE_KEY","1","2","3","4","5","6","slideLeft","slideRight","SHADE","MOVE","RECORD_HEIGHT_KEY","move","area","isOutAnim","minStack","moveType","scrollbar","vessel","conType","times","titype","ismax","maxmin","titleHTML","face","animClass","additFaceClass","btnAlign","layero","elemShade","setAnim","restore","hideOnClose","closeAll","tipsMore","moveElem","shadeo","setScrollbar","background-color","transition","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","btnLoading","btnElem","isLoading","openLayer","IE6","btnCallback","btnAsync","loading","promiseLikeResolve","reason","shadeClose","full","reselect","sthis","setTop","record","contentElem","contentRecordHeightElem","restScrollbar","getChildFrame","getFrameIndex","iframeAuto","heg","iframeSrc","elemMin","hasMinLeft","maxminStatus","minLeft","edgeIndex","contentRecordHeight","isfix","executor","closeAnim","WRAP","iframe","contentWindow","write","domsElem","closeLast","layerIndexMax","layerIndexList","isArrayType","prompt","placeholder","formType","maxlength","tab","photos","loop","toolbar","imgIndex","pushData","alt","pid","thumb","imgprev","tabimg","imgnext","errorMsg","keyup","isNumber","getTransform","transforms","rotate","scaleX","touchEndCallback","imgElem","transform","ratio","wheelDelta","zoomElem","threshold","loadi","loadImage","winarea","imgarea","wh","_$","isMobile","_win","propSuffix","propName","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","REGEX_PARSE","years","days","milliseconds","meridiem","getMilliseconds","customMeridiem","hm","yy","yyyy","MM","dd","H","HH","hh","A","mm","ss","SSS","$1","unescape","openWin","specs","toVisibleArea","scrollElem","SCROLL_NAME","OFFSET_NAME","scrollValue","size","scrollOffset","thisOffset","thisElem","vertical","attrSelector","DATANAME","dataCache","_WIN","ELEM_LI","clickOrMousedown","MOD_INDEX_OPENED","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","closeOnClick","mainElem","eachItemView","elemUl","isChild","templet","group","-","viewLi","viewText","elemPanel","TPL_MAIN","mainElemExisted","findMainElem","delayRemove","isClickAllScope","clickScope","elemGroup","spread","normalizedDelay","isMouseEnter","thisEventElem","opened","isAccordion","needSpread","groupSibs","isCtxMenu","isTriggerTarget","isPanelTarget","ELEM_LI_PAR","dataParams","SLIDER_BAR","SLIDER_WRAP","SLIDER_WRAP_BTN","SLIDER_TIPS","SLIDER_INPUT_TXT","ELEM_HOVER","showstep","tipsAlways","precision","precisions","decimalArr","minValue","maxValue","scaleFir","scaleSec","hasRender","elemTemp","number","setSliderTipsTxt","sliderWrapBtnElem","tipsTxt","setTips","calcSliderTipsLeft","sliderWidth","sliderWrap","setSliderTipsLeft","margin-bottom","elemInput","slide","sliderAct","sliderTxt","inputValue","offsetValue","arrValue","firLeft","valueTo","secLeft","wrapWidth","selfValue","toFixed","oldLeft","elemMove","sliderBtnElem","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","z","createMoveElem","needTrigger","needStopPropagation","triggerEvent","oldtop","oldy","maxh","maxw","simulatedEvent","pointer","createEvent","initMouseEvent","dispatchEvent","sidetop","basisElem","elemColorBoxSpan","colorValue","attrEvent","SHOW","TITLE","Element","NAV_ELEM","tabAdd","layAttr","tabElem","titElem","barElem","contElem","tabChange","tabAuto","tabDelete","layid","force","tabClick","dom","headerElem","NAV_ITEM","NAV_BAR","NAV_TREE","NAV_CHILD","NAV_MORE","NAV_ANIM","bodyElem","elemA","isJump","unselect","hasId","liThis","MORE","BAR","CLOSE","STOPE","allowclose","isSpread","hideTabMore","tsbTitle","clickThis","NAV_ITEMED","needExpand","parentSibs","collapse","isNone","elemFilter","items","nav","timerMore","timeEnd","NAV_TITLE","bar","itemElem","hasBarElem","thisA","breadcrumb","ATTE_SPR","separator","aNode","elemTitle","files","ELEM_FILE","ELEM_FORM","ELEM_IFRAME","ELEM_CHOOSE","UPLOADING","accept","exts","bindAction","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","clearInterval","setInterval","iframeBody","forceConvert","convert","thisFile","pushFile","resetFile","filename","newFile","File","getChooseFiles","typeName","images","video","audio","setChooseFile","setChooseText","checkFile","extendInfo","extInfo","ext","sizes","parseSize","FileList","dataTransfer","formatSize","log","needCheckboxFallback","HIDE","BAD_INPUT","Form","verify","required","phone","email","identity","autocomplete","getFormElem","itemForm","getValue","nameIndex","fieldElem","init_name","inputs","handleInputNumber","rawValue","noAction","isInit","isBadInput","isStepStrictly","decimals","controlBtn","increment","decrement","affix","CLASS_WRAP","CLASS_SUFFIX","CLASS_AFFIX","showAffix","renderAffix","affixOptions","elemAffix","elemIcon","hasElemAffix","hasElemSuffix","inputFilter","eye","SHOW_NAME","ns","skipCheck","isComposition","isReadonly","isMouseWheel","tempMatched","tempNumber","propertyName","specialCode","deltaX","deltaY","TIPS","NONE","CREATE_OPTION","PANEL_ELEM_DATA","selects","reElem","titleElem","isSearch","isCreatable","isAppendTo","removeClickOutsideEvent","laySearch","appendTarget","appendPosition","needPlaceholderPatch","showDown","hideDown","followScroll","notOption","dl","dts","initValue","caseSensitive","updatePosition","dlHeight","dds","__ieph","none","posTop","thisDd","ddHeight","setThisDd","prevNext","lastIndex","allDisplayedElem","nextIndex","origin","fuzzyMatchRE","hasEquals","fuzzy","keyword","wordMap","regexPattern","wordArr","isCreateOption","thisDds","firstOptionELem","hasTips","createOptionElem","ddElem","optionElem","optionsFirst","contentWrapElem","triggerElem","panelWrapElem","switch","SUBTRA","checks","RE_CLASS","titleTplAttrs","titleTplElem","toggleAttribute","indeterminate","isSwitch","isPrimary","syncAppearanceOnPropChanged","ICON","radios","ANIM","sameRadios","radioEl","renderItem","itemType","originProps","newValue","validate","intercept","DANGER","vers","verType","thisVer","rule","verst","isForm2Elem","layFilter","verifyElem","forceOn","forceOff","$dom","checkName","indexName","initIndexName","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","DISABLED_TRANSITION","DATA_MOVE_NAME","TPL_HEADER","TPL_BODY","eachChildCols","cellMinWidth","cellMaxWidth","MAX_VALUE","editTrigger","defaultToolbar","defaultContextmenu","autoSort","cols","pageName","limitName","statusName","msgName","dataName","totalRowName","countName","pullData","setInit","fullHeightGap","parentDiv","parentHeightGap","customHeightFunc","lay-filter","renderStyle","layTool","layBox","layHeader","layMain","layBody","layFixed","layFixLeft","layFixRight","layTotal","layPage","renderToolbar","renderPagebar","fullSize","initOpts","space","unresize","numbers","getWidth","clientWidth","getContentWidth","parentElem","initChildCols","i1","item1","i2","item2","indexChild","childIndex","colspan","rowspan","colGroup","i22","item22","HAS_PARENT","parentKey","lineStyle","trClassName","cellMaxHeight","iconElem","leftDefaultTemp","elemToolTemp","defaultConfig","toolbarHtml","layEvent","onClick","lis","openPanel","eachCols","fieldTitle","setParentCol","panel","exportFile","print","printWin","thElem","edg","onafterprint","itemIsName","thisItem","pagebarHtml","layPagebar","pagebar","parentTh","parentColspan","arrParentKey","getThisCol","colspan2","nextParentKey","setColsPatch","setGroupWidth","lastSpreadCol","colNums","autoColNums","autoWidth","countWidth","cntrWidth","borderWidth","headerTableElem","mainTableElem","isEmptyTable","getAutoWidth","getScrollWidth","back","pixelsForLastCol","i3","newWidth","isConnected","scrollPatch","haveInit","HAS_SET_COLS_PATCH","errorView","elemNone","layNone","syncCheckAll","renderForm","startLimit","initSort","reloadType","renderData","totalRow","_xhr","_xhrAbort","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","tdContent","TOTAL_ROW","patchElem","outerHTML","getColElem","renderFormByElem","checkAllElem","checkStatus","isAll","setRowActive","setRowChecked","makeMap","thisData","existChecked","getChecked","radioCheckedIndex","fixRElem","isCheckAll","isCheckMult","isCheckAllOrMult","dataIndex","checkedSameElem","checkedElem","_field","elemSort","fromEvent","selectorText","headerMain","thIndex","bodyHeight","layMainTable","scrollWidth","outWidth","addPatch","fixHeight","updateRow","ELEM_CELL","row","cell","_BODY","commonMember","oLeft","pLeft","allowResize","ruleWidth","thatTable","setWidth","nowType","clearCacheKey","del","update","fields","setRowEvent","getCol","UNROW","renderGridEdit","editType","ELEM_GRID_DOWN","oldValue","reedit","showGridExpandIcon","elemCell","gridExpand","expandedMode","ELEM_CELL_C","elemCellClose","cellExpandedMode","expandedWidth","cellExpandedWidth","$this","toolFn","rAF","cb","getElementSize","borderRightWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","marginTop","marginRight","marginBottom","boxSizing","errorTips","tdIndex","attrData","tableData","trElem","itemData","tableIns","CHILD_COLS","PARENT_COL_INDEX","arrs","eachArrs","invalidNum","getData","textType","csv","xls","alink","dataTitle","dataMain","fieldsIsHide","isTreeTable","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","HTML_TAG_RE","ICON_PROPS","updateCache","childrenKey","tableCache","itemDataIndex","updateOptions","thatOptionsTemp","treeOptions","idKey","hasNumberCol","hasChecboxCol","hasRadioCol","scrollTopCache","mod","parseDataThat","retData","isSimpleData","enable","flatToTree","updateStatus","initData","renderType","isRenderData","tableView","isExpandAll","layTableAllChooseElem","renderTreeTable","iconProp","normalizedIcon","cascade","isParent","indent","flexIconClose","flexIconOpen","showIcon","iconClose","iconOpen","iconLeaf","showFlexIconIfNotParent","dblClickExpand","expandAllDefault","rootPid","autoParam","beforeExpand","onExpand","iconStr","pIdKey","idTemp","pidTemp","rootNodes","tableId","flatArr","tempObj","treeToFlat","parentId","parentIndex","dataNew","getTreeNode","getParentNode","getNodeByIndex","treeNode","treeNodeData","getNodeDataByIndex","updateNode","removeNode","expandNode","setChecked","getNodeById","tableDataFlat","dataRet","indexArr","getTableData","isParentKey","debounceFn","expandFlag","sonSign","callbackFlag","tableViewElem","treeTableThat","trData","isToggle","trExpand","retValue","trExpanded","trsElem","flexIconElem","trDataId","updateNodeIcon","scopeEl","isExpand","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","nodeIconElem","nodeIcon","level","treeOptionsView","existsData","dataExpand","layDataIndex","nameKey","htmlTemp","itemCell","trIndex","trDefaultExpand","trMain","trFixedL","trFixedR","statusObj","notCascade","dataUpdated","updateObjParams","rowIndex","tableThat","updateFn","checkNode","newNode","trLevel","newNodeTemp","trNew","_keepParent","delNode","nodeP","delNodesFlat","updateCheckStatus","delNodeDataIndex","i4","item4","trEl","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","trDataP","radioElem","collectNeedExpandNodeIndex","needExpandIndex","nodeData","checkAllNodes","reloadAsyncNode","dataId","getNodesByFilter","isSingle","nodesResult","headerMode","HEADER","BODY","ITEM","CARD","getContainer","documentElem","elemView","elemHeaderItem","renderHeaderItem","elemBodyItem","renderBodyItem","renderClose","findHeaderItem","roll","afterRender","delegatedElement","onresize","bodyItem","mode","newHeaderItem","newBodyItem","headerItem","hasOwnIndex","thisHeaderItem","findBodyItem","closeMult","nextHeader","bodys","DISABLED_CLOSE_SELECTOR","FILTER","closableAttr","prevHeader","thatA","isLink","appendClose","closable","headerItems","tabsLeft","scrollMode","CLASS_SCROLL","CLASS_BAR","CLASS_BAR_ICON","rollElem","prevLeft","elemScroll","thisItemElem","thisLeft","thisBodyItem","getHeaderItem","getBodyItem","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","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","nums","haveChecked","isHide","stopNone","noneView","createNoneElem","selectedData","thisElemCheckbox","thisBoxElem","siblingInput","thisList","onchange","elemThis","dblclick","thisListElem","isMatch","ELEM_LEFT","ELEM_RIGHT","ELEM_ARROW","ELEM_IND","arrow","indicator","autoplay","elemItem","prevIndex","addIndex","subIndex","itemsCount","tplArrow","goto","tplInd","elemInd","thisIndex","haveSlide","touchEl","isVertical","distance","ICON_RATE","ICON_RATE_SOLID","ICON_RATE_HALF","ICON_SOLID_HALF","ICON_HALF_RATE","readonly","half","setText","action","setvalue","_ul","wide","liElems","ind","score","itemElemWidth","remainder","isActiveIcon","needSelect","shouldHalfIcon","Flow","isOver","lazyimg","isAuto","moreText","isTop","notDocument","more","mb","_cleanup","over","scrollHeightStart","scrollTopStart","scrollHeightEnd","isLazyimg","elemTop","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","rawCode","finalCode","isIframePreview","elemHeaderView","elemToolbar","runPreview","codeElem","createCodeRst","lines","setCodeLayout","elemFixbar","copyElem","reloadCode","obverse","codeRender","createCode","line","codeParse","hasDataClass","hasOnCopy","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":"8BAMC,CAAC,SAASA,GACT,aAEA,IAiBMC,EAjBFC,EAAMF,EAAIG,SACVC,EAAS,CACXC,QAAS,GACTC,OAAQ,GACRC,QAAS,GACTC,MAAO,EACT,EAEIC,EAAQ,WACVC,KAAKC,EAAI,QAC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ACE,YAA3B,OAAOiE,EAAQqjE,SAA0BrjE,EAAQqjE,QAAQ,IAGpDj8C,CACT,CAAC,CACH,CAAC,EAGGlsB,MAAM,cACRA,MAAMsE,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.10.3'; // Layui 版本号\n };\n\n // 识别预先可能定义的指定全局对象\n var GLOBAL = win.LAYUI_GLOBAL || {};\n\n // 获取 layui 所在目录\n var getPath = function(){\n var jsPath = (doc.currentScript && doc.currentScript.tagName.toUpperCase() === 'SCRIPT') ? doc.currentScript.src : function(){\n var js = doc.getElementsByTagName('script');\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 tabs: 'tabs', // 标签页\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 component: 'component', // 组件构建器\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 // currentStyle.getAttribute 参数为 camelCase 形式的字符串\n Layui.prototype.getStyle = function(node, name){\n var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);\n return style.getPropertyValue\n ? style.getPropertyValue(name)\n : style.getAttribute(name.replace(/-(\\w)/g, function(_, c){ return c ? c.toUpperCase() : '';}));\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 href: ''\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","/**\r\n * 用于打包聚合版,该文件不会存在于构建后的目录 \r\n */\r\n \r\nlayui.define(function(exports){\r\n var cache = layui.cache;\r\n layui.config({\r\n dir: cache.dir.replace(/lay\\/dest\\/$/, '')\r\n });\r\n exports('layui.all', layui.v);\r\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 * @param {[offsetX:number, offsetY:number]} [opts.offset] - 相对于触发元素的额外偏移量[x,y]\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 var offsetX = opts.offset ? opts.offset[0] : 0;\r\n var offsetY = opts.offset ? opts.offset[1] : 0;\r\n\r\n // 设置坐标\r\n elem.style.left = left + (position === 'fixed' ? 0 : scrollArea(1)) + offsetX + 'px';\r\n elem.style.top = top + (position === 'fixed' ? 0 : scrollArea()) + offsetY + '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 * 检测是否支持 Passive Event Listeners\r\n * 引用自 https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n * @type {boolean}\r\n */\r\n lay.passiveSupported = function(){\r\n var passiveSupported = false;\r\n try {\r\n var opts = Object.defineProperty({}, 'passive', {\r\n get: function() {\r\n passiveSupported = true;\r\n }\r\n });\r\n window.addEventListener('test', null, opts);\r\n window.removeEventListener('test', null, opts);\r\n } catch (err) {}\r\n return passiveSupported;\r\n }();\r\n\r\n /**\r\n * 是否支持 touch 事件\r\n */\r\n lay.touchEventsSupported = function(){\r\n return 'ontouchstart' in window;\r\n };\r\n\r\n /**\r\n * @typedef touchSwipeState\r\n * @prop {{x: number,y: number}} pointerStart - 初始坐标\r\n * @prop {{x: number,y: number}} pointerEnd - 结束坐标\r\n * @prop {number} distanceX - X 轴移动距离\r\n * @prop {number} distanceY - Y 轴移动距离\r\n * @prop {'none'|'right'|'left'|'up'|'down'} direction - 滑动方向\r\n * @prop {Date} timeStart 开始时间\r\n */\r\n /**\r\n * @callback touchSwipeCallback\r\n * @param {TouchEvent} e 滑动事件\r\n * @param {touchSwipeState} state 滑动相关的状态\r\n */\r\n /**\r\n * 基于 touch 事件的触摸滑动\r\n * @param {string | HTMLElement | JQuery} elem - HTML 元素\r\n * @param {{onTouchStart?: touchSwipeCallback, onTouchMove?: touchSwipeCallback, onTouchEnd?: touchSwipeCallback}} opts - 配置项\r\n */\r\n lay.touchSwipe = function(elem, opts){\r\n var options = opts\r\n var targetElem = lay(elem)[0];\r\n\r\n if(!targetElem || !lay.touchEventsSupported()) return;\r\n\r\n var state = {\r\n pointerStart: {x:0, y:0},\r\n pointerEnd: {x:0, y:0},\r\n distanceX: 0,\r\n distanceY: 0,\r\n direction:'none', // 'up','down','left','right','none\r\n timeStart: null\r\n }\r\n\r\n var onStart = function(e){\r\n if(e.touches.length !== 1) return;\r\n bindEvents();\r\n // 重置状态\r\n state.timeStart = Date.now();\r\n state.pointerStart.x = state.pointerEnd.x = e.touches[0].clientX;\r\n state.pointerStart.y = state.pointerEnd.y = e.touches[0].clientY;\r\n state.distanceX = state.distanceY = 0;\r\n state.direction = 'none'\r\n\r\n options.onTouchStart && options.onTouchStart(e, state);\r\n }\r\n\r\n var onMove = function(e){\r\n e.preventDefault();\r\n state.pointerEnd.x = e.touches[0].clientX;\r\n state.pointerEnd.y = e.touches[0].clientY;\r\n state.distanceX = state.pointerStart.x - state.pointerEnd.x;\r\n state.distanceY = state.pointerStart.y - state.pointerEnd.y;\r\n if(Math.abs(state.distanceX) > Math.abs(state.distanceY)){\r\n state.direction = state.distanceX > 0 ? 'left' : 'right';\r\n }else{\r\n state.direction = state.distanceY > 0 ? 'up' : 'down';\r\n }\r\n options.onTouchMove && options.onTouchMove(e, state);\r\n }\r\n\r\n var onEnd = function(e){\r\n options.onTouchEnd && options.onTouchEnd(e, state);\r\n unbindEvents();\r\n }\r\n \r\n var bindEvents = function(){\r\n targetElem.addEventListener('touchmove', onMove, lay.passiveSupported ? { passive: false} : false);\r\n targetElem.addEventListener('touchend', onEnd);\r\n targetElem.addEventListener('touchcancel', onEnd);\r\n }\r\n\r\n var unbindEvents = function(){\r\n targetElem.removeEventListener('touchmove', onMove);\r\n targetElem.removeEventListener('touchend', onEnd, lay.passiveSupported ? { passive: false} : false);\r\n targetElem.removeEventListener('touchcancel', onEnd);\r\n }\r\n\r\n // 防止事件重复绑定\r\n if(targetElem.__lay_touchswipe_cb_){\r\n targetElem.removeEventListener('touchstart', targetElem.__lay_touchswipe_cb_);\r\n }\r\n targetElem.__lay_touchswipe_cb_ = onStart;\r\n targetElem.addEventListener('touchstart', onStart);\r\n }\r\n\r\n /** @type {(elem: Element|Document|Window,eventName: string,fn:EventListenerOrEventListenerObject,options: boolean | AddEventListenerOptions) => any}*/\r\n lay.addEvent = function(){\r\n if(document.addEventListener){\r\n return function(elem, eventName, fn, options){\r\n elem.addEventListener(eventName, fn, options);\r\n }\r\n }else{\r\n return function(elem, eventName, fn){\r\n var prefix = '_lay_on_';\r\n var eventsCacheName = prefix + eventName;\r\n var listener = function(e){\r\n e.target = e.srcElement;\r\n fn.call(elem, e);\r\n }\r\n listener._rawFn = fn;\r\n if(!elem[eventsCacheName]){\r\n elem[eventsCacheName] = [];\r\n }\r\n var include = false;\r\n lay.each(elem[eventsCacheName], function(_, listener){\r\n if(listener._rawFn === fn){\r\n include = true;\r\n return true;\r\n }\r\n })\r\n if(!include){\r\n elem[eventsCacheName].push(listener);\r\n elem.attachEvent('on' + eventName, listener);\r\n }\r\n }\r\n }\r\n }();\r\n\r\n /** @type {(elem: Element|Document|Window,eventName: string,fn:EventListenerOrEventListenerObject,options: boolean | EventListenerOptions) => any}*/\r\n lay.removeEvent = function(){\r\n if(document.removeEventListener){\r\n return function(elem, eventName, fn, options){\r\n elem.removeEventListener(eventName, fn, options);\r\n }\r\n }else{\r\n return function(elem, eventName, fn){\r\n var prefix = '_lay_on_';\r\n var eventsCacheName = prefix + eventName;\r\n var events = elem[eventsCacheName];\r\n if(layui.isArray(events)){\r\n var newEvents = [];\r\n lay.each(events, function(_, listener){\r\n if(listener._rawFn === fn){\r\n elem.detachEvent('on'+ eventName, listener);\r\n }else{\r\n newEvents.push(listener);\r\n }\r\n })\r\n elem[eventsCacheName] = newEvents;\r\n } \r\n } \r\n }\r\n }();\r\n\r\n /**\r\n * 监听指定元素外部的点击\r\n * @param {HTMLElement} target - 被监听的元素\r\n * @param {(e: Event) => void} handler - 事件触发时执行的函数\r\n * @param {object} [options] - 选项\r\n * @param {string} [options.event=\"pointerdown\"] - 监听的事件类型\r\n * @param {HTMLElement | Window} [options.scope=document] - 监听范围\r\n * @param {Array<HTMLElement | string>} [options.ignore] - 忽略监听的元素或选择器字符串\r\n * @param {boolean} [options.capture=true] - 对内部事件侦听器使用捕获阶段\r\n * @returns {() => void} - 返回一个停止事件监听的函数\r\n */\r\n lay.onClickOutside = function(target, handler, options){\r\n options = options || {};\r\n var eventType = options.event || ('onpointerdown' in window ? 'pointerdown' : 'mousedown');\r\n var scopeTarget = options.scope || document;\r\n var ignore = options.ignore || [];\r\n var useCapture = 'capture' in options ? options.capture : true;\r\n\r\n var listener = function(event){\r\n var el = target;\r\n var eventTarget = event.target || event.srcElement;\r\n var eventPath = getEventPath(event);\r\n\r\n if (!el || el === eventTarget || eventPath.indexOf(el) !== -1){\r\n return;\r\n }\r\n if(shouldIgnore(event, eventPath)){\r\n return;\r\n }\r\n\r\n handler(event);\r\n };\r\n\r\n function shouldIgnore(event, eventPath){\r\n var eventTarget = event.target || event.srcElement;\r\n for(var i = 0; i < ignore.length; i++){\r\n var target = ignore[i];\r\n if(typeof target === 'string'){\r\n var targetElements = document.querySelectorAll(target);\r\n for(var j = 0; j < targetElements.length; j++){\r\n var targetEl = targetElements[i];\r\n if(targetEl === eventTarget || eventPath.indexOf(targetEl) !== -1){\r\n return true;\r\n }\r\n }\r\n }else{\r\n if(target && (target === eventTarget || eventPath.indexOf(target) !== -1)){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getEventPath(event){\r\n var path = (event.composedPath && event.composedPath()) || event.path;\r\n var eventTarget = event.target || event.srcElement;\r\n\r\n if (path !== null && path !== undefined){\r\n return path;\r\n }\r\n\r\n function getParents(node, memo){\r\n memo = memo || [];\r\n var parentNode = node.parentNode;\r\n\r\n return parentNode\r\n ? getParents(parentNode, memo.concat([parentNode]))\r\n : memo;\r\n }\r\n\r\n return [eventTarget].concat(getParents(eventTarget));\r\n }\r\n\r\n function bindEventListener(elem, eventName, handler, opts){\r\n elem.addEventListener\r\n ? elem.addEventListener(eventName, handler, opts)\r\n : elem.attachEvent('on' + eventName, handler);\r\n\r\n return function(){\r\n elem.removeEventListener\r\n ? elem.removeEventListener(eventName, handler, opts)\r\n : elem.detachEvent('on' + eventName, handler);\r\n }\r\n }\r\n\r\n return bindEventListener(\r\n scopeTarget, \r\n eventType, \r\n listener, \r\n lay.passiveSupported ? { passive: true, capture: useCapture } : useCapture\r\n );\r\n }\r\n\r\n var hasOwnProperty = Object.prototype.hasOwnProperty;\r\n lay.hasOwn = function(obj, prop){\r\n return hasOwnProperty.call(obj, prop);\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, options){\r\n return this.each(function(index, item){\r\n lay.addEvent(item, eventName, fn, options)\r\n });\r\n };\r\n\r\n // 解除事件\r\n Class.fn.off = function(eventName, fn, options){\r\n return this.each(function(index, item){\r\n lay.removeEvent(item, eventName, fn, options)\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 : '上一页'; // 上一页文本\r\n config.next = 'next' in config ? config.next : '下一页'; // 下一页文本\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=\"首页\">'+ (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\">...</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\">...</span>');\r\n }\r\n if(groups !== 0){\r\n pager.push('<a class=\"layui-laypage-last\" title=\"尾页\" 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 '到第',\r\n '页',\r\n '确定'\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// @ts-expect-error\r\n;!function(window, document){ // gulp build: laydate-header\r\n \"use strict\";\r\n\r\n var isLayui = window.layui && layui.define;\r\n var ready = {\r\n getPath: window.lay && lay.getPath ? lay.getPath : '',\r\n\r\n // 载入 CSS 依赖\r\n link: function (href, fn, cssname) {\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 = 'lay-' + MOD_NAME + '-id'; // 已渲染过的索引标记名\r\n\r\n // 外部调用\r\n var laydate = {\r\n v: '5.6.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 Class.prototype.markerOfChineseFestivals = {\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 }\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 //获取限制内日期\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 // 重定义 input 元素的 get set\r\n if(typeof options.formatToDisplay === 'function'){\r\n if(that.isInput(options.elem[0])){\r\n that.formatToDisplay(options.elem[0], options.formatToDisplay);\r\n } else {\r\n var rangeElem = that.rangeElem;\r\n if(rangeElem){\r\n that.formatToDisplay(rangeElem[0][0], options.formatToDisplay);\r\n that.formatToDisplay(rangeElem[1][0], options.formatToDisplay);\r\n }\r\n }\r\n }\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 });\r\n elem.appendChild(lay.elem('span'));\r\n elem.appendChild(lay.elem('span'));\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 * 渲染备注\r\n * @param {JQuery} tdElem td 元素\r\n * @param {[number, number, number]} YMD 年月日\r\n * @param {object | string} markers 备注信息\r\n */\r\n Class.prototype.markRender = function(tdElem, YMD, markers){\r\n var markText;\r\n\r\n if(typeof markers === 'object'){\r\n lay.each(markers || {}, 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 markText = title || YMD[2];\r\n }\r\n });\r\n }else if(typeof markers === 'string'){\r\n markText = markers || YMD[2];\r\n }\r\n\r\n markText && tdElem.find('div').html('<span class=\"laydate-day-mark\">'+ markText +'</span>');\r\n }\r\n\r\n /**\r\n * 公历重要日期与自定义备注\r\n * @param {JQuery} td \r\n * @param {[number, number, number]} YMD \r\n * @returns Class\r\n */\r\n Class.prototype.mark = function(td, YMD){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var render = function(markers){\r\n that.markRender(td, YMD, markers);\r\n }\r\n\r\n if(options.calendar && options.lang === 'cn'){\r\n render(that.markerOfChineseFestivals);\r\n } \r\n\r\n if(typeof options.mark === 'function'){\r\n options.mark({year: YMD[0], month: YMD[1], date: YMD[2]}, render);\r\n }else if(typeof options.mark === 'object'){\r\n render(options.mark);\r\n }\r\n\r\n return that;\r\n };\r\n\r\n /**\r\n * 渲染法定节假日或补假上班标记\r\n * @param {JQuery} tdElem td 元素\r\n * @param {[number, number, number]} YMD 年月日\r\n * @param {[Array<string>, Array<string>] | string} markers 标记信息\r\n */\r\n Class.prototype.holidaysRender = function(tdElem, YMD, markers){\r\n var type = ['holidays', 'workdays'];\r\n\r\n var isEquals = function(ymdStr1, ymdStr2){\r\n var ymd1 = ymdStr1.split('-');\r\n var ymd2 = ymdStr2.split('-');\r\n\r\n lay.each(ymd1, function(i,v){\r\n ymd1[i] = parseInt(v, 10);\r\n })\r\n lay.each(ymd2, function(i,v){\r\n ymd2[i] = parseInt(v, 10);\r\n })\r\n \r\n return ymd1.join('-') === ymd2.join('-');\r\n }\r\n\r\n var insertHtml = function(el, type, text){\r\n el.find('div').html([\r\n '<span',\r\n ' class=\"laydate-day-holidays\"',\r\n ' type=\"'+ type +'\"',\r\n '>',\r\n text,\r\n '</span>'\r\n ].join(''));\r\n }\r\n \r\n if(layui.type(markers) === 'array'){\r\n lay.each(markers, function(idx, item) {\r\n lay.each(item, function(i, dayStr) {\r\n if(isEquals(dayStr, tdElem.attr('lay-ymd'))){\r\n insertHtml(tdElem, type[idx], YMD[2])\r\n }\r\n });\r\n });\r\n }else if(typeof markers === 'string'){\r\n if(type.indexOf(markers) !== -1){\r\n insertHtml(tdElem, markers, YMD[2])\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 标注法定节假日或补假上班\r\n * @param {JQuery} td \r\n * @param {[number, number, number]} YMD \r\n * @returns Class\r\n */\r\n Class.prototype.holidays = function(td, YMD) {\r\n var that = this;\r\n var options = that.config;\r\n\r\n var render = function(markers){\r\n that.holidaysRender(td, YMD, markers);\r\n }\r\n\r\n if(typeof options.holidays === 'function'){\r\n options.holidays({year: YMD[0], month: YMD[1], date: YMD[2]}, render);\r\n }else if(layui.type(options.holidays) === 'array'){\r\n render(options.holidays);\r\n }\r\n\r\n return that;\r\n };\r\n\r\n /**\r\n * 自定义单元格\r\n * @param {HTMLElement|Array<HTMLElement>} el - 单元格元素\r\n * @param {{year:number, month:number, date:number}} dateObj - 当前单元格对应的日期信息\r\n * @param {'year' | 'month' | 'date'} panelMode - 面板模式\r\n * @returns \r\n */\r\n Class.prototype.cellRender = function(el, dateObj, panelMode){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(typeof options.cellRender === 'function'){\r\n var render = function(content){\r\n if(typeof content === 'string'){\r\n lay(el).html(content);\r\n }else if(typeof content === 'object'){\r\n lay(el).html('').append(lay(content)[0]);\r\n }\r\n }\r\n options.cellRender(dateObj, render, {originElem: el, type: panelMode})\r\n }\r\n\r\n return that;\r\n }\r\n\r\n /**\r\n * 给定年份的开始日期\r\n * @param {Date} date \r\n */\r\n Class.prototype.startOfYear = function(date){\r\n var newDate = new Date(date);\r\n newDate.setFullYear(newDate.getFullYear(), 0, 1);\r\n newDate.setHours(0, 0, 0, 0);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 给定年份的结束日期\r\n * @param {Date} date\r\n */\r\n Class.prototype.endOfYear = function(date){\r\n var newDate = new Date(date);\r\n var year = newDate.getFullYear();\r\n newDate.setFullYear(year + 1, 0, 0);\r\n newDate.setHours(23, 59, 59, 999);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 给定月份的开始日期\r\n * @param {Date} date \r\n */\r\n Class.prototype.startOfMonth = function(date){\r\n var newDate = new Date(date);\r\n newDate.setDate(1);\r\n newDate.setHours(0, 0, 0, 0);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 给定月份的结束日期\r\n * @param {Date} date \r\n */\r\n Class.prototype.endOfMonth = function(date){\r\n var newDate = new Date(date);\r\n var month = newDate.getMonth();\r\n newDate.setFullYear(newDate.getFullYear(), month + 1, 0);\r\n newDate.setHours(23, 59, 59, 999);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 将指定的天数添加到给定日期\r\n * @param {Date} date 要更改的日期\r\n * @param {number} amount 天数\r\n */\r\n Class.prototype.addDays = function(date, amount){\r\n var newDate = new Date(date);\r\n if(!amount) return newDate;\r\n newDate.setDate(newDate.getDate() + amount);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 不可选取的年或月。年或月中的所有日期都禁用时,才判定为不可选取。\r\n * @param {Date} date 要检测的年或月\r\n * @param {'year' | 'month'} type 面板类型\r\n * @param {'start' | 'end'} position 面板位置\r\n */\r\n Class.prototype.isDisabledYearOrMonth = function(date, type, position){\r\n var that = this;\r\n var options = that.config;\r\n var millisecondsInDay = 24 * 60 * 60 * 1000;\r\n\r\n var startDay = type === 'year' ? that.startOfYear(date) : that.startOfMonth(date);\r\n var endDay = type === 'year' ? that.endOfYear(date) : that.endOfMonth(date);\r\n var numOfDays = Math.floor((endDay.getTime() - startDay.getTime()) / millisecondsInDay) + 1;\r\n var disabledCount = 0;\r\n \r\n for(var i = 0; i < numOfDays; i++){\r\n var day = that.addDays(startDay, i);\r\n if(options.disabledDate.call(options, day, position)){\r\n disabledCount++;\r\n }\r\n }\r\n\r\n return disabledCount === numOfDays;\r\n }\r\n\r\n /**\r\n * @typedef limitOptions\r\n * @prop {JQuery} [elem] - 检测的元素, 例如面板中年月日时分秒元素,“现在”,“确认” 按钮等\r\n * @prop {number} [index] - 元素集合中当前检测元素的索引years:0,month:0,date:0-41,hms:0\r\n * @prop {['hours', 'minutes', 'seconds'] | ['hours', 'minutes'] | ['hours']} [time] - 是否比较时分秒\r\n * @prop {'year'|'month'|string} [type] - 面板类型?\r\n * @prop {0 | 1} [rangeType] - 面板索引, 0 表示 start, 1 表示 end\r\n * @prop {Partial<{year:number,month: number,date:number,hours:number,minutes:number,seconds:number}>} [date] - 检测的日期时间对象\r\n * @prop {'date' | 'time' | 'datetime'} disabledType - 禁用类型,按钮应使用 datetime\r\n */\r\n /**\r\n * 不可选取的日期\r\n * @param {number} date 当前检测的日期的时间戳\r\n * @param {limitOptions} opts\r\n * @returns {boolean}\r\n */\r\n Class.prototype.isDisabledDate = function(date, opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n var position = options.range ? (opts.rangeType === 0 ? 'start' : 'end') : 'start';\r\n \r\n if(!options.disabledDate) return false;\r\n if(options.type === 'time') return false;\r\n if(!(opts.disabledType === 'date' || opts.disabledType === 'datetime')) return false;\r\n\r\n // 不需要时分秒\r\n var normalizedDate = new Date(date);\r\n normalizedDate.setHours(0, 0, 0, 0);\r\n \r\n return opts.type === 'year' || opts.type === 'month'\r\n ? that.isDisabledYearOrMonth(normalizedDate, opts.type, position)\r\n : options.disabledDate.call(options, normalizedDate, position);\r\n }\r\n\r\n /**\r\n * 不可选取的时间\r\n * @param {number} date 当前检测的日期的时间戳\r\n * @param {limitOptions} opts\r\n * @returns {boolean}\r\n */\r\n Class.prototype.isDisabledTime = function(date, opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n var position = options.range ? (opts.rangeType === 0 ? 'start' : 'end') : 'start';\r\n \r\n if(!options.disabledTime) return false;\r\n if(!(options.type === \"time\" || options.type === \"datetime\")) return false;\r\n if(!(opts.disabledType === 'time' || opts.disabledType === 'datetime')) return false;\r\n\r\n var isDisabledItem = function(compareVal, rangeFn, rangeFnParam){\r\n return function(){\r\n return (typeof rangeFn === 'function' && rangeFn.apply(options, rangeFnParam) || []).indexOf(compareVal) !== -1;\r\n } \r\n }\r\n\r\n var dateObj = that.systemDate(new Date(date));\r\n var disabledTime = options.disabledTime.call(options, that.newDate(dateObj), position) || {};\r\n\r\n // 面板中的时分秒 HTML 元素需要分别检测是否禁用\r\n // 按钮检测任意一项是否禁用即可\r\n return opts.disabledType === 'datetime'\r\n ? isDisabledItem(dateObj.hours, disabledTime.hours)()\r\n || isDisabledItem(dateObj.minutes, disabledTime.minutes, [dateObj.hours])()\r\n || isDisabledItem(dateObj.seconds, disabledTime.seconds, [dateObj.hours, dateObj.minutes])()\r\n : [isDisabledItem(dateObj.hours, disabledTime.hours),\r\n isDisabledItem(dateObj.minutes, disabledTime.minutes, [dateObj.hours]),\r\n isDisabledItem(dateObj.seconds, disabledTime.seconds, [dateObj.hours, dateObj.minutes])][opts.time.length - 1]();\r\n }\r\n\r\n /**\r\n * 不可选取的日期时间\r\n * @param {number} timestamp 当前检测的日期的时间戳\r\n * @param {limitOptions} opts \r\n * @returns \r\n */\r\n Class.prototype.isDisabledDateTime = function(timestamp, opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n\r\n return that.isDisabledDate(timestamp, opts) || that.isDisabledTime(timestamp, opts);\r\n }\r\n\r\n\r\n /**\r\n * 无效日期范围的标记\r\n * @param {limitOptions} opts \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 || that.isDisabledDateTime(timestamp.now, opts);\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 rangeType: index,\r\n disabledType: 'date' // 日面板,检测当前日期是否禁用\r\n });\r\n that.cellRender(item, {year: YMD[0], month: YMD[1], date: YMD[2]}, 'date');\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 if(!that.panelYM) that.panelYM = {};\r\n that.panelYM[index] = {year: dateTime.year, month: dateTime.month};\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 disabledType: 'datetime' // 按钮,检测日期和时间\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 disabledType: 'datetime' // 按钮,检测日期和时间\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 rangeType: index,\r\n disabledType: 'date' // 年面板,检测当前年份中的所有日期是否禁用\r\n });\r\n that.cellRender(li, {year: yearNum, month: 1, date: 1}, 'year');\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 rangeType: index,\r\n disabledType: 'date' // 月面板,检测当前月份中的所有日期是否禁用\r\n });\r\n that.cellRender(li, {year: listYM[0], month: i + 1, date: 1}, 'month');\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 rangeType: index,\r\n disabledType: 'time', // 时间面板,分别检测时分秒列表是否禁用\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 disabledType: 'datetime' // 确认按钮,检测时分秒列表任意一项是否禁用\r\n });\r\n }\r\n };\r\n\r\n var setTimeListVisibility = function(){\r\n var showHour = options.format.indexOf('H') !== -1;\r\n var showMinute = options.format.indexOf('m') !== -1;\r\n var showSecond = options.format.indexOf('s') !== -1;\r\n var liElem = ul.children;\r\n var hideCount = 0;\r\n\r\n lay.each([showHour, showMinute, showSecond], function(i, isShow){\r\n if(!isShow){\r\n liElem[i].className += ' layui-hide';\r\n hideCount++;\r\n }\r\n })\r\n ul.className += (' laydate-time-list-hide-' + hideCount);\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 setTimeListVisibility();\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 = ['year', 'month'].indexOf(options.type) !== -1;\r\n var isChangeMonth = type === 'year' && ['date', 'datetime'].indexOf(options.type) !== -1;\r\n if (isYearOrMonth || isChangeMonth) {\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') || isChangeMonth) {\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 var olElem = lay(ul).find('ol');\r\n olElem.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') && that.done(null, 'change');\r\n\r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n });\r\n });\r\n\r\n if(layui.device().mobile){\r\n olElem.css({\r\n overflowY: 'auto',\r\n touchAction: 'pan-y'\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\r\n ,elemBtn = lay(that.footer).find(ELEM_CONFIRM)\r\n ,timeParams = options.type === 'datetime' || options.type === 'time' ? ['hours', 'minutes', 'seconds'] : undefined;\r\n if(options.range){\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 disabledType: 'datetime', // 按钮,检测日期和时间\r\n time: timeParams,\r\n rangeType: 0\r\n }) || that.limit({\r\n date: end,\r\n disabledType: 'datetime', // 按钮,检测日期和时间\r\n time: timeParams,\r\n rangeType: 1\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 * 格式化输入框显示值\r\n * @param {HTMLInputElement} elem HTML input 元素\r\n * @param {(value: string) => string} displayValueCallback \r\n */\r\n Class.prototype.formatToDisplay = function (elem, displayValueCallback) {\r\n var that = this;\r\n var props = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value');\r\n \r\n Object.defineProperty(\r\n elem,\r\n 'value',\r\n lay.extend({}, props, {\r\n get: function () {\r\n return this.getAttribute('lay-date');\r\n },\r\n set: function (value) {\r\n props.set.call(this, displayValueCallback.call(that, value));\r\n this.setAttribute('lay-date', value);\r\n },\r\n })\r\n );\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 var displayValue = typeof options.formatToDisplay === 'function' ? options.formatToDisplay(value) : value;\r\n lay(elem).html(displayValue);\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 * 判断日期是否存在面板,用于处理日期范围选择的一些边缘情况\r\n * @param {object} datetime 日期时间对象\r\n * @param {number} index - 面板索引\r\n * @returns \r\n */\r\n Class.prototype.checkPanelDate = function(datetime, index){\r\n var that = this;\r\n var options = that.config;\r\n // 年月范围选择不需要处理\r\n if(options.type !== 'date' && options.type !== 'datetime') return;\r\n\r\n var startPanel = index === 0;\r\n var month = datetime.month + 1; // 点击的日期所在月份\r\n var panelMonth = that.panelYM[index].month + 1; // 当前面板头部月份\r\n\r\n // 边缘日期的处理\r\n var firstRenderIndex = that.endState\r\n // 二次点击(一般为结束日期)任意一侧面板时:\r\n // 1. 左侧面板中,点击的月份属于下一个月时,应渲染右侧面板而不是左侧面板;\r\n // 2. 左侧面板中,点击的月份属于上一个月时,应将两个面板都重新渲染(等效点击 prevMonth);\r\n // 3. 右侧面板同理。\r\n ? function() {\r\n return (startPanel && month > panelMonth) || (!startPanel && month < panelMonth)\r\n ? 1 - index\r\n : index;\r\n }()\r\n // 初次点击(一般为开始日期)任意一侧面板时:\r\n // 1. 让该面板自行切换,以保持日期的「选中状态」在该侧;\r\n // 2. 另一侧面板则根据点击的面板进行响应式切换,以保持左右面板始终为连续月份。\r\n : index;\r\n\r\n // 为简化实现,只要点击的月份不等于当前面板顶部显示的月份时,就重新渲染两侧面板\r\n return {\r\n needFullRender: month !== panelMonth,\r\n index: firstRenderIndex\r\n }\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 } 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 // 此处为范围选择的日期面板点击选中处理,所以 disabledType 为 date\r\n if (that.endState && !that.limit({date: that.rangeLinked ? that.startDate : that.thisDateTime(1 - index), disabledType:'date'})) {\r\n // 根据选择之后判断是否需要切换模式\r\n var isChange;\r\n if (that.endState && that.autoCalendarModel.auto) {\r\n isChange = that.autoCalendarModel();\r\n }\r\n // 判断是否反选\r\n var needSwapDate = (isChange || that.rangeLinked && that.endState) && that.newDate(that.startDate) > that.newDate(that.endDate);\r\n if (needSwapDate){\r\n var isSameDate = that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month && that.startDate.date === that.endDate.date;\r\n var startDate;\r\n // 如果是同一天并且出现了反选证明是时分秒出现开始时间大于结束时间的现象\r\n if(isSameDate){\r\n startDate = that.startTime;\r\n that.startTime = that.endTime;\r\n that.endTime = startDate;\r\n }\r\n // 当出现反向选择时(即“后点击”的日期比“先点击”的日期小),重新提取区间\r\n startDate = that.startDate;\r\n that.startDate = lay.extend({}, that.endDate, that.startTime);\r\n options.dateTime = lay.extend({}, that.startDate);\r\n that.endDate = lay.extend({}, startDate, that.endTime);\r\n }\r\n isChange && (options.dateTime = lay.extend({}, that.startDate));\r\n }\r\n if (that.rangeLinked) {\r\n // 处理日期范围选择的一些边缘情况\r\n var checkState = that.checkPanelDate(dateTime, panelIndex);\r\n var dateTimeTemp = lay.extend({}, dateTime);\r\n var renderMode = (isChange || (checkState && checkState.needFullRender)) ? 'init' : null;\r\n var panelIdx = checkState ? checkState.index : panelIndex;\r\n that.calendar(dateTimeTemp, panelIdx, renderMode);\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)){\r\n var isTimeout = options.type === 'time'\r\n ? that.startTime && that.endTime && that.newDate(that.startTime) > that.newDate(that.endTime)\r\n : that.startDate && that.endDate && that.newDate(lay.extend({},that.startDate, that.startTime || {})) > that.newDate(lay.extend({},that.endDate, that.endTime || {}));\r\n\r\n return isTimeout \r\n ? that.hint(options.type === 'time' ? lang.timeout.replace(/日期/g, '时间') : lang.timeout)\r\n : that.hint(lang.invalidDate);\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 disabledType: 'datetime' // 按钮,检测日期和时间\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 // rangeLinked 模式非实时选择日期,不需要同步 options.dateTime应根据面板显示日期切换\r\n if(that.rangeLinked){\r\n var panelYM = that.panelYM[0];\r\n var YM = that.getAsYM(panelYM.year, panelYM.month, 'sub');\r\n var dateTimeTemp = lay.extend({}, options.dateTime, that.panelYM[0], {year: YM[0], month: YM[1]});\r\n that.checkDate('limit').calendar(dateTimeTemp, null, 'init');\r\n }else{\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 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 var panelYM = that.panelYM[0];\r\n var YM = that.getAsYM(panelYM.year, panelYM.month);\r\n var dateTimeTemp = lay.extend({}, options.dateTime, that.panelYM[0], {year: YM[0],month: YM[1]});\r\n that.checkDate('limit').calendar(dateTimeTemp, null, 'init');\r\n }else{\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 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 * jQuery JavaScript Library v3.7.1\r\n * https://jquery.com/\r\n *\r\n * Copyright OpenJS Foundation and other contributors\r\n * Released under the MIT license\r\n * https://jquery.org/license\r\n *\r\n * Date: 2023-08-28T13:37Z\r\n */\r\n( function( global, factory ) {\r\n\r\n\t\"use strict\";\r\n\r\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\r\n\r\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\r\n\t\t// is present, execute the factory and get jQuery.\r\n\t\t// For environments that do not have a `window` with a `document`\r\n\t\t// (such as Node.js), expose a factory as module.exports.\r\n\t\t// This accentuates the need for the creation of a real `window`.\r\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\r\n\t\t// See ticket trac-14549 for more info.\r\n\t\tmodule.exports = global.document ?\r\n\t\t\tfactory( global, true ) :\r\n\t\t\tfunction( w ) {\r\n\t\t\t\tif ( !w.document ) {\r\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\r\n\t\t\t\t}\r\n\t\t\t\treturn factory( w );\r\n\t\t\t};\r\n\t} else {\r\n\t\tfactory( global );\r\n\t}\r\n\r\n// Pass this if window is not defined yet\r\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\r\n\r\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\r\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\r\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\r\n// enough that all such attempts are guarded in a try block.\r\n\"use strict\";\r\n\r\nvar arr = [];\r\n\r\nvar getProto = Object.getPrototypeOf;\r\n\r\nvar slice = arr.slice;\r\n\r\nvar flat = arr.flat ? function( array ) {\r\n\treturn arr.flat.call( array );\r\n} : function( array ) {\r\n\treturn arr.concat.apply( [], array );\r\n};\r\n\r\n\r\nvar push = arr.push;\r\n\r\nvar indexOf = arr.indexOf;\r\n\r\nvar class2type = {};\r\n\r\nvar toString = class2type.toString;\r\n\r\nvar hasOwn = class2type.hasOwnProperty;\r\n\r\nvar fnToString = hasOwn.toString;\r\n\r\nvar ObjectFunctionString = fnToString.call( Object );\r\n\r\nvar support = {};\r\n\r\nvar isFunction = function isFunction( obj ) {\r\n\r\n\t\t// Support: Chrome <=57, Firefox <=52\r\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\r\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\r\n\t\t// We don't want to classify *any* DOM node as a function.\r\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\r\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\r\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\r\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\r\n\t\t\ttypeof obj.item !== \"function\";\r\n\t};\r\n\r\n\r\nvar isWindow = function isWindow( obj ) {\r\n\t\treturn obj != null && obj === obj.window;\r\n\t};\r\n\r\n\r\nvar document = window.document;\r\n\r\n\r\n\r\n\tvar preservedScriptAttributes = {\r\n\t\ttype: true,\r\n\t\tsrc: true,\r\n\t\tnonce: true,\r\n\t\tnoModule: true\r\n\t};\r\n\r\n\tfunction DOMEval( code, node, doc ) {\r\n\t\tdoc = doc || document;\r\n\r\n\t\tvar i, val,\r\n\t\t\tscript = doc.createElement( \"script\" );\r\n\r\n\t\tscript.text = code;\r\n\t\tif ( node ) {\r\n\t\t\tfor ( i in preservedScriptAttributes ) {\r\n\r\n\t\t\t\t// Support: Firefox 64+, Edge 18+\r\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\r\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\r\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\r\n\t\t\t\t// becomes browsing-context connected.\r\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\r\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\r\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\r\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\r\n\t\t\t\t// via an object.\r\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\r\n\t\t\t\tif ( val ) {\r\n\t\t\t\t\tscript.setAttribute( i, val );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\r\n\t}\r\n\r\n\r\nfunction toType( obj ) {\r\n\tif ( obj == null ) {\r\n\t\treturn obj + \"\";\r\n\t}\r\n\r\n\t// Support: Android <=2.3 only (functionish RegExp)\r\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\r\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\r\n\t\ttypeof obj;\r\n}\r\n/* global Symbol */\r\n// Defining this global in .eslintrc.json would create a danger of using the global\r\n// unguarded in another place, it seems safer to define global only for this module\r\n\r\n\r\n\r\nvar version = \"3.7.1\",\r\n\r\n\trhtmlSuffix = /HTML$/i,\r\n\r\n\t// Define a local copy of jQuery\r\n\tjQuery = function( selector, context ) {\r\n\r\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\r\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\r\n\t\treturn new jQuery.fn.init( selector, context );\r\n\t};\r\n\r\njQuery.fn = jQuery.prototype = {\r\n\r\n\t// The current version of jQuery being used\r\n\tjquery: version,\r\n\r\n\tconstructor: jQuery,\r\n\r\n\t// The default length of a jQuery object is 0\r\n\tlength: 0,\r\n\r\n\ttoArray: function() {\r\n\t\treturn slice.call( this );\r\n\t},\r\n\r\n\t// Get the Nth element in the matched element set OR\r\n\t// Get the whole matched element set as a clean array\r\n\tget: function( num ) {\r\n\r\n\t\t// Return all the elements in a clean array\r\n\t\tif ( num == null ) {\r\n\t\t\treturn slice.call( this );\r\n\t\t}\r\n\r\n\t\t// Return just the one element from the set\r\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\r\n\t},\r\n\r\n\t// Take an array of elements and push it onto the stack\r\n\t// (returning the new matched element set)\r\n\tpushStack: function( elems ) {\r\n\r\n\t\t// Build a new jQuery matched element set\r\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\r\n\r\n\t\t// Add the old object onto the stack (as a reference)\r\n\t\tret.prevObject = this;\r\n\r\n\t\t// Return the newly-formed element set\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// Execute a callback for every element in the matched set.\r\n\teach: function( callback ) {\r\n\t\treturn jQuery.each( this, callback );\r\n\t},\r\n\r\n\tmap: function( callback ) {\r\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\r\n\t\t\treturn callback.call( elem, i, elem );\r\n\t\t} ) );\r\n\t},\r\n\r\n\tslice: function() {\r\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\r\n\t},\r\n\r\n\tfirst: function() {\r\n\t\treturn this.eq( 0 );\r\n\t},\r\n\r\n\tlast: function() {\r\n\t\treturn this.eq( -1 );\r\n\t},\r\n\r\n\teven: function() {\r\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\r\n\t\t\treturn ( i + 1 ) % 2;\r\n\t\t} ) );\r\n\t},\r\n\r\n\todd: function() {\r\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\r\n\t\t\treturn i % 2;\r\n\t\t} ) );\r\n\t},\r\n\r\n\teq: function( i ) {\r\n\t\tvar len = this.length,\r\n\t\t\tj = +i + ( i < 0 ? len : 0 );\r\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\r\n\t},\r\n\r\n\tend: function() {\r\n\t\treturn this.prevObject || this.constructor();\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t// Behaves like an Array's method, not like a jQuery method.\r\n\tpush: push,\r\n\tsort: arr.sort,\r\n\tsplice: arr.splice\r\n};\r\n\r\njQuery.extend = jQuery.fn.extend = function() {\r\n\tvar options, name, src, copy, copyIsArray, clone,\r\n\t\ttarget = arguments[ 0 ] || {},\r\n\t\ti = 1,\r\n\t\tlength = arguments.length,\r\n\t\tdeep = false;\r\n\r\n\t// Handle a deep copy situation\r\n\tif ( typeof target === \"boolean\" ) {\r\n\t\tdeep = target;\r\n\r\n\t\t// Skip the boolean and the target\r\n\t\ttarget = arguments[ i ] || {};\r\n\t\ti++;\r\n\t}\r\n\r\n\t// Handle case when target is a string or something (possible in deep copy)\r\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\r\n\t\ttarget = {};\r\n\t}\r\n\r\n\t// Extend jQuery itself if only one argument is passed\r\n\tif ( i === length ) {\r\n\t\ttarget = this;\r\n\t\ti--;\r\n\t}\r\n\r\n\tfor ( ; i < length; i++ ) {\r\n\r\n\t\t// Only deal with non-null/undefined values\r\n\t\tif ( ( options = arguments[ i ] ) != null ) {\r\n\r\n\t\t\t// Extend the base object\r\n\t\t\tfor ( name in options ) {\r\n\t\t\t\tcopy = options[ name ];\r\n\r\n\t\t\t\t// Prevent Object.prototype pollution\r\n\t\t\t\t// Prevent never-ending loop\r\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Recurse if we're merging plain objects or arrays\r\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\r\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\r\n\t\t\t\t\tsrc = target[ name ];\r\n\r\n\t\t\t\t\t// Ensure proper type for the source value\r\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\r\n\t\t\t\t\t\tclone = [];\r\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\r\n\t\t\t\t\t\tclone = {};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tclone = src;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcopyIsArray = false;\r\n\r\n\t\t\t\t\t// Never move original objects, clone them\r\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\r\n\r\n\t\t\t\t// Don't bring in undefined values\r\n\t\t\t\t} else if ( copy !== undefined ) {\r\n\t\t\t\t\ttarget[ name ] = copy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the modified object\r\n\treturn target;\r\n};\r\n\r\njQuery.extend( {\r\n\r\n\t// Unique for each copy of jQuery on the page\r\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\r\n\r\n\t// Assume jQuery is ready without the ready module\r\n\tisReady: true,\r\n\r\n\terror: function( msg ) {\r\n\t\tthrow new Error( msg );\r\n\t},\r\n\r\n\tnoop: function() {},\r\n\r\n\tisPlainObject: function( obj ) {\r\n\t\tvar proto, Ctor;\r\n\r\n\t\t// Detect obvious negatives\r\n\t\t// Use toString instead of jQuery.type to catch host objects\r\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tproto = getProto( obj );\r\n\r\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\r\n\t\tif ( !proto ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\r\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\r\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\r\n\t},\r\n\r\n\tisEmptyObject: function( obj ) {\r\n\t\tvar name;\r\n\r\n\t\tfor ( name in obj ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\t// Evaluates a script in a provided context; falls back to the global one\r\n\t// if not specified.\r\n\tglobalEval: function( code, options, doc ) {\r\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\r\n\t},\r\n\r\n\teach: function( obj, callback ) {\r\n\t\tvar length, i = 0;\r\n\r\n\t\tif ( isArrayLike( obj ) ) {\r\n\t\t\tlength = obj.length;\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor ( i in obj ) {\r\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn obj;\r\n\t},\r\n\r\n\r\n\t// Retrieve the text value of an array of DOM nodes\r\n\ttext: function( elem ) {\r\n\t\tvar node,\r\n\t\t\tret = \"\",\r\n\t\t\ti = 0,\r\n\t\t\tnodeType = elem.nodeType;\r\n\r\n\t\tif ( !nodeType ) {\r\n\r\n\t\t\t// If no nodeType, this is expected to be an array\r\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\r\n\r\n\t\t\t\t// Do not traverse comment nodes\r\n\t\t\t\tret += jQuery.text( node );\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\r\n\t\t\treturn elem.textContent;\r\n\t\t}\r\n\t\tif ( nodeType === 9 ) {\r\n\t\t\treturn elem.documentElement.textContent;\r\n\t\t}\r\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\r\n\t\t\treturn elem.nodeValue;\r\n\t\t}\r\n\r\n\t\t// Do not include comment or processing instruction nodes\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// results is for internal usage only\r\n\tmakeArray: function( arr, results ) {\r\n\t\tvar ret = results || [];\r\n\r\n\t\tif ( arr != null ) {\r\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\r\n\t\t\t\tjQuery.merge( ret,\r\n\t\t\t\t\ttypeof arr === \"string\" ?\r\n\t\t\t\t\t\t[ arr ] : arr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tpush.call( ret, arr );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\tinArray: function( elem, arr, i ) {\r\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\r\n\t},\r\n\r\n\tisXMLDoc: function( elem ) {\r\n\t\tvar namespace = elem && elem.namespaceURI,\r\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\r\n\r\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\r\n\t\t// document fragments.\r\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\r\n\t},\r\n\r\n\t// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t// push.apply(_, arraylike) throws on ancient WebKit\r\n\tmerge: function( first, second ) {\r\n\t\tvar len = +second.length,\r\n\t\t\tj = 0,\r\n\t\t\ti = first.length;\r\n\r\n\t\tfor ( ; j < len; j++ ) {\r\n\t\t\tfirst[ i++ ] = second[ j ];\r\n\t\t}\r\n\r\n\t\tfirst.length = i;\r\n\r\n\t\treturn first;\r\n\t},\r\n\r\n\tgrep: function( elems, callback, invert ) {\r\n\t\tvar callbackInverse,\r\n\t\t\tmatches = [],\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tcallbackExpect = !invert;\r\n\r\n\t\t// Go through the array, only saving the items\r\n\t\t// that pass the validator function\r\n\t\tfor ( ; i < length; i++ ) {\r\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\r\n\t\t\tif ( callbackInverse !== callbackExpect ) {\r\n\t\t\t\tmatches.push( elems[ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn matches;\r\n\t},\r\n\r\n\t// arg is for internal usage only\r\n\tmap: function( elems, callback, arg ) {\r\n\t\tvar length, value,\r\n\t\t\ti = 0,\r\n\t\t\tret = [];\r\n\r\n\t\t// Go through the array, translating each of the items to their new values\r\n\t\tif ( isArrayLike( elems ) ) {\r\n\t\t\tlength = elems.length;\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret.push( value );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Go through every key on the object,\r\n\t\t} else {\r\n\t\t\tfor ( i in elems ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret.push( value );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\treturn flat( ret );\r\n\t},\r\n\r\n\t// A global GUID counter for objects\r\n\tguid: 1,\r\n\r\n\t// jQuery.support is not used in Core but other projects attach their\r\n\t// properties to it so it needs to exist.\r\n\tsupport: support\r\n} );\r\n\r\nif ( typeof Symbol === \"function\" ) {\r\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\r\n}\r\n\r\n// Populate the class2type map\r\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\r\n\tfunction( _i, name ) {\r\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\r\n\t} );\r\n\r\nfunction isArrayLike( obj ) {\r\n\r\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\r\n\t// `in` check used to prevent JIT error (gh-2145)\r\n\t// hasOwn isn't used here due to false negatives\r\n\t// regarding Nodelist length in IE\r\n\tvar length = !!obj && \"length\" in obj && obj.length,\r\n\t\ttype = toType( obj );\r\n\r\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn type === \"array\" || length === 0 ||\r\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\r\n}\r\n\r\n\r\nfunction nodeName( elem, name ) {\r\n\r\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\r\n\r\n}\r\nvar pop = arr.pop;\r\n\r\n\r\nvar sort = arr.sort;\r\n\r\n\r\nvar splice = arr.splice;\r\n\r\n\r\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\r\n\r\n\r\nvar rtrimCSS = new RegExp(\r\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\r\n\t\"g\"\r\n);\r\n\r\n\r\n\r\n\r\n// Note: an element does not contain itself\r\njQuery.contains = function( a, b ) {\r\n\tvar bup = b && b.parentNode;\r\n\r\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\r\n\r\n\t\t// Support: IE 9 - 11+\r\n\t\t// IE doesn't have `contains` on SVG.\r\n\t\ta.contains ?\r\n\t\t\ta.contains( bup ) :\r\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\r\n\t) );\r\n};\r\n\r\n\r\n\r\n\r\n// CSS string/identifier serialization\r\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\r\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\r\n\r\nfunction fcssescape( ch, asCodePoint ) {\r\n\tif ( asCodePoint ) {\r\n\r\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\r\n\t\tif ( ch === \"\\0\" ) {\r\n\t\t\treturn \"\\uFFFD\";\r\n\t\t}\r\n\r\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\r\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\r\n\t}\r\n\r\n\t// Other potentially-special ASCII characters get backslash-escaped\r\n\treturn \"\\\\\" + ch;\r\n}\r\n\r\njQuery.escapeSelector = function( sel ) {\r\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\r\n};\r\n\r\n\r\n\r\n\r\nvar preferredDoc = document,\r\n\tpushNative = push;\r\n\r\n( function() {\r\n\r\nvar i,\r\n\tExpr,\r\n\toutermostContext,\r\n\tsortInput,\r\n\thasDuplicate,\r\n\tpush = pushNative,\r\n\r\n\t// Local document vars\r\n\tdocument,\r\n\tdocumentElement,\r\n\tdocumentIsHTML,\r\n\trbuggyQSA,\r\n\tmatches,\r\n\r\n\t// Instance-specific data\r\n\texpando = jQuery.expando,\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\tnonnativeSelectorCache = createCache(),\r\n\tsortOrder = function( a, b ) {\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\r\n\t\t\"loop|multiple|open|readonly|required|scoped\",\r\n\r\n\t// Regular expressions\r\n\r\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\r\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\r\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\r\n\r\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\r\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\r\n\r\n\t\t// Operator (capture 2)\r\n\t\t\"*([*^$|!~]?=)\" + whitespace +\r\n\r\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\r\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\r\n\t\twhitespace + \"*\\\\]\",\r\n\r\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\r\n\r\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\r\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\r\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\r\n\r\n\t\t// 2. simple (capture 6)\r\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\r\n\r\n\t\t// 3. anything else (capture 2)\r\n\t\t\".*\" +\r\n\t\t\")\\\\)|)\",\r\n\r\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\r\n\r\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\r\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\r\n\t\twhitespace + \"*\" ),\r\n\trdescend = new RegExp( whitespace + \"|>\" ),\r\n\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\r\n\r\n\tmatchExpr = {\r\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\r\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\r\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\r\n\t\tATTR: new RegExp( \"^\" + attributes ),\r\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\r\n\t\tCHILD: new RegExp(\r\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\r\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\r\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\r\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\r\n\r\n\t\t// For use in libraries implementing .is()\r\n\t\t// We use this for POS matching in `select`\r\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\r\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\r\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\r\n\t},\r\n\r\n\trinputs = /^(?:input|select|textarea|button)$/i,\r\n\trheader = /^h\\d$/i,\r\n\r\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trsibling = /[+~]/,\r\n\r\n\t// CSS escapes\r\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\r\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\r\n\tfunescape = function( escape, nonHex ) {\r\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\r\n\r\n\t\tif ( nonHex ) {\r\n\r\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\r\n\t\t\treturn nonHex;\r\n\t\t}\r\n\r\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\r\n\t\t// Support: IE <=11+\r\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\r\n\t\t// surrogate pair\r\n\t\treturn high < 0 ?\r\n\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t},\r\n\r\n\t// Used for iframes; see `setDocument`.\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t// Removing the function wrapper causes a \"Permission Denied\"\r\n\t// error in IE/Edge.\r\n\tunloadHandler = function() {\r\n\t\tsetDocument();\r\n\t},\r\n\r\n\tinDisabledFieldset = addCombinator(\r\n\t\tfunction( elem ) {\r\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\r\n\t\t},\r\n\t\t{ dir: \"parentNode\", next: \"legend\" }\r\n\t);\r\n\r\n// Support: IE <=9 only\r\n// Accessing document.activeElement can throw unexpectedly\r\n// https://bugs.jquery.com/ticket/13393\r\nfunction safeActiveElement() {\r\n\ttry {\r\n\t\treturn document.activeElement;\r\n\t} catch ( err ) { }\r\n}\r\n\r\n// Optimize for push.apply( _, NodeList )\r\ntry {\r\n\tpush.apply(\r\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\r\n\t\tpreferredDoc.childNodes\r\n\t);\r\n\r\n\t// Support: Android <=4.0\r\n\t// Detect silently failing push.apply\r\n\t// eslint-disable-next-line no-unused-expressions\r\n\tarr[ preferredDoc.childNodes.length ].nodeType;\r\n} catch ( e ) {\r\n\tpush = {\r\n\t\tapply: function( target, els ) {\r\n\t\t\tpushNative.apply( target, slice.call( els ) );\r\n\t\t},\r\n\t\tcall: function( target ) {\r\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction find( selector, context, results, seed ) {\r\n\tvar m, i, elem, nid, match, groups, newSelector,\r\n\t\tnewContext = context && context.ownerDocument,\r\n\r\n\t\t// nodeType defaults to 9, since context defaults to document\r\n\t\tnodeType = context ? context.nodeType : 9;\r\n\r\n\tresults = results || [];\r\n\r\n\t// Return early from calls with invalid selector or context\r\n\tif ( typeof selector !== \"string\" || !selector ||\r\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\r\n\tif ( !seed ) {\r\n\t\tsetDocument( context );\r\n\t\tcontext = context || document;\r\n\r\n\t\tif ( documentIsHTML ) {\r\n\r\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\r\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\r\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\r\n\r\n\t\t\t\t// ID selector\r\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\r\n\r\n\t\t\t\t\t// Document context\r\n\t\t\t\t\tif ( nodeType === 9 ) {\r\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\r\n\r\n\t\t\t\t\t\t\t// Support: IE 9 only\r\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\r\n\t\t\t\t\t\t\tif ( elem.id === m ) {\r\n\t\t\t\t\t\t\t\tpush.call( results, elem );\r\n\t\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Element context\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// Support: IE 9 only\r\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\r\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\r\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\r\n\t\t\t\t\t\t\telem.id === m ) {\r\n\r\n\t\t\t\t\t\t\tpush.call( results, elem );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Type selector\r\n\t\t\t\t} else if ( match[ 2 ] ) {\r\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\r\n\t\t\t\t\treturn results;\r\n\r\n\t\t\t\t// Class selector\r\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\r\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Take advantage of querySelectorAll\r\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\r\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\r\n\r\n\t\t\t\tnewSelector = selector;\r\n\t\t\t\tnewContext = context;\r\n\r\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\r\n\t\t\t\t// descendant combinators, which is not what we want.\r\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\r\n\t\t\t\t// list with an ID selector referencing the scope context.\r\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\r\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\r\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\r\n\t\t\t\tif ( nodeType === 1 &&\r\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\r\n\r\n\t\t\t\t\t// Expand context for sibling selectors\r\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\r\n\t\t\t\t\t\tcontext;\r\n\r\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\r\n\t\t\t\t\t// supports it & if we're not changing the context.\r\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\r\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\r\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\r\n\r\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\r\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\r\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prefix every selector in the list\r\n\t\t\t\t\tgroups = tokenize( selector );\r\n\t\t\t\t\ti = groups.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\r\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnewSelector = groups.join( \",\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpush.apply( results,\r\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t} catch ( qsaError ) {\r\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif ( nid === expando ) {\r\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// All others\r\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\r\n}\r\n\r\n/**\r\n * Create key-value caches of limited size\r\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\r\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\r\n *\tdeleting the oldest entry\r\n */\r\nfunction createCache() {\r\n\tvar keys = [];\r\n\r\n\tfunction cache( key, value ) {\r\n\r\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\r\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\r\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\r\n\r\n\t\t\t// Only keep the most recent entries\r\n\t\t\tdelete cache[ keys.shift() ];\r\n\t\t}\r\n\t\treturn ( cache[ key + \" \" ] = value );\r\n\t}\r\n\treturn cache;\r\n}\r\n\r\n/**\r\n * Mark a function for special use by jQuery selector module\r\n * @param {Function} fn The function to mark\r\n */\r\nfunction markFunction( fn ) {\r\n\tfn[ expando ] = true;\r\n\treturn fn;\r\n}\r\n\r\n/**\r\n * Support testing using an element\r\n * @param {Function} fn Passed the created element and returns a boolean result\r\n */\r\nfunction assert( fn ) {\r\n\tvar el = document.createElement( \"fieldset\" );\r\n\r\n\ttry {\r\n\t\treturn !!fn( el );\r\n\t} catch ( e ) {\r\n\t\treturn false;\r\n\t} finally {\r\n\r\n\t\t// Remove from its parent by default\r\n\t\tif ( el.parentNode ) {\r\n\t\t\tel.parentNode.removeChild( el );\r\n\t\t}\r\n\r\n\t\t// release memory in IE\r\n\t\tel = null;\r\n\t}\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for input types\r\n * @param {String} type\r\n */\r\nfunction createInputPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for buttons\r\n * @param {String} type\r\n */\r\nfunction createButtonPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\r\n\t\t\telem.type === type;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for :enabled/:disabled\r\n * @param {Boolean} disabled true for :disabled; false for :enabled\r\n */\r\nfunction createDisabledPseudo( disabled ) {\r\n\r\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\r\n\treturn function( elem ) {\r\n\r\n\t\t// Only certain elements can match :enabled or :disabled\r\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\r\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\r\n\t\tif ( \"form\" in elem ) {\r\n\r\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\r\n\t\t\t// * listed form-associated elements in a disabled fieldset\r\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\r\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\r\n\t\t\t// * option elements in a disabled optgroup\r\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\r\n\t\t\t// All such elements have a \"form\" property.\r\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\r\n\r\n\t\t\t\t// Option elements defer to a parent optgroup if present\r\n\t\t\t\tif ( \"label\" in elem ) {\r\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\r\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn elem.disabled === disabled;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Support: IE 6 - 11+\r\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\r\n\t\t\t\treturn elem.isDisabled === disabled ||\r\n\r\n\t\t\t\t\t// Where there is no isDisabled, check manually\r\n\t\t\t\t\telem.isDisabled !== !disabled &&\r\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.disabled === disabled;\r\n\r\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\r\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\r\n\t\t// even exist on them, let alone have a boolean value.\r\n\t\t} else if ( \"label\" in elem ) {\r\n\t\t\treturn elem.disabled === disabled;\r\n\t\t}\r\n\r\n\t\t// Remaining elements are neither :enabled nor :disabled\r\n\t\treturn false;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for positionals\r\n * @param {Function} fn\r\n */\r\nfunction createPositionalPseudo( fn ) {\r\n\treturn markFunction( function( argument ) {\r\n\t\targument = +argument;\r\n\t\treturn markFunction( function( seed, matches ) {\r\n\t\t\tvar j,\r\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\r\n\t\t\t\ti = matchIndexes.length;\r\n\r\n\t\t\t// Match elements found at the specified indexes\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\r\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\t} );\r\n}\r\n\r\n/**\r\n * Checks a node for validity as a jQuery selector context\r\n * @param {Element|Object=} context\r\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\r\n */\r\nfunction testContext( context ) {\r\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\r\n}\r\n\r\n/**\r\n * Sets document-related variables once based on the current document\r\n * @param {Element|Object} [node] An element or document object to use to set the document\r\n * @returns {Object} Returns the current document\r\n */\r\nfunction setDocument( node ) {\r\n\tvar subWindow,\r\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\r\n\r\n\t// Return early if doc is invalid or already selected\r\n\t// Support: IE 11+, Edge 17 - 18+\r\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t// two documents; shallow comparisons work.\r\n\t// eslint-disable-next-line eqeqeq\r\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\r\n\t\treturn document;\r\n\t}\r\n\r\n\t// Update global variables\r\n\tdocument = doc;\r\n\tdocumentElement = document.documentElement;\r\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\r\n\r\n\t// Support: iOS 7 only, IE 9 - 11+\r\n\t// Older browsers didn't support unprefixed `matches`.\r\n\tmatches = documentElement.matches ||\r\n\t\tdocumentElement.webkitMatchesSelector ||\r\n\t\tdocumentElement.msMatchesSelector;\r\n\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\r\n\t// (see trac-13936).\r\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\r\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\r\n\tif ( documentElement.msMatchesSelector &&\r\n\r\n\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t// two documents; shallow comparisons work.\r\n\t\t// eslint-disable-next-line eqeqeq\r\n\t\tpreferredDoc != document &&\r\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\r\n\r\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\r\n\t}\r\n\r\n\t// Support: IE <10\r\n\t// Check if getElementById returns elements by name\r\n\t// The broken getElementById methods don't pick up programmatically-set names,\r\n\t// so use a roundabout getElementsByName test\r\n\tsupport.getById = assert( function( el ) {\r\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\r\n\t\treturn !document.getElementsByName ||\r\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\r\n\t} );\r\n\r\n\t// Support: IE 9 only\r\n\t// Check to see if it's possible to do matchesSelector\r\n\t// on a disconnected node.\r\n\tsupport.disconnectedMatch = assert( function( el ) {\r\n\t\treturn matches.call( el, \"*\" );\r\n\t} );\r\n\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t// IE/Edge don't support the :scope pseudo-class.\r\n\tsupport.scope = assert( function() {\r\n\t\treturn document.querySelectorAll( \":scope\" );\r\n\t} );\r\n\r\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\r\n\t// Make sure the `:has()` argument is parsed unforgivingly.\r\n\t// We include `*` in the test to detect buggy implementations that are\r\n\t// _selectively_ forgiving (specifically when the list includes at least\r\n\t// one valid selector).\r\n\t// Note that we treat complete lack of support for `:has()` as if it were\r\n\t// spec-compliant support, which is fine because use of `:has()` in such\r\n\t// environments will fail in the qSA path and fall back to jQuery traversal\r\n\t// anyway.\r\n\tsupport.cssHas = assert( function() {\r\n\t\ttry {\r\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\r\n\t\t\treturn false;\r\n\t\t} catch ( e ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t} );\r\n\r\n\t// ID filter and find\r\n\tif ( support.getById ) {\r\n\t\tExpr.filter.ID = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t\tExpr.find.ID = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\r\n\t\t\t\tvar elem = context.getElementById( id );\r\n\t\t\t\treturn elem ? [ elem ] : [];\r\n\t\t\t}\r\n\t\t};\r\n\t} else {\r\n\t\tExpr.filter.ID = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\r\n\t\t\t\t\telem.getAttributeNode( \"id\" );\r\n\t\t\t\treturn node && node.value === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\r\n\t\t// Support: IE 6 - 7 only\r\n\t\t// getElementById is not reliable as a find shortcut\r\n\t\tExpr.find.ID = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\r\n\t\t\t\tvar node, i, elems,\r\n\t\t\t\t\telem = context.getElementById( id );\r\n\r\n\t\t\t\tif ( elem ) {\r\n\r\n\t\t\t\t\t// Verify the id attribute\r\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\r\n\t\t\t\t\tif ( node && node.value === id ) {\r\n\t\t\t\t\t\treturn [ elem ];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Fall back on getElementsByName\r\n\t\t\t\t\telems = context.getElementsByName( id );\r\n\t\t\t\t\ti = 0;\r\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\r\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\r\n\t\t\t\t\t\tif ( node && node.value === id ) {\r\n\t\t\t\t\t\t\treturn [ elem ];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t// Tag\r\n\tExpr.find.TAG = function( tag, context ) {\r\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\r\n\t\t\treturn context.getElementsByTagName( tag );\r\n\r\n\t\t// DocumentFragment nodes don't have gEBTN\r\n\t\t} else {\r\n\t\t\treturn context.querySelectorAll( tag );\r\n\t\t}\r\n\t};\r\n\r\n\t// Class\r\n\tExpr.find.CLASS = function( className, context ) {\r\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\r\n\t\t\treturn context.getElementsByClassName( className );\r\n\t\t}\r\n\t};\r\n\r\n\t/* QSA/matchesSelector\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// QSA and matchesSelector support\r\n\r\n\trbuggyQSA = [];\r\n\r\n\t// Build QSA regex\r\n\t// Regex strategy adopted from Diego Perini\r\n\tassert( function( el ) {\r\n\r\n\t\tvar input;\r\n\r\n\t\tdocumentElement.appendChild( el ).innerHTML =\r\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\r\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\r\n\t\t\t\"<option selected=''></option></select>\";\r\n\r\n\t\t// Support: iOS <=7 - 8 only\r\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\r\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\r\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\r\n\t\t}\r\n\r\n\t\t// Support: iOS <=7 - 8 only\r\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\r\n\t\t\trbuggyQSA.push( \"~=\" );\r\n\t\t}\r\n\r\n\t\t// Support: iOS 8 only\r\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\r\n\t\t// In-page `selector#id sibling-combinator selector` fails\r\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\r\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\r\n\t\t}\r\n\r\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\r\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\r\n\t\t// This is probably OK but for backwards compatibility we want to maintain\r\n\t\t// handling them through jQuery traversal in jQuery 3.x.\r\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\r\n\t\t\trbuggyQSA.push( \":checked\" );\r\n\t\t}\r\n\r\n\t\t// Support: Windows 8 Native Apps\r\n\t\t// The type and name attributes are restricted during .innerHTML assignment\r\n\t\tinput = document.createElement( \"input\" );\r\n\t\tinput.setAttribute( \"type\", \"hidden\" );\r\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\r\n\r\n\t\t// Support: IE 9 - 11+\r\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\r\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\r\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\r\n\t\t// This is probably OK but for backwards compatibility we want to maintain\r\n\t\t// handling them through jQuery traversal in jQuery 3.x.\r\n\t\tdocumentElement.appendChild( el ).disabled = true;\r\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\r\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\r\n\t\t}\r\n\r\n\t\t// Support: IE 11+, Edge 15 - 18+\r\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\r\n\t\t// Adding a temporary attribute to the document before the selection works\r\n\t\t// around the issue.\r\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\r\n\t\tinput = document.createElement( \"input\" );\r\n\t\tinput.setAttribute( \"name\", \"\" );\r\n\t\tel.appendChild( input );\r\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\r\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\r\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\r\n\t\t}\r\n\t} );\r\n\r\n\tif ( !support.cssHas ) {\r\n\r\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\r\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\r\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\r\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\r\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\r\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\r\n\t\trbuggyQSA.push( \":has\" );\r\n\t}\r\n\r\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\r\n\r\n\t/* Sorting\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Document order sorting\r\n\tsortOrder = function( a, b ) {\r\n\r\n\t\t// Flag for duplicate removal\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Sort on method existence if only one input has compareDocumentPosition\r\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\r\n\t\tif ( compare ) {\r\n\t\t\treturn compare;\r\n\t\t}\r\n\r\n\t\t// Calculate position if both inputs belong to the same document\r\n\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t// two documents; shallow comparisons work.\r\n\t\t// eslint-disable-next-line eqeqeq\r\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\r\n\t\t\ta.compareDocumentPosition( b ) :\r\n\r\n\t\t\t// Otherwise we know they are disconnected\r\n\t\t\t1;\r\n\r\n\t\t// Disconnected nodes\r\n\t\tif ( compare & 1 ||\r\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\r\n\r\n\t\t\t// Choose the first element that is related to our preferred document\r\n\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\r\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\r\n\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\r\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\t// Maintain original order\r\n\t\t\treturn sortInput ?\r\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\r\n\t\t\t\t0;\r\n\t\t}\r\n\r\n\t\treturn compare & 4 ? -1 : 1;\r\n\t};\r\n\r\n\treturn document;\r\n}\r\n\r\nfind.matches = function( expr, elements ) {\r\n\treturn find( expr, null, null, elements );\r\n};\r\n\r\nfind.matchesSelector = function( elem, expr ) {\r\n\tsetDocument( elem );\r\n\r\n\tif ( documentIsHTML &&\r\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\r\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\r\n\r\n\t\ttry {\r\n\t\t\tvar ret = matches.call( elem, expr );\r\n\r\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\r\n\t\t\tif ( ret || support.disconnectedMatch ||\r\n\r\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\r\n\t\t\t\t\t// fragment in IE 9\r\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t} catch ( e ) {\r\n\t\t\tnonnativeSelectorCache( expr, true );\r\n\t\t}\r\n\t}\r\n\r\n\treturn find( expr, document, null, [ elem ] ).length > 0;\r\n};\r\n\r\nfind.contains = function( context, elem ) {\r\n\r\n\t// Set document vars if needed\r\n\t// Support: IE 11+, Edge 17 - 18+\r\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t// two documents; shallow comparisons work.\r\n\t// eslint-disable-next-line eqeqeq\r\n\tif ( ( context.ownerDocument || context ) != document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\treturn jQuery.contains( context, elem );\r\n};\r\n\r\n\r\nfind.attr = function( elem, name ) {\r\n\r\n\t// Set document vars if needed\r\n\t// Support: IE 11+, Edge 17 - 18+\r\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t// two documents; shallow comparisons work.\r\n\t// eslint-disable-next-line eqeqeq\r\n\tif ( ( elem.ownerDocument || elem ) != document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\r\n\r\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\r\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\r\n\t\t\tfn( elem, name, !documentIsHTML ) :\r\n\t\t\tundefined;\r\n\r\n\tif ( val !== undefined ) {\r\n\t\treturn val;\r\n\t}\r\n\r\n\treturn elem.getAttribute( name );\r\n};\r\n\r\nfind.error = function( msg ) {\r\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\r\n};\r\n\r\n/**\r\n * Document sorting and removing duplicates\r\n * @param {ArrayLike} results\r\n */\r\njQuery.uniqueSort = function( results ) {\r\n\tvar elem,\r\n\t\tduplicates = [],\r\n\t\tj = 0,\r\n\t\ti = 0;\r\n\r\n\t// Unless we *know* we can detect duplicates, assume their presence\r\n\t//\r\n\t// Support: Android <=4.0+\r\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\r\n\t// depend on duplicate detection in all browsers without a stable sort.\r\n\thasDuplicate = !support.sortStable;\r\n\tsortInput = !support.sortStable && slice.call( results, 0 );\r\n\tsort.call( results, sortOrder );\r\n\r\n\tif ( hasDuplicate ) {\r\n\t\twhile ( ( elem = results[ i++ ] ) ) {\r\n\t\t\tif ( elem === results[ i ] ) {\r\n\t\t\t\tj = duplicates.push( i );\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile ( j-- ) {\r\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\r\n\t\t}\r\n\t}\r\n\r\n\t// Clear input after sorting to release objects\r\n\t// See https://github.com/jquery/sizzle/pull/225\r\n\tsortInput = null;\r\n\r\n\treturn results;\r\n};\r\n\r\njQuery.fn.uniqueSort = function() {\r\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\r\n};\r\n\r\nExpr = jQuery.expr = {\r\n\r\n\t// Can be adjusted by the user\r\n\tcacheLength: 50,\r\n\r\n\tcreatePseudo: markFunction,\r\n\r\n\tmatch: matchExpr,\r\n\r\n\tattrHandle: {},\r\n\r\n\tfind: {},\r\n\r\n\trelative: {\r\n\t\t\">\": { dir: \"parentNode\", first: true },\r\n\t\t\" \": { dir: \"parentNode\" },\r\n\t\t\"+\": { dir: \"previousSibling\", first: true },\r\n\t\t\"~\": { dir: \"previousSibling\" }\r\n\t},\r\n\r\n\tpreFilter: {\r\n\t\tATTR: function( match ) {\r\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\r\n\r\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\r\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\r\n\t\t\t\t.replace( runescape, funescape );\r\n\r\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\r\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\r\n\t\t\t}\r\n\r\n\t\t\treturn match.slice( 0, 4 );\r\n\t\t},\r\n\r\n\t\tCHILD: function( match ) {\r\n\r\n\t\t\t/* matches from matchExpr[\"CHILD\"]\r\n\t\t\t\t1 type (only|nth|...)\r\n\t\t\t\t2 what (child|of-type)\r\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\r\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\r\n\t\t\t\t5 sign of xn-component\r\n\t\t\t\t6 x of xn-component\r\n\t\t\t\t7 sign of y-component\r\n\t\t\t\t8 y of y-component\r\n\t\t\t*/\r\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\r\n\r\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\r\n\r\n\t\t\t\t// nth-* requires argument\r\n\t\t\t\tif ( !match[ 3 ] ) {\r\n\t\t\t\t\tfind.error( match[ 0 ] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\r\n\t\t\t\t// remember that false/true cast respectively to 0/1\r\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\r\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\r\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\r\n\t\t\t\t);\r\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\r\n\r\n\t\t\t// other types prohibit arguments\r\n\t\t\t} else if ( match[ 3 ] ) {\r\n\t\t\t\tfind.error( match[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\treturn match;\r\n\t\t},\r\n\r\n\t\tPSEUDO: function( match ) {\r\n\t\t\tvar excess,\r\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\r\n\r\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t// Accept quoted arguments as-is\r\n\t\t\tif ( match[ 3 ] ) {\r\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\r\n\r\n\t\t\t// Strip excess characters from unquoted arguments\r\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\r\n\r\n\t\t\t\t// Get excess from tokenize (recursively)\r\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\r\n\r\n\t\t\t\t// advance to the next closing parenthesis\r\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\r\n\r\n\t\t\t\t// excess is a negative index\r\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\r\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\r\n\t\t\t}\r\n\r\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\r\n\t\t\treturn match.slice( 0, 3 );\r\n\t\t}\r\n\t},\r\n\r\n\tfilter: {\r\n\r\n\t\tTAG: function( nodeNameSelector ) {\r\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn nodeNameSelector === \"*\" ?\r\n\t\t\t\tfunction() {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} :\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\tCLASS: function( className ) {\r\n\t\t\tvar pattern = classCache[ className + \" \" ];\r\n\r\n\t\t\treturn pattern ||\r\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\r\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\r\n\t\t\t\tclassCache( className, function( elem ) {\r\n\t\t\t\t\treturn pattern.test(\r\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\r\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\r\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t);\r\n\t\t\t\t} );\r\n\t\t},\r\n\r\n\t\tATTR: function( name, operator, check ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar result = find.attr( elem, name );\r\n\r\n\t\t\t\tif ( result == null ) {\r\n\t\t\t\t\treturn operator === \"!=\";\r\n\t\t\t\t}\r\n\t\t\t\tif ( !operator ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult += \"\";\r\n\r\n\t\t\t\tif ( operator === \"=\" ) {\r\n\t\t\t\t\treturn result === check;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"!=\" ) {\r\n\t\t\t\t\treturn result !== check;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"^=\" ) {\r\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"*=\" ) {\r\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"$=\" ) {\r\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"~=\" ) {\r\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\r\n\t\t\t\t\t\t.indexOf( check ) > -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"|=\" ) {\r\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\tCHILD: function( type, what, _argument, first, last ) {\r\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\r\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\r\n\t\t\t\tofType = what === \"of-type\";\r\n\r\n\t\t\treturn first === 1 && last === 0 ?\r\n\r\n\t\t\t\t// Shortcut for :nth-*(n)\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn !!elem.parentNode;\r\n\t\t\t\t} :\r\n\r\n\t\t\t\tfunction( elem, _context, xml ) {\r\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\r\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\r\n\t\t\t\t\t\tparent = elem.parentNode,\r\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\r\n\t\t\t\t\t\tuseCache = !xml && !ofType,\r\n\t\t\t\t\t\tdiff = false;\r\n\r\n\t\t\t\t\tif ( parent ) {\r\n\r\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\r\n\t\t\t\t\t\tif ( simple ) {\r\n\t\t\t\t\t\t\twhile ( dir ) {\r\n\t\t\t\t\t\t\t\tnode = elem;\r\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\r\n\t\t\t\t\t\t\t\t\tif ( ofType ?\r\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\r\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\r\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\r\n\r\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\r\n\t\t\t\t\t\tif ( forward && useCache ) {\r\n\r\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\r\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\r\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\r\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\r\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\r\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\r\n\r\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\r\n\r\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\r\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\r\n\r\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\r\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\r\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t// Use previously-cached element index if available\r\n\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\r\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\r\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\r\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// xml :nth-child(...)\r\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\r\n\t\t\t\t\t\t\tif ( diff === false ) {\r\n\r\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\r\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\r\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\r\n\r\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\r\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\r\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\r\n\t\t\t\t\t\t\t\t\t\t++diff ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\r\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\r\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\r\n\t\t\t\t\t\tdiff -= last;\r\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\tPSEUDO: function( pseudo, argument ) {\r\n\r\n\t\t\t// pseudo-class names are case-insensitive\r\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\r\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\r\n\t\t\t// Remember that setFilters inherits from pseudos\r\n\t\t\tvar args,\r\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\r\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\r\n\r\n\t\t\t// The user may use createPseudo to indicate that\r\n\t\t\t// arguments are needed to create the filter function\r\n\t\t\t// just as jQuery does\r\n\t\t\tif ( fn[ expando ] ) {\r\n\t\t\t\treturn fn( argument );\r\n\t\t\t}\r\n\r\n\t\t\t// But maintain support for old signatures\r\n\t\t\tif ( fn.length > 1 ) {\r\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\r\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\r\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\r\n\t\t\t\t\t\tvar idx,\r\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\r\n\t\t\t\t\t\t\ti = matched.length;\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\r\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} ) :\r\n\t\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\t\treturn fn( elem, 0, args );\r\n\t\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t},\r\n\r\n\tpseudos: {\r\n\r\n\t\t// Potentially complex pseudos\r\n\t\tnot: markFunction( function( selector ) {\r\n\r\n\t\t\t// Trim the selector passed to compile\r\n\t\t\t// to avoid treating leading and trailing\r\n\t\t\t// spaces as combinators\r\n\t\t\tvar input = [],\r\n\t\t\t\tresults = [],\r\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\r\n\r\n\t\t\treturn matcher[ expando ] ?\r\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\r\n\t\t\t\t\tvar elem,\r\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\r\n\t\t\t\t\t\ti = seed.length;\r\n\r\n\t\t\t\t\t// Match elements unmatched by `matcher`\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\r\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} ) :\r\n\t\t\t\tfunction( elem, _context, xml ) {\r\n\t\t\t\t\tinput[ 0 ] = elem;\r\n\t\t\t\t\tmatcher( input, null, xml, results );\r\n\r\n\t\t\t\t\t// Don't keep the element\r\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\r\n\t\t\t\t\tinput[ 0 ] = null;\r\n\t\t\t\t\treturn !results.pop();\r\n\t\t\t\t};\r\n\t\t} ),\r\n\r\n\t\thas: markFunction( function( selector ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn find( selector, elem ).length > 0;\r\n\t\t\t};\r\n\t\t} ),\r\n\r\n\t\tcontains: markFunction( function( text ) {\r\n\t\t\ttext = text.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\r\n\t\t\t};\r\n\t\t} ),\r\n\r\n\t\t// \"Whether an element is represented by a :lang() selector\r\n\t\t// is based solely on the element's language value\r\n\t\t// being equal to the identifier C,\r\n\t\t// or beginning with the identifier C immediately followed by \"-\".\r\n\t\t// The matching of C against the element's language value is performed case-insensitively.\r\n\t\t// The identifier C does not have to be a valid language name.\"\r\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\r\n\t\tlang: markFunction( function( lang ) {\r\n\r\n\t\t\t// lang value must be a valid identifier\r\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\r\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\r\n\t\t\t}\r\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar elemLang;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\r\n\t\t\t\t\t\telem.lang :\r\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\r\n\r\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\r\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t} ),\r\n\r\n\t\t// Miscellaneous\r\n\t\ttarget: function( elem ) {\r\n\t\t\tvar hash = window.location && window.location.hash;\r\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\r\n\t\t},\r\n\r\n\t\troot: function( elem ) {\r\n\t\t\treturn elem === documentElement;\r\n\t\t},\r\n\r\n\t\tfocus: function( elem ) {\r\n\t\t\treturn elem === safeActiveElement() &&\r\n\t\t\t\tdocument.hasFocus() &&\r\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\r\n\t\t},\r\n\r\n\t\t// Boolean properties\r\n\t\tenabled: createDisabledPseudo( false ),\r\n\t\tdisabled: createDisabledPseudo( true ),\r\n\r\n\t\tchecked: function( elem ) {\r\n\r\n\t\t\t// In CSS3, :checked should return both checked and selected elements\r\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\r\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\r\n\t\t},\r\n\r\n\t\tselected: function( elem ) {\r\n\r\n\t\t\t// Support: IE <=11+\r\n\t\t\t// Accessing the selectedIndex property\r\n\t\t\t// forces the browser to treat the default option as\r\n\t\t\t// selected when in an optgroup.\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\r\n\t\t\t\telem.parentNode.selectedIndex;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.selected === true;\r\n\t\t},\r\n\r\n\t\t// Contents\r\n\t\tempty: function( elem ) {\r\n\r\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\r\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\r\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\r\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tif ( elem.nodeType < 6 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tparent: function( elem ) {\r\n\t\t\treturn !Expr.pseudos.empty( elem );\r\n\t\t},\r\n\r\n\t\t// Element/input types\r\n\t\theader: function( elem ) {\r\n\t\t\treturn rheader.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\tinput: function( elem ) {\r\n\t\t\treturn rinputs.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\tbutton: function( elem ) {\r\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\r\n\t\t\t\tnodeName( elem, \"button\" );\r\n\t\t},\r\n\r\n\t\ttext: function( elem ) {\r\n\t\t\tvar attr;\r\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\r\n\r\n\t\t\t\t// Support: IE <10 only\r\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\r\n\t\t\t\t// with elem.type === \"text\"\r\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\r\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\r\n\t\t},\r\n\r\n\t\t// Position-in-collection\r\n\t\tfirst: createPositionalPseudo( function() {\r\n\t\t\treturn [ 0 ];\r\n\t\t} ),\r\n\r\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\r\n\t\t\treturn [ length - 1 ];\r\n\t\t} ),\r\n\r\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\r\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\r\n\t\t} ),\r\n\r\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t} ),\r\n\r\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\r\n\t\t\tvar i = 1;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t} ),\r\n\r\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\r\n\t\t\tvar i;\r\n\r\n\t\t\tif ( argument < 0 ) {\r\n\t\t\t\ti = argument + length;\r\n\t\t\t} else if ( argument > length ) {\r\n\t\t\t\ti = length;\r\n\t\t\t} else {\r\n\t\t\t\ti = argument;\r\n\t\t\t}\r\n\r\n\t\t\tfor ( ; --i >= 0; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t} ),\r\n\r\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; ++i < length; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t} )\r\n\t}\r\n};\r\n\r\nExpr.pseudos.nth = Expr.pseudos.eq;\r\n\r\n// Add button/input type pseudos\r\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\r\n\tExpr.pseudos[ i ] = createInputPseudo( i );\r\n}\r\nfor ( i in { submit: true, reset: true } ) {\r\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\r\n}\r\n\r\n// Easy API for creating new setFilters\r\nfunction setFilters() {}\r\nsetFilters.prototype = Expr.filters = Expr.pseudos;\r\nExpr.setFilters = new setFilters();\r\n\r\nfunction tokenize( selector, parseOnly ) {\r\n\tvar matched, match, tokens, type,\r\n\t\tsoFar, groups, preFilters,\r\n\t\tcached = tokenCache[ selector + \" \" ];\r\n\r\n\tif ( cached ) {\r\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\r\n\t}\r\n\r\n\tsoFar = selector;\r\n\tgroups = [];\r\n\tpreFilters = Expr.preFilter;\r\n\r\n\twhile ( soFar ) {\r\n\r\n\t\t// Comma and first run\r\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\r\n\t\t\tif ( match ) {\r\n\r\n\t\t\t\t// Don't consume trailing commas as valid\r\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\r\n\t\t\t}\r\n\t\t\tgroups.push( ( tokens = [] ) );\r\n\t\t}\r\n\r\n\t\tmatched = false;\r\n\r\n\t\t// Combinators\r\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\r\n\t\t\tmatched = match.shift();\r\n\t\t\ttokens.push( {\r\n\t\t\t\tvalue: matched,\r\n\r\n\t\t\t\t// Cast descendant combinators to space\r\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\r\n\t\t\t} );\r\n\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t}\r\n\r\n\t\t// Filters\r\n\t\tfor ( type in Expr.filter ) {\r\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\r\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\r\n\t\t\t\tmatched = match.shift();\r\n\t\t\t\ttokens.push( {\r\n\t\t\t\t\tvalue: matched,\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tmatches: match\r\n\t\t\t\t} );\r\n\t\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( !matched ) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the length of the invalid excess\r\n\t// if we're just parsing\r\n\t// Otherwise, throw an error or return tokens\r\n\tif ( parseOnly ) {\r\n\t\treturn soFar.length;\r\n\t}\r\n\r\n\treturn soFar ?\r\n\t\tfind.error( selector ) :\r\n\r\n\t\t// Cache the tokens\r\n\t\ttokenCache( selector, groups ).slice( 0 );\r\n}\r\n\r\nfunction toSelector( tokens ) {\r\n\tvar i = 0,\r\n\t\tlen = tokens.length,\r\n\t\tselector = \"\";\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tselector += tokens[ i ].value;\r\n\t}\r\n\treturn selector;\r\n}\r\n\r\nfunction addCombinator( matcher, combinator, base ) {\r\n\tvar dir = combinator.dir,\r\n\t\tskip = combinator.next,\r\n\t\tkey = skip || dir,\r\n\t\tcheckNonElements = base && key === \"parentNode\",\r\n\t\tdoneName = done++;\r\n\r\n\treturn combinator.first ?\r\n\r\n\t\t// Check against closest ancestor/preceding element\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\r\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\treturn matcher( elem, context, xml );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} :\r\n\r\n\t\t// Check against all ancestor/preceding elements\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar oldCache, outerCache,\r\n\t\t\t\tnewCache = [ dirruns, doneName ];\r\n\r\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\r\n\t\t\tif ( xml ) {\r\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\r\n\r\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\r\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\r\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\r\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\r\n\r\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\r\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\r\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\r\n\r\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\r\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n}\r\n\r\nfunction elementMatcher( matchers ) {\r\n\treturn matchers.length > 1 ?\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar i = matchers.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} :\r\n\t\tmatchers[ 0 ];\r\n}\r\n\r\nfunction multipleContexts( selector, contexts, results ) {\r\n\tvar i = 0,\r\n\t\tlen = contexts.length;\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tfind( selector, contexts[ i ], results );\r\n\t}\r\n\treturn results;\r\n}\r\n\r\nfunction condense( unmatched, map, filter, context, xml ) {\r\n\tvar elem,\r\n\t\tnewUnmatched = [],\r\n\t\ti = 0,\r\n\t\tlen = unmatched.length,\r\n\t\tmapped = map != null;\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( ( elem = unmatched[ i ] ) ) {\r\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\r\n\t\t\t\tnewUnmatched.push( elem );\r\n\t\t\t\tif ( mapped ) {\r\n\t\t\t\t\tmap.push( i );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn newUnmatched;\r\n}\r\n\r\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\r\n\tif ( postFilter && !postFilter[ expando ] ) {\r\n\t\tpostFilter = setMatcher( postFilter );\r\n\t}\r\n\tif ( postFinder && !postFinder[ expando ] ) {\r\n\t\tpostFinder = setMatcher( postFinder, postSelector );\r\n\t}\r\n\treturn markFunction( function( seed, results, context, xml ) {\r\n\t\tvar temp, i, elem, matcherOut,\r\n\t\t\tpreMap = [],\r\n\t\t\tpostMap = [],\r\n\t\t\tpreexisting = results.length,\r\n\r\n\t\t\t// Get initial elements from seed or context\r\n\t\t\telems = seed ||\r\n\t\t\t\tmultipleContexts( selector || \"*\",\r\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\r\n\r\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\r\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\r\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\r\n\t\t\t\telems;\r\n\r\n\t\tif ( matcher ) {\r\n\r\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\r\n\t\t\t// or preexisting results,\r\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\r\n\r\n\t\t\t\t// ...intermediate processing is necessary\r\n\t\t\t\t[] :\r\n\r\n\t\t\t\t// ...otherwise use results directly\r\n\t\t\t\tresults;\r\n\r\n\t\t\t// Find primary matches\r\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\r\n\t\t} else {\r\n\t\t\tmatcherOut = matcherIn;\r\n\t\t}\r\n\r\n\t\t// Apply postFilter\r\n\t\tif ( postFilter ) {\r\n\t\t\ttemp = condense( matcherOut, postMap );\r\n\t\t\tpostFilter( temp, [], context, xml );\r\n\r\n\t\t\t// Un-match failing elements by moving them back to matcherIn\r\n\t\t\ti = temp.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\r\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( seed ) {\r\n\t\t\tif ( postFinder || preFilter ) {\r\n\t\t\t\tif ( postFinder ) {\r\n\r\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\r\n\t\t\t\t\ttemp = [];\r\n\t\t\t\t\ti = matcherOut.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\r\n\r\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\r\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\r\n\t\t\t\ti = matcherOut.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\r\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\r\n\r\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Add elements to results, through postFinder if defined\r\n\t\t} else {\r\n\t\t\tmatcherOut = condense(\r\n\t\t\t\tmatcherOut === results ?\r\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\r\n\t\t\t\t\tmatcherOut\r\n\t\t\t);\r\n\t\t\tif ( postFinder ) {\r\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\r\n\t\t\t} else {\r\n\t\t\t\tpush.apply( results, matcherOut );\r\n\t\t\t}\r\n\t\t}\r\n\t} );\r\n}\r\n\r\nfunction matcherFromTokens( tokens ) {\r\n\tvar checkContext, matcher, j,\r\n\t\tlen = tokens.length,\r\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\r\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\r\n\t\ti = leadingRelative ? 1 : 0,\r\n\r\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\r\n\t\tmatchContext = addCombinator( function( elem ) {\r\n\t\t\treturn elem === checkContext;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchAnyContext = addCombinator( function( elem ) {\r\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchers = [ function( elem, context, xml ) {\r\n\r\n\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\r\n\t\t\t\t( checkContext = context ).nodeType ?\r\n\t\t\t\t\tmatchContext( elem, context, xml ) :\r\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\r\n\r\n\t\t\t// Avoid hanging onto element\r\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\r\n\t\t\tcheckContext = null;\r\n\t\t\treturn ret;\r\n\t\t} ];\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\r\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\r\n\t\t} else {\r\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\r\n\r\n\t\t\t// Return special upon seeing a positional matcher\r\n\t\t\tif ( matcher[ expando ] ) {\r\n\r\n\t\t\t\t// Find the next relative operator (if any) for proper handling\r\n\t\t\t\tj = ++i;\r\n\t\t\t\tfor ( ; j < len; j++ ) {\r\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn setMatcher(\r\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\r\n\t\t\t\t\ti > 1 && toSelector(\r\n\r\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\r\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\r\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\r\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\r\n\t\t\t\t\tmatcher,\r\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\r\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\r\n\t\t\t\t\tj < len && toSelector( tokens )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tmatchers.push( matcher );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elementMatcher( matchers );\r\n}\r\n\r\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\r\n\tvar bySet = setMatchers.length > 0,\r\n\t\tbyElement = elementMatchers.length > 0,\r\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\r\n\t\t\tvar elem, j, matcher,\r\n\t\t\t\tmatchedCount = 0,\r\n\t\t\t\ti = \"0\",\r\n\t\t\t\tunmatched = seed && [],\r\n\t\t\t\tsetMatched = [],\r\n\t\t\t\tcontextBackup = outermostContext,\r\n\r\n\t\t\t\t// We must always have either seed elements or outermost context\r\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\r\n\r\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\r\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\r\n\t\t\t\tlen = elems.length;\r\n\r\n\t\t\tif ( outermost ) {\r\n\r\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\t\toutermostContext = context == document || context || outermost;\r\n\t\t\t}\r\n\r\n\t\t\t// Add elements passing elementMatchers directly to results\r\n\t\t\t// Support: iOS <=7 - 9 only\r\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\r\n\t\t\t// elements by id. (see trac-14142)\r\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\r\n\t\t\t\tif ( byElement && elem ) {\r\n\t\t\t\t\tj = 0;\r\n\r\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\r\n\t\t\t\t\t\tsetDocument( elem );\r\n\t\t\t\t\t\txml = !documentIsHTML;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\r\n\t\t\t\t\t\t\tpush.call( results, elem );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( outermost ) {\r\n\t\t\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Track unmatched elements for set filters\r\n\t\t\t\tif ( bySet ) {\r\n\r\n\t\t\t\t\t// They will have gone through all possible matchers\r\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\r\n\t\t\t\t\t\tmatchedCount--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Lengthen the array for every element, matched or not\r\n\t\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t\tunmatched.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\r\n\t\t\t// makes the latter nonnegative.\r\n\t\t\tmatchedCount += i;\r\n\r\n\t\t\t// Apply set filters to unmatched elements\r\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\r\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\r\n\t\t\t// no element matchers and no seed.\r\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\r\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\r\n\t\t\t// numerically zero.\r\n\t\t\tif ( bySet && i !== matchedCount ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\r\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( seed ) {\r\n\r\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\r\n\t\t\t\t\tif ( matchedCount > 0 ) {\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\r\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\r\n\t\t\t\t\tsetMatched = condense( setMatched );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add matches to results\r\n\t\t\t\tpush.apply( results, setMatched );\r\n\r\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\r\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\r\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\r\n\r\n\t\t\t\t\tjQuery.uniqueSort( results );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Override manipulation of globals by nested matchers\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\toutermostContext = contextBackup;\r\n\t\t\t}\r\n\r\n\t\t\treturn unmatched;\r\n\t\t};\r\n\r\n\treturn bySet ?\r\n\t\tmarkFunction( superMatcher ) :\r\n\t\tsuperMatcher;\r\n}\r\n\r\nfunction compile( selector, match /* Internal Use Only */ ) {\r\n\tvar i,\r\n\t\tsetMatchers = [],\r\n\t\telementMatchers = [],\r\n\t\tcached = compilerCache[ selector + \" \" ];\r\n\r\n\tif ( !cached ) {\r\n\r\n\t\t// Generate a function of recursive functions that can be used to check each element\r\n\t\tif ( !match ) {\r\n\t\t\tmatch = tokenize( selector );\r\n\t\t}\r\n\t\ti = match.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tcached = matcherFromTokens( match[ i ] );\r\n\t\t\tif ( cached[ expando ] ) {\r\n\t\t\t\tsetMatchers.push( cached );\r\n\t\t\t} else {\r\n\t\t\t\telementMatchers.push( cached );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Cache the compiled function\r\n\t\tcached = compilerCache( selector,\r\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\r\n\r\n\t\t// Save selector and tokenization\r\n\t\tcached.selector = selector;\r\n\t}\r\n\treturn cached;\r\n}\r\n\r\n/**\r\n * A low-level selection function that works with jQuery's compiled\r\n * selector functions\r\n * @param {String|Function} selector A selector or a pre-compiled\r\n * selector function built with jQuery selector compile\r\n * @param {Element} context\r\n * @param {Array} [results]\r\n * @param {Array} [seed] A set of elements to match against\r\n */\r\nfunction select( selector, context, results, seed ) {\r\n\tvar i, tokens, token, type, find,\r\n\t\tcompiled = typeof selector === \"function\" && selector,\r\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\r\n\r\n\tresults = results || [];\r\n\r\n\t// Try to minimize operations if there is only one selector in the list and no seed\r\n\t// (the latter of which guarantees us context)\r\n\tif ( match.length === 1 ) {\r\n\r\n\t\t// Reduce context if the leading compound selector is an ID\r\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\r\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\r\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\r\n\r\n\t\t\tcontext = ( Expr.find.ID(\r\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\r\n\t\t\t\tcontext\r\n\t\t\t) || [] )[ 0 ];\r\n\t\t\tif ( !context ) {\r\n\t\t\t\treturn results;\r\n\r\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\r\n\t\t\t} else if ( compiled ) {\r\n\t\t\t\tcontext = context.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tselector = selector.slice( tokens.shift().value.length );\r\n\t\t}\r\n\r\n\t\t// Fetch a seed set for right-to-left matching\r\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\ttoken = tokens[ i ];\r\n\r\n\t\t\t// Abort if we hit a combinator\r\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\r\n\r\n\t\t\t\t// Search, expanding context for leading sibling combinators\r\n\t\t\t\tif ( ( seed = find(\r\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\r\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\r\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\r\n\t\t\t\t) ) ) {\r\n\r\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\r\n\t\t\t\t\ttokens.splice( i, 1 );\r\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\r\n\t\t\t\t\tif ( !selector ) {\r\n\t\t\t\t\t\tpush.apply( results, seed );\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Compile and execute a filtering function if one is not provided\r\n\t// Provide `match` to avoid retokenization if we modified the selector above\r\n\t( compiled || compile( selector, match ) )(\r\n\t\tseed,\r\n\t\tcontext,\r\n\t\t!documentIsHTML,\r\n\t\tresults,\r\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\r\n\t);\r\n\treturn results;\r\n}\r\n\r\n// One-time assignments\r\n\r\n// Support: Android <=4.0 - 4.1+\r\n// Sort stability\r\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\r\n\r\n// Initialize against the default document\r\nsetDocument();\r\n\r\n// Support: Android <=4.0 - 4.1+\r\n// Detached nodes confoundingly follow *each other*\r\nsupport.sortDetached = assert( function( el ) {\r\n\r\n\t// Should return 1, but returns 4 (following)\r\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\r\n} );\r\n\r\njQuery.find = find;\r\n\r\n// Deprecated\r\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\r\njQuery.unique = jQuery.uniqueSort;\r\n\r\n// These have always been private, but they used to be documented as part of\r\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\r\nfind.compile = compile;\r\nfind.select = select;\r\nfind.setDocument = setDocument;\r\nfind.tokenize = tokenize;\r\n\r\nfind.escape = jQuery.escapeSelector;\r\nfind.getText = jQuery.text;\r\nfind.isXML = jQuery.isXMLDoc;\r\nfind.selectors = jQuery.expr;\r\nfind.support = jQuery.support;\r\nfind.uniqueSort = jQuery.uniqueSort;\r\n\r\n\t/* eslint-enable */\r\n\r\n} )();\r\n\r\n\r\nvar dir = function( elem, dir, until ) {\r\n\tvar matched = [],\r\n\t\ttruncate = until !== undefined;\r\n\r\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\r\n\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tmatched.push( elem );\r\n\t\t}\r\n\t}\r\n\treturn matched;\r\n};\r\n\r\n\r\nvar siblings = function( n, elem ) {\r\n\tvar matched = [];\r\n\r\n\tfor ( ; n; n = n.nextSibling ) {\r\n\t\tif ( n.nodeType === 1 && n !== elem ) {\r\n\t\t\tmatched.push( n );\r\n\t\t}\r\n\t}\r\n\r\n\treturn matched;\r\n};\r\n\r\n\r\nvar rneedsContext = jQuery.expr.match.needsContext;\r\n\r\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\r\n\r\n\r\n\r\n// Implement the identical functionality for filter and not\r\nfunction winnow( elements, qualifier, not ) {\r\n\tif ( isFunction( qualifier ) ) {\r\n\t\treturn jQuery.grep( elements, function( elem, i ) {\r\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\r\n\t\t} );\r\n\t}\r\n\r\n\t// Single element\r\n\tif ( qualifier.nodeType ) {\r\n\t\treturn jQuery.grep( elements, function( elem ) {\r\n\t\t\treturn ( elem === qualifier ) !== not;\r\n\t\t} );\r\n\t}\r\n\r\n\t// Arraylike of elements (jQuery, arguments, Array)\r\n\tif ( typeof qualifier !== \"string\" ) {\r\n\t\treturn jQuery.grep( elements, function( elem ) {\r\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\r\n\t\t} );\r\n\t}\r\n\r\n\t// Filtered directly for both simple and complex selectors\r\n\treturn jQuery.filter( qualifier, elements, not );\r\n}\r\n\r\njQuery.filter = function( expr, elems, not ) {\r\n\tvar elem = elems[ 0 ];\r\n\r\n\tif ( not ) {\r\n\t\texpr = \":not(\" + expr + \")\";\r\n\t}\r\n\r\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\r\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\r\n\t}\r\n\r\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\r\n\t\treturn elem.nodeType === 1;\r\n\t} ) );\r\n};\r\n\r\njQuery.fn.extend( {\r\n\tfind: function( selector ) {\r\n\t\tvar i, ret,\r\n\t\t\tlen = this.length,\r\n\t\t\tself = this;\r\n\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\r\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} ) );\r\n\t\t}\r\n\r\n\t\tret = this.pushStack( [] );\r\n\r\n\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\tjQuery.find( selector, self[ i ], ret );\r\n\t\t}\r\n\r\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\r\n\t},\r\n\tfilter: function( selector ) {\r\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\r\n\t},\r\n\tnot: function( selector ) {\r\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\r\n\t},\r\n\tis: function( selector ) {\r\n\t\treturn !!winnow(\r\n\t\t\tthis,\r\n\r\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\r\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\r\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\r\n\t\t\t\tjQuery( selector ) :\r\n\t\t\t\tselector || [],\r\n\t\t\tfalse\r\n\t\t).length;\r\n\t}\r\n} );\r\n\r\n\r\n// Initialize a jQuery object\r\n\r\n\r\n// A central reference to the root jQuery(document)\r\nvar rootjQuery,\r\n\r\n\t// A simple way to check for HTML strings\r\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\r\n\t// Strict HTML recognition (trac-11290: must start with <)\r\n\t// Shortcut simple #id case for speed\r\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\r\n\r\n\tinit = jQuery.fn.init = function( selector, context, root ) {\r\n\t\tvar match, elem;\r\n\r\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\r\n\t\tif ( !selector ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// Method init() accepts an alternate rootjQuery\r\n\t\t// so migrate can support jQuery.sub (gh-2101)\r\n\t\troot = root || rootjQuery;\r\n\r\n\t\t// Handle HTML strings\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\tif ( selector[ 0 ] === \"<\" &&\r\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\r\n\t\t\t\tselector.length >= 3 ) {\r\n\r\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\r\n\t\t\t\tmatch = [ null, selector, null ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\tmatch = rquickExpr.exec( selector );\r\n\t\t\t}\r\n\r\n\t\t\t// Match html or make sure no context is specified for #id\r\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\r\n\r\n\t\t\t\t// HANDLE: $(html) -> $(array)\r\n\t\t\t\tif ( match[ 1 ] ) {\r\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\r\n\r\n\t\t\t\t\t// Option to run scripts is true for back-compat\r\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\r\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\r\n\t\t\t\t\t\tmatch[ 1 ],\r\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\r\n\t\t\t\t\t\ttrue\r\n\t\t\t\t\t) );\r\n\r\n\t\t\t\t\t// HANDLE: $(html, props)\r\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\r\n\t\t\t\t\t\tfor ( match in context ) {\r\n\r\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\r\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\r\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\r\n\r\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this;\r\n\r\n\t\t\t\t// HANDLE: $(#id)\r\n\t\t\t\t} else {\r\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\r\n\r\n\t\t\t\t\tif ( elem ) {\r\n\r\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\r\n\t\t\t\t\t\tthis[ 0 ] = elem;\r\n\t\t\t\t\t\tthis.length = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\r\n\t\t\t// HANDLE: $(expr, $(...))\r\n\t\t\t} else if ( !context || context.jquery ) {\r\n\t\t\t\treturn ( context || root ).find( selector );\r\n\r\n\t\t\t// HANDLE: $(expr, context)\r\n\t\t\t// (which is just equivalent to: $(context).find(expr)\r\n\t\t\t} else {\r\n\t\t\t\treturn this.constructor( context ).find( selector );\r\n\t\t\t}\r\n\r\n\t\t// HANDLE: $(DOMElement)\r\n\t\t} else if ( selector.nodeType ) {\r\n\t\t\tthis[ 0 ] = selector;\r\n\t\t\tthis.length = 1;\r\n\t\t\treturn this;\r\n\r\n\t\t// HANDLE: $(function)\r\n\t\t// Shortcut for document ready\r\n\t\t} else if ( isFunction( selector ) ) {\r\n\t\t\treturn root.ready !== undefined ?\r\n\t\t\t\troot.ready( selector ) :\r\n\r\n\t\t\t\t// Execute immediately if ready is not present\r\n\t\t\t\tselector( jQuery );\r\n\t\t}\r\n\r\n\t\treturn jQuery.makeArray( selector, this );\r\n\t};\r\n\r\n// Give the init function the jQuery prototype for later instantiation\r\ninit.prototype = jQuery.fn;\r\n\r\n// Initialize central reference\r\nrootjQuery = jQuery( document );\r\n\r\n\r\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\r\n\r\n\t// Methods guaranteed to produce a unique set when starting from a unique set\r\n\tguaranteedUnique = {\r\n\t\tchildren: true,\r\n\t\tcontents: true,\r\n\t\tnext: true,\r\n\t\tprev: true\r\n\t};\r\n\r\njQuery.fn.extend( {\r\n\thas: function( target ) {\r\n\t\tvar targets = jQuery( target, this ),\r\n\t\t\tl = targets.length;\r\n\r\n\t\treturn this.filter( function() {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tclosest: function( selectors, context ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tmatched = [],\r\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\r\n\r\n\t\t// Positional selectors never match, since there's no _selection_ context\r\n\t\tif ( !rneedsContext.test( selectors ) ) {\r\n\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\r\n\r\n\t\t\t\t\t// Always skip document fragments\r\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\r\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\r\n\r\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\r\n\t\t\t\t\t\tcur.nodeType === 1 &&\r\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\r\n\r\n\t\t\t\t\t\tmatched.push( cur );\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\r\n\t},\r\n\r\n\t// Determine the position of an element within the set\r\n\tindex: function( elem ) {\r\n\r\n\t\t// No argument, return index in parent\r\n\t\tif ( !elem ) {\r\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\r\n\t\t}\r\n\r\n\t\t// Index in selector\r\n\t\tif ( typeof elem === \"string\" ) {\r\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\r\n\t\t}\r\n\r\n\t\t// Locate the position of the desired element\r\n\t\treturn indexOf.call( this,\r\n\r\n\t\t\t// If it receives a jQuery object, the first element is used\r\n\t\t\telem.jquery ? elem[ 0 ] : elem\r\n\t\t);\r\n\t},\r\n\r\n\tadd: function( selector, context ) {\r\n\t\treturn this.pushStack(\r\n\t\t\tjQuery.uniqueSort(\r\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\r\n\t\t\t)\r\n\t\t);\r\n\t},\r\n\r\n\taddBack: function( selector ) {\r\n\t\treturn this.add( selector == null ?\r\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\r\n\t\t);\r\n\t}\r\n} );\r\n\r\nfunction sibling( cur, dir ) {\r\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\r\n\treturn cur;\r\n}\r\n\r\njQuery.each( {\r\n\tparent: function( elem ) {\r\n\t\tvar parent = elem.parentNode;\r\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\r\n\t},\r\n\tparents: function( elem ) {\r\n\t\treturn dir( elem, \"parentNode\" );\r\n\t},\r\n\tparentsUntil: function( elem, _i, until ) {\r\n\t\treturn dir( elem, \"parentNode\", until );\r\n\t},\r\n\tnext: function( elem ) {\r\n\t\treturn sibling( elem, \"nextSibling\" );\r\n\t},\r\n\tprev: function( elem ) {\r\n\t\treturn sibling( elem, \"previousSibling\" );\r\n\t},\r\n\tnextAll: function( elem ) {\r\n\t\treturn dir( elem, \"nextSibling\" );\r\n\t},\r\n\tprevAll: function( elem ) {\r\n\t\treturn dir( elem, \"previousSibling\" );\r\n\t},\r\n\tnextUntil: function( elem, _i, until ) {\r\n\t\treturn dir( elem, \"nextSibling\", until );\r\n\t},\r\n\tprevUntil: function( elem, _i, until ) {\r\n\t\treturn dir( elem, \"previousSibling\", until );\r\n\t},\r\n\tsiblings: function( elem ) {\r\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\r\n\t},\r\n\tchildren: function( elem ) {\r\n\t\treturn siblings( elem.firstChild );\r\n\t},\r\n\tcontents: function( elem ) {\r\n\t\tif ( elem.contentDocument != null &&\r\n\r\n\t\t\t// Support: IE 11+\r\n\t\t\t// <object> elements with no `data` attribute has an object\r\n\t\t\t// `contentDocument` with a `null` prototype.\r\n\t\t\tgetProto( elem.contentDocument ) ) {\r\n\r\n\t\t\treturn elem.contentDocument;\r\n\t\t}\r\n\r\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\r\n\t\t// Treat the template element as a regular one in browsers that\r\n\t\t// don't support it.\r\n\t\tif ( nodeName( elem, \"template\" ) ) {\r\n\t\t\telem = elem.content || elem;\r\n\t\t}\r\n\r\n\t\treturn jQuery.merge( [], elem.childNodes );\r\n\t}\r\n}, function( name, fn ) {\r\n\tjQuery.fn[ name ] = function( until, selector ) {\r\n\t\tvar matched = jQuery.map( this, fn, until );\r\n\r\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\r\n\t\t\tselector = until;\r\n\t\t}\r\n\r\n\t\tif ( selector && typeof selector === \"string\" ) {\r\n\t\t\tmatched = jQuery.filter( selector, matched );\r\n\t\t}\r\n\r\n\t\tif ( this.length > 1 ) {\r\n\r\n\t\t\t// Remove duplicates\r\n\t\t\tif ( !guaranteedUnique[ name ] ) {\r\n\t\t\t\tjQuery.uniqueSort( matched );\r\n\t\t\t}\r\n\r\n\t\t\t// Reverse order for parents* and prev-derivatives\r\n\t\t\tif ( rparentsprev.test( name ) ) {\r\n\t\t\t\tmatched.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( matched );\r\n\t};\r\n} );\r\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\r\n\r\n\r\n\r\n// Convert String-formatted options into Object-formatted ones\r\nfunction createOptions( options ) {\r\n\tvar object = {};\r\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\r\n\t\tobject[ flag ] = true;\r\n\t} );\r\n\treturn object;\r\n}\r\n\r\n/*\r\n * Create a callback list using the following parameters:\r\n *\r\n *\toptions: an optional list of space-separated options that will change how\r\n *\t\t\tthe callback list behaves or a more traditional option object\r\n *\r\n * By default a callback list will act like an event callback list and can be\r\n * \"fired\" multiple times.\r\n *\r\n * Possible options:\r\n *\r\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\r\n *\r\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\r\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\r\n *\t\t\t\t\tvalues (like a Deferred)\r\n *\r\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\r\n *\r\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\r\n *\r\n */\r\njQuery.Callbacks = function( options ) {\r\n\r\n\t// Convert options from String-formatted to Object-formatted if needed\r\n\t// (we check in cache first)\r\n\toptions = typeof options === \"string\" ?\r\n\t\tcreateOptions( options ) :\r\n\t\tjQuery.extend( {}, options );\r\n\r\n\tvar // Flag to know if list is currently firing\r\n\t\tfiring,\r\n\r\n\t\t// Last fire value for non-forgettable lists\r\n\t\tmemory,\r\n\r\n\t\t// Flag to know if list was already fired\r\n\t\tfired,\r\n\r\n\t\t// Flag to prevent firing\r\n\t\tlocked,\r\n\r\n\t\t// Actual callback list\r\n\t\tlist = [],\r\n\r\n\t\t// Queue of execution data for repeatable lists\r\n\t\tqueue = [],\r\n\r\n\t\t// Index of currently firing callback (modified by add/remove as needed)\r\n\t\tfiringIndex = -1,\r\n\r\n\t\t// Fire callbacks\r\n\t\tfire = function() {\r\n\r\n\t\t\t// Enforce single-firing\r\n\t\t\tlocked = locked || options.once;\r\n\r\n\t\t\t// Execute callbacks for all pending executions,\r\n\t\t\t// respecting firingIndex overrides and runtime changes\r\n\t\t\tfired = firing = true;\r\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\r\n\t\t\t\tmemory = queue.shift();\r\n\t\t\t\twhile ( ++firingIndex < list.length ) {\r\n\r\n\t\t\t\t\t// Run callback and check for early termination\r\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\r\n\t\t\t\t\t\toptions.stopOnFalse ) {\r\n\r\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\r\n\t\t\t\t\t\tfiringIndex = list.length;\r\n\t\t\t\t\t\tmemory = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Forget the data if we're done with it\r\n\t\t\tif ( !options.memory ) {\r\n\t\t\t\tmemory = false;\r\n\t\t\t}\r\n\r\n\t\t\tfiring = false;\r\n\r\n\t\t\t// Clean up if we're done firing for good\r\n\t\t\tif ( locked ) {\r\n\r\n\t\t\t\t// Keep an empty list if we have data for future add calls\r\n\t\t\t\tif ( memory ) {\r\n\t\t\t\t\tlist = [];\r\n\r\n\t\t\t\t// Otherwise, this object is spent\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlist = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// Actual Callbacks object\r\n\t\tself = {\r\n\r\n\t\t\t// Add a callback or a collection of callbacks to the list\r\n\t\t\tadd: function() {\r\n\t\t\t\tif ( list ) {\r\n\r\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\r\n\t\t\t\t\tif ( memory && !firing ) {\r\n\t\t\t\t\t\tfiringIndex = list.length - 1;\r\n\t\t\t\t\t\tqueue.push( memory );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t( function add( args ) {\r\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\r\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\r\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\r\n\t\t\t\t\t\t\t\t\tlist.push( arg );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\r\n\r\n\t\t\t\t\t\t\t\t// Inspect recursively\r\n\t\t\t\t\t\t\t\tadd( arg );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\t} )( arguments );\r\n\r\n\t\t\t\t\tif ( memory && !firing ) {\r\n\t\t\t\t\t\tfire();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Remove a callback from the list\r\n\t\t\tremove: function() {\r\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\r\n\t\t\t\t\tvar index;\r\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\r\n\t\t\t\t\t\tlist.splice( index, 1 );\r\n\r\n\t\t\t\t\t\t// Handle firing indexes\r\n\t\t\t\t\t\tif ( index <= firingIndex ) {\r\n\t\t\t\t\t\t\tfiringIndex--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Check if a given callback is in the list.\r\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\r\n\t\t\thas: function( fn ) {\r\n\t\t\t\treturn fn ?\r\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\r\n\t\t\t\t\tlist.length > 0;\r\n\t\t\t},\r\n\r\n\t\t\t// Remove all callbacks from the list\r\n\t\t\tempty: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\tlist = [];\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Disable .fire and .add\r\n\t\t\t// Abort any current/pending executions\r\n\t\t\t// Clear all callbacks and values\r\n\t\t\tdisable: function() {\r\n\t\t\t\tlocked = queue = [];\r\n\t\t\t\tlist = memory = \"\";\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\tdisabled: function() {\r\n\t\t\t\treturn !list;\r\n\t\t\t},\r\n\r\n\t\t\t// Disable .fire\r\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\r\n\t\t\t// Abort any pending executions\r\n\t\t\tlock: function() {\r\n\t\t\t\tlocked = queue = [];\r\n\t\t\t\tif ( !memory && !firing ) {\r\n\t\t\t\t\tlist = memory = \"\";\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\tlocked: function() {\r\n\t\t\t\treturn !!locked;\r\n\t\t\t},\r\n\r\n\t\t\t// Call all callbacks with the given context and arguments\r\n\t\t\tfireWith: function( context, args ) {\r\n\t\t\t\tif ( !locked ) {\r\n\t\t\t\t\targs = args || [];\r\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\r\n\t\t\t\t\tqueue.push( args );\r\n\t\t\t\t\tif ( !firing ) {\r\n\t\t\t\t\t\tfire();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Call all the callbacks with the given arguments\r\n\t\t\tfire: function() {\r\n\t\t\t\tself.fireWith( this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// To know if the callbacks have already been called at least once\r\n\t\t\tfired: function() {\r\n\t\t\t\treturn !!fired;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\treturn self;\r\n};\r\n\r\n\r\nfunction Identity( v ) {\r\n\treturn v;\r\n}\r\nfunction Thrower( ex ) {\r\n\tthrow ex;\r\n}\r\n\r\nfunction adoptValue( value, resolve, reject, noValue ) {\r\n\tvar method;\r\n\r\n\ttry {\r\n\r\n\t\t// Check for promise aspect first to privilege synchronous behavior\r\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\r\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\r\n\r\n\t\t// Other thenables\r\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\r\n\t\t\tmethod.call( value, resolve, reject );\r\n\r\n\t\t// Other non-thenables\r\n\t\t} else {\r\n\r\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\r\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\r\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\r\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\r\n\t\t}\r\n\r\n\t// For Promises/A+, convert exceptions into rejections\r\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\r\n\t// Deferred#then to conditionally suppress rejection.\r\n\t} catch ( value ) {\r\n\r\n\t\t// Support: Android 4.0 only\r\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\r\n\t\treject.apply( undefined, [ value ] );\r\n\t}\r\n}\r\n\r\njQuery.extend( {\r\n\r\n\tDeferred: function( func ) {\r\n\t\tvar tuples = [\r\n\r\n\t\t\t\t// action, add listener, callbacks,\r\n\t\t\t\t// ... .then handlers, argument index, [final state]\r\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\r\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\r\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\r\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\r\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\r\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\r\n\t\t\t],\r\n\t\t\tstate = \"pending\",\r\n\t\t\tpromise = {\r\n\t\t\t\tstate: function() {\r\n\t\t\t\t\treturn state;\r\n\t\t\t\t},\r\n\t\t\t\talways: function() {\r\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\t\t\t\t\"catch\": function( fn ) {\r\n\t\t\t\t\treturn promise.then( null, fn );\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Keep pipe for back-compat\r\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\r\n\t\t\t\t\tvar fns = arguments;\r\n\r\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\r\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\r\n\r\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\r\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\r\n\r\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\r\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\r\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\r\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\r\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\r\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\r\n\t\t\t\t\t\t\t\t\treturned.promise()\r\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\r\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\r\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\r\n\t\t\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\t\tfns = null;\r\n\t\t\t\t\t} ).promise();\r\n\t\t\t\t},\r\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\r\n\t\t\t\t\tvar maxDepth = 0;\r\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\r\n\t\t\t\t\t\treturn function() {\r\n\t\t\t\t\t\t\tvar that = this,\r\n\t\t\t\t\t\t\t\targs = arguments,\r\n\t\t\t\t\t\t\t\tmightThrow = function() {\r\n\t\t\t\t\t\t\t\t\tvar returned, then;\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\r\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\r\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\r\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\r\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\r\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\r\n\t\t\t\t\t\t\t\t\tthen = returned &&\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\r\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\r\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\r\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\r\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\r\n\t\t\t\t\t\t\t\t\t\treturned.then;\r\n\r\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\r\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\r\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\r\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\r\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\r\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\r\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\r\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\r\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\r\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\r\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\r\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\r\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t},\r\n\r\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\r\n\t\t\t\t\t\t\t\tprocess = special ?\r\n\t\t\t\t\t\t\t\t\tmightThrow :\r\n\t\t\t\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\r\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\r\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\r\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\r\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\r\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\r\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\r\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\r\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\r\n\t\t\t\t\t\t\t// subsequent errors\r\n\t\t\t\t\t\t\tif ( depth ) {\r\n\t\t\t\t\t\t\t\tprocess();\r\n\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\r\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\r\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\r\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\r\n\r\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\r\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\r\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\r\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\r\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\r\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\r\n\r\n\t\t\t\t\t\t// progress_handlers.add( ... )\r\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\r\n\t\t\t\t\t\t\tresolve(\r\n\t\t\t\t\t\t\t\t0,\r\n\t\t\t\t\t\t\t\tnewDefer,\r\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\r\n\t\t\t\t\t\t\t\t\tonProgress :\r\n\t\t\t\t\t\t\t\t\tIdentity,\r\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\r\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\r\n\t\t\t\t\t\t\tresolve(\r\n\t\t\t\t\t\t\t\t0,\r\n\t\t\t\t\t\t\t\tnewDefer,\r\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\r\n\t\t\t\t\t\t\t\t\tonFulfilled :\r\n\t\t\t\t\t\t\t\t\tIdentity\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t// rejected_handlers.add( ... )\r\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\r\n\t\t\t\t\t\t\tresolve(\r\n\t\t\t\t\t\t\t\t0,\r\n\t\t\t\t\t\t\t\tnewDefer,\r\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\r\n\t\t\t\t\t\t\t\t\tonRejected :\r\n\t\t\t\t\t\t\t\t\tThrower\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t} ).promise();\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Get a promise for this deferred\r\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\r\n\t\t\t\tpromise: function( obj ) {\r\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdeferred = {};\r\n\r\n\t\t// Add list-specific methods\r\n\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\tvar list = tuple[ 2 ],\r\n\t\t\t\tstateString = tuple[ 5 ];\r\n\r\n\t\t\t// promise.progress = list.add\r\n\t\t\t// promise.done = list.add\r\n\t\t\t// promise.fail = list.add\r\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\r\n\r\n\t\t\t// Handle state\r\n\t\t\tif ( stateString ) {\r\n\t\t\t\tlist.add(\r\n\t\t\t\t\tfunction() {\r\n\r\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\r\n\t\t\t\t\t\t// state = \"rejected\"\r\n\t\t\t\t\t\tstate = stateString;\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\t// rejected_callbacks.disable\r\n\t\t\t\t\t// fulfilled_callbacks.disable\r\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\r\n\r\n\t\t\t\t\t// rejected_handlers.disable\r\n\t\t\t\t\t// fulfilled_handlers.disable\r\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\r\n\r\n\t\t\t\t\t// progress_callbacks.lock\r\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\r\n\r\n\t\t\t\t\t// progress_handlers.lock\r\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// progress_handlers.fire\r\n\t\t\t// fulfilled_handlers.fire\r\n\t\t\t// rejected_handlers.fire\r\n\t\t\tlist.add( tuple[ 3 ].fire );\r\n\r\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\r\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\r\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\r\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\r\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t};\r\n\r\n\t\t\t// deferred.notifyWith = list.fireWith\r\n\t\t\t// deferred.resolveWith = list.fireWith\r\n\t\t\t// deferred.rejectWith = list.fireWith\r\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\r\n\t\t} );\r\n\r\n\t\t// Make the deferred a promise\r\n\t\tpromise.promise( deferred );\r\n\r\n\t\t// Call given func if any\r\n\t\tif ( func ) {\r\n\t\t\tfunc.call( deferred, deferred );\r\n\t\t}\r\n\r\n\t\t// All done!\r\n\t\treturn deferred;\r\n\t},\r\n\r\n\t// Deferred helper\r\n\twhen: function( singleValue ) {\r\n\t\tvar\r\n\r\n\t\t\t// count of uncompleted subordinates\r\n\t\t\tremaining = arguments.length,\r\n\r\n\t\t\t// count of unprocessed arguments\r\n\t\t\ti = remaining,\r\n\r\n\t\t\t// subordinate fulfillment data\r\n\t\t\tresolveContexts = Array( i ),\r\n\t\t\tresolveValues = slice.call( arguments ),\r\n\r\n\t\t\t// the primary Deferred\r\n\t\t\tprimary = jQuery.Deferred(),\r\n\r\n\t\t\t// subordinate callback factory\r\n\t\t\tupdateFunc = function( i ) {\r\n\t\t\t\treturn function( value ) {\r\n\t\t\t\t\tresolveContexts[ i ] = this;\r\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\r\n\t\t\t\t\tif ( !( --remaining ) ) {\r\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t};\r\n\r\n\t\t// Single- and empty arguments are adopted like Promise.resolve\r\n\t\tif ( remaining <= 1 ) {\r\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\r\n\t\t\t\t!remaining );\r\n\r\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\r\n\t\t\tif ( primary.state() === \"pending\" ||\r\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\r\n\r\n\t\t\t\treturn primary.then();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Multiple arguments are aggregated like Promise.all array elements\r\n\t\twhile ( i-- ) {\r\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\r\n\t\t}\r\n\r\n\t\treturn primary.promise();\r\n\t}\r\n} );\r\n\r\n\r\n// These usually indicate a programmer mistake during development,\r\n// warn about them ASAP rather than swallowing them by default.\r\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\r\n\r\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\r\n// captured before the async barrier to get the original error cause\r\n// which may otherwise be hidden.\r\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\r\n\r\n\t// Support: IE 8 - 9 only\r\n\t// Console exists when dev tools are open, which can happen at any time\r\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\r\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\r\n\t\t\terror.stack, asyncError );\r\n\t}\r\n};\r\n\r\n\r\n\r\n\r\njQuery.readyException = function( error ) {\r\n\twindow.setTimeout( function() {\r\n\t\tthrow error;\r\n\t} );\r\n};\r\n\r\n\r\n\r\n\r\n// The deferred used on DOM ready\r\nvar readyList = jQuery.Deferred();\r\n\r\njQuery.fn.ready = function( fn ) {\r\n\r\n\treadyList\r\n\t\t.then( fn )\r\n\r\n\t\t// Wrap jQuery.readyException in a function so that the lookup\r\n\t\t// happens at the time of error handling instead of callback\r\n\t\t// registration.\r\n\t\t.catch( function( error ) {\r\n\t\t\tjQuery.readyException( error );\r\n\t\t} );\r\n\r\n\treturn this;\r\n};\r\n\r\njQuery.extend( {\r\n\r\n\t// Is the DOM ready to be used? Set to true once it occurs.\r\n\tisReady: false,\r\n\r\n\t// A counter to track how many items to wait for before\r\n\t// the ready event fires. See trac-6781\r\n\treadyWait: 1,\r\n\r\n\t// Handle when the DOM is ready\r\n\tready: function( wait ) {\r\n\r\n\t\t// Abort if there are pending holds or we're already ready\r\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Remember that the DOM is ready\r\n\t\tjQuery.isReady = true;\r\n\r\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\r\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If there are functions bound, to execute\r\n\t\treadyList.resolveWith( document, [ jQuery ] );\r\n\t}\r\n} );\r\n\r\njQuery.ready.then = readyList.then;\r\n\r\n// The ready event handler and self cleanup method\r\nfunction completed() {\r\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\r\n\twindow.removeEventListener( \"load\", completed );\r\n\tjQuery.ready();\r\n}\r\n\r\n// Catch cases where $(document).ready() is called\r\n// after the browser event has already occurred.\r\n// Support: IE <=9 - 10 only\r\n// Older IE sometimes signals \"interactive\" too soon\r\nif ( document.readyState === \"complete\" ||\r\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\r\n\r\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\r\n\twindow.setTimeout( jQuery.ready );\r\n\r\n} else {\r\n\r\n\t// Use the handy event callback\r\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\r\n\r\n\t// A fallback to window.onload, that will always work\r\n\twindow.addEventListener( \"load\", completed );\r\n}\r\n\r\n\r\n\r\n\r\n// Multifunctional method to get and set values of a collection\r\n// The value/s can optionally be executed if it's a function\r\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\r\n\tvar i = 0,\r\n\t\tlen = elems.length,\r\n\t\tbulk = key == null;\r\n\r\n\t// Sets many values\r\n\tif ( toType( key ) === \"object\" ) {\r\n\t\tchainable = true;\r\n\t\tfor ( i in key ) {\r\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\r\n\t\t}\r\n\r\n\t// Sets one value\r\n\t} else if ( value !== undefined ) {\r\n\t\tchainable = true;\r\n\r\n\t\tif ( !isFunction( value ) ) {\r\n\t\t\traw = true;\r\n\t\t}\r\n\r\n\t\tif ( bulk ) {\r\n\r\n\t\t\t// Bulk operations run against the entire set\r\n\t\t\tif ( raw ) {\r\n\t\t\t\tfn.call( elems, value );\r\n\t\t\t\tfn = null;\r\n\r\n\t\t\t// ...except when executing function values\r\n\t\t\t} else {\r\n\t\t\t\tbulk = fn;\r\n\t\t\t\tfn = function( elem, _key, value ) {\r\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( fn ) {\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\tfn(\r\n\t\t\t\t\telems[ i ], key, raw ?\r\n\t\t\t\t\t\tvalue :\r\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ( chainable ) {\r\n\t\treturn elems;\r\n\t}\r\n\r\n\t// Gets\r\n\tif ( bulk ) {\r\n\t\treturn fn.call( elems );\r\n\t}\r\n\r\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\r\n};\r\n\r\n\r\n// Matches dashed string for camelizing\r\nvar rmsPrefix = /^-ms-/,\r\n\trdashAlpha = /-([a-z])/g;\r\n\r\n// Used by camelCase as callback to replace()\r\nfunction fcamelCase( _all, letter ) {\r\n\treturn letter.toUpperCase();\r\n}\r\n\r\n// Convert dashed to camelCase; used by the css and data modules\r\n// Support: IE <=9 - 11, Edge 12 - 15\r\n// Microsoft forgot to hump their vendor prefix (trac-9572)\r\nfunction camelCase( string ) {\r\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n}\r\nvar acceptData = function( owner ) {\r\n\r\n\t// Accepts only:\r\n\t// - Node\r\n\t// - Node.ELEMENT_NODE\r\n\t// - Node.DOCUMENT_NODE\r\n\t// - Object\r\n\t// - Any\r\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\r\n};\r\n\r\n\r\n\r\n\r\nfunction Data() {\r\n\tthis.expando = jQuery.expando + Data.uid++;\r\n}\r\n\r\nData.uid = 1;\r\n\r\nData.prototype = {\r\n\r\n\tcache: function( owner ) {\r\n\r\n\t\t// Check if the owner object already has a cache\r\n\t\tvar value = owner[ this.expando ];\r\n\r\n\t\t// If not, create one\r\n\t\tif ( !value ) {\r\n\t\t\tvalue = {};\r\n\r\n\t\t\t// We can accept data for non-element nodes in modern browsers,\r\n\t\t\t// but we should not, see trac-8335.\r\n\t\t\t// Always return an empty object.\r\n\t\t\tif ( acceptData( owner ) ) {\r\n\r\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\r\n\t\t\t\t// use plain assignment\r\n\t\t\t\tif ( owner.nodeType ) {\r\n\t\t\t\t\towner[ this.expando ] = value;\r\n\r\n\t\t\t\t// Otherwise secure it in a non-enumerable property\r\n\t\t\t\t// configurable must be true to allow the property to be\r\n\t\t\t\t// deleted when data is removed\r\n\t\t\t\t} else {\r\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\r\n\t\t\t\t\t\tvalue: value,\r\n\t\t\t\t\t\tconfigurable: true\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn value;\r\n\t},\r\n\tset: function( owner, data, value ) {\r\n\t\tvar prop,\r\n\t\t\tcache = this.cache( owner );\r\n\r\n\t\t// Handle: [ owner, key, value ] args\r\n\t\t// Always use camelCase key (gh-2257)\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\tcache[ camelCase( data ) ] = value;\r\n\r\n\t\t// Handle: [ owner, { properties } ] args\r\n\t\t} else {\r\n\r\n\t\t\t// Copy the properties one-by-one to the cache object\r\n\t\t\tfor ( prop in data ) {\r\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cache;\r\n\t},\r\n\tget: function( owner, key ) {\r\n\t\treturn key === undefined ?\r\n\t\t\tthis.cache( owner ) :\r\n\r\n\t\t\t// Always use camelCase key (gh-2257)\r\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\r\n\t},\r\n\taccess: function( owner, key, value ) {\r\n\r\n\t\t// In cases where either:\r\n\t\t//\r\n\t\t// 1. No key was specified\r\n\t\t// 2. A string key was specified, but no value provided\r\n\t\t//\r\n\t\t// Take the \"read\" path and allow the get method to determine\r\n\t\t// which value to return, respectively either:\r\n\t\t//\r\n\t\t// 1. The entire cache object\r\n\t\t// 2. The data stored at the key\r\n\t\t//\r\n\t\tif ( key === undefined ||\r\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\r\n\r\n\t\t\treturn this.get( owner, key );\r\n\t\t}\r\n\r\n\t\t// When the key is not a string, or both a key and value\r\n\t\t// are specified, set or extend (existing objects) with either:\r\n\t\t//\r\n\t\t// 1. An object of properties\r\n\t\t// 2. A key and value\r\n\t\t//\r\n\t\tthis.set( owner, key, value );\r\n\r\n\t\t// Since the \"set\" path can have two possible entry points\r\n\t\t// return the expected data based on which path was taken[*]\r\n\t\treturn value !== undefined ? value : key;\r\n\t},\r\n\tremove: function( owner, key ) {\r\n\t\tvar i,\r\n\t\t\tcache = owner[ this.expando ];\r\n\r\n\t\tif ( cache === undefined ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( key !== undefined ) {\r\n\r\n\t\t\t// Support array or space separated string of keys\r\n\t\t\tif ( Array.isArray( key ) ) {\r\n\r\n\t\t\t\t// If key is an array of keys...\r\n\t\t\t\t// We always set camelCase keys, so remove that.\r\n\t\t\t\tkey = key.map( camelCase );\r\n\t\t\t} else {\r\n\t\t\t\tkey = camelCase( key );\r\n\r\n\t\t\t\t// If a key with the spaces exists, use it.\r\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\r\n\t\t\t\tkey = key in cache ?\r\n\t\t\t\t\t[ key ] :\r\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\r\n\t\t\t}\r\n\r\n\t\t\ti = key.length;\r\n\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tdelete cache[ key[ i ] ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove the expando if there's no more data\r\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\r\n\r\n\t\t\t// Support: Chrome <=35 - 45\r\n\t\t\t// Webkit & Blink performance suffers when deleting properties\r\n\t\t\t// from DOM nodes, so set to undefined instead\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\r\n\t\t\tif ( owner.nodeType ) {\r\n\t\t\t\towner[ this.expando ] = undefined;\r\n\t\t\t} else {\r\n\t\t\t\tdelete owner[ this.expando ];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\thasData: function( owner ) {\r\n\t\tvar cache = owner[ this.expando ];\r\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\r\n\t}\r\n};\r\nvar dataPriv = new Data();\r\n\r\nvar dataUser = new Data();\r\n\r\n\r\n\r\n//\tImplementation Summary\r\n//\r\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\r\n//\t2. Improve the module's maintainability by reducing the storage\r\n//\t\tpaths to a single mechanism.\r\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\r\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\r\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\r\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\r\n\r\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\r\n\trmultiDash = /[A-Z]/g;\r\n\r\nfunction getData( data ) {\r\n\tif ( data === \"true\" ) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tif ( data === \"false\" ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( data === \"null\" ) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t// Only convert to a number if it doesn't change the string\r\n\tif ( data === +data + \"\" ) {\r\n\t\treturn +data;\r\n\t}\r\n\r\n\tif ( rbrace.test( data ) ) {\r\n\t\treturn JSON.parse( data );\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nfunction dataAttr( elem, key, data ) {\r\n\tvar name;\r\n\r\n\t// If nothing was found internally, try to fetch any\r\n\t// data from the HTML5 data-* attribute\r\n\tif ( data === undefined && elem.nodeType === 1 ) {\r\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\r\n\t\tdata = elem.getAttribute( name );\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\ttry {\r\n\t\t\t\tdata = getData( data );\r\n\t\t\t} catch ( e ) {}\r\n\r\n\t\t\t// Make sure we set the data so it isn't changed later\r\n\t\t\tdataUser.set( elem, key, data );\r\n\t\t} else {\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\t}\r\n\treturn data;\r\n}\r\n\r\njQuery.extend( {\r\n\thasData: function( elem ) {\r\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\r\n\t},\r\n\r\n\tdata: function( elem, name, data ) {\r\n\t\treturn dataUser.access( elem, name, data );\r\n\t},\r\n\r\n\tremoveData: function( elem, name ) {\r\n\t\tdataUser.remove( elem, name );\r\n\t},\r\n\r\n\t// TODO: Now that all calls to _data and _removeData have been replaced\r\n\t// with direct calls to dataPriv methods, these can be deprecated.\r\n\t_data: function( elem, name, data ) {\r\n\t\treturn dataPriv.access( elem, name, data );\r\n\t},\r\n\r\n\t_removeData: function( elem, name ) {\r\n\t\tdataPriv.remove( elem, name );\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\tdata: function( key, value ) {\r\n\t\tvar i, name, data,\r\n\t\t\telem = this[ 0 ],\r\n\t\t\tattrs = elem && elem.attributes;\r\n\r\n\t\t// Gets all values\r\n\t\tif ( key === undefined ) {\r\n\t\t\tif ( this.length ) {\r\n\t\t\t\tdata = dataUser.get( elem );\r\n\r\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\r\n\t\t\t\t\ti = attrs.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\r\n\t\t\t\t\t\t// Support: IE 11 only\r\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\r\n\t\t\t\t\t\tif ( attrs[ i ] ) {\r\n\t\t\t\t\t\t\tname = attrs[ i ].name;\r\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\r\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\r\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\t// Sets multiple values\r\n\t\tif ( typeof key === \"object\" ) {\r\n\t\t\treturn this.each( function() {\r\n\t\t\t\tdataUser.set( this, key );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn access( this, function( value ) {\r\n\t\t\tvar data;\r\n\r\n\t\t\t// The calling jQuery object (element matches) is not empty\r\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\r\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\r\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\r\n\t\t\t// throw an exception if an attempt to read a data cache is made.\r\n\t\t\tif ( elem && value === undefined ) {\r\n\r\n\t\t\t\t// Attempt to get data from the cache\r\n\t\t\t\t// The key will always be camelCased in Data\r\n\t\t\t\tdata = dataUser.get( elem, key );\r\n\t\t\t\tif ( data !== undefined ) {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Attempt to \"discover\" the data in\r\n\t\t\t\t// HTML5 custom data-* attrs\r\n\t\t\t\tdata = dataAttr( elem, key );\r\n\t\t\t\tif ( data !== undefined ) {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// We tried really hard, but the data doesn't exist.\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Set the data...\r\n\t\t\tthis.each( function() {\r\n\r\n\t\t\t\t// We always store the camelCased key\r\n\t\t\t\tdataUser.set( this, key, value );\r\n\t\t\t} );\r\n\t\t}, null, value, arguments.length > 1, null, true );\r\n\t},\r\n\r\n\tremoveData: function( key ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tdataUser.remove( this, key );\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\n\r\njQuery.extend( {\r\n\tqueue: function( elem, type, data ) {\r\n\t\tvar queue;\r\n\r\n\t\tif ( elem ) {\r\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\r\n\t\t\tqueue = dataPriv.get( elem, type );\r\n\r\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\r\n\t\t\tif ( data ) {\r\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\r\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tqueue.push( data );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn queue || [];\r\n\t\t}\r\n\t},\r\n\r\n\tdequeue: function( elem, type ) {\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\tvar queue = jQuery.queue( elem, type ),\r\n\t\t\tstartLength = queue.length,\r\n\t\t\tfn = queue.shift(),\r\n\t\t\thooks = jQuery._queueHooks( elem, type ),\r\n\t\t\tnext = function() {\r\n\t\t\t\tjQuery.dequeue( elem, type );\r\n\t\t\t};\r\n\r\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\r\n\t\tif ( fn === \"inprogress\" ) {\r\n\t\t\tfn = queue.shift();\r\n\t\t\tstartLength--;\r\n\t\t}\r\n\r\n\t\tif ( fn ) {\r\n\r\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\r\n\t\t\t// automatically dequeued\r\n\t\t\tif ( type === \"fx\" ) {\r\n\t\t\t\tqueue.unshift( \"inprogress\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Clear up the last queue stop function\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tfn.call( elem, next, hooks );\r\n\t\t}\r\n\r\n\t\tif ( !startLength && hooks ) {\r\n\t\t\thooks.empty.fire();\r\n\t\t}\r\n\t},\r\n\r\n\t// Not public - generate a queueHooks object, or return the current one\r\n\t_queueHooks: function( elem, type ) {\r\n\t\tvar key = type + \"queueHooks\";\r\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\r\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\r\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\r\n\t\t\t} )\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\tqueue: function( type, data ) {\r\n\t\tvar setter = 2;\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tdata = type;\r\n\t\t\ttype = \"fx\";\r\n\t\t\tsetter--;\r\n\t\t}\r\n\r\n\t\tif ( arguments.length < setter ) {\r\n\t\t\treturn jQuery.queue( this[ 0 ], type );\r\n\t\t}\r\n\r\n\t\treturn data === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each( function() {\r\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\r\n\r\n\t\t\t\t// Ensure a hooks for this queue\r\n\t\t\t\tjQuery._queueHooks( this, type );\r\n\r\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\r\n\t\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t},\r\n\tdequeue: function( type ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.dequeue( this, type );\r\n\t\t} );\r\n\t},\r\n\tclearQueue: function( type ) {\r\n\t\treturn this.queue( type || \"fx\", [] );\r\n\t},\r\n\r\n\t// Get a promise resolved when queues of a certain type\r\n\t// are emptied (fx is the type by default)\r\n\tpromise: function( type, obj ) {\r\n\t\tvar tmp,\r\n\t\t\tcount = 1,\r\n\t\t\tdefer = jQuery.Deferred(),\r\n\t\t\telements = this,\r\n\t\t\ti = this.length,\r\n\t\t\tresolve = function() {\r\n\t\t\t\tif ( !( --count ) ) {\r\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tobj = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\twhile ( i-- ) {\r\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\r\n\t\t\tif ( tmp && tmp.empty ) {\r\n\t\t\t\tcount++;\r\n\t\t\t\ttmp.empty.add( resolve );\r\n\t\t\t}\r\n\t\t}\r\n\t\tresolve();\r\n\t\treturn defer.promise( obj );\r\n\t}\r\n} );\r\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\r\n\r\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\r\n\r\n\r\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\r\n\r\nvar documentElement = document.documentElement;\r\n\r\n\r\n\r\n\tvar isAttached = function( elem ) {\r\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\r\n\t\t},\r\n\t\tcomposed = { composed: true };\r\n\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\r\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\r\n\t// Support: iOS 10.0-10.2 only\r\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\r\n\t// leading to errors. We need to check for `getRootNode`.\r\n\tif ( documentElement.getRootNode ) {\r\n\t\tisAttached = function( elem ) {\r\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\r\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\r\n\t\t};\r\n\t}\r\nvar isHiddenWithinTree = function( elem, el ) {\r\n\r\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\r\n\t\t// in that case, element will be second argument\r\n\t\telem = el || elem;\r\n\r\n\t\t// Inline style trumps all\r\n\t\treturn elem.style.display === \"none\" ||\r\n\t\t\telem.style.display === \"\" &&\r\n\r\n\t\t\t// Otherwise, check computed style\r\n\t\t\t// Support: Firefox <=43 - 45\r\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\r\n\t\t\t// in the document.\r\n\t\t\tisAttached( elem ) &&\r\n\r\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\r\n\t};\r\n\r\n\r\n\r\nfunction adjustCSS( elem, prop, valueParts, tween ) {\r\n\tvar adjusted, scale,\r\n\t\tmaxIterations = 20,\r\n\t\tcurrentValue = tween ?\r\n\t\t\tfunction() {\r\n\t\t\t\treturn tween.cur();\r\n\t\t\t} :\r\n\t\t\tfunction() {\r\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\r\n\t\t\t},\r\n\t\tinitial = currentValue(),\r\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\r\n\r\n\t\t// Starting value computation is required for potential unit mismatches\r\n\t\tinitialInUnit = elem.nodeType &&\r\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\r\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\r\n\r\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\r\n\r\n\t\t// Support: Firefox <=54\r\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\r\n\t\tinitial = initial / 2;\r\n\r\n\t\t// Trust units reported by jQuery.css\r\n\t\tunit = unit || initialInUnit[ 3 ];\r\n\r\n\t\t// Iteratively approximate from a nonzero starting point\r\n\t\tinitialInUnit = +initial || 1;\r\n\r\n\t\twhile ( maxIterations-- ) {\r\n\r\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\r\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\r\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\r\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\r\n\t\t\t\tmaxIterations = 0;\r\n\t\t\t}\r\n\t\t\tinitialInUnit = initialInUnit / scale;\r\n\r\n\t\t}\r\n\r\n\t\tinitialInUnit = initialInUnit * 2;\r\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\r\n\r\n\t\t// Make sure we update the tween properties later on\r\n\t\tvalueParts = valueParts || [];\r\n\t}\r\n\r\n\tif ( valueParts ) {\r\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\r\n\r\n\t\t// Apply relative offset (+=/-=) if specified\r\n\t\tadjusted = valueParts[ 1 ] ?\r\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\r\n\t\t\t+valueParts[ 2 ];\r\n\t\tif ( tween ) {\r\n\t\t\ttween.unit = unit;\r\n\t\t\ttween.start = initialInUnit;\r\n\t\t\ttween.end = adjusted;\r\n\t\t}\r\n\t}\r\n\treturn adjusted;\r\n}\r\n\r\n\r\nvar defaultDisplayMap = {};\r\n\r\nfunction getDefaultDisplay( elem ) {\r\n\tvar temp,\r\n\t\tdoc = elem.ownerDocument,\r\n\t\tnodeName = elem.nodeName,\r\n\t\tdisplay = defaultDisplayMap[ nodeName ];\r\n\r\n\tif ( display ) {\r\n\t\treturn display;\r\n\t}\r\n\r\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\r\n\tdisplay = jQuery.css( temp, \"display\" );\r\n\r\n\ttemp.parentNode.removeChild( temp );\r\n\r\n\tif ( display === \"none\" ) {\r\n\t\tdisplay = \"block\";\r\n\t}\r\n\tdefaultDisplayMap[ nodeName ] = display;\r\n\r\n\treturn display;\r\n}\r\n\r\nfunction showHide( elements, show ) {\r\n\tvar display, elem,\r\n\t\tvalues = [],\r\n\t\tindex = 0,\r\n\t\tlength = elements.length;\r\n\r\n\t// Determine new display value for elements that need to change\r\n\tfor ( ; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tdisplay = elem.style.display;\r\n\t\tif ( show ) {\r\n\r\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\r\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\r\n\t\t\t// inline or about-to-be-restored)\r\n\t\t\tif ( display === \"none\" ) {\r\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\r\n\t\t\t\tif ( !values[ index ] ) {\r\n\t\t\t\t\telem.style.display = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\r\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ( display !== \"none\" ) {\r\n\t\t\t\tvalues[ index ] = \"none\";\r\n\r\n\t\t\t\t// Remember what we're overwriting\r\n\t\t\t\tdataPriv.set( elem, \"display\", display );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Set the display of the elements in a second loop to avoid constant reflow\r\n\tfor ( index = 0; index < length; index++ ) {\r\n\t\tif ( values[ index ] != null ) {\r\n\t\t\telements[ index ].style.display = values[ index ];\r\n\t\t}\r\n\t}\r\n\r\n\treturn elements;\r\n}\r\n\r\njQuery.fn.extend( {\r\n\tshow: function() {\r\n\t\treturn showHide( this, true );\r\n\t},\r\n\thide: function() {\r\n\t\treturn showHide( this );\r\n\t},\r\n\ttoggle: function( state ) {\r\n\t\tif ( typeof state === \"boolean\" ) {\r\n\t\t\treturn state ? this.show() : this.hide();\r\n\t\t}\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tif ( isHiddenWithinTree( this ) ) {\r\n\t\t\t\tjQuery( this ).show();\r\n\t\t\t} else {\r\n\t\t\t\tjQuery( this ).hide();\r\n\t\t\t}\r\n\t\t} );\r\n\t}\r\n} );\r\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\r\n\r\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\r\n\r\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\r\n\r\n\r\n\r\n( function() {\r\n\tvar fragment = document.createDocumentFragment(),\r\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\r\n\t\tinput = document.createElement( \"input\" );\r\n\r\n\t// Support: Android 4.0 - 4.3 only\r\n\t// Check state lost if the name is set (trac-11217)\r\n\t// Support: Windows Web Apps (WWA)\r\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\r\n\tinput.setAttribute( \"type\", \"radio\" );\r\n\tinput.setAttribute( \"checked\", \"checked\" );\r\n\tinput.setAttribute( \"name\", \"t\" );\r\n\r\n\tdiv.appendChild( input );\r\n\r\n\t// Support: Android <=4.1 only\r\n\t// Older WebKit doesn't clone checked state correctly in fragments\r\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\r\n\r\n\t// Support: IE <=11 only\r\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\r\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\r\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\r\n\r\n\t// Support: IE <=9 only\r\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\r\n\t// the select element.\r\n\tdiv.innerHTML = \"<option></option>\";\r\n\tsupport.option = !!div.lastChild;\r\n} )();\r\n\r\n\r\n// We have to close these tags to support XHTML (trac-13200)\r\nvar wrapMap = {\r\n\r\n\t// XHTML parsers do not magically insert elements in the\r\n\t// same way that tag soup parsers do. So we cannot shorten\r\n\t// this by omitting <tbody> or other required elements.\r\n\tthead: [ 1, \"<table>\", \"</table>\" ],\r\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\r\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\r\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\r\n\r\n\t_default: [ 0, \"\", \"\" ]\r\n};\r\n\r\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\r\nwrapMap.th = wrapMap.td;\r\n\r\n// Support: IE <=9 only\r\nif ( !support.option ) {\r\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\r\n}\r\n\r\n\r\nfunction getAll( context, tag ) {\r\n\r\n\t// Support: IE <=9 - 11 only\r\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\r\n\tvar ret;\r\n\r\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\r\n\t\tret = context.getElementsByTagName( tag || \"*\" );\r\n\r\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\r\n\t\tret = context.querySelectorAll( tag || \"*\" );\r\n\r\n\t} else {\r\n\t\tret = [];\r\n\t}\r\n\r\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\r\n\t\treturn jQuery.merge( [ context ], ret );\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n// Mark scripts as having already been evaluated\r\nfunction setGlobalEval( elems, refElements ) {\r\n\tvar i = 0,\r\n\t\tl = elems.length;\r\n\r\n\tfor ( ; i < l; i++ ) {\r\n\t\tdataPriv.set(\r\n\t\t\telems[ i ],\r\n\t\t\t\"globalEval\",\r\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\r\n\t\t);\r\n\t}\r\n}\r\n\r\n\r\nvar rhtml = /<|&#?\\w+;/;\r\n\r\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\r\n\tvar elem, tmp, tag, wrap, attached, j,\r\n\t\tfragment = context.createDocumentFragment(),\r\n\t\tnodes = [],\r\n\t\ti = 0,\r\n\t\tl = elems.length;\r\n\r\n\tfor ( ; i < l; i++ ) {\r\n\t\telem = elems[ i ];\r\n\r\n\t\tif ( elem || elem === 0 ) {\r\n\r\n\t\t\t// Add nodes directly\r\n\t\t\tif ( toType( elem ) === \"object\" ) {\r\n\r\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\r\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\r\n\r\n\t\t\t// Convert non-html into a text node\r\n\t\t\t} else if ( !rhtml.test( elem ) ) {\r\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\r\n\r\n\t\t\t// Convert html into DOM nodes\r\n\t\t\t} else {\r\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\r\n\r\n\t\t\t\t// Deserialize a standard representation\r\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\r\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\r\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\r\n\r\n\t\t\t\t// Descend through wrappers to the right content\r\n\t\t\t\tj = wrap[ 0 ];\r\n\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\ttmp = tmp.lastChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\r\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\r\n\r\n\t\t\t\t// Remember the top-level container\r\n\t\t\t\ttmp = fragment.firstChild;\r\n\r\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\r\n\t\t\t\ttmp.textContent = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Remove wrapper from fragment\r\n\tfragment.textContent = \"\";\r\n\r\n\ti = 0;\r\n\twhile ( ( elem = nodes[ i++ ] ) ) {\r\n\r\n\t\t// Skip elements already in the context collection (trac-4087)\r\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\r\n\t\t\tif ( ignored ) {\r\n\t\t\t\tignored.push( elem );\r\n\t\t\t}\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tattached = isAttached( elem );\r\n\r\n\t\t// Append to fragment\r\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tif ( attached ) {\r\n\t\t\tsetGlobalEval( tmp );\r\n\t\t}\r\n\r\n\t\t// Capture executables\r\n\t\tif ( scripts ) {\r\n\t\t\tj = 0;\r\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\r\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\r\n\t\t\t\t\tscripts.push( elem );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn fragment;\r\n}\r\n\r\n\r\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\r\n\r\nfunction returnTrue() {\r\n\treturn true;\r\n}\r\n\r\nfunction returnFalse() {\r\n\treturn false;\r\n}\r\n\r\nfunction on( elem, types, selector, data, fn, one ) {\r\n\tvar origFn, type;\r\n\r\n\t// Types can be a map of types/handlers\r\n\tif ( typeof types === \"object\" ) {\r\n\r\n\t\t// ( types-Object, selector, data )\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\r\n\t\t\t// ( types-Object, data )\r\n\t\t\tdata = data || selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tfor ( type in types ) {\r\n\t\t\ton( elem, type, selector, data, types[ type ], one );\r\n\t\t}\r\n\t\treturn elem;\r\n\t}\r\n\r\n\tif ( data == null && fn == null ) {\r\n\r\n\t\t// ( types, fn )\r\n\t\tfn = selector;\r\n\t\tdata = selector = undefined;\r\n\t} else if ( fn == null ) {\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\r\n\t\t\t// ( types, selector, fn )\r\n\t\t\tfn = data;\r\n\t\t\tdata = undefined;\r\n\t\t} else {\r\n\r\n\t\t\t// ( types, data, fn )\r\n\t\t\tfn = data;\r\n\t\t\tdata = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t}\r\n\tif ( fn === false ) {\r\n\t\tfn = returnFalse;\r\n\t} else if ( !fn ) {\r\n\t\treturn elem;\r\n\t}\r\n\r\n\tif ( one === 1 ) {\r\n\t\torigFn = fn;\r\n\t\tfn = function( event ) {\r\n\r\n\t\t\t// Can use an empty set, since event contains the info\r\n\t\t\tjQuery().off( event );\r\n\t\t\treturn origFn.apply( this, arguments );\r\n\t\t};\r\n\r\n\t\t// Use same guid so caller can remove using origFn\r\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\r\n\t}\r\n\treturn elem.each( function() {\r\n\t\tjQuery.event.add( this, types, fn, data, selector );\r\n\t} );\r\n}\r\n\r\n/*\r\n * Helper functions for managing events -- not part of the public interface.\r\n * Props to Dean Edwards' addEvent library for many of the ideas.\r\n */\r\njQuery.event = {\r\n\r\n\tglobal: {},\r\n\r\n\tadd: function( elem, types, handler, data, selector ) {\r\n\r\n\t\tvar handleObjIn, eventHandle, tmp,\r\n\t\t\tevents, t, handleObj,\r\n\t\t\tspecial, handlers, type, namespaces, origType,\r\n\t\t\telemData = dataPriv.get( elem );\r\n\r\n\t\t// Only attach events to objects that accept data\r\n\t\tif ( !acceptData( elem ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Caller can pass in an object of custom data in lieu of the handler\r\n\t\tif ( handler.handler ) {\r\n\t\t\thandleObjIn = handler;\r\n\t\t\thandler = handleObjIn.handler;\r\n\t\t\tselector = handleObjIn.selector;\r\n\t\t}\r\n\r\n\t\t// Ensure that invalid selectors throw exceptions at attach time\r\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\r\n\t\tif ( selector ) {\r\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\r\n\t\t}\r\n\r\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\r\n\t\tif ( !handler.guid ) {\r\n\t\t\thandler.guid = jQuery.guid++;\r\n\t\t}\r\n\r\n\t\t// Init the element's event structure and main handler, if this is the first\r\n\t\tif ( !( events = elemData.events ) ) {\r\n\t\t\tevents = elemData.events = Object.create( null );\r\n\t\t}\r\n\t\tif ( !( eventHandle = elemData.handle ) ) {\r\n\t\t\teventHandle = elemData.handle = function( e ) {\r\n\r\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\r\n\t\t\t\t// when an event is called after a page has unloaded\r\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\r\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t// Handle multiple events separated by a space\r\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\r\n\t\t\ttype = origType = tmp[ 1 ];\r\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// If event changes its type, use the special event handlers for the changed type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// If selector defined, determine special event api type, otherwise given type\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\r\n\t\t\t// Update special based on newly reset type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// handleObj is passed to all event handlers\r\n\t\t\thandleObj = jQuery.extend( {\r\n\t\t\t\ttype: type,\r\n\t\t\t\torigType: origType,\r\n\t\t\t\tdata: data,\r\n\t\t\t\thandler: handler,\r\n\t\t\t\tguid: handler.guid,\r\n\t\t\t\tselector: selector,\r\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\r\n\t\t\t\tnamespace: namespaces.join( \".\" )\r\n\t\t\t}, handleObjIn );\r\n\r\n\t\t\t// Init the event handler queue if we're the first\r\n\t\t\tif ( !( handlers = events[ type ] ) ) {\r\n\t\t\t\thandlers = events[ type ] = [];\r\n\t\t\t\thandlers.delegateCount = 0;\r\n\r\n\t\t\t\t// Only use addEventListener if the special events handler returns false\r\n\t\t\t\tif ( !special.setup ||\r\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\r\n\r\n\t\t\t\t\tif ( elem.addEventListener ) {\r\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( special.add ) {\r\n\t\t\t\tspecial.add.call( elem, handleObj );\r\n\r\n\t\t\t\tif ( !handleObj.handler.guid ) {\r\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add to the element's handler list, delegates in front\r\n\t\t\tif ( selector ) {\r\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\r\n\t\t\t} else {\r\n\t\t\t\thandlers.push( handleObj );\r\n\t\t\t}\r\n\r\n\t\t\t// Keep track of which events have ever been used, for event optimization\r\n\t\t\tjQuery.event.global[ type ] = true;\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t// Detach an event or set of events from an element\r\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\r\n\r\n\t\tvar j, origCount, tmp,\r\n\t\t\tevents, t, handleObj,\r\n\t\t\tspecial, handlers, type, namespaces, origType,\r\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\r\n\r\n\t\tif ( !elemData || !( events = elemData.events ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Once for each type.namespace in types; type may be omitted\r\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\r\n\t\t\ttype = origType = tmp[ 1 ];\r\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tfor ( type in events ) {\r\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\t\t\thandlers = events[ type ] || [];\r\n\t\t\ttmp = tmp[ 2 ] &&\r\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\r\n\r\n\t\t\t// Remove matching events\r\n\t\t\torigCount = j = handlers.length;\r\n\t\t\twhile ( j-- ) {\r\n\t\t\t\thandleObj = handlers[ j ];\r\n\r\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\r\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\r\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\r\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\r\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\r\n\t\t\t\t\thandlers.splice( j, 1 );\r\n\r\n\t\t\t\t\tif ( handleObj.selector ) {\r\n\t\t\t\t\t\thandlers.delegateCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( special.remove ) {\r\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\r\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\r\n\t\t\tif ( origCount && !handlers.length ) {\r\n\t\t\t\tif ( !special.teardown ||\r\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\r\n\r\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelete events[ type ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove data and the expando if it's no longer used\r\n\t\tif ( jQuery.isEmptyObject( events ) ) {\r\n\t\t\tdataPriv.remove( elem, \"handle events\" );\r\n\t\t}\r\n\t},\r\n\r\n\tdispatch: function( nativeEvent ) {\r\n\r\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\r\n\t\t\targs = new Array( arguments.length ),\r\n\r\n\t\t\t// Make a writable jQuery.Event from the native event object\r\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\r\n\r\n\t\t\thandlers = (\r\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\r\n\t\t\t)[ event.type ] || [],\r\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\r\n\r\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\r\n\t\targs[ 0 ] = event;\r\n\r\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\r\n\t\t\targs[ i ] = arguments[ i ];\r\n\t\t}\r\n\r\n\t\tevent.delegateTarget = this;\r\n\r\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\r\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine handlers\r\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\r\n\r\n\t\t// Run delegates first; they may want to stop propagation beneath us\r\n\t\ti = 0;\r\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\r\n\t\t\tevent.currentTarget = matched.elem;\r\n\r\n\t\t\tj = 0;\r\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\r\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\r\n\r\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\r\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\r\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\r\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\r\n\r\n\t\t\t\t\tevent.handleObj = handleObj;\r\n\t\t\t\t\tevent.data = handleObj.data;\r\n\r\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\r\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\r\n\r\n\t\t\t\t\tif ( ret !== undefined ) {\r\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call the postDispatch hook for the mapped type\r\n\t\tif ( special.postDispatch ) {\r\n\t\t\tspecial.postDispatch.call( this, event );\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\thandlers: function( event, handlers ) {\r\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\r\n\t\t\thandlerQueue = [],\r\n\t\t\tdelegateCount = handlers.delegateCount,\r\n\t\t\tcur = event.target;\r\n\r\n\t\t// Find delegate handlers\r\n\t\tif ( delegateCount &&\r\n\r\n\t\t\t// Support: IE <=9\r\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\r\n\t\t\tcur.nodeType &&\r\n\r\n\t\t\t// Support: Firefox <=42\r\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\r\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\r\n\t\t\t// Support: IE 11 only\r\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\r\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\r\n\r\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\r\n\r\n\t\t\t\t// Don't check non-elements (trac-13208)\r\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\r\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\r\n\t\t\t\t\tmatchedHandlers = [];\r\n\t\t\t\t\tmatchedSelectors = {};\r\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\r\n\t\t\t\t\t\thandleObj = handlers[ i ];\r\n\r\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\r\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\r\n\r\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\r\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\r\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\r\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\r\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( matchedHandlers.length ) {\r\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add the remaining (directly-bound) handlers\r\n\t\tcur = this;\r\n\t\tif ( delegateCount < handlers.length ) {\r\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\r\n\t\t}\r\n\r\n\t\treturn handlerQueue;\r\n\t},\r\n\r\n\taddProp: function( name, hook ) {\r\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: true,\r\n\r\n\t\t\tget: isFunction( hook ) ?\r\n\t\t\t\tfunction() {\r\n\t\t\t\t\tif ( this.originalEvent ) {\r\n\t\t\t\t\t\treturn hook( this.originalEvent );\r\n\t\t\t\t\t}\r\n\t\t\t\t} :\r\n\t\t\t\tfunction() {\r\n\t\t\t\t\tif ( this.originalEvent ) {\r\n\t\t\t\t\t\treturn this.originalEvent[ name ];\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\tset: function( value ) {\r\n\t\t\t\tObject.defineProperty( this, name, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable: true,\r\n\t\t\t\t\twritable: true,\r\n\t\t\t\t\tvalue: value\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tfix: function( originalEvent ) {\r\n\t\treturn originalEvent[ jQuery.expando ] ?\r\n\t\t\toriginalEvent :\r\n\t\t\tnew jQuery.Event( originalEvent );\r\n\t},\r\n\r\n\tspecial: {\r\n\t\tload: {\r\n\r\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\r\n\t\t\tnoBubble: true\r\n\t\t},\r\n\t\tclick: {\r\n\r\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\r\n\t\t\tsetup: function( data ) {\r\n\r\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\r\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\r\n\t\t\t\tvar el = this || data;\r\n\r\n\t\t\t\t// Claim the first handler\r\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\r\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\r\n\r\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\r\n\t\t\t\t\tleverageNative( el, \"click\", true );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Return false to allow normal processing in the caller\r\n\t\t\t\treturn false;\r\n\t\t\t},\r\n\t\t\ttrigger: function( data ) {\r\n\r\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\r\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\r\n\t\t\t\tvar el = this || data;\r\n\r\n\t\t\t\t// Force setup before triggering a click\r\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\r\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\r\n\r\n\t\t\t\t\tleverageNative( el, \"click\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Return non-false to allow normal event-path propagation\r\n\t\t\t\treturn true;\r\n\t\t\t},\r\n\r\n\t\t\t// For cross-browser consistency, suppress native .click() on links\r\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\r\n\t\t\t_default: function( event ) {\r\n\t\t\t\tvar target = event.target;\r\n\t\t\t\treturn rcheckableType.test( target.type ) &&\r\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\r\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\r\n\t\t\t\t\tnodeName( target, \"a\" );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tbeforeunload: {\r\n\t\t\tpostDispatch: function( event ) {\r\n\r\n\t\t\t\t// Support: Firefox 20+\r\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\r\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\r\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// Ensure the presence of an event listener that handles manually-triggered\r\n// synthetic events by interrupting progress until reinvoked in response to\r\n// *native* events that it fires directly, ensuring that state changes have\r\n// already occurred before other listeners are invoked.\r\nfunction leverageNative( el, type, isSetup ) {\r\n\r\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\r\n\tif ( !isSetup ) {\r\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\r\n\t\t\tjQuery.event.add( el, type, returnTrue );\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Register the controller as a special universal handler for all event namespaces\r\n\tdataPriv.set( el, type, false );\r\n\tjQuery.event.add( el, type, {\r\n\t\tnamespace: false,\r\n\t\thandler: function( event ) {\r\n\t\t\tvar result,\r\n\t\t\t\tsaved = dataPriv.get( this, type );\r\n\r\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\r\n\r\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\r\n\t\t\t\tif ( !saved ) {\r\n\r\n\t\t\t\t\t// Store arguments for use when handling the inner native event\r\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\r\n\t\t\t\t\t// will not be confused with a leftover capture object.\r\n\t\t\t\t\tsaved = slice.call( arguments );\r\n\t\t\t\t\tdataPriv.set( this, type, saved );\r\n\r\n\t\t\t\t\t// Trigger the native event and capture its result\r\n\t\t\t\t\tthis[ type ]();\r\n\t\t\t\t\tresult = dataPriv.get( this, type );\r\n\t\t\t\t\tdataPriv.set( this, type, false );\r\n\r\n\t\t\t\t\tif ( saved !== result ) {\r\n\r\n\t\t\t\t\t\t// Cancel the outer synthetic event\r\n\t\t\t\t\t\tevent.stopImmediatePropagation();\r\n\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\r\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\r\n\t\t\t\t// the native event and prevent that from happening again here.\r\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\r\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\r\n\t\t\t\t// less bad than duplication.\r\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t// If this is a native event triggered above, everything is now in order\r\n\t\t\t// Fire an inner synthetic event with the original arguments\r\n\t\t\t} else if ( saved ) {\r\n\r\n\t\t\t\t// ...and capture the result\r\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\r\n\t\t\t\t\tsaved[ 0 ],\r\n\t\t\t\t\tsaved.slice( 1 ),\r\n\t\t\t\t\tthis\r\n\t\t\t\t) );\r\n\r\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\r\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\r\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\r\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\r\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\r\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\r\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\r\n\t\t\t\t// and radios. We accept this limitation.\r\n\t\t\t\tevent.stopPropagation();\r\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\r\n\t\t\t}\r\n\t\t}\r\n\t} );\r\n}\r\n\r\njQuery.removeEvent = function( elem, type, handle ) {\r\n\r\n\t// This \"if\" is needed for plain objects\r\n\tif ( elem.removeEventListener ) {\r\n\t\telem.removeEventListener( type, handle );\r\n\t}\r\n};\r\n\r\njQuery.Event = function( src, props ) {\r\n\r\n\t// Allow instantiation without the 'new' keyword\r\n\tif ( !( this instanceof jQuery.Event ) ) {\r\n\t\treturn new jQuery.Event( src, props );\r\n\t}\r\n\r\n\t// Event object\r\n\tif ( src && src.type ) {\r\n\t\tthis.originalEvent = src;\r\n\t\tthis.type = src.type;\r\n\r\n\t\t// Events bubbling up the document may have been marked as prevented\r\n\t\t// by a handler lower down the tree; reflect the correct value.\r\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\r\n\t\t\t\tsrc.defaultPrevented === undefined &&\r\n\r\n\t\t\t\t// Support: Android <=2.3 only\r\n\t\t\t\tsrc.returnValue === false ?\r\n\t\t\treturnTrue :\r\n\t\t\treturnFalse;\r\n\r\n\t\t// Create target properties\r\n\t\t// Support: Safari <=6 - 7 only\r\n\t\t// Target should not be a text node (trac-504, trac-13143)\r\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\r\n\t\t\tsrc.target.parentNode :\r\n\t\t\tsrc.target;\r\n\r\n\t\tthis.currentTarget = src.currentTarget;\r\n\t\tthis.relatedTarget = src.relatedTarget;\r\n\r\n\t// Event type\r\n\t} else {\r\n\t\tthis.type = src;\r\n\t}\r\n\r\n\t// Put explicitly provided properties onto the event object\r\n\tif ( props ) {\r\n\t\tjQuery.extend( this, props );\r\n\t}\r\n\r\n\t// Create a timestamp if incoming event doesn't have one\r\n\tthis.timeStamp = src && src.timeStamp || Date.now();\r\n\r\n\t// Mark it as fixed\r\n\tthis[ jQuery.expando ] = true;\r\n};\r\n\r\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\r\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\r\njQuery.Event.prototype = {\r\n\tconstructor: jQuery.Event,\r\n\tisDefaultPrevented: returnFalse,\r\n\tisPropagationStopped: returnFalse,\r\n\tisImmediatePropagationStopped: returnFalse,\r\n\tisSimulated: false,\r\n\r\n\tpreventDefault: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isDefaultPrevented = returnTrue;\r\n\r\n\t\tif ( e && !this.isSimulated ) {\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t},\r\n\tstopPropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isPropagationStopped = returnTrue;\r\n\r\n\t\tif ( e && !this.isSimulated ) {\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\t},\r\n\tstopImmediatePropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isImmediatePropagationStopped = returnTrue;\r\n\r\n\t\tif ( e && !this.isSimulated ) {\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\r\n\t\tthis.stopPropagation();\r\n\t}\r\n};\r\n\r\n// Includes all common event props including KeyEvent and MouseEvent specific props\r\njQuery.each( {\r\n\taltKey: true,\r\n\tbubbles: true,\r\n\tcancelable: true,\r\n\tchangedTouches: true,\r\n\tctrlKey: true,\r\n\tdetail: true,\r\n\teventPhase: true,\r\n\tmetaKey: true,\r\n\tpageX: true,\r\n\tpageY: true,\r\n\tshiftKey: true,\r\n\tview: true,\r\n\t\"char\": true,\r\n\tcode: true,\r\n\tcharCode: true,\r\n\tkey: true,\r\n\tkeyCode: true,\r\n\tbutton: true,\r\n\tbuttons: true,\r\n\tclientX: true,\r\n\tclientY: true,\r\n\toffsetX: true,\r\n\toffsetY: true,\r\n\tpointerId: true,\r\n\tpointerType: true,\r\n\tscreenX: true,\r\n\tscreenY: true,\r\n\ttargetTouches: true,\r\n\ttoElement: true,\r\n\ttouches: true,\r\n\twhich: true\r\n}, jQuery.event.addProp );\r\n\r\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\r\n\r\n\tfunction focusMappedHandler( nativeEvent ) {\r\n\t\tif ( document.documentMode ) {\r\n\r\n\t\t\t// Support: IE 11+\r\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\r\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\r\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\r\n\r\n\t\t\t// `handle` from private data would already wrap the event, but we need\r\n\t\t\t// to change the `type` here.\r\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\r\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\r\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\r\n\t\t\tevent.isSimulated = true;\r\n\r\n\t\t\t// First, handle focusin/focusout\r\n\t\t\thandle( nativeEvent );\r\n\r\n\t\t\t// ...then, handle focus/blur\r\n\t\t\t//\r\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\r\n\t\t\t// invoking the handler at the lower level.\r\n\t\t\tif ( event.target === event.currentTarget ) {\r\n\r\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\r\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\r\n\t\t\t\t// by this point.\r\n\t\t\t\thandle( event );\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\r\n\t\t\t// while someone wants focusin/focusout.\r\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\r\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\r\n\t\t}\r\n\t}\r\n\r\n\tjQuery.event.special[ type ] = {\r\n\r\n\t\t// Utilize native event if possible so blur/focus sequence is correct\r\n\t\tsetup: function() {\r\n\r\n\t\t\tvar attaches;\r\n\r\n\t\t\t// Claim the first handler\r\n\t\t\t// dataPriv.set( this, \"focus\", ... )\r\n\t\t\t// dataPriv.set( this, \"blur\", ... )\r\n\t\t\tleverageNative( this, type, true );\r\n\r\n\t\t\tif ( document.documentMode ) {\r\n\r\n\t\t\t\t// Support: IE 9 - 11+\r\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\r\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\r\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\r\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\r\n\t\t\t\tif ( !attaches ) {\r\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t}\r\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Return false to allow normal processing in the caller\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttrigger: function() {\r\n\r\n\t\t\t// Force setup before trigger\r\n\t\t\tleverageNative( this, type );\r\n\r\n\t\t\t// Return non-false to allow normal event-path propagation\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\tvar attaches;\r\n\r\n\t\t\tif ( document.documentMode ) {\r\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\r\n\t\t\t\tif ( !attaches ) {\r\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t\tdataPriv.remove( this, delegateType );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Return false to indicate standard teardown should be applied\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// Suppress native focus or blur if we're currently inside\r\n\t\t// a leveraged native-event stack\r\n\t\t_default: function( event ) {\r\n\t\t\treturn dataPriv.get( event.target, type );\r\n\t\t},\r\n\r\n\t\tdelegateType: delegateType\r\n\t};\r\n\r\n\t// Support: Firefox <=44\r\n\t// Firefox doesn't have focus(in | out) events\r\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\r\n\t//\r\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\r\n\t// focus(in | out) events fire after focus & blur events,\r\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\r\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\r\n\t//\r\n\t// Support: IE 9 - 11+\r\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\r\n\t// attach a single handler for both events in IE.\r\n\tjQuery.event.special[ delegateType ] = {\r\n\t\tsetup: function() {\r\n\r\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\r\n\t\t\t// (via `this.document`) & document (via `this`).\r\n\t\t\tvar doc = this.ownerDocument || this.document || this,\r\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\r\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\r\n\r\n\t\t\t// Support: IE 9 - 11+\r\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\r\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\r\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\r\n\t\t\tif ( !attaches ) {\r\n\t\t\t\tif ( document.documentMode ) {\r\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\r\n\t\t},\r\n\t\tteardown: function() {\r\n\t\t\tvar doc = this.ownerDocument || this.document || this,\r\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\r\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\r\n\r\n\t\t\tif ( !attaches ) {\r\n\t\t\t\tif ( document.documentMode ) {\r\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\r\n\t\t\t\t}\r\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\r\n\t\t\t} else {\r\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n} );\r\n\r\n// Create mouseenter/leave events using mouseover/out and event-time checks\r\n// so that event delegation works in jQuery.\r\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\r\n//\r\n// Support: Safari 7 only\r\n// Safari sends mouseenter too often; see:\r\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\r\n// for the description of the bug (it existed in older Chrome versions as well).\r\njQuery.each( {\r\n\tmouseenter: \"mouseover\",\r\n\tmouseleave: \"mouseout\",\r\n\tpointerenter: \"pointerover\",\r\n\tpointerleave: \"pointerout\"\r\n}, function( orig, fix ) {\r\n\tjQuery.event.special[ orig ] = {\r\n\t\tdelegateType: fix,\r\n\t\tbindType: fix,\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar ret,\r\n\t\t\t\ttarget = this,\r\n\t\t\t\trelated = event.relatedTarget,\r\n\t\t\t\thandleObj = event.handleObj;\r\n\r\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\r\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\r\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\r\n\t\t\t\tevent.type = handleObj.origType;\r\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\r\n\t\t\t\tevent.type = fix;\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t};\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\r\n\ton: function( types, selector, data, fn ) {\r\n\t\treturn on( this, types, selector, data, fn );\r\n\t},\r\n\tone: function( types, selector, data, fn ) {\r\n\t\treturn on( this, types, selector, data, fn, 1 );\r\n\t},\r\n\toff: function( types, selector, fn ) {\r\n\t\tvar handleObj, type;\r\n\t\tif ( types && types.preventDefault && types.handleObj ) {\r\n\r\n\t\t\t// ( event ) dispatched jQuery.Event\r\n\t\t\thandleObj = types.handleObj;\r\n\t\t\tjQuery( types.delegateTarget ).off(\r\n\t\t\t\thandleObj.namespace ?\r\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\r\n\t\t\t\t\thandleObj.origType,\r\n\t\t\t\thandleObj.selector,\r\n\t\t\t\thandleObj.handler\r\n\t\t\t);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( typeof types === \"object\" ) {\r\n\r\n\t\t\t// ( types-object [, selector] )\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.off( type, selector, types[ type ] );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( selector === false || typeof selector === \"function\" ) {\r\n\r\n\t\t\t// ( types [, fn] )\r\n\t\t\tfn = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.remove( this, types, fn, selector );\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\n\r\nvar\r\n\r\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\r\n\t// In IE/Edge using regex groups here causes severe slowdowns.\r\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\r\n\trnoInnerhtml = /<script|<style|<link/i,\r\n\r\n\t// checked=\"checked\" or checked\r\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\r\n\r\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\r\n\r\n// Prefer a tbody over its parent table for containing new rows\r\nfunction manipulationTarget( elem, content ) {\r\n\tif ( nodeName( elem, \"table\" ) &&\r\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\r\n\r\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\r\n\t}\r\n\r\n\treturn elem;\r\n}\r\n\r\n// Replace/restore the type attribute of script elements for safe DOM manipulation\r\nfunction disableScript( elem ) {\r\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}\r\nfunction restoreScript( elem ) {\r\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\r\n\t\telem.type = elem.type.slice( 5 );\r\n\t} else {\r\n\t\telem.removeAttribute( \"type\" );\r\n\t}\r\n\r\n\treturn elem;\r\n}\r\n\r\nfunction cloneCopyEvent( src, dest ) {\r\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\r\n\r\n\tif ( dest.nodeType !== 1 ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// 1. Copy private data: events, handlers, etc.\r\n\tif ( dataPriv.hasData( src ) ) {\r\n\t\tpdataOld = dataPriv.get( src );\r\n\t\tevents = pdataOld.events;\r\n\r\n\t\tif ( events ) {\r\n\t\t\tdataPriv.remove( dest, \"handle events\" );\r\n\r\n\t\t\tfor ( type in events ) {\r\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\r\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// 2. Copy user data\r\n\tif ( dataUser.hasData( src ) ) {\r\n\t\tudataOld = dataUser.access( src );\r\n\t\tudataCur = jQuery.extend( {}, udataOld );\r\n\r\n\t\tdataUser.set( dest, udataCur );\r\n\t}\r\n}\r\n\r\n// Fix IE bugs, see support tests\r\nfunction fixInput( src, dest ) {\r\n\tvar nodeName = dest.nodeName.toLowerCase();\r\n\r\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\r\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\r\n\t\tdest.checked = src.checked;\r\n\r\n\t// Fails to return the selected option to the default selected state when cloning options\r\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\r\n\t\tdest.defaultValue = src.defaultValue;\r\n\t}\r\n}\r\n\r\nfunction domManip( collection, args, callback, ignored ) {\r\n\r\n\t// Flatten any nested arrays\r\n\targs = flat( args );\r\n\r\n\tvar fragment, first, scripts, hasScripts, node, doc,\r\n\t\ti = 0,\r\n\t\tl = collection.length,\r\n\t\tiNoClone = l - 1,\r\n\t\tvalue = args[ 0 ],\r\n\t\tvalueIsFunction = isFunction( value );\r\n\r\n\t// We can't cloneNode fragments that contain checked, in WebKit\r\n\tif ( valueIsFunction ||\r\n\t\t\t( l > 1 && typeof value === \"string\" &&\r\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\r\n\t\treturn collection.each( function( index ) {\r\n\t\t\tvar self = collection.eq( index );\r\n\t\t\tif ( valueIsFunction ) {\r\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\r\n\t\t\t}\r\n\t\t\tdomManip( self, args, callback, ignored );\r\n\t\t} );\r\n\t}\r\n\r\n\tif ( l ) {\r\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\r\n\t\tfirst = fragment.firstChild;\r\n\r\n\t\tif ( fragment.childNodes.length === 1 ) {\r\n\t\t\tfragment = first;\r\n\t\t}\r\n\r\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\r\n\t\tif ( first || ignored ) {\r\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\r\n\t\t\thasScripts = scripts.length;\r\n\r\n\t\t\t// Use the original fragment for the last item\r\n\t\t\t// instead of the first because it can end up\r\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\r\n\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\tnode = fragment;\r\n\r\n\t\t\t\tif ( i !== iNoClone ) {\r\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\r\n\r\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\r\n\t\t\t\t\tif ( hasScripts ) {\r\n\r\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\r\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcallback.call( collection[ i ], node, i );\r\n\t\t\t}\r\n\r\n\t\t\tif ( hasScripts ) {\r\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\r\n\r\n\t\t\t\t// Re-enable scripts\r\n\t\t\t\tjQuery.map( scripts, restoreScript );\r\n\r\n\t\t\t\t// Evaluate executable scripts on first document insertion\r\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\r\n\t\t\t\t\tnode = scripts[ i ];\r\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\r\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\r\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\r\n\r\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\r\n\r\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\r\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\r\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\r\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\r\n\t\t\t\t\t\t\t\t}, doc );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\r\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\r\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\r\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\r\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\r\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn collection;\r\n}\r\n\r\nfunction remove( elem, selector, keepData ) {\r\n\tvar node,\r\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\r\n\t\ti = 0;\r\n\r\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\r\n\t\tif ( !keepData && node.nodeType === 1 ) {\r\n\t\t\tjQuery.cleanData( getAll( node ) );\r\n\t\t}\r\n\r\n\t\tif ( node.parentNode ) {\r\n\t\t\tif ( keepData && isAttached( node ) ) {\r\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\r\n\t\t\t}\r\n\t\t\tnode.parentNode.removeChild( node );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elem;\r\n}\r\n\r\njQuery.extend( {\r\n\thtmlPrefilter: function( html ) {\r\n\t\treturn html;\r\n\t},\r\n\r\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\r\n\t\tvar i, l, srcElements, destElements,\r\n\t\t\tclone = elem.cloneNode( true ),\r\n\t\t\tinPage = isAttached( elem );\r\n\r\n\t\t// Fix IE cloning issues\r\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\r\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\r\n\r\n\t\t\t// We eschew jQuery#find here for performance reasons:\r\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\r\n\t\t\tdestElements = getAll( clone );\r\n\t\t\tsrcElements = getAll( elem );\r\n\r\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\r\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy the events from the original to the clone\r\n\t\tif ( dataAndEvents ) {\r\n\t\t\tif ( deepDataAndEvents ) {\r\n\t\t\t\tsrcElements = srcElements || getAll( elem );\r\n\t\t\t\tdestElements = destElements || getAll( clone );\r\n\r\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\r\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcloneCopyEvent( elem, clone );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tdestElements = getAll( clone, \"script\" );\r\n\t\tif ( destElements.length > 0 ) {\r\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\r\n\t\t}\r\n\r\n\t\t// Return the cloned set\r\n\t\treturn clone;\r\n\t},\r\n\r\n\tcleanData: function( elems ) {\r\n\t\tvar data, elem, type,\r\n\t\t\tspecial = jQuery.event.special,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\r\n\t\t\tif ( acceptData( elem ) ) {\r\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\r\n\t\t\t\t\tif ( data.events ) {\r\n\t\t\t\t\t\tfor ( type in data.events ) {\r\n\t\t\t\t\t\t\tif ( special[ type ] ) {\r\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\r\n\r\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Support: Chrome <=35 - 45+\r\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\r\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\r\n\t\t\t\t}\r\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\r\n\r\n\t\t\t\t\t// Support: Chrome <=35 - 45+\r\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\r\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\tdetach: function( selector ) {\r\n\t\treturn remove( this, selector, true );\r\n\t},\r\n\r\n\tremove: function( selector ) {\r\n\t\treturn remove( this, selector );\r\n\t},\r\n\r\n\ttext: function( value ) {\r\n\t\treturn access( this, function( value ) {\r\n\t\t\treturn value === undefined ?\r\n\t\t\t\tjQuery.text( this ) :\r\n\t\t\t\tthis.empty().each( function() {\r\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\t\t\tthis.textContent = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t} );\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\tappend: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tvar target = manipulationTarget( this, elem );\r\n\t\t\t\ttarget.appendChild( elem );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tprepend: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tvar target = manipulationTarget( this, elem );\r\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tbefore: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tafter: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tempty: function() {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\r\n\t\t\tif ( elem.nodeType === 1 ) {\r\n\r\n\t\t\t\t// Prevent memory leaks\r\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\r\n\t\t\t\t// Remove any remaining nodes\r\n\t\t\t\telem.textContent = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\r\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\r\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\r\n\r\n\t\treturn this.map( function() {\r\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\r\n\t\t} );\r\n\t},\r\n\r\n\thtml: function( value ) {\r\n\t\treturn access( this, function( value ) {\r\n\t\t\tvar elem = this[ 0 ] || {},\r\n\t\t\t\ti = 0,\r\n\t\t\t\tl = this.length;\r\n\r\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\r\n\t\t\t\treturn elem.innerHTML;\r\n\t\t\t}\r\n\r\n\t\t\t// See if we can take a shortcut and just use innerHTML\r\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\r\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\r\n\r\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\t\t\telem = this[ i ] || {};\r\n\r\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t\t\t\t\telem.innerHTML = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem = 0;\r\n\r\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\r\n\t\t\t\t} catch ( e ) {}\r\n\t\t\t}\r\n\r\n\t\t\tif ( elem ) {\r\n\t\t\t\tthis.empty().append( value );\r\n\t\t\t}\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\treplaceWith: function() {\r\n\t\tvar ignored = [];\r\n\r\n\t\t// Make the changes, replacing each non-ignored context element with the new content\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tvar parent = this.parentNode;\r\n\r\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( this ) );\r\n\t\t\t\tif ( parent ) {\r\n\t\t\t\t\tparent.replaceChild( elem, this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Force callback invocation\r\n\t\t}, ignored );\r\n\t}\r\n} );\r\n\r\njQuery.each( {\r\n\tappendTo: \"append\",\r\n\tprependTo: \"prepend\",\r\n\tinsertBefore: \"before\",\r\n\tinsertAfter: \"after\",\r\n\treplaceAll: \"replaceWith\"\r\n}, function( name, original ) {\r\n\tjQuery.fn[ name ] = function( selector ) {\r\n\t\tvar elems,\r\n\t\t\tret = [],\r\n\t\t\tinsert = jQuery( selector ),\r\n\t\t\tlast = insert.length - 1,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; i <= last; i++ ) {\r\n\t\t\telems = i === last ? this : this.clone( true );\r\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\r\n\r\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\r\n\t\t\tpush.apply( ret, elems.get() );\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n} );\r\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\r\n\r\nvar rcustomProp = /^--/;\r\n\r\n\r\nvar getStyles = function( elem ) {\r\n\r\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\r\n\t\t// IE throws on elements created in popups\r\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\r\n\t\tvar view = elem.ownerDocument.defaultView;\r\n\r\n\t\tif ( !view || !view.opener ) {\r\n\t\t\tview = window;\r\n\t\t}\r\n\r\n\t\treturn view.getComputedStyle( elem );\r\n\t};\r\n\r\nvar swap = function( elem, options, callback ) {\r\n\tvar ret, name,\r\n\t\told = {};\r\n\r\n\t// Remember the old values, and insert the new ones\r\n\tfor ( name in options ) {\r\n\t\told[ name ] = elem.style[ name ];\r\n\t\telem.style[ name ] = options[ name ];\r\n\t}\r\n\r\n\tret = callback.call( elem );\r\n\r\n\t// Revert the old values\r\n\tfor ( name in options ) {\r\n\t\telem.style[ name ] = old[ name ];\r\n\t}\r\n\r\n\treturn ret;\r\n};\r\n\r\n\r\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\r\n\r\n\r\n\r\n( function() {\r\n\r\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\r\n\t// so they're executed at the same time to save the second computation.\r\n\tfunction computeStyleTests() {\r\n\r\n\t\t// This is a singleton, we need to execute it only once\r\n\t\tif ( !div ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\r\n\t\t\t\"margin-top:1px;padding:0;border:0\";\r\n\t\tdiv.style.cssText =\r\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\r\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\r\n\t\t\t\"width:60%;top:1%\";\r\n\t\tdocumentElement.appendChild( container ).appendChild( div );\r\n\r\n\t\tvar divStyle = window.getComputedStyle( div );\r\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\r\n\r\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\r\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\r\n\r\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\r\n\t\t// Some styles come back with percentage values, even though they shouldn't\r\n\t\tdiv.style.right = \"60%\";\r\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\r\n\r\n\t\t// Support: IE 9 - 11 only\r\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\r\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\r\n\r\n\t\t// Support: IE 9 only\r\n\t\t// Detect overflow:scroll screwiness (gh-3699)\r\n\t\t// Support: Chrome <=64\r\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\r\n\t\tdiv.style.position = \"absolute\";\r\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\r\n\r\n\t\tdocumentElement.removeChild( container );\r\n\r\n\t\t// Nullify the div so it wouldn't be stored in the memory and\r\n\t\t// it will also be a sign that checks already performed\r\n\t\tdiv = null;\r\n\t}\r\n\r\n\tfunction roundPixelMeasures( measure ) {\r\n\t\treturn Math.round( parseFloat( measure ) );\r\n\t}\r\n\r\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\r\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\r\n\t\tcontainer = document.createElement( \"div\" ),\r\n\t\tdiv = document.createElement( \"div\" );\r\n\r\n\t// Finish early in limited (non-browser) environments\r\n\tif ( !div.style ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Support: IE <=9 - 11 only\r\n\t// Style of cloned element affects source element cloned (trac-8908)\r\n\tdiv.style.backgroundClip = \"content-box\";\r\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\r\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\r\n\r\n\tjQuery.extend( support, {\r\n\t\tboxSizingReliable: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn boxSizingReliableVal;\r\n\t\t},\r\n\t\tpixelBoxStyles: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn pixelBoxStylesVal;\r\n\t\t},\r\n\t\tpixelPosition: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn pixelPositionVal;\r\n\t\t},\r\n\t\treliableMarginLeft: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn reliableMarginLeftVal;\r\n\t\t},\r\n\t\tscrollboxSize: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn scrollboxSizeVal;\r\n\t\t},\r\n\r\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\r\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\r\n\t\t// set in CSS while `offset*` properties report correct values.\r\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\r\n\t\t// some versions of this test; make sure not to make it pass there!\r\n\t\t//\r\n\t\t// Support: Firefox 70+\r\n\t\t// Only Firefox includes border widths\r\n\t\t// in computed dimensions. (gh-4529)\r\n\t\treliableTrDimensions: function() {\r\n\t\t\tvar table, tr, trChild, trStyle;\r\n\t\t\tif ( reliableTrDimensionsVal == null ) {\r\n\t\t\t\ttable = document.createElement( \"table\" );\r\n\t\t\t\ttr = document.createElement( \"tr\" );\r\n\t\t\t\ttrChild = document.createElement( \"div\" );\r\n\r\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\r\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\r\n\r\n\t\t\t\t// Support: Chrome 86+\r\n\t\t\t\t// Height set through cssText does not get applied.\r\n\t\t\t\t// Computed height then comes back as 0.\r\n\t\t\t\ttr.style.height = \"1px\";\r\n\t\t\t\ttrChild.style.height = \"9px\";\r\n\r\n\t\t\t\t// Support: Android 8 Chrome 86+\r\n\t\t\t\t// In our bodyBackground.html iframe,\r\n\t\t\t\t// display for all div elements is set to \"inline\",\r\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\r\n\t\t\t\t// Ensuring the div is `display: block`\r\n\t\t\t\t// gets around this issue.\r\n\t\t\t\ttrChild.style.display = \"block\";\r\n\r\n\t\t\t\tdocumentElement\r\n\t\t\t\t\t.appendChild( table )\r\n\t\t\t\t\t.appendChild( tr )\r\n\t\t\t\t\t.appendChild( trChild );\r\n\r\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\r\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\r\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\r\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\r\n\r\n\t\t\t\tdocumentElement.removeChild( table );\r\n\t\t\t}\r\n\t\t\treturn reliableTrDimensionsVal;\r\n\t\t}\r\n\t} );\r\n} )();\r\n\r\n\r\nfunction curCSS( elem, name, computed ) {\r\n\tvar width, minWidth, maxWidth, ret,\r\n\t\tisCustomProp = rcustomProp.test( name ),\r\n\r\n\t\t// Support: Firefox 51+\r\n\t\t// Retrieving style before computed somehow\r\n\t\t// fixes an issue with getting wrong values\r\n\t\t// on detached elements\r\n\t\tstyle = elem.style;\r\n\r\n\tcomputed = computed || getStyles( elem );\r\n\r\n\t// getPropertyValue is needed for:\r\n\t// .css('filter') (IE 9 only, trac-12537)\r\n\t// .css('--customProperty) (gh-3144)\r\n\tif ( computed ) {\r\n\r\n\t\t// Support: IE <=9 - 11+\r\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\r\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\r\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\r\n\t\t// Normally, this would create difference in behavior: if\r\n\t\t// `getPropertyValue` returns an empty string, the value returned\r\n\t\t// by `.css()` would be `undefined`. This is usually the case for\r\n\t\t// disconnected elements. However, in IE even disconnected elements\r\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\r\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\r\n\r\n\t\tif ( isCustomProp && ret ) {\r\n\r\n\t\t\t// Support: Firefox 105+, Chrome <=105+\r\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\r\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\r\n\t\t\t// both leading & trailing whitespace to a single space.\r\n\t\t\t//\r\n\t\t\t// Fall back to `undefined` if empty string returned.\r\n\t\t\t// This collapses a missing definition with property defined\r\n\t\t\t// and set to an empty string but there's no standard API\r\n\t\t\t// allowing us to differentiate them without a performance penalty\r\n\t\t\t// and returning `undefined` aligns with older jQuery.\r\n\t\t\t//\r\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\r\n\t\t\t// as whitespace while CSS does not, but this is not a problem\r\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\r\n\t\t\t// (which *is* CSS whitespace)\r\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\r\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\r\n\t\t}\r\n\r\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\r\n\t\t\tret = jQuery.style( elem, name );\r\n\t\t}\r\n\r\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\r\n\t\t// Android Browser returns percentage for some values,\r\n\t\t// but width seems to be reliably pixels.\r\n\t\t// This is against the CSSOM draft spec:\r\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\r\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\r\n\r\n\t\t\t// Remember the original values\r\n\t\t\twidth = style.width;\r\n\t\t\tminWidth = style.minWidth;\r\n\t\t\tmaxWidth = style.maxWidth;\r\n\r\n\t\t\t// Put in the new values to get a computed value out\r\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\r\n\t\t\tret = computed.width;\r\n\r\n\t\t\t// Revert the changed values\r\n\t\t\tstyle.width = width;\r\n\t\t\tstyle.minWidth = minWidth;\r\n\t\t\tstyle.maxWidth = maxWidth;\r\n\t\t}\r\n\t}\r\n\r\n\treturn ret !== undefined ?\r\n\r\n\t\t// Support: IE <=9 - 11 only\r\n\t\t// IE returns zIndex value as an integer.\r\n\t\tret + \"\" :\r\n\t\tret;\r\n}\r\n\r\n\r\nfunction addGetHookIf( conditionFn, hookFn ) {\r\n\r\n\t// Define the hook, we'll check on the first run if it's really needed.\r\n\treturn {\r\n\t\tget: function() {\r\n\t\t\tif ( conditionFn() ) {\r\n\r\n\t\t\t\t// Hook not needed (or it's not possible to use it due\r\n\t\t\t\t// to missing dependency), remove it.\r\n\t\t\t\tdelete this.get;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\r\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n\r\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\r\n\temptyStyle = document.createElement( \"div\" ).style,\r\n\tvendorProps = {};\r\n\r\n// Return a vendor-prefixed property or undefined\r\nfunction vendorPropName( name ) {\r\n\r\n\t// Check for vendor prefixed names\r\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in emptyStyle ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\r\nfunction finalPropName( name ) {\r\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\r\n\r\n\tif ( final ) {\r\n\t\treturn final;\r\n\t}\r\n\tif ( name in emptyStyle ) {\r\n\t\treturn name;\r\n\t}\r\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\r\n}\r\n\r\n\r\nvar\r\n\r\n\t// Swappable if display is none or starts with table\r\n\t// except \"table\", \"table-cell\", or \"table-caption\"\r\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\r\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\r\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\r\n\tcssNormalTransform = {\r\n\t\tletterSpacing: \"0\",\r\n\t\tfontWeight: \"400\"\r\n\t};\r\n\r\nfunction setPositiveNumber( _elem, value, subtract ) {\r\n\r\n\t// Any relative (+/-) values have already been\r\n\t// normalized at this point\r\n\tvar matches = rcssNum.exec( value );\r\n\treturn matches ?\r\n\r\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\r\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\r\n\t\tvalue;\r\n}\r\n\r\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\r\n\tvar i = dimension === \"width\" ? 1 : 0,\r\n\t\textra = 0,\r\n\t\tdelta = 0,\r\n\t\tmarginDelta = 0;\r\n\r\n\t// Adjustment may not be necessary\r\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tfor ( ; i < 4; i += 2 ) {\r\n\r\n\t\t// Both box models exclude margin\r\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\r\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\r\n\t\tif ( box === \"margin\" ) {\r\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\r\n\t\t}\r\n\r\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\r\n\t\tif ( !isBorderBox ) {\r\n\r\n\t\t\t// Add padding\r\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\r\n\t\t\t// For \"border\" or \"margin\", add border\r\n\t\t\tif ( box !== \"padding\" ) {\r\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\r\n\t\t\t// But still keep track of it otherwise\r\n\t\t\t} else {\r\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\r\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\r\n\t\t// \"padding\" or \"margin\"\r\n\t\t} else {\r\n\r\n\t\t\t// For \"content\", subtract padding\r\n\t\t\tif ( box === \"content\" ) {\r\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\t\t\t}\r\n\r\n\t\t\t// For \"content\" or \"padding\", subtract border\r\n\t\t\tif ( box !== \"margin\" ) {\r\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\r\n\tif ( !isBorderBox && computedVal >= 0 ) {\r\n\r\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\r\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\r\n\t\tdelta += Math.max( 0, Math.ceil(\r\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\r\n\t\t\tcomputedVal -\r\n\t\t\tdelta -\r\n\t\t\textra -\r\n\t\t\t0.5\r\n\r\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\r\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\r\n\t\t) ) || 0;\r\n\t}\r\n\r\n\treturn delta + marginDelta;\r\n}\r\n\r\nfunction getWidthOrHeight( elem, dimension, extra ) {\r\n\r\n\t// Start with computed style\r\n\tvar styles = getStyles( elem ),\r\n\r\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\r\n\t\t// Fake content-box until we know it's needed to know the true value.\r\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\r\n\t\tisBorderBox = boxSizingNeeded &&\r\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\tvalueIsBorderBox = isBorderBox,\r\n\r\n\t\tval = curCSS( elem, dimension, styles ),\r\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\r\n\r\n\t// Support: Firefox <=54\r\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\r\n\tif ( rnumnonpx.test( val ) ) {\r\n\t\tif ( !extra ) {\r\n\t\t\treturn val;\r\n\t\t}\r\n\t\tval = \"auto\";\r\n\t}\r\n\r\n\r\n\t// Support: IE 9 - 11 only\r\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\r\n\t// In those cases, the computed value can be trusted to be border-box.\r\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\r\n\r\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\r\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\r\n\t\t// set in CSS while `offset*` properties report correct values.\r\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\r\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\r\n\r\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\r\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\r\n\t\tval === \"auto\" ||\r\n\r\n\t\t// Support: Android <=4.1 - 4.3 only\r\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\r\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\r\n\r\n\t\t// Make sure the element is visible & connected\r\n\t\telem.getClientRects().length ) {\r\n\r\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\r\n\r\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\r\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\r\n\t\t// retrieved value as a content box dimension.\r\n\t\tvalueIsBorderBox = offsetProp in elem;\r\n\t\tif ( valueIsBorderBox ) {\r\n\t\t\tval = elem[ offsetProp ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Normalize \"\" and auto\r\n\tval = parseFloat( val ) || 0;\r\n\r\n\t// Adjust for the element's box model\r\n\treturn ( val +\r\n\t\tboxModelAdjustment(\r\n\t\t\telem,\r\n\t\t\tdimension,\r\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\r\n\t\t\tvalueIsBorderBox,\r\n\t\t\tstyles,\r\n\r\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\r\n\t\t\tval\r\n\t\t)\r\n\t) + \"px\";\r\n}\r\n\r\njQuery.extend( {\r\n\r\n\t// Add in style property hooks for overriding the default\r\n\t// behavior of getting and setting a style property\r\n\tcssHooks: {\r\n\t\topacity: {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\r\n\t\t\t\t\t// We should always get a number back from opacity\r\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\r\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Don't automatically add \"px\" to these possibly-unitless properties\r\n\tcssNumber: {\r\n\t\tanimationIterationCount: true,\r\n\t\taspectRatio: true,\r\n\t\tborderImageSlice: true,\r\n\t\tcolumnCount: true,\r\n\t\tflexGrow: true,\r\n\t\tflexShrink: true,\r\n\t\tfontWeight: true,\r\n\t\tgridArea: true,\r\n\t\tgridColumn: true,\r\n\t\tgridColumnEnd: true,\r\n\t\tgridColumnStart: true,\r\n\t\tgridRow: true,\r\n\t\tgridRowEnd: true,\r\n\t\tgridRowStart: true,\r\n\t\tlineHeight: true,\r\n\t\topacity: true,\r\n\t\torder: true,\r\n\t\torphans: true,\r\n\t\tscale: true,\r\n\t\twidows: true,\r\n\t\tzIndex: true,\r\n\t\tzoom: true,\r\n\r\n\t\t// SVG-related\r\n\t\tfillOpacity: true,\r\n\t\tfloodOpacity: true,\r\n\t\tstopOpacity: true,\r\n\t\tstrokeMiterlimit: true,\r\n\t\tstrokeOpacity: true\r\n\t},\r\n\r\n\t// Add in properties whose names you wish to fix before\r\n\t// setting or getting the value\r\n\tcssProps: {},\r\n\r\n\t// Get and set the style property on a DOM Node\r\n\tstyle: function( elem, name, value, extra ) {\r\n\r\n\t\t// Don't set styles on text and comment nodes\r\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tvar ret, type, hooks,\r\n\t\t\torigName = camelCase( name ),\r\n\t\t\tisCustomProp = rcustomProp.test( name ),\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\t// Make sure that we're working with the right name. We don't\r\n\t\t// want to query the value if it is a CSS custom property\r\n\t\t// since they are user-defined.\r\n\t\tif ( !isCustomProp ) {\r\n\t\t\tname = finalPropName( origName );\r\n\t\t}\r\n\r\n\t\t// Gets hook for the prefixed version, then unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// Check if we're setting a value\r\n\t\tif ( value !== undefined ) {\r\n\t\t\ttype = typeof value;\r\n\r\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\r\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\r\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\r\n\r\n\t\t\t\t// Fixes bug trac-9237\r\n\t\t\t\ttype = \"number\";\r\n\t\t\t}\r\n\r\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\r\n\t\t\tif ( value == null || value !== value ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\r\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\r\n\t\t\t// \"px\" to a few hardcoded values.\r\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\r\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\r\n\t\t\t}\r\n\r\n\t\t\t// background-* props affect original clone's values\r\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\r\n\t\t\t\tstyle[ name ] = \"inherit\";\r\n\t\t\t}\r\n\r\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\r\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\r\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\r\n\r\n\t\t\t\tif ( isCustomProp ) {\r\n\t\t\t\t\tstyle.setProperty( name, value );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstyle[ name ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// If a hook was provided get the non-computed value from there\r\n\t\t\tif ( hooks && \"get\" in hooks &&\r\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\r\n\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise just get the value from the style object\r\n\t\t\treturn style[ name ];\r\n\t\t}\r\n\t},\r\n\r\n\tcss: function( elem, name, extra, styles ) {\r\n\t\tvar val, num, hooks,\r\n\t\t\torigName = camelCase( name ),\r\n\t\t\tisCustomProp = rcustomProp.test( name );\r\n\r\n\t\t// Make sure that we're working with the right name. We don't\r\n\t\t// want to modify the value if it is a CSS custom property\r\n\t\t// since they are user-defined.\r\n\t\tif ( !isCustomProp ) {\r\n\t\t\tname = finalPropName( origName );\r\n\t\t}\r\n\r\n\t\t// Try prefixed name followed by the unprefixed name\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// If a hook was provided get the computed value from there\r\n\t\tif ( hooks && \"get\" in hooks ) {\r\n\t\t\tval = hooks.get( elem, true, extra );\r\n\t\t}\r\n\r\n\t\t// Otherwise, if a way to get the computed value exists, use that\r\n\t\tif ( val === undefined ) {\r\n\t\t\tval = curCSS( elem, name, styles );\r\n\t\t}\r\n\r\n\t\t// Convert \"normal\" to computed value\r\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\r\n\t\t\tval = cssNormalTransform[ name ];\r\n\t\t}\r\n\r\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\r\n\t\tif ( extra === \"\" || extra ) {\r\n\t\t\tnum = parseFloat( val );\r\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\r\n\t\t}\r\n\r\n\t\treturn val;\r\n\t}\r\n} );\r\n\r\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\r\n\tjQuery.cssHooks[ dimension ] = {\r\n\t\tget: function( elem, computed, extra ) {\r\n\t\t\tif ( computed ) {\r\n\r\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\r\n\t\t\t\t// but it must have a current display style that would benefit\r\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\r\n\r\n\t\t\t\t\t// Support: Safari 8+\r\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\r\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\r\n\t\t\t\t\t// Support: IE <=11 only\r\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\r\n\t\t\t\t\t// in IE throws an error.\r\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\r\n\t\t\t\t\tswap( elem, cssShow, function() {\r\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\r\n\t\t\t\t\t} ) :\r\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tset: function( elem, value, extra ) {\r\n\t\t\tvar matches,\r\n\t\t\t\tstyles = getStyles( elem ),\r\n\r\n\t\t\t\t// Only read styles.position if the test has a chance to fail\r\n\t\t\t\t// to avoid forcing a reflow.\r\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\r\n\t\t\t\t\tstyles.position === \"absolute\",\r\n\r\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\r\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\r\n\t\t\t\tisBorderBox = boxSizingNeeded &&\r\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\t\t\tsubtract = extra ?\r\n\t\t\t\t\tboxModelAdjustment(\r\n\t\t\t\t\t\telem,\r\n\t\t\t\t\t\tdimension,\r\n\t\t\t\t\t\textra,\r\n\t\t\t\t\t\tisBorderBox,\r\n\t\t\t\t\t\tstyles\r\n\t\t\t\t\t) :\r\n\t\t\t\t\t0;\r\n\r\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\r\n\t\t\t// faking a content-box to get border and padding (gh-3699)\r\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\r\n\t\t\t\tsubtract -= Math.ceil(\r\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\r\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\r\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\r\n\t\t\t\t\t0.5\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// Convert to pixels if value adjustment is needed\r\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\r\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\r\n\r\n\t\t\t\telem.style[ dimension ] = value;\r\n\t\t\t\tvalue = jQuery.css( elem, dimension );\r\n\t\t\t}\r\n\r\n\t\t\treturn setPositiveNumber( elem, value, subtract );\r\n\t\t}\r\n\t};\r\n} );\r\n\r\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\r\n\tfunction( elem, computed ) {\r\n\t\tif ( computed ) {\r\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\r\n\t\t\t\telem.getBoundingClientRect().left -\r\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\r\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\r\n\t\t\t\t\t} )\r\n\t\t\t) + \"px\";\r\n\t\t}\r\n\t}\r\n);\r\n\r\n// These hooks are used by animate to expand properties\r\njQuery.each( {\r\n\tmargin: \"\",\r\n\tpadding: \"\",\r\n\tborder: \"Width\"\r\n}, function( prefix, suffix ) {\r\n\tjQuery.cssHooks[ prefix + suffix ] = {\r\n\t\texpand: function( value ) {\r\n\t\t\tvar i = 0,\r\n\t\t\t\texpanded = {},\r\n\r\n\t\t\t\t// Assumes a single number if not a string\r\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\r\n\r\n\t\t\tfor ( ; i < 4; i++ ) {\r\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\r\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\r\n\t\t\t}\r\n\r\n\t\t\treturn expanded;\r\n\t\t}\r\n\t};\r\n\r\n\tif ( prefix !== \"margin\" ) {\r\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\tcss: function( name, value ) {\r\n\t\treturn access( this, function( elem, name, value ) {\r\n\t\t\tvar styles, len,\r\n\t\t\t\tmap = {},\r\n\t\t\t\ti = 0;\r\n\r\n\t\t\tif ( Array.isArray( name ) ) {\r\n\t\t\t\tstyles = getStyles( elem );\r\n\t\t\t\tlen = name.length;\r\n\r\n\t\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn map;\r\n\t\t\t}\r\n\r\n\t\t\treturn value !== undefined ?\r\n\t\t\t\tjQuery.style( elem, name, value ) :\r\n\t\t\t\tjQuery.css( elem, name );\r\n\t\t}, name, value, arguments.length > 1 );\r\n\t}\r\n} );\r\n\r\n\r\nfunction Tween( elem, options, prop, end, easing ) {\r\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\r\n}\r\njQuery.Tween = Tween;\r\n\r\nTween.prototype = {\r\n\tconstructor: Tween,\r\n\tinit: function( elem, options, prop, end, easing, unit ) {\r\n\t\tthis.elem = elem;\r\n\t\tthis.prop = prop;\r\n\t\tthis.easing = easing || jQuery.easing._default;\r\n\t\tthis.options = options;\r\n\t\tthis.start = this.now = this.cur();\r\n\t\tthis.end = end;\r\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\t},\r\n\tcur: function() {\r\n\t\tvar hooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\treturn hooks && hooks.get ?\r\n\t\t\thooks.get( this ) :\r\n\t\t\tTween.propHooks._default.get( this );\r\n\t},\r\n\trun: function( percent ) {\r\n\t\tvar eased,\r\n\t\t\thooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\tif ( this.options.duration ) {\r\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\r\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.pos = eased = percent;\r\n\t\t}\r\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\r\n\r\n\t\tif ( this.options.step ) {\r\n\t\t\tthis.options.step.call( this.elem, this.now, this );\r\n\t\t}\r\n\r\n\t\tif ( hooks && hooks.set ) {\r\n\t\t\thooks.set( this );\r\n\t\t} else {\r\n\t\t\tTween.propHooks._default.set( this );\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n};\r\n\r\nTween.prototype.init.prototype = Tween.prototype;\r\n\r\nTween.propHooks = {\r\n\t_default: {\r\n\t\tget: function( tween ) {\r\n\t\t\tvar result;\r\n\r\n\t\t\t// Use a property on the element directly when it is not a DOM element,\r\n\t\t\t// or when there is no matching style property that exists.\r\n\t\t\tif ( tween.elem.nodeType !== 1 ||\r\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\r\n\t\t\t\treturn tween.elem[ tween.prop ];\r\n\t\t\t}\r\n\r\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\r\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\r\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\r\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\r\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\r\n\r\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\r\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\r\n\t\t},\r\n\t\tset: function( tween ) {\r\n\r\n\t\t\t// Use step hook for back compat.\r\n\t\t\t// Use cssHook if its there.\r\n\t\t\t// Use .style if available and use plain properties where available.\r\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\r\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\r\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\r\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\r\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\r\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\r\n\t\t\t} else {\r\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// Support: IE <=9 only\r\n// Panic based approach to setting things on disconnected nodes\r\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\r\n\tset: function( tween ) {\r\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\r\n\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.easing = {\r\n\tlinear: function( p ) {\r\n\t\treturn p;\r\n\t},\r\n\tswing: function( p ) {\r\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\r\n\t},\r\n\t_default: \"swing\"\r\n};\r\n\r\njQuery.fx = Tween.prototype.init;\r\n\r\n// Back compat <1.8 extension point\r\njQuery.fx.step = {};\r\n\r\n\r\n\r\n\r\nvar\r\n\tfxNow, inProgress,\r\n\trfxtypes = /^(?:toggle|show|hide)$/,\r\n\trrun = /queueHooks$/;\r\n\r\nfunction schedule() {\r\n\tif ( inProgress ) {\r\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\r\n\t\t\twindow.requestAnimationFrame( schedule );\r\n\t\t} else {\r\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\r\n\t\t}\r\n\r\n\t\tjQuery.fx.tick();\r\n\t}\r\n}\r\n\r\n// Animations created synchronously will run synchronously\r\nfunction createFxNow() {\r\n\twindow.setTimeout( function() {\r\n\t\tfxNow = undefined;\r\n\t} );\r\n\treturn ( fxNow = Date.now() );\r\n}\r\n\r\n// Generate parameters to create a standard animation\r\nfunction genFx( type, includeWidth ) {\r\n\tvar which,\r\n\t\ti = 0,\r\n\t\tattrs = { height: type };\r\n\r\n\t// If we include width, step value is 1 to do all cssExpand values,\r\n\t// otherwise step value is 2 to skip over Left and Right\r\n\tincludeWidth = includeWidth ? 1 : 0;\r\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\r\n\t\twhich = cssExpand[ i ];\r\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\r\n\t}\r\n\r\n\tif ( includeWidth ) {\r\n\t\tattrs.opacity = attrs.width = type;\r\n\t}\r\n\r\n\treturn attrs;\r\n}\r\n\r\nfunction createTween( value, prop, animation ) {\r\n\tvar tween,\r\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\r\n\t\tindex = 0,\r\n\t\tlength = collection.length;\r\n\tfor ( ; index < length; index++ ) {\r\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\r\n\r\n\t\t\t// We're done with this property\r\n\t\t\treturn tween;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction defaultPrefilter( elem, props, opts ) {\r\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\r\n\t\tisBox = \"width\" in props || \"height\" in props,\r\n\t\tanim = this,\r\n\t\torig = {},\r\n\t\tstyle = elem.style,\r\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\r\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\r\n\r\n\t// Queue-skipping animations hijack the fx hooks\r\n\tif ( !opts.queue ) {\r\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\r\n\t\tif ( hooks.unqueued == null ) {\r\n\t\t\thooks.unqueued = 0;\r\n\t\t\toldfire = hooks.empty.fire;\r\n\t\t\thooks.empty.fire = function() {\r\n\t\t\t\tif ( !hooks.unqueued ) {\r\n\t\t\t\t\toldfire();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\thooks.unqueued++;\r\n\r\n\t\tanim.always( function() {\r\n\r\n\t\t\t// Ensure the complete handler is called before this completes\r\n\t\t\tanim.always( function() {\r\n\t\t\t\thooks.unqueued--;\r\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\r\n\t\t\t\t\thooks.empty.fire();\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t} );\r\n\t}\r\n\r\n\t// Detect show/hide animations\r\n\tfor ( prop in props ) {\r\n\t\tvalue = props[ prop ];\r\n\t\tif ( rfxtypes.test( value ) ) {\r\n\t\t\tdelete props[ prop ];\r\n\t\t\ttoggle = toggle || value === \"toggle\";\r\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\r\n\r\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\r\n\t\t\t\t// there is still data from a stopped show/hide\r\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\r\n\t\t\t\t\thidden = true;\r\n\r\n\t\t\t\t// Ignore all other no-op show/hide data\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\r\n\t\t}\r\n\t}\r\n\r\n\t// Bail out if this is a no-op like .hide().hide()\r\n\tpropTween = !jQuery.isEmptyObject( props );\r\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Restrict \"overflow\" and \"display\" styles during box animations\r\n\tif ( isBox && elem.nodeType === 1 ) {\r\n\r\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\r\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\r\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\r\n\t\t// the overflowX value there.\r\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\r\n\r\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\r\n\t\trestoreDisplay = dataShow && dataShow.display;\r\n\t\tif ( restoreDisplay == null ) {\r\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\r\n\t\t}\r\n\t\tdisplay = jQuery.css( elem, \"display\" );\r\n\t\tif ( display === \"none\" ) {\r\n\t\t\tif ( restoreDisplay ) {\r\n\t\t\t\tdisplay = restoreDisplay;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\r\n\t\t\t\tshowHide( [ elem ], true );\r\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\r\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\r\n\t\t\t\tshowHide( [ elem ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Animate inline elements as inline-block\r\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\r\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\r\n\r\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\r\n\t\t\t\tif ( !propTween ) {\r\n\t\t\t\t\tanim.done( function() {\r\n\t\t\t\t\t\tstyle.display = restoreDisplay;\r\n\t\t\t\t\t} );\r\n\t\t\t\t\tif ( restoreDisplay == null ) {\r\n\t\t\t\t\t\tdisplay = style.display;\r\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tstyle.display = \"inline-block\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ( opts.overflow ) {\r\n\t\tstyle.overflow = \"hidden\";\r\n\t\tanim.always( function() {\r\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\r\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\r\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\r\n\t\t} );\r\n\t}\r\n\r\n\t// Implement show/hide animations\r\n\tpropTween = false;\r\n\tfor ( prop in orig ) {\r\n\r\n\t\t// General show/hide setup for this element animation\r\n\t\tif ( !propTween ) {\r\n\t\t\tif ( dataShow ) {\r\n\t\t\t\tif ( \"hidden\" in dataShow ) {\r\n\t\t\t\t\thidden = dataShow.hidden;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\r\n\t\t\t}\r\n\r\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\r\n\t\t\tif ( toggle ) {\r\n\t\t\t\tdataShow.hidden = !hidden;\r\n\t\t\t}\r\n\r\n\t\t\t// Show elements before animating them\r\n\t\t\tif ( hidden ) {\r\n\t\t\t\tshowHide( [ elem ], true );\r\n\t\t\t}\r\n\r\n\t\t\t/* eslint-disable no-loop-func */\r\n\r\n\t\t\tanim.done( function() {\r\n\r\n\t\t\t\t/* eslint-enable no-loop-func */\r\n\r\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\r\n\t\t\t\tif ( !hidden ) {\r\n\t\t\t\t\tshowHide( [ elem ] );\r\n\t\t\t\t}\r\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\r\n\t\t\t\tfor ( prop in orig ) {\r\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\t// Per-property setup\r\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\r\n\t\tif ( !( prop in dataShow ) ) {\r\n\t\t\tdataShow[ prop ] = propTween.start;\r\n\t\t\tif ( hidden ) {\r\n\t\t\t\tpropTween.end = propTween.start;\r\n\t\t\t\tpropTween.start = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction propFilter( props, specialEasing ) {\r\n\tvar index, name, easing, value, hooks;\r\n\r\n\t// camelCase, specialEasing and expand cssHook pass\r\n\tfor ( index in props ) {\r\n\t\tname = camelCase( index );\r\n\t\teasing = specialEasing[ name ];\r\n\t\tvalue = props[ index ];\r\n\t\tif ( Array.isArray( value ) ) {\r\n\t\t\teasing = value[ 1 ];\r\n\t\t\tvalue = props[ index ] = value[ 0 ];\r\n\t\t}\r\n\r\n\t\tif ( index !== name ) {\r\n\t\t\tprops[ name ] = value;\r\n\t\t\tdelete props[ index ];\r\n\t\t}\r\n\r\n\t\thooks = jQuery.cssHooks[ name ];\r\n\t\tif ( hooks && \"expand\" in hooks ) {\r\n\t\t\tvalue = hooks.expand( value );\r\n\t\t\tdelete props[ name ];\r\n\r\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\r\n\t\t\t// Reusing 'index' because we have the correct \"name\"\r\n\t\t\tfor ( index in value ) {\r\n\t\t\t\tif ( !( index in props ) ) {\r\n\t\t\t\t\tprops[ index ] = value[ index ];\r\n\t\t\t\t\tspecialEasing[ index ] = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tspecialEasing[ name ] = easing;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction Animation( elem, properties, options ) {\r\n\tvar result,\r\n\t\tstopped,\r\n\t\tindex = 0,\r\n\t\tlength = Animation.prefilters.length,\r\n\t\tdeferred = jQuery.Deferred().always( function() {\r\n\r\n\t\t\t// Don't match elem in the :animated selector\r\n\t\t\tdelete tick.elem;\r\n\t\t} ),\r\n\t\ttick = function() {\r\n\t\t\tif ( stopped ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar currentTime = fxNow || createFxNow(),\r\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\r\n\r\n\t\t\t\t// Support: Android 2.3 only\r\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\r\n\t\t\t\ttemp = remaining / animation.duration || 0,\r\n\t\t\t\tpercent = 1 - temp,\r\n\t\t\t\tindex = 0,\r\n\t\t\t\tlength = animation.tweens.length;\r\n\r\n\t\t\tfor ( ; index < length; index++ ) {\r\n\t\t\t\tanimation.tweens[ index ].run( percent );\r\n\t\t\t}\r\n\r\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\r\n\r\n\t\t\t// If there's more to do, yield\r\n\t\t\tif ( percent < 1 && length ) {\r\n\t\t\t\treturn remaining;\r\n\t\t\t}\r\n\r\n\t\t\t// If this was an empty animation, synthesize a final progress notification\r\n\t\t\tif ( !length ) {\r\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Resolve the animation and report its conclusion\r\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\tanimation = deferred.promise( {\r\n\t\t\telem: elem,\r\n\t\t\tprops: jQuery.extend( {}, properties ),\r\n\t\t\topts: jQuery.extend( true, {\r\n\t\t\t\tspecialEasing: {},\r\n\t\t\t\teasing: jQuery.easing._default\r\n\t\t\t}, options ),\r\n\t\t\toriginalProperties: properties,\r\n\t\t\toriginalOptions: options,\r\n\t\t\tstartTime: fxNow || createFxNow(),\r\n\t\t\tduration: options.duration,\r\n\t\t\ttweens: [],\r\n\t\t\tcreateTween: function( prop, end ) {\r\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\r\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\r\n\t\t\t\tanimation.tweens.push( tween );\r\n\t\t\t\treturn tween;\r\n\t\t\t},\r\n\t\t\tstop: function( gotoEnd ) {\r\n\t\t\t\tvar index = 0,\r\n\r\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\r\n\t\t\t\t\t// otherwise we skip this part\r\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\r\n\t\t\t\tif ( stopped ) {\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t\tstopped = true;\r\n\t\t\t\tfor ( ; index < length; index++ ) {\r\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\r\n\t\t\t\tif ( gotoEnd ) {\r\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\r\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t} ),\r\n\t\tprops = animation.props;\r\n\r\n\tpropFilter( props, animation.opts.specialEasing );\r\n\r\n\tfor ( ; index < length; index++ ) {\r\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\r\n\t\tif ( result ) {\r\n\t\t\tif ( isFunction( result.stop ) ) {\r\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\r\n\t\t\t\t\tresult.stop.bind( result );\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\tjQuery.map( props, createTween, animation );\r\n\r\n\tif ( isFunction( animation.opts.start ) ) {\r\n\t\tanimation.opts.start.call( elem, animation );\r\n\t}\r\n\r\n\t// Attach callbacks from options\r\n\tanimation\r\n\t\t.progress( animation.opts.progress )\r\n\t\t.done( animation.opts.done, animation.opts.complete )\r\n\t\t.fail( animation.opts.fail )\r\n\t\t.always( animation.opts.always );\r\n\r\n\tjQuery.fx.timer(\r\n\t\tjQuery.extend( tick, {\r\n\t\t\telem: elem,\r\n\t\t\tanim: animation,\r\n\t\t\tqueue: animation.opts.queue\r\n\t\t} )\r\n\t);\r\n\r\n\treturn animation;\r\n}\r\n\r\njQuery.Animation = jQuery.extend( Animation, {\r\n\r\n\ttweeners: {\r\n\t\t\"*\": [ function( prop, value ) {\r\n\t\t\tvar tween = this.createTween( prop, value );\r\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\r\n\t\t\treturn tween;\r\n\t\t} ]\r\n\t},\r\n\r\n\ttweener: function( props, callback ) {\r\n\t\tif ( isFunction( props ) ) {\r\n\t\t\tcallback = props;\r\n\t\t\tprops = [ \"*\" ];\r\n\t\t} else {\r\n\t\t\tprops = props.match( rnothtmlwhite );\r\n\t\t}\r\n\r\n\t\tvar prop,\r\n\t\t\tindex = 0,\r\n\t\t\tlength = props.length;\r\n\r\n\t\tfor ( ; index < length; index++ ) {\r\n\t\t\tprop = props[ index ];\r\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\r\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\r\n\t\t}\r\n\t},\r\n\r\n\tprefilters: [ defaultPrefilter ],\r\n\r\n\tprefilter: function( callback, prepend ) {\r\n\t\tif ( prepend ) {\r\n\t\t\tAnimation.prefilters.unshift( callback );\r\n\t\t} else {\r\n\t\t\tAnimation.prefilters.push( callback );\r\n\t\t}\r\n\t}\r\n} );\r\n\r\njQuery.speed = function( speed, easing, fn ) {\r\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\r\n\t\tcomplete: fn || !fn && easing ||\r\n\t\t\tisFunction( speed ) && speed,\r\n\t\tduration: speed,\r\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\r\n\t};\r\n\r\n\t// Go to the end state if fx are off\r\n\tif ( jQuery.fx.off ) {\r\n\t\topt.duration = 0;\r\n\r\n\t} else {\r\n\t\tif ( typeof opt.duration !== \"number\" ) {\r\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\r\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\r\n\tif ( opt.queue == null || opt.queue === true ) {\r\n\t\topt.queue = \"fx\";\r\n\t}\r\n\r\n\t// Queueing\r\n\topt.old = opt.complete;\r\n\r\n\topt.complete = function() {\r\n\t\tif ( isFunction( opt.old ) ) {\r\n\t\t\topt.old.call( this );\r\n\t\t}\r\n\r\n\t\tif ( opt.queue ) {\r\n\t\t\tjQuery.dequeue( this, opt.queue );\r\n\t\t}\r\n\t};\r\n\r\n\treturn opt;\r\n};\r\n\r\njQuery.fn.extend( {\r\n\tfadeTo: function( speed, to, easing, callback ) {\r\n\r\n\t\t// Show any hidden elements after setting opacity to 0\r\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\r\n\r\n\t\t\t// Animate to the value specified\r\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\r\n\t},\r\n\tanimate: function( prop, speed, easing, callback ) {\r\n\t\tvar empty = jQuery.isEmptyObject( prop ),\r\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\r\n\t\t\tdoAnimation = function() {\r\n\r\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\r\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\r\n\r\n\t\t\t\t// Empty animations, or finishing resolves immediately\r\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\tdoAnimation.finish = doAnimation;\r\n\r\n\t\treturn empty || optall.queue === false ?\r\n\t\t\tthis.each( doAnimation ) :\r\n\t\t\tthis.queue( optall.queue, doAnimation );\r\n\t},\r\n\tstop: function( type, clearQueue, gotoEnd ) {\r\n\t\tvar stopQueue = function( hooks ) {\r\n\t\t\tvar stop = hooks.stop;\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tstop( gotoEnd );\r\n\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tgotoEnd = clearQueue;\r\n\t\t\tclearQueue = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\tif ( clearQueue ) {\r\n\t\t\tthis.queue( type || \"fx\", [] );\r\n\t\t}\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tvar dequeue = true,\r\n\t\t\t\tindex = type != null && type + \"queueHooks\",\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tdata = dataPriv.get( this );\r\n\r\n\t\t\tif ( index ) {\r\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\r\n\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( index in data ) {\r\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\r\n\t\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this &&\r\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\r\n\r\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\r\n\t\t\t\t\tdequeue = false;\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Start the next in the queue if the last step wasn't forced.\r\n\t\t\t// Timers currently will call their complete callbacks, which\r\n\t\t\t// will dequeue but only if they were gotoEnd.\r\n\t\t\tif ( dequeue || !gotoEnd ) {\r\n\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\tfinish: function( type ) {\r\n\t\tif ( type !== false ) {\r\n\t\t\ttype = type || \"fx\";\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tvar index,\r\n\t\t\t\tdata = dataPriv.get( this ),\r\n\t\t\t\tqueue = data[ type + \"queue\" ],\r\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tlength = queue ? queue.length : 0;\r\n\r\n\t\t\t// Enable finishing flag on private data\r\n\t\t\tdata.finish = true;\r\n\r\n\t\t\t// Empty the queue first\r\n\t\t\tjQuery.queue( this, type, [] );\r\n\r\n\t\t\tif ( hooks && hooks.stop ) {\r\n\t\t\t\thooks.stop.call( this, true );\r\n\t\t\t}\r\n\r\n\t\t\t// Look for any active animations, and finish them\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( true );\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Look for any animations in the old queue and finish them\r\n\t\t\tfor ( index = 0; index < length; index++ ) {\r\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\r\n\t\t\t\t\tqueue[ index ].finish.call( this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Turn off finishing flag\r\n\t\t\tdelete data.finish;\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\r\n\tvar cssFn = jQuery.fn[ name ];\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn speed == null || typeof speed === \"boolean\" ?\r\n\t\t\tcssFn.apply( this, arguments ) :\r\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\r\n\t};\r\n} );\r\n\r\n// Generate shortcuts for custom animations\r\njQuery.each( {\r\n\tslideDown: genFx( \"show\" ),\r\n\tslideUp: genFx( \"hide\" ),\r\n\tslideToggle: genFx( \"toggle\" ),\r\n\tfadeIn: { opacity: \"show\" },\r\n\tfadeOut: { opacity: \"hide\" },\r\n\tfadeToggle: { opacity: \"toggle\" }\r\n}, function( name, props ) {\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn this.animate( props, speed, easing, callback );\r\n\t};\r\n} );\r\n\r\njQuery.timers = [];\r\njQuery.fx.tick = function() {\r\n\tvar timer,\r\n\t\ti = 0,\r\n\t\ttimers = jQuery.timers;\r\n\r\n\tfxNow = Date.now();\r\n\r\n\tfor ( ; i < timers.length; i++ ) {\r\n\t\ttimer = timers[ i ];\r\n\r\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\r\n\t\tif ( !timer() && timers[ i ] === timer ) {\r\n\t\t\ttimers.splice( i--, 1 );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !timers.length ) {\r\n\t\tjQuery.fx.stop();\r\n\t}\r\n\tfxNow = undefined;\r\n};\r\n\r\njQuery.fx.timer = function( timer ) {\r\n\tjQuery.timers.push( timer );\r\n\tjQuery.fx.start();\r\n};\r\n\r\njQuery.fx.interval = 13;\r\njQuery.fx.start = function() {\r\n\tif ( inProgress ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tinProgress = true;\r\n\tschedule();\r\n};\r\n\r\njQuery.fx.stop = function() {\r\n\tinProgress = null;\r\n};\r\n\r\njQuery.fx.speeds = {\r\n\tslow: 600,\r\n\tfast: 200,\r\n\r\n\t// Default speed\r\n\t_default: 400\r\n};\r\n\r\n\r\n// Based off of the plugin by Clint Helfers, with permission.\r\njQuery.fn.delay = function( time, type ) {\r\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\r\n\ttype = type || \"fx\";\r\n\r\n\treturn this.queue( type, function( next, hooks ) {\r\n\t\tvar timeout = window.setTimeout( next, time );\r\n\t\thooks.stop = function() {\r\n\t\t\twindow.clearTimeout( timeout );\r\n\t\t};\r\n\t} );\r\n};\r\n\r\n\r\n( function() {\r\n\tvar input = document.createElement( \"input\" ),\r\n\t\tselect = document.createElement( \"select\" ),\r\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\r\n\r\n\tinput.type = \"checkbox\";\r\n\r\n\t// Support: Android <=4.3 only\r\n\t// Default value for a checkbox should be \"on\"\r\n\tsupport.checkOn = input.value !== \"\";\r\n\r\n\t// Support: IE <=11 only\r\n\t// Must access selectedIndex to make default options select\r\n\tsupport.optSelected = opt.selected;\r\n\r\n\t// Support: IE <=11 only\r\n\t// An input loses its value after becoming a radio\r\n\tinput = document.createElement( \"input\" );\r\n\tinput.value = \"t\";\r\n\tinput.type = \"radio\";\r\n\tsupport.radioValue = input.value === \"t\";\r\n} )();\r\n\r\n\r\nvar boolHook,\r\n\tattrHandle = jQuery.expr.attrHandle;\r\n\r\njQuery.fn.extend( {\r\n\tattr: function( name, value ) {\r\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveAttr: function( name ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.removeAttr( this, name );\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.extend( {\r\n\tattr: function( elem, name, value ) {\r\n\t\tvar ret, hooks,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// Don't get/set attributes on text, comment and attribute nodes\r\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Fallback to prop when attributes are not supported\r\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\r\n\t\t\treturn jQuery.prop( elem, name, value );\r\n\t\t}\r\n\r\n\t\t// Attribute hooks are determined by the lowercase version\r\n\t\t// Grab necessary hook if one is defined\r\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\r\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\r\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\tif ( value === null ) {\r\n\t\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( hooks && \"set\" in hooks &&\r\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\telem.setAttribute( name, value + \"\" );\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\tret = jQuery.find.attr( elem, name );\r\n\r\n\t\t// Non-existent attributes return null, we normalize to undefined\r\n\t\treturn ret == null ? undefined : ret;\r\n\t},\r\n\r\n\tattrHooks: {\r\n\t\ttype: {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\r\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\r\n\t\t\t\t\tvar val = elem.value;\r\n\t\t\t\t\telem.setAttribute( \"type\", value );\r\n\t\t\t\t\tif ( val ) {\r\n\t\t\t\t\t\telem.value = val;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tremoveAttr: function( elem, value ) {\r\n\t\tvar name,\r\n\t\t\ti = 0,\r\n\r\n\t\t\t// Attribute names can contain non-HTML whitespace characters\r\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\r\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\r\n\r\n\t\tif ( attrNames && elem.nodeType === 1 ) {\r\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\r\n\t\t\t\telem.removeAttribute( name );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n// Hooks for boolean attributes\r\nboolHook = {\r\n\tset: function( elem, value, name ) {\r\n\t\tif ( value === false ) {\r\n\r\n\t\t\t// Remove boolean attributes when set to false\r\n\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t} else {\r\n\t\t\telem.setAttribute( name, name );\r\n\t\t}\r\n\t\treturn name;\r\n\t}\r\n};\r\n\r\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\r\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\r\n\r\n\tattrHandle[ name ] = function( elem, name, isXML ) {\r\n\t\tvar ret, handle,\r\n\t\t\tlowercaseName = name.toLowerCase();\r\n\r\n\t\tif ( !isXML ) {\r\n\r\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\r\n\t\t\thandle = attrHandle[ lowercaseName ];\r\n\t\t\tattrHandle[ lowercaseName ] = ret;\r\n\t\t\tret = getter( elem, name, isXML ) != null ?\r\n\t\t\t\tlowercaseName :\r\n\t\t\t\tnull;\r\n\t\t\tattrHandle[ lowercaseName ] = handle;\r\n\t\t}\r\n\t\treturn ret;\r\n\t};\r\n} );\r\n\r\n\r\n\r\n\r\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\r\n\trclickable = /^(?:a|area)$/i;\r\n\r\njQuery.fn.extend( {\r\n\tprop: function( name, value ) {\r\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveProp: function( name ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.extend( {\r\n\tprop: function( elem, name, value ) {\r\n\t\tvar ret, hooks,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// Don't get/set properties on text, comment and attribute nodes\r\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\r\n\r\n\t\t\t// Fix name and attach hooks\r\n\t\t\tname = jQuery.propFix[ name ] || name;\r\n\t\t\thooks = jQuery.propHooks[ name ];\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\tif ( hooks && \"set\" in hooks &&\r\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn ( elem[ name ] = value );\r\n\t\t}\r\n\r\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\treturn elem[ name ];\r\n\t},\r\n\r\n\tpropHooks: {\r\n\t\ttabIndex: {\r\n\t\t\tget: function( elem ) {\r\n\r\n\t\t\t\t// Support: IE <=9 - 11 only\r\n\t\t\t\t// elem.tabIndex doesn't always return the\r\n\t\t\t\t// correct value when it hasn't been explicitly set\r\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\r\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\r\n\r\n\t\t\t\tif ( tabindex ) {\r\n\t\t\t\t\treturn parseInt( tabindex, 10 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\r\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\r\n\t\t\t\t\telem.href\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropFix: {\r\n\t\t\"for\": \"htmlFor\",\r\n\t\t\"class\": \"className\"\r\n\t}\r\n} );\r\n\r\n// Support: IE <=11 only\r\n// Accessing the selectedIndex property\r\n// forces the browser to respect setting selected\r\n// on the option\r\n// The getter ensures a default option is selected\r\n// when in an optgroup\r\n// eslint rule \"no-unused-expressions\" is disabled for this code\r\n// since it considers such accessions noop\r\nif ( !support.optSelected ) {\r\n\tjQuery.propHooks.selected = {\r\n\t\tget: function( elem ) {\r\n\r\n\t\t\t/* eslint no-unused-expressions: \"off\" */\r\n\r\n\t\t\tvar parent = elem.parentNode;\r\n\t\t\tif ( parent && parent.parentNode ) {\r\n\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tset: function( elem ) {\r\n\r\n\t\t\t/* eslint no-unused-expressions: \"off\" */\r\n\r\n\t\t\tvar parent = elem.parentNode;\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tparent.selectedIndex;\r\n\r\n\t\t\t\tif ( parent.parentNode ) {\r\n\t\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\njQuery.each( [\r\n\t\"tabIndex\",\r\n\t\"readOnly\",\r\n\t\"maxLength\",\r\n\t\"cellSpacing\",\r\n\t\"cellPadding\",\r\n\t\"rowSpan\",\r\n\t\"colSpan\",\r\n\t\"useMap\",\r\n\t\"frameBorder\",\r\n\t\"contentEditable\"\r\n], function() {\r\n\tjQuery.propFix[ this.toLowerCase() ] = this;\r\n} );\r\n\r\n\r\n\r\n\r\n\t// Strip and collapse whitespace according to HTML spec\r\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\r\n\tfunction stripAndCollapse( value ) {\r\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\r\n\t\treturn tokens.join( \" \" );\r\n\t}\r\n\r\n\r\nfunction getClass( elem ) {\r\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\r\n}\r\n\r\nfunction classesToArray( value ) {\r\n\tif ( Array.isArray( value ) ) {\r\n\t\treturn value;\r\n\t}\r\n\tif ( typeof value === \"string\" ) {\r\n\t\treturn value.match( rnothtmlwhite ) || [];\r\n\t}\r\n\treturn [];\r\n}\r\n\r\njQuery.fn.extend( {\r\n\taddClass: function( value ) {\r\n\t\tvar classNames, cur, curValue, className, i, finalValue;\r\n\r\n\t\tif ( isFunction( value ) ) {\r\n\t\t\treturn this.each( function( j ) {\r\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\tclassNames = classesToArray( value );\r\n\r\n\t\tif ( classNames.length ) {\r\n\t\t\treturn this.each( function() {\r\n\t\t\t\tcurValue = getClass( this );\r\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\r\n\t\t\t\t\t\tclassName = classNames[ i ];\r\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\r\n\t\t\t\t\t\t\tcur += className + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\r\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\r\n\t\t\t\t\tif ( curValue !== finalValue ) {\r\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveClass: function( value ) {\r\n\t\tvar classNames, cur, curValue, className, i, finalValue;\r\n\r\n\t\tif ( isFunction( value ) ) {\r\n\t\t\treturn this.each( function( j ) {\r\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\treturn this.attr( \"class\", \"\" );\r\n\t\t}\r\n\r\n\t\tclassNames = classesToArray( value );\r\n\r\n\t\tif ( classNames.length ) {\r\n\t\t\treturn this.each( function() {\r\n\t\t\t\tcurValue = getClass( this );\r\n\r\n\t\t\t\t// This expression is here for better compressibility (see addClass)\r\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\r\n\t\t\t\t\t\tclassName = classNames[ i ];\r\n\r\n\t\t\t\t\t\t// Remove *all* instances\r\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\r\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\r\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\r\n\t\t\t\t\tif ( curValue !== finalValue ) {\r\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\ttoggleClass: function( value, stateVal ) {\r\n\t\tvar classNames, className, i, self,\r\n\t\t\ttype = typeof value,\r\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\r\n\r\n\t\tif ( isFunction( value ) ) {\r\n\t\t\treturn this.each( function( i ) {\r\n\t\t\t\tjQuery( this ).toggleClass(\r\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\r\n\t\t\t\t\tstateVal\r\n\t\t\t\t);\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\r\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\r\n\t\t}\r\n\r\n\t\tclassNames = classesToArray( value );\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tif ( isValidValue ) {\r\n\r\n\t\t\t\t// Toggle individual class names\r\n\t\t\t\tself = jQuery( this );\r\n\r\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\r\n\t\t\t\t\tclassName = classNames[ i ];\r\n\r\n\t\t\t\t\t// Check each className given, space separated list\r\n\t\t\t\t\tif ( self.hasClass( className ) ) {\r\n\t\t\t\t\t\tself.removeClass( className );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tself.addClass( className );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Toggle whole class name\r\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\r\n\t\t\t\tclassName = getClass( this );\r\n\t\t\t\tif ( className ) {\r\n\r\n\t\t\t\t\t// Store className if set\r\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the element has a class name or if we're passed `false`,\r\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\r\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\r\n\t\t\t\t// falling back to the empty string if nothing was stored.\r\n\t\t\t\tif ( this.setAttribute ) {\r\n\t\t\t\t\tthis.setAttribute( \"class\",\r\n\t\t\t\t\t\tclassName || value === false ?\r\n\t\t\t\t\t\t\t\"\" :\r\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\thasClass: function( selector ) {\r\n\t\tvar className, elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tclassName = \" \" + selector + \" \";\r\n\t\twhile ( ( elem = this[ i++ ] ) ) {\r\n\t\t\tif ( elem.nodeType === 1 &&\r\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\nvar rreturn = /\\r/g;\r\n\r\njQuery.fn.extend( {\r\n\tval: function( value ) {\r\n\t\tvar hooks, ret, valueIsFunction,\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\tif ( elem ) {\r\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\r\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t\t\tif ( hooks &&\r\n\t\t\t\t\t\"get\" in hooks &&\r\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tret = elem.value;\r\n\r\n\t\t\t\t// Handle most common string cases\r\n\t\t\t\tif ( typeof ret === \"string\" ) {\r\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Handle cases where value is null/undef or number\r\n\t\t\t\treturn ret == null ? \"\" : ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvalueIsFunction = isFunction( value );\r\n\r\n\t\treturn this.each( function( i ) {\r\n\t\t\tvar val;\r\n\r\n\t\t\tif ( this.nodeType !== 1 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( valueIsFunction ) {\r\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\r\n\t\t\t} else {\r\n\t\t\t\tval = value;\r\n\t\t\t}\r\n\r\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\tval = \"\";\r\n\r\n\t\t\t} else if ( typeof val === \"number\" ) {\r\n\t\t\t\tval += \"\";\r\n\r\n\t\t\t} else if ( Array.isArray( val ) ) {\r\n\t\t\t\tval = jQuery.map( val, function( value ) {\r\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\r\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\r\n\r\n\t\t\t// If set returns undefined, fall back to normal setting\r\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\r\n\t\t\t\tthis.value = val;\r\n\t\t\t}\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.extend( {\r\n\tvalHooks: {\r\n\t\toption: {\r\n\t\t\tget: function( elem ) {\r\n\r\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\r\n\t\t\t\treturn val != null ?\r\n\t\t\t\t\tval :\r\n\r\n\t\t\t\t\t// Support: IE <=10 - 11 only\r\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\r\n\t\t\t\t\t// Strip and collapse whitespace\r\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\r\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\r\n\t\t\t}\r\n\t\t},\r\n\t\tselect: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar value, option, i,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tindex = elem.selectedIndex,\r\n\t\t\t\t\tone = elem.type === \"select-one\",\r\n\t\t\t\t\tvalues = one ? null : [],\r\n\t\t\t\t\tmax = one ? index + 1 : options.length;\r\n\r\n\t\t\t\tif ( index < 0 ) {\r\n\t\t\t\t\ti = max;\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\ti = one ? index : 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Loop through all the selected options\r\n\t\t\t\tfor ( ; i < max; i++ ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\t// Support: IE <=9 only\r\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\r\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\r\n\r\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\r\n\t\t\t\t\t\t\t!option.disabled &&\r\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\r\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\r\n\r\n\t\t\t\t\t\t// Get the specific value for the option\r\n\t\t\t\t\t\tvalue = jQuery( option ).val();\r\n\r\n\t\t\t\t\t\t// We don't need an array for one selects\r\n\t\t\t\t\t\tif ( one ) {\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Multi-Selects return an array\r\n\t\t\t\t\t\tvalues.push( value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn values;\r\n\t\t\t},\r\n\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tvar optionSet, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\r\n\t\t\t\t\ti = options.length;\r\n\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\t/* eslint-disable no-cond-assign */\r\n\r\n\t\t\t\t\tif ( option.selected =\r\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\toptionSet = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* eslint-enable no-cond-assign */\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\r\n\t\t\t\tif ( !optionSet ) {\r\n\t\t\t\t\telem.selectedIndex = -1;\r\n\t\t\t\t}\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n// Radios and checkboxes getter/setter\r\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\r\n\tjQuery.valHooks[ this ] = {\r\n\t\tset: function( elem, value ) {\r\n\t\t\tif ( Array.isArray( value ) ) {\r\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tif ( !support.checkOn ) {\r\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\r\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\r\n\t\t};\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\n// Return jQuery for attributes-only inclusion\r\nvar location = window.location;\r\n\r\nvar nonce = { guid: Date.now() };\r\n\r\nvar rquery = ( /\\?/ );\r\n\r\n\r\n\r\n// Cross-browser xml parsing\r\njQuery.parseXML = function( data ) {\r\n\tvar xml, parserErrorElem;\r\n\tif ( !data || typeof data !== \"string\" ) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t// Support: IE 9 - 11 only\r\n\t// IE throws on parseFromString with invalid input.\r\n\ttry {\r\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\r\n\t} catch ( e ) {}\r\n\r\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\r\n\tif ( !xml || parserErrorElem ) {\r\n\t\tjQuery.error( \"Invalid XML: \" + (\r\n\t\t\tparserErrorElem ?\r\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\r\n\t\t\t\t\treturn el.textContent;\r\n\t\t\t\t} ).join( \"\\n\" ) :\r\n\t\t\t\tdata\r\n\t\t) );\r\n\t}\r\n\treturn xml;\r\n};\r\n\r\n\r\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\r\n\tstopPropagationCallback = function( e ) {\r\n\t\te.stopPropagation();\r\n\t};\r\n\r\njQuery.extend( jQuery.event, {\r\n\r\n\ttrigger: function( event, data, elem, onlyHandlers ) {\r\n\r\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\r\n\t\t\teventPath = [ elem || document ],\r\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\r\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\r\n\r\n\t\tcur = lastElement = tmp = elem = elem || document;\r\n\r\n\t\t// Don't do events on text and comment nodes\r\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\r\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\r\n\r\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\r\n\t\t\tnamespaces = type.split( \".\" );\r\n\t\t\ttype = namespaces.shift();\r\n\t\t\tnamespaces.sort();\r\n\t\t}\r\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\r\n\r\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\r\n\t\tevent = event[ jQuery.expando ] ?\r\n\t\t\tevent :\r\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\r\n\r\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\r\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\r\n\t\tevent.namespace = namespaces.join( \".\" );\r\n\t\tevent.rnamespace = event.namespace ?\r\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\r\n\t\t\tnull;\r\n\r\n\t\t// Clean up the event in case it is being reused\r\n\t\tevent.result = undefined;\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = elem;\r\n\t\t}\r\n\r\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\r\n\t\tdata = data == null ?\r\n\t\t\t[ event ] :\r\n\t\t\tjQuery.makeArray( data, [ event ] );\r\n\r\n\t\t// Allow special events to draw outside the lines\r\n\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\r\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\r\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\r\n\r\n\t\t\tbubbleType = special.delegateType || type;\r\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\r\n\t\t\t\teventPath.push( cur );\r\n\t\t\t\ttmp = cur;\r\n\t\t\t}\r\n\r\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\r\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\r\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fire handlers on the event path\r\n\t\ti = 0;\r\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\r\n\t\t\tlastElement = cur;\r\n\t\t\tevent.type = i > 1 ?\r\n\t\t\t\tbubbleType :\r\n\t\t\t\tspecial.bindType || type;\r\n\r\n\t\t\t// jQuery handler\r\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\r\n\t\t\t\tdataPriv.get( cur, \"handle\" );\r\n\t\t\tif ( handle ) {\r\n\t\t\t\thandle.apply( cur, data );\r\n\t\t\t}\r\n\r\n\t\t\t// Native handler\r\n\t\t\thandle = ontype && cur[ ontype ];\r\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\r\n\t\t\t\tevent.result = handle.apply( cur, data );\r\n\t\t\t\tif ( event.result === false ) {\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevent.type = type;\r\n\r\n\t\t// If nobody prevented the default action, do it now\r\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\r\n\r\n\t\t\tif ( ( !special._default ||\r\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\r\n\t\t\t\tacceptData( elem ) ) {\r\n\r\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\r\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\r\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\r\n\t\t\t\t\ttmp = elem[ ontype ];\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\r\n\t\t\t\t\tjQuery.event.triggered = type;\r\n\r\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\r\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem[ type ]();\r\n\r\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\r\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tjQuery.event.triggered = undefined;\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\t// Piggyback on a donor event to simulate a different one\r\n\t// Used only for `focus(in | out)` events\r\n\tsimulate: function( type, elem, event ) {\r\n\t\tvar e = jQuery.extend(\r\n\t\t\tnew jQuery.Event(),\r\n\t\t\tevent,\r\n\t\t\t{\r\n\t\t\t\ttype: type,\r\n\t\t\t\tisSimulated: true\r\n\t\t\t}\r\n\t\t);\r\n\r\n\t\tjQuery.event.trigger( e, null, elem );\r\n\t}\r\n\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\r\n\ttrigger: function( type, data ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.trigger( type, data, this );\r\n\t\t} );\r\n\t},\r\n\ttriggerHandler: function( type, data ) {\r\n\t\tvar elem = this[ 0 ];\r\n\t\tif ( elem ) {\r\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n\r\nvar\r\n\trbracket = /\\[\\]$/,\r\n\trCRLF = /\\r?\\n/g,\r\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\r\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\r\n\r\nfunction buildParams( prefix, obj, traditional, add ) {\r\n\tvar name;\r\n\r\n\tif ( Array.isArray( obj ) ) {\r\n\r\n\t\t// Serialize array item.\r\n\t\tjQuery.each( obj, function( i, v ) {\r\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\r\n\r\n\t\t\t\t// Treat each array item as a scalar.\r\n\t\t\t\tadd( prefix, v );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\r\n\t\t\t\tbuildParams(\r\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\r\n\t\t\t\t\tv,\r\n\t\t\t\t\ttraditional,\r\n\t\t\t\t\tadd\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\r\n\r\n\t\t// Serialize object item.\r\n\t\tfor ( name in obj ) {\r\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\t// Serialize scalar item.\r\n\t\tadd( prefix, obj );\r\n\t}\r\n}\r\n\r\n// Serialize an array of form elements or a set of\r\n// key/values into a query string\r\njQuery.param = function( a, traditional ) {\r\n\tvar prefix,\r\n\t\ts = [],\r\n\t\tadd = function( key, valueOrFunction ) {\r\n\r\n\t\t\t// If value is a function, invoke it and use its return value\r\n\t\t\tvar value = isFunction( valueOrFunction ) ?\r\n\t\t\t\tvalueOrFunction() :\r\n\t\t\t\tvalueOrFunction;\r\n\r\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\r\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\r\n\t\t};\r\n\r\n\tif ( a == null ) {\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\t// If an array was passed in, assume that it is an array of form elements.\r\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\r\n\r\n\t\t// Serialize the form elements\r\n\t\tjQuery.each( a, function() {\r\n\t\t\tadd( this.name, this.value );\r\n\t\t} );\r\n\r\n\t} else {\r\n\r\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\r\n\t\t// did it), otherwise encode params recursively.\r\n\t\tfor ( prefix in a ) {\r\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the resulting serialization\r\n\treturn s.join( \"&\" );\r\n};\r\n\r\njQuery.fn.extend( {\r\n\tserialize: function() {\r\n\t\treturn jQuery.param( this.serializeArray() );\r\n\t},\r\n\tserializeArray: function() {\r\n\t\treturn this.map( function() {\r\n\r\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\r\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\r\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\r\n\t\t} ).filter( function() {\r\n\t\t\tvar type = this.type;\r\n\r\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\r\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\r\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\r\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\r\n\t\t} ).map( function( _i, elem ) {\r\n\t\t\tvar val = jQuery( this ).val();\r\n\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tif ( Array.isArray( val ) ) {\r\n\t\t\t\treturn jQuery.map( val, function( val ) {\r\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\r\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t} ).get();\r\n\t}\r\n} );\r\n\r\n\r\nvar\r\n\tr20 = /%20/g,\r\n\trhash = /#.*$/,\r\n\trantiCache = /([?&])_=[^&]*/,\r\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\r\n\r\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\r\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\r\n\trnoContent = /^(?:GET|HEAD)$/,\r\n\trprotocol = /^\\/\\//,\r\n\r\n\t/* Prefilters\r\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\r\n\t * 2) These are called:\r\n\t * - BEFORE asking for a transport\r\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\r\n\t * 3) key is the dataType\r\n\t * 4) the catchall symbol \"*\" can be used\r\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\r\n\t */\r\n\tprefilters = {},\r\n\r\n\t/* Transports bindings\r\n\t * 1) key is the dataType\r\n\t * 2) the catchall symbol \"*\" can be used\r\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\r\n\t */\r\n\ttransports = {},\r\n\r\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\r\n\tallTypes = \"*/\".concat( \"*\" ),\r\n\r\n\t// Anchor tag for parsing the document origin\r\n\toriginAnchor = document.createElement( \"a\" );\r\n\r\noriginAnchor.href = location.href;\r\n\r\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\r\nfunction addToPrefiltersOrTransports( structure ) {\r\n\r\n\t// dataTypeExpression is optional and defaults to \"*\"\r\n\treturn function( dataTypeExpression, func ) {\r\n\r\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\r\n\t\t\tfunc = dataTypeExpression;\r\n\t\t\tdataTypeExpression = \"*\";\r\n\t\t}\r\n\r\n\t\tvar dataType,\r\n\t\t\ti = 0,\r\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\r\n\r\n\t\tif ( isFunction( func ) ) {\r\n\r\n\t\t\t// For each dataType in the dataTypeExpression\r\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\r\n\r\n\t\t\t\t// Prepend if requested\r\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\r\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\r\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\r\n\r\n\t\t\t\t// Otherwise append\r\n\t\t\t\t} else {\r\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Base inspection function for prefilters and transports\r\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\r\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t} );\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}\r\n\r\n// A special extend for ajax options\r\n// that takes \"flat\" options (not to be deep extended)\r\n// Fixes trac-9887\r\nfunction ajaxExtend( target, src ) {\r\n\tvar key, deep,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}\r\n\r\n/* Handles responses to an ajax request:\r\n * - finds the right dataType (mediates between content-type and expected dataType)\r\n * - returns the corresponding response\r\n */\r\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}\r\n\r\n/* Chain conversions given the request and the original response\r\n * Also sets the responseXXX fields on the jqXHR instance\r\n */\r\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\r\n\tvar conv2, current, conv, tmp, prev,\r\n\t\tconverters = {},\r\n\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\tcurrent = dataTypes.shift();\r\n\r\n\t// Convert to each sequential dataType\r\n\twhile ( current ) {\r\n\r\n\t\tif ( s.responseFields[ current ] ) {\r\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\r\n\t\t}\r\n\r\n\t\t// Apply the dataFilter if provided\r\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\r\n\t\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t\t}\r\n\r\n\t\tprev = current;\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\tif ( current ) {\r\n\r\n\t\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\tif ( current === \"*\" ) {\r\n\r\n\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s.throws ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}\r\n\r\njQuery.extend( {\r\n\r\n\t// Counter for holding the number of active queries\r\n\tactive: 0,\r\n\r\n\t// Last-Modified header cache for next request\r\n\tlastModified: {},\r\n\tetag: {},\r\n\r\n\tajaxSettings: {\r\n\t\turl: location.href,\r\n\t\ttype: \"GET\",\r\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\r\n\t\tglobal: true,\r\n\t\tprocessData: true,\r\n\t\tasync: true,\r\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n\r\n\t\t/*\r\n\t\ttimeout: 0,\r\n\t\tdata: null,\r\n\t\tdataType: null,\r\n\t\tusername: null,\r\n\t\tpassword: null,\r\n\t\tcache: null,\r\n\t\tthrows: false,\r\n\t\ttraditional: false,\r\n\t\theaders: {},\r\n\t\t*/\r\n\r\n\t\taccepts: {\r\n\t\t\t\"*\": allTypes,\r\n\t\t\ttext: \"text/plain\",\r\n\t\t\thtml: \"text/html\",\r\n\t\t\txml: \"application/xml, text/xml\",\r\n\t\t\tjson: \"application/json, text/javascript\"\r\n\t\t},\r\n\r\n\t\tcontents: {\r\n\t\t\txml: /\\bxml\\b/,\r\n\t\t\thtml: /\\bhtml/,\r\n\t\t\tjson: /\\bjson\\b/\r\n\t\t},\r\n\r\n\t\tresponseFields: {\r\n\t\t\txml: \"responseXML\",\r\n\t\t\ttext: \"responseText\",\r\n\t\t\tjson: \"responseJSON\"\r\n\t\t},\r\n\r\n\t\t// Data converters\r\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\r\n\t\tconverters: {\r\n\r\n\t\t\t// Convert anything to text\r\n\t\t\t\"* text\": String,\r\n\r\n\t\t\t// Text to html (true = no transformation)\r\n\t\t\t\"text html\": true,\r\n\r\n\t\t\t// Evaluate text as a json expression\r\n\t\t\t\"text json\": JSON.parse,\r\n\r\n\t\t\t// Parse text as xml\r\n\t\t\t\"text xml\": jQuery.parseXML\r\n\t\t},\r\n\r\n\t\t// For options that shouldn't be deep extended:\r\n\t\t// you can add your own custom options here if\r\n\t\t// and when you create one that shouldn't be\r\n\t\t// deep extended (see ajaxExtend)\r\n\t\tflatOptions: {\r\n\t\t\turl: true,\r\n\t\t\tcontext: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Creates a full fledged settings object into target\r\n\t// with both ajaxSettings and settings fields.\r\n\t// If target is omitted, writes into ajaxSettings.\r\n\tajaxSetup: function( target, settings ) {\r\n\t\treturn settings ?\r\n\r\n\t\t\t// Building a settings object\r\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\r\n\r\n\t\t\t// Extending ajaxSettings\r\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\r\n\t},\r\n\r\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\r\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\r\n\r\n\t// Main method\r\n\tajax: function( url, options ) {\r\n\r\n\t\t// If url is an object, simulate pre-1.5 signature\r\n\t\tif ( typeof url === \"object\" ) {\r\n\t\t\toptions = url;\r\n\t\t\turl = undefined;\r\n\t\t}\r\n\r\n\t\t// Force options to be an object\r\n\t\toptions = options || {};\r\n\r\n\t\tvar transport,\r\n\r\n\t\t\t// URL without anti-cache param\r\n\t\t\tcacheURL,\r\n\r\n\t\t\t// Response headers\r\n\t\t\tresponseHeadersString,\r\n\t\t\tresponseHeaders,\r\n\r\n\t\t\t// timeout handle\r\n\t\t\ttimeoutTimer,\r\n\r\n\t\t\t// Url cleanup var\r\n\t\t\turlAnchor,\r\n\r\n\t\t\t// Request state (becomes false upon send and true upon completion)\r\n\t\t\tcompleted,\r\n\r\n\t\t\t// To know if global events are to be dispatched\r\n\t\t\tfireGlobals,\r\n\r\n\t\t\t// Loop variable\r\n\t\t\ti,\r\n\r\n\t\t\t// uncached part of the url\r\n\t\t\tuncached,\r\n\r\n\t\t\t// Create the final options object\r\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\r\n\r\n\t\t\t// Callbacks context\r\n\t\t\tcallbackContext = s.context || s,\r\n\r\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\r\n\t\t\tglobalEventContext = s.context &&\r\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\r\n\t\t\t\tjQuery( callbackContext ) :\r\n\t\t\t\tjQuery.event,\r\n\r\n\t\t\t// Deferreds\r\n\t\t\tdeferred = jQuery.Deferred(),\r\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tstatusCode = s.statusCode || {},\r\n\r\n\t\t\t// Headers (they are sent all at once)\r\n\t\t\trequestHeaders = {},\r\n\t\t\trequestHeadersNames = {},\r\n\r\n\t\t\t// Default abort message\r\n\t\t\tstrAbort = \"canceled\",\r\n\r\n\t\t\t// Fake xhr\r\n\t\t\tjqXHR = {\r\n\t\t\t\treadyState: 0,\r\n\r\n\t\t\t\t// Builds headers hashtable if needed\r\n\t\t\t\tgetResponseHeader: function( key ) {\r\n\t\t\t\t\tvar match;\r\n\t\t\t\t\tif ( completed ) {\r\n\t\t\t\t\t\tif ( !responseHeaders ) {\r\n\t\t\t\t\t\t\tresponseHeaders = {};\r\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\r\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\r\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\r\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Raw string\r\n\t\t\t\tgetAllResponseHeaders: function() {\r\n\t\t\t\t\treturn completed ? responseHeadersString : null;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Caches the header\r\n\t\t\t\tsetRequestHeader: function( name, value ) {\r\n\t\t\t\t\tif ( completed == null ) {\r\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\r\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\r\n\t\t\t\t\t\trequestHeaders[ name ] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Overrides response content-type header\r\n\t\t\t\toverrideMimeType: function( type ) {\r\n\t\t\t\t\tif ( completed == null ) {\r\n\t\t\t\t\t\ts.mimeType = type;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Status-dependent callbacks\r\n\t\t\t\tstatusCode: function( map ) {\r\n\t\t\t\t\tvar code;\r\n\t\t\t\t\tif ( map ) {\r\n\t\t\t\t\t\tif ( completed ) {\r\n\r\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\r\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\r\n\t\t\t\t\t\t\tfor ( code in map ) {\r\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Cancel the request\r\n\t\t\t\tabort: function( statusText ) {\r\n\t\t\t\t\tvar finalText = statusText || strAbort;\r\n\t\t\t\t\tif ( transport ) {\r\n\t\t\t\t\t\ttransport.abort( finalText );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdone( 0, finalText );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t// Attach deferreds\r\n\t\tdeferred.promise( jqXHR );\r\n\r\n\t\t// Add protocol if not provided (prefilters might expect it)\r\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\r\n\t\t// We also use the url parameter if available\r\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\r\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\r\n\r\n\t\t// Alias method option to type as per ticket trac-12004\r\n\t\ts.type = options.method || options.type || s.method || s.type;\r\n\r\n\t\t// Extract dataTypes list\r\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\r\n\r\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\r\n\t\tif ( s.crossDomain == null ) {\r\n\t\t\turlAnchor = document.createElement( \"a\" );\r\n\r\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\r\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\r\n\t\t\t// e.g. http://example.com:80x/\r\n\t\t\ttry {\r\n\t\t\t\turlAnchor.href = s.url;\r\n\r\n\t\t\t\t// Support: IE <=8 - 11 only\r\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\r\n\t\t\t\turlAnchor.href = urlAnchor.href;\r\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\r\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\r\n\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\r\n\t\t\t\t// it can be rejected by the transport if it is invalid\r\n\t\t\t\ts.crossDomain = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Convert data if not already a string\r\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\r\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\r\n\t\t}\r\n\r\n\t\t// Apply prefilters\r\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\r\n\r\n\t\t// If request was aborted inside a prefilter, stop there\r\n\t\tif ( completed ) {\r\n\t\t\treturn jqXHR;\r\n\t\t}\r\n\r\n\t\t// We can fire global events as of now if asked to\r\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\r\n\t\tfireGlobals = jQuery.event && s.global;\r\n\r\n\t\t// Watch for a new set of requests\r\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\r\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\r\n\t\t}\r\n\r\n\t\t// Uppercase the type\r\n\t\ts.type = s.type.toUpperCase();\r\n\r\n\t\t// Determine if request has content\r\n\t\ts.hasContent = !rnoContent.test( s.type );\r\n\r\n\t\t// Save the URL in case we're toying with the If-Modified-Since\r\n\t\t// and/or If-None-Match header later on\r\n\t\t// Remove hash to simplify url manipulation\r\n\t\tcacheURL = s.url.replace( rhash, \"\" );\r\n\r\n\t\t// More options handling for requests with no content\r\n\t\tif ( !s.hasContent ) {\r\n\r\n\t\t\t// Remember the hash so we can put it back\r\n\t\t\tuncached = s.url.slice( cacheURL.length );\r\n\r\n\t\t\t// If data is available and should be processed, append data to url\r\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\r\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\r\n\r\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\r\n\t\t\t\tdelete s.data;\r\n\t\t\t}\r\n\r\n\t\t\t// Add or update anti-cache param if needed\r\n\t\t\tif ( s.cache === false ) {\r\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\r\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\r\n\t\t\t\t\tuncached;\r\n\t\t\t}\r\n\r\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\r\n\t\t\ts.url = cacheURL + uncached;\r\n\r\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\r\n\t\t} else if ( s.data && s.processData &&\r\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\r\n\t\t\ts.data = s.data.replace( r20, \"+\" );\r\n\t\t}\r\n\r\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\tif ( s.ifModified ) {\r\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\r\n\t\t\t}\r\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the correct header, if data is being sent\r\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\r\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\r\n\t\t}\r\n\r\n\t\t// Set the Accepts header for the server, depending on the dataType\r\n\t\tjqXHR.setRequestHeader(\r\n\t\t\t\"Accept\",\r\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\r\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\r\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\r\n\t\t\t\ts.accepts[ \"*\" ]\r\n\t\t);\r\n\r\n\t\t// Check for headers option\r\n\t\tfor ( i in s.headers ) {\r\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\r\n\t\t}\r\n\r\n\t\t// Allow custom headers/mimetypes and early abort\r\n\t\tif ( s.beforeSend &&\r\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\r\n\r\n\t\t\t// Abort if not done already and return\r\n\t\t\treturn jqXHR.abort();\r\n\t\t}\r\n\r\n\t\t// Aborting is no longer a cancellation\r\n\t\tstrAbort = \"abort\";\r\n\r\n\t\t// Install callbacks on deferreds\r\n\t\tcompleteDeferred.add( s.complete );\r\n\t\tjqXHR.done( s.success );\r\n\t\tjqXHR.fail( s.error );\r\n\r\n\t\t// Get transport\r\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\r\n\r\n\t\t// If no transport, we auto-abort\r\n\t\tif ( !transport ) {\r\n\t\t\tdone( -1, \"No Transport\" );\r\n\t\t} else {\r\n\t\t\tjqXHR.readyState = 1;\r\n\r\n\t\t\t// Send global event\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\r\n\t\t\t}\r\n\r\n\t\t\t// If request was aborted inside ajaxSend, stop there\r\n\t\t\tif ( completed ) {\r\n\t\t\t\treturn jqXHR;\r\n\t\t\t}\r\n\r\n\t\t\t// Timeout\r\n\t\t\tif ( s.async && s.timeout > 0 ) {\r\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\r\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\r\n\t\t\t\t}, s.timeout );\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tcompleted = false;\r\n\t\t\t\ttransport.send( requestHeaders, done );\r\n\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t// Rethrow post-completion exceptions\r\n\t\t\t\tif ( completed ) {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Propagate others as results\r\n\t\t\t\tdone( -1, e );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Callback for when everything is done\r\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\r\n\t\t\tvar isSuccess, success, error, response, modified,\r\n\t\t\t\tstatusText = nativeStatusText;\r\n\r\n\t\t\t// Ignore repeat invocations\r\n\t\t\tif ( completed ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tcompleted = true;\r\n\r\n\t\t\t// Clear timeout if it exists\r\n\t\t\tif ( timeoutTimer ) {\r\n\t\t\t\twindow.clearTimeout( timeoutTimer );\r\n\t\t\t}\r\n\r\n\t\t\t// Dereference transport for early garbage collection\r\n\t\t\t// (no matter how long the jqXHR object will be used)\r\n\t\t\ttransport = undefined;\r\n\r\n\t\t\t// Cache response headers\r\n\t\t\tresponseHeadersString = headers || \"\";\r\n\r\n\t\t\t// Set readyState\r\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\r\n\r\n\t\t\t// Determine if successful\r\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\r\n\r\n\t\t\t// Get response data\r\n\t\t\tif ( responses ) {\r\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\r\n\t\t\t}\r\n\r\n\t\t\t// Use a noop converter for missing script but not if jsonp\r\n\t\t\tif ( !isSuccess &&\r\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\r\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\r\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\r\n\t\t\t}\r\n\r\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\r\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\r\n\r\n\t\t\t// If successful, handle type chaining\r\n\t\t\tif ( isSuccess ) {\r\n\r\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\t\t\tif ( s.ifModified ) {\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if no content\r\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\r\n\t\t\t\t\tstatusText = \"nocontent\";\r\n\r\n\t\t\t\t// if not modified\r\n\t\t\t\t} else if ( status === 304 ) {\r\n\t\t\t\t\tstatusText = \"notmodified\";\r\n\r\n\t\t\t\t// If we have data, let's convert it\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatusText = response.state;\r\n\t\t\t\t\tsuccess = response.data;\r\n\t\t\t\t\terror = response.error;\r\n\t\t\t\t\tisSuccess = !error;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\r\n\t\t\t\terror = statusText;\r\n\t\t\t\tif ( status || !statusText ) {\r\n\t\t\t\t\tstatusText = \"error\";\r\n\t\t\t\t\tif ( status < 0 ) {\r\n\t\t\t\t\t\tstatus = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set data for the fake xhr object\r\n\t\t\tjqXHR.status = status;\r\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\r\n\r\n\t\t\t// Success/Error\r\n\t\t\tif ( isSuccess ) {\r\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tjqXHR.statusCode( statusCode );\r\n\t\t\tstatusCode = undefined;\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\r\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Complete\r\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\r\n\r\n\t\t\t\t// Handle the global AJAX counter\r\n\t\t\t\tif ( !( --jQuery.active ) ) {\r\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn jqXHR;\r\n\t},\r\n\r\n\tgetJSON: function( url, data, callback ) {\r\n\t\treturn jQuery.get( url, data, callback, \"json\" );\r\n\t},\r\n\r\n\tgetScript: function( url, callback ) {\r\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\r\n\t}\r\n} );\r\n\r\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\r\n\tjQuery[ method ] = function( url, data, callback, type ) {\r\n\r\n\t\t// Shift arguments if data argument was omitted\r\n\t\tif ( isFunction( data ) ) {\r\n\t\t\ttype = type || callback;\r\n\t\t\tcallback = data;\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\r\n\t\t// The url can be an options object (which then must have .url)\r\n\t\treturn jQuery.ajax( jQuery.extend( {\r\n\t\t\turl: url,\r\n\t\t\ttype: method,\r\n\t\t\tdataType: type,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: callback\r\n\t\t}, jQuery.isPlainObject( url ) && url ) );\r\n\t};\r\n} );\r\n\r\njQuery.ajaxPrefilter( function( s ) {\r\n\tvar i;\r\n\tfor ( i in s.headers ) {\r\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\r\n\t\t\ts.contentType = s.headers[ i ] || \"\";\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n\r\njQuery._evalUrl = function( url, options, doc ) {\r\n\treturn jQuery.ajax( {\r\n\t\turl: url,\r\n\r\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\r\n\t\ttype: \"GET\",\r\n\t\tdataType: \"script\",\r\n\t\tcache: true,\r\n\t\tasync: false,\r\n\t\tglobal: false,\r\n\r\n\t\t// Only evaluate the response if it is successful (gh-4126)\r\n\t\t// dataFilter is not invoked for failure responses, so using it instead\r\n\t\t// of the default converter is kludgy but it works.\r\n\t\tconverters: {\r\n\t\t\t\"text script\": function() {}\r\n\t\t},\r\n\t\tdataFilter: function( response ) {\r\n\t\t\tjQuery.globalEval( response, options, doc );\r\n\t\t}\r\n\t} );\r\n};\r\n\r\n\r\njQuery.fn.extend( {\r\n\twrapAll: function( html ) {\r\n\t\tvar wrap;\r\n\r\n\t\tif ( this[ 0 ] ) {\r\n\t\t\tif ( isFunction( html ) ) {\r\n\t\t\t\thtml = html.call( this[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\t// The elements to wrap the target around\r\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\r\n\r\n\t\t\tif ( this[ 0 ].parentNode ) {\r\n\t\t\t\twrap.insertBefore( this[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\twrap.map( function() {\r\n\t\t\t\tvar elem = this;\r\n\r\n\t\t\t\twhile ( elem.firstElementChild ) {\r\n\t\t\t\t\telem = elem.firstElementChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn elem;\r\n\t\t\t} ).append( this );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\twrapInner: function( html ) {\r\n\t\tif ( isFunction( html ) ) {\r\n\t\t\treturn this.each( function( i ) {\r\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tvar self = jQuery( this ),\r\n\t\t\t\tcontents = self.contents();\r\n\r\n\t\t\tif ( contents.length ) {\r\n\t\t\t\tcontents.wrapAll( html );\r\n\r\n\t\t\t} else {\r\n\t\t\t\tself.append( html );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\twrap: function( html ) {\r\n\t\tvar htmlIsFunction = isFunction( html );\r\n\r\n\t\treturn this.each( function( i ) {\r\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\r\n\t\t} );\r\n\t},\r\n\r\n\tunwrap: function( selector ) {\r\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\r\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\r\n\t\t} );\r\n\t\treturn this;\r\n\t}\r\n} );\r\n\r\n\r\njQuery.expr.pseudos.hidden = function( elem ) {\r\n\treturn !jQuery.expr.pseudos.visible( elem );\r\n};\r\njQuery.expr.pseudos.visible = function( elem ) {\r\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\r\n};\r\n\r\n\r\n\r\n\r\njQuery.ajaxSettings.xhr = function() {\r\n\ttry {\r\n\t\treturn new window.XMLHttpRequest();\r\n\t} catch ( e ) {}\r\n};\r\n\r\nvar xhrSuccessStatus = {\r\n\r\n\t\t// File protocol always yields status code 0, assume 200\r\n\t\t0: 200,\r\n\r\n\t\t// Support: IE <=9 only\r\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\r\n\t\t1223: 204\r\n\t},\r\n\txhrSupported = jQuery.ajaxSettings.xhr();\r\n\r\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\r\nsupport.ajax = xhrSupported = !!xhrSupported;\r\n\r\njQuery.ajaxTransport( function( options ) {\r\n\tvar callback, errorCallback;\r\n\r\n\t// Cross domain only allowed if supported through XMLHttpRequest\r\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\r\n\t\treturn {\r\n\t\t\tsend: function( headers, complete ) {\r\n\t\t\t\tvar i,\r\n\t\t\t\t\txhr = options.xhr();\r\n\r\n\t\t\t\txhr.open(\r\n\t\t\t\t\toptions.type,\r\n\t\t\t\t\toptions.url,\r\n\t\t\t\t\toptions.async,\r\n\t\t\t\t\toptions.username,\r\n\t\t\t\t\toptions.password\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Apply custom fields if provided\r\n\t\t\t\tif ( options.xhrFields ) {\r\n\t\t\t\t\tfor ( i in options.xhrFields ) {\r\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Override mime type if needed\r\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\r\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// X-Requested-With header\r\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\r\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\r\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\r\n\t\t\t\t// For same-domain requests, won't change header if already provided.\r\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\r\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Set headers\r\n\t\t\t\tfor ( i in headers ) {\r\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Callback\r\n\t\t\t\tcallback = function( type ) {\r\n\t\t\t\t\treturn function() {\r\n\t\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\r\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\r\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\r\n\r\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\r\n\t\t\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\r\n\r\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\r\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\r\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\r\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\r\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcomplete(\r\n\r\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\r\n\t\t\t\t\t\t\t\t\t\txhr.status,\r\n\t\t\t\t\t\t\t\t\t\txhr.statusText\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcomplete(\r\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\r\n\t\t\t\t\t\t\t\t\txhr.statusText,\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\r\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\r\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\r\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\r\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\r\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\r\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\r\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Listen to events\r\n\t\t\t\txhr.onload = callback();\r\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\r\n\r\n\t\t\t\t// Support: IE 9 only\r\n\t\t\t\t// Use onreadystatechange to replace onabort\r\n\t\t\t\t// to handle uncaught aborts\r\n\t\t\t\tif ( xhr.onabort !== undefined ) {\r\n\t\t\t\t\txhr.onabort = errorCallback;\r\n\t\t\t\t} else {\r\n\t\t\t\t\txhr.onreadystatechange = function() {\r\n\r\n\t\t\t\t\t\t// Check readyState before timeout as it changes\r\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\r\n\r\n\t\t\t\t\t\t\t// Allow onerror to be called first,\r\n\t\t\t\t\t\t\t// but that will not handle a native abort\r\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\r\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\r\n\t\t\t\t\t\t\twindow.setTimeout( function() {\r\n\t\t\t\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\t\t\t\terrorCallback();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Create the abort callback\r\n\t\t\t\tcallback = callback( \"abort\" );\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\t// Do send the request (this may raise an exception)\r\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\r\n\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( callback ) {\r\n\t\t\t\t\tcallback();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\r\njQuery.ajaxPrefilter( function( s ) {\r\n\tif ( s.crossDomain ) {\r\n\t\ts.contents.script = false;\r\n\t}\r\n} );\r\n\r\n// Install script dataType\r\njQuery.ajaxSetup( {\r\n\taccepts: {\r\n\t\tscript: \"text/javascript, application/javascript, \" +\r\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\r\n\t},\r\n\tcontents: {\r\n\t\tscript: /\\b(?:java|ecma)script\\b/\r\n\t},\r\n\tconverters: {\r\n\t\t\"text script\": function( text ) {\r\n\t\t\tjQuery.globalEval( text );\r\n\t\t\treturn text;\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n// Handle cache's special case and crossDomain\r\njQuery.ajaxPrefilter( \"script\", function( s ) {\r\n\tif ( s.cache === undefined ) {\r\n\t\ts.cache = false;\r\n\t}\r\n\tif ( s.crossDomain ) {\r\n\t\ts.type = \"GET\";\r\n\t}\r\n} );\r\n\r\n// Bind script tag hack transport\r\njQuery.ajaxTransport( \"script\", function( s ) {\r\n\r\n\t// This transport only deals with cross domain or forced-by-attrs requests\r\n\tif ( s.crossDomain || s.scriptAttrs ) {\r\n\t\tvar script, callback;\r\n\t\treturn {\r\n\t\t\tsend: function( _, complete ) {\r\n\t\t\t\tscript = jQuery( \"<script>\" )\r\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\r\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\r\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\r\n\t\t\t\t\t\tscript.remove();\r\n\t\t\t\t\t\tcallback = null;\r\n\t\t\t\t\t\tif ( evt ) {\r\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} );\r\n\r\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\r\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\r\n\t\t\t},\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( callback ) {\r\n\t\t\t\t\tcallback();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\nvar oldCallbacks = [],\r\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\r\n\r\n// Default jsonp settings\r\njQuery.ajaxSetup( {\r\n\tjsonp: \"callback\",\r\n\tjsonpCallback: function() {\r\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\r\n\t\tthis[ callback ] = true;\r\n\t\treturn callback;\r\n\t}\r\n} );\r\n\r\n// Detect, normalize options and install callbacks for jsonp requests\r\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\r\n\r\n\tvar callbackName, overwritten, responseContainer,\r\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\r\n\t\t\t\"url\" :\r\n\t\t\ttypeof s.data === \"string\" &&\r\n\t\t\t\t( s.contentType || \"\" )\r\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\r\n\t\t\t\trjsonp.test( s.data ) && \"data\"\r\n\t\t);\r\n\r\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\r\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\r\n\r\n\t\t// Get callback name, remembering preexisting value associated with it\r\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\r\n\t\t\ts.jsonpCallback() :\r\n\t\t\ts.jsonpCallback;\r\n\r\n\t\t// Insert callback into url or form data\r\n\t\tif ( jsonProp ) {\r\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\r\n\t\t} else if ( s.jsonp !== false ) {\r\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\r\n\t\t}\r\n\r\n\t\t// Use data converter to retrieve json after script execution\r\n\t\ts.converters[ \"script json\" ] = function() {\r\n\t\t\tif ( !responseContainer ) {\r\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\r\n\t\t\t}\r\n\t\t\treturn responseContainer[ 0 ];\r\n\t\t};\r\n\r\n\t\t// Force json dataType\r\n\t\ts.dataTypes[ 0 ] = \"json\";\r\n\r\n\t\t// Install callback\r\n\t\toverwritten = window[ callbackName ];\r\n\t\twindow[ callbackName ] = function() {\r\n\t\t\tresponseContainer = arguments;\r\n\t\t};\r\n\r\n\t\t// Clean-up function (fires after converters)\r\n\t\tjqXHR.always( function() {\r\n\r\n\t\t\t// If previous value didn't exist - remove it\r\n\t\t\tif ( overwritten === undefined ) {\r\n\t\t\t\tjQuery( window ).removeProp( callbackName );\r\n\r\n\t\t\t// Otherwise restore preexisting value\r\n\t\t\t} else {\r\n\t\t\t\twindow[ callbackName ] = overwritten;\r\n\t\t\t}\r\n\r\n\t\t\t// Save back as free\r\n\t\t\tif ( s[ callbackName ] ) {\r\n\r\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\r\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\r\n\r\n\t\t\t\t// Save the callback name for future use\r\n\t\t\t\toldCallbacks.push( callbackName );\r\n\t\t\t}\r\n\r\n\t\t\t// Call if it was a function and we have a response\r\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\r\n\t\t\t\toverwritten( responseContainer[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\tresponseContainer = overwritten = undefined;\r\n\t\t} );\r\n\r\n\t\t// Delegate to script\r\n\t\treturn \"script\";\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\n// Support: Safari 8 only\r\n// In Safari 8 documents created via document.implementation.createHTMLDocument\r\n// collapse sibling forms: the second one becomes a child of the first one.\r\n// Because of that, this security measure has to be disabled in Safari 8.\r\n// https://bugs.webkit.org/show_bug.cgi?id=137337\r\nsupport.createHTMLDocument = ( function() {\r\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\r\n\tbody.innerHTML = \"<form></form><form></form>\";\r\n\treturn body.childNodes.length === 2;\r\n} )();\r\n\r\n\r\n// Argument \"data\" should be string of html\r\n// context (optional): If specified, the fragment will be created in this context,\r\n// defaults to document\r\n// keepScripts (optional): If true, will include scripts passed in the html string\r\njQuery.parseHTML = function( data, context, keepScripts ) {\r\n\tif ( typeof data !== \"string\" ) {\r\n\t\treturn [];\r\n\t}\r\n\tif ( typeof context === \"boolean\" ) {\r\n\t\tkeepScripts = context;\r\n\t\tcontext = false;\r\n\t}\r\n\r\n\tvar base, parsed, scripts;\r\n\r\n\tif ( !context ) {\r\n\r\n\t\t// Stop scripts or inline event handlers from being executed immediately\r\n\t\t// by using document.implementation\r\n\t\tif ( support.createHTMLDocument ) {\r\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\r\n\r\n\t\t\t// Set the base href for the created document\r\n\t\t\t// so any parsed elements with URLs\r\n\t\t\t// are based on the document's URL (gh-2965)\r\n\t\t\tbase = context.createElement( \"base\" );\r\n\t\t\tbase.href = document.location.href;\r\n\t\t\tcontext.head.appendChild( base );\r\n\t\t} else {\r\n\t\t\tcontext = document;\r\n\t\t}\r\n\t}\r\n\r\n\tparsed = rsingleTag.exec( data );\r\n\tscripts = !keepScripts && [];\r\n\r\n\t// Single tag\r\n\tif ( parsed ) {\r\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\r\n\t}\r\n\r\n\tparsed = buildFragment( [ data ], context, scripts );\r\n\r\n\tif ( scripts && scripts.length ) {\r\n\t\tjQuery( scripts ).remove();\r\n\t}\r\n\r\n\treturn jQuery.merge( [], parsed.childNodes );\r\n};\r\n\r\n\r\n/**\r\n * Load a url into a page\r\n */\r\njQuery.fn.load = function( url, params, callback ) {\r\n\tvar selector, type, response,\r\n\t\tself = this,\r\n\t\toff = url.indexOf( \" \" );\r\n\r\n\tif ( off > -1 ) {\r\n\t\tselector = stripAndCollapse( url.slice( off ) );\r\n\t\turl = url.slice( 0, off );\r\n\t}\r\n\r\n\t// If it's a function\r\n\tif ( isFunction( params ) ) {\r\n\r\n\t\t// We assume that it's the callback\r\n\t\tcallback = params;\r\n\t\tparams = undefined;\r\n\r\n\t// Otherwise, build a param string\r\n\t} else if ( params && typeof params === \"object\" ) {\r\n\t\ttype = \"POST\";\r\n\t}\r\n\r\n\t// If we have elements to modify, make the request\r\n\tif ( self.length > 0 ) {\r\n\t\tjQuery.ajax( {\r\n\t\t\turl: url,\r\n\r\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\r\n\t\t\t// Make value of this field explicit since\r\n\t\t\t// user can override it through ajaxSetup method\r\n\t\t\ttype: type || \"GET\",\r\n\t\t\tdataType: \"html\",\r\n\t\t\tdata: params\r\n\t\t} ).done( function( responseText ) {\r\n\r\n\t\t\t// Save response for use in complete callback\r\n\t\t\tresponse = arguments;\r\n\r\n\t\t\tself.html( selector ?\r\n\r\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\r\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\r\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\r\n\r\n\t\t\t\t// Otherwise use the full result\r\n\t\t\t\tresponseText );\r\n\r\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\r\n\t\t// but they are ignored because response was set above.\r\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\r\n\t\t} ).always( callback && function( jqXHR, status ) {\r\n\t\t\tself.each( function() {\r\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\r\n\t\t\t} );\r\n\t\t} );\r\n\t}\r\n\r\n\treturn this;\r\n};\r\n\r\n\r\n\r\n\r\njQuery.expr.pseudos.animated = function( elem ) {\r\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\r\n\t\treturn elem === fn.elem;\r\n\t} ).length;\r\n};\r\n\r\n\r\n\r\n\r\njQuery.offset = {\r\n\tsetOffset: function( elem, options, i ) {\r\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\r\n\t\t\tposition = jQuery.css( elem, \"position\" ),\r\n\t\t\tcurElem = jQuery( elem ),\r\n\t\t\tprops = {};\r\n\r\n\t\t// Set position first, in-case top/left are set even on static elem\r\n\t\tif ( position === \"static\" ) {\r\n\t\t\telem.style.position = \"relative\";\r\n\t\t}\r\n\r\n\t\tcurOffset = curElem.offset();\r\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\r\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\r\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\r\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\r\n\r\n\t\t// Need to be able to calculate position if either\r\n\t\t// top or left is auto and position is either absolute or fixed\r\n\t\tif ( calculatePosition ) {\r\n\t\t\tcurPosition = curElem.position();\r\n\t\t\tcurTop = curPosition.top;\r\n\t\t\tcurLeft = curPosition.left;\r\n\r\n\t\t} else {\r\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\r\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\r\n\t\t}\r\n\r\n\t\tif ( isFunction( options ) ) {\r\n\r\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\r\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\r\n\t\t}\r\n\r\n\t\tif ( options.top != null ) {\r\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\r\n\t\t}\r\n\t\tif ( options.left != null ) {\r\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\r\n\t\t}\r\n\r\n\t\tif ( \"using\" in options ) {\r\n\t\t\toptions.using.call( elem, props );\r\n\r\n\t\t} else {\r\n\t\t\tcurElem.css( props );\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.fn.extend( {\r\n\r\n\t// offset() relates an element's border box to the document origin\r\n\toffset: function( options ) {\r\n\r\n\t\t// Preserve chaining for setter\r\n\t\tif ( arguments.length ) {\r\n\t\t\treturn options === undefined ?\r\n\t\t\t\tthis :\r\n\t\t\t\tthis.each( function( i ) {\r\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\r\n\t\t\t\t} );\r\n\t\t}\r\n\r\n\t\tvar rect, win,\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\tif ( !elem ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\r\n\t\t// Support: IE <=11 only\r\n\t\t// Running getBoundingClientRect on a\r\n\t\t// disconnected node in IE throws an error\r\n\t\tif ( !elem.getClientRects().length ) {\r\n\t\t\treturn { top: 0, left: 0 };\r\n\t\t}\r\n\r\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\r\n\t\trect = elem.getBoundingClientRect();\r\n\t\twin = elem.ownerDocument.defaultView;\r\n\t\treturn {\r\n\t\t\ttop: rect.top + win.pageYOffset,\r\n\t\t\tleft: rect.left + win.pageXOffset\r\n\t\t};\r\n\t},\r\n\r\n\t// position() relates an element's margin box to its offset parent's padding box\r\n\t// This corresponds to the behavior of CSS absolute positioning\r\n\tposition: function() {\r\n\t\tif ( !this[ 0 ] ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar offsetParent, offset, doc,\r\n\t\t\telem = this[ 0 ],\r\n\t\t\tparentOffset = { top: 0, left: 0 };\r\n\r\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\r\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\r\n\r\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\r\n\t\t\toffset = elem.getBoundingClientRect();\r\n\r\n\t\t} else {\r\n\t\t\toffset = this.offset();\r\n\r\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\r\n\t\t\t// when a statically positioned element is identified\r\n\t\t\tdoc = elem.ownerDocument;\r\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\r\n\t\t\twhile ( offsetParent &&\r\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\r\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\r\n\r\n\t\t\t\toffsetParent = offsetParent.parentNode;\r\n\t\t\t}\r\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\r\n\r\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\r\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\r\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\r\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Subtract parent offsets and element margins\r\n\t\treturn {\r\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\r\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\r\n\t\t};\r\n\t},\r\n\r\n\t// This method will return documentElement in the following cases:\r\n\t// 1) For the element inside the iframe without offsetParent, this method will return\r\n\t// documentElement of the parent window\r\n\t// 2) For the hidden or detached element\r\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\r\n\t//\r\n\t// but those exceptions were never presented as a real life use-cases\r\n\t// and might be considered as more preferable results.\r\n\t//\r\n\t// This logic, however, is not guaranteed and can change at any point in the future\r\n\toffsetParent: function() {\r\n\t\treturn this.map( function() {\r\n\t\t\tvar offsetParent = this.offsetParent;\r\n\r\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\r\n\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t}\r\n\r\n\t\t\treturn offsetParent || documentElement;\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\n// Create scrollLeft and scrollTop methods\r\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\r\n\tvar top = \"pageYOffset\" === prop;\r\n\r\n\tjQuery.fn[ method ] = function( val ) {\r\n\t\treturn access( this, function( elem, method, val ) {\r\n\r\n\t\t\t// Coalesce documents and windows\r\n\t\t\tvar win;\r\n\t\t\tif ( isWindow( elem ) ) {\r\n\t\t\t\twin = elem;\r\n\t\t\t} else if ( elem.nodeType === 9 ) {\r\n\t\t\t\twin = elem.defaultView;\r\n\t\t\t}\r\n\r\n\t\t\tif ( val === undefined ) {\r\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\r\n\t\t\t}\r\n\r\n\t\t\tif ( win ) {\r\n\t\t\t\twin.scrollTo(\r\n\t\t\t\t\t!top ? val : win.pageXOffset,\r\n\t\t\t\t\ttop ? val : win.pageYOffset\r\n\t\t\t\t);\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem[ method ] = val;\r\n\t\t\t}\r\n\t\t}, method, val, arguments.length );\r\n\t};\r\n} );\r\n\r\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\r\n// Add the top/left cssHooks using jQuery.fn.position\r\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\r\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\r\n// getComputedStyle returns percent when specified for top/left/bottom/right;\r\n// rather than make the css module depend on the offset module, just check for it here\r\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\r\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\r\n\t\tfunction( elem, computed ) {\r\n\t\t\tif ( computed ) {\r\n\t\t\t\tcomputed = curCSS( elem, prop );\r\n\r\n\t\t\t\t// If curCSS returns percentage, fallback to offset\r\n\t\t\t\treturn rnumnonpx.test( computed ) ?\r\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\r\n\t\t\t\t\tcomputed;\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n} );\r\n\r\n\r\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\r\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\r\n\tjQuery.each( {\r\n\t\tpadding: \"inner\" + name,\r\n\t\tcontent: type,\r\n\t\t\"\": \"outer\" + name\r\n\t}, function( defaultExtra, funcName ) {\r\n\r\n\t\t// Margin is only for outerHeight, outerWidth\r\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\r\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\r\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\r\n\r\n\t\t\treturn access( this, function( elem, type, value ) {\r\n\t\t\t\tvar doc;\r\n\r\n\t\t\t\tif ( isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\r\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\r\n\t\t\t\t\t\telem[ \"inner\" + name ] :\r\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get document width or height\r\n\t\t\t\tif ( elem.nodeType === 9 ) {\r\n\t\t\t\t\tdoc = elem.documentElement;\r\n\r\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\r\n\t\t\t\t\t// whichever is greatest\r\n\t\t\t\t\treturn Math.max(\r\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\r\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\r\n\t\t\t\t\t\tdoc[ \"client\" + name ]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value === undefined ?\r\n\r\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\r\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\r\n\r\n\t\t\t\t\t// Set width or height on the element\r\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\r\n\t\t\t}, type, chainable ? margin : undefined, chainable );\r\n\t\t};\r\n\t} );\r\n} );\r\n\r\n\r\njQuery.each( [\r\n\t\"ajaxStart\",\r\n\t\"ajaxStop\",\r\n\t\"ajaxComplete\",\r\n\t\"ajaxError\",\r\n\t\"ajaxSuccess\",\r\n\t\"ajaxSend\"\r\n], function( _i, type ) {\r\n\tjQuery.fn[ type ] = function( fn ) {\r\n\t\treturn this.on( type, fn );\r\n\t};\r\n} );\r\n\r\n\r\n\r\n\r\njQuery.fn.extend( {\r\n\r\n\tbind: function( types, data, fn ) {\r\n\t\treturn this.on( types, null, data, fn );\r\n\t},\r\n\tunbind: function( types, fn ) {\r\n\t\treturn this.off( types, null, fn );\r\n\t},\r\n\r\n\tdelegate: function( selector, types, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn );\r\n\t},\r\n\tundelegate: function( selector, types, fn ) {\r\n\r\n\t\t// ( namespace ) or ( selector, types [, fn] )\r\n\t\treturn arguments.length === 1 ?\r\n\t\t\tthis.off( selector, \"**\" ) :\r\n\t\t\tthis.off( types, selector || \"**\", fn );\r\n\t},\r\n\r\n\thover: function( fnOver, fnOut ) {\r\n\t\treturn this\r\n\t\t\t.on( \"mouseenter\", fnOver )\r\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\r\n\t}\r\n} );\r\n\r\njQuery.each(\r\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\r\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\r\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\r\n\tfunction( _i, name ) {\r\n\r\n\t\t// Handle event binding\r\n\t\tjQuery.fn[ name ] = function( data, fn ) {\r\n\t\t\treturn arguments.length > 0 ?\r\n\t\t\t\tthis.on( name, null, data, fn ) :\r\n\t\t\t\tthis.trigger( name );\r\n\t\t};\r\n\t}\r\n);\r\n\r\n\r\n\r\n\r\n// Support: Android <=4.0 only\r\n// Make sure we trim BOM and NBSP\r\n// Require that the \"whitespace run\" starts from a non-whitespace\r\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\r\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\r\n\r\n// Bind a function to a context, optionally partially applying any\r\n// arguments.\r\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\r\n// However, it is not slated for removal any time soon\r\njQuery.proxy = function( fn, context ) {\r\n\tvar tmp, args, proxy;\r\n\r\n\tif ( typeof context === \"string\" ) {\r\n\t\ttmp = fn[ context ];\r\n\t\tcontext = fn;\r\n\t\tfn = tmp;\r\n\t}\r\n\r\n\t// Quick check to determine if target is callable, in the spec\r\n\t// this throws a TypeError, but we will just return undefined.\r\n\tif ( !isFunction( fn ) ) {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t// Simulated bind\r\n\targs = slice.call( arguments, 2 );\r\n\tproxy = function() {\r\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\r\n\t};\r\n\r\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\r\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\r\n\r\n\treturn proxy;\r\n};\r\n\r\njQuery.holdReady = function( hold ) {\r\n\tif ( hold ) {\r\n\t\tjQuery.readyWait++;\r\n\t} else {\r\n\t\tjQuery.ready( true );\r\n\t}\r\n};\r\njQuery.isArray = Array.isArray;\r\njQuery.parseJSON = JSON.parse;\r\njQuery.nodeName = nodeName;\r\njQuery.isFunction = isFunction;\r\njQuery.isWindow = isWindow;\r\njQuery.camelCase = camelCase;\r\njQuery.type = toType;\r\n\r\njQuery.now = Date.now;\r\n\r\njQuery.isNumeric = function( obj ) {\r\n\r\n\t// As of jQuery 3.0, isNumeric is limited to\r\n\t// strings and numbers (primitives or objects)\r\n\t// that can be coerced to finite numbers (gh-2662)\r\n\tvar type = jQuery.type( obj );\r\n\treturn ( type === \"number\" || type === \"string\" ) &&\r\n\r\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\r\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\r\n\t\t// subtraction forces infinities to NaN\r\n\t\t!isNaN( obj - parseFloat( obj ) );\r\n};\r\n\r\njQuery.trim = function( text ) {\r\n\treturn text == null ?\r\n\t\t\"\" :\r\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\r\n};\r\n\r\n\r\n\r\n// Register as a named AMD module, since jQuery can be concatenated with other\r\n// files that may use define, but not via a proper concatenation script that\r\n// understands anonymous AMD modules. A named AMD is safest and most robust\r\n// way to register. Lowercase jquery is used because AMD module names are\r\n// derived from file names, and jQuery is normally delivered in a lowercase\r\n// file name. Do this after creating the global so that if an AMD module wants\r\n// to call noConflict to hide this version of jQuery, it will work.\r\n\r\n// Note that for maximum portability, libraries that are not jQuery should\r\n// declare themselves as anonymous modules, and avoid setting a global if an\r\n// AMD loader is present. jQuery is a special case. For more information, see\r\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\r\n\r\n/* if ( typeof define === \"function\" && define.amd ) {\r\n\tdefine( \"jquery\", [], function() {\r\n\t\treturn jQuery;\r\n\t} );\r\n}\r\n\r\n\r\n\r\n\r\nvar\r\n\r\n\t// Map over jQuery in case of overwrite\r\n\t_jQuery = window.jQuery,\r\n\r\n\t// Map over the $ in case of overwrite\r\n\t_$ = window.$;\r\n\r\njQuery.noConflict = function( deep ) {\r\n\tif ( window.$ === jQuery ) {\r\n\t\twindow.$ = _$;\r\n\t}\r\n\r\n\tif ( deep && window.jQuery === jQuery ) {\r\n\t\twindow.jQuery = _jQuery;\r\n\t}\r\n\r\n\treturn jQuery;\r\n};\r\n\r\n// Expose jQuery and $ identifiers, even in AMD\r\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\r\n// and CommonJS for browser emulators (trac-13566)\r\nif ( typeof noGlobal === \"undefined\" ) {\r\n\twindow.jQuery = window.$ = jQuery;\r\n} */\r\n\r\n// Define jQuery as a Layui module\r\ntypeof layui === 'object' && layui.define(function(exports) {\r\n layui.$ = jQuery;\r\n exports('jquery', jQuery);\r\n});\r\n\r\n\r\n\r\nreturn jQuery;\r\n} );\r\n","/**\r\n * component\r\n * Layui 2 组件构建器\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 // export\r\n exports('component', function(settings) {\r\n // 默认设置\r\n settings = $.extend(true, {\r\n isRenderWithoutElem: false, // 渲染是否无需指定目标元素\r\n isRenderOnEvent: true, // 渲染是否仅由事件触发。--- 推荐根据组件类型始终显式设置对应值\r\n isDeepReload: false // 是否默认为深度重载\r\n }, settings);\r\n\r\n // 组件名\r\n var MOD_NAME = settings.name;\r\n var MOD_ID = 'lay-' + MOD_NAME + '-id'; // 用于记录组件实例 id 的属性名\r\n\r\n // 组件基础对外接口\r\n var component = {\r\n config: {}, // 全局配置项,一般通过 component.set() 设置\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0, // 组件索引\r\n\r\n // 通用常量集,一般存放固定字符,如类名等\r\n CONST: $.extend(true, {\r\n MOD_NAME: MOD_NAME,\r\n MOD_ID: MOD_ID,\r\n\r\n CLASS_THIS: 'layui-this',\r\n CLASS_SHOW: 'layui-show',\r\n CLASS_HIDE: 'layui-hide',\r\n CLASS_HIDEV: 'layui-hide-v',\r\n CLASS_DISABLED: 'layui-disabled',\r\n CLASS_NONE: 'layui-none'\r\n }, settings.CONST),\r\n\r\n // 设置全局项\r\n 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 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 instance = function() {\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n // 实例对象\r\n var inst = {\r\n config: options,\r\n id: id,\r\n\r\n // 重置实例\r\n reload: function(options) {\r\n that.reload.call(that, options);\r\n }\r\n };\r\n\r\n // 扩展实例对象的回调\r\n if (typeof settings.extendsInstance === 'function') {\r\n $.extend(true, inst, settings.extendsInstance.call(that));\r\n }\r\n\r\n // 返回实例对象\r\n return inst;\r\n };\r\n\r\n // 构造器\r\n var Class = function(options) {\r\n var that = this;\r\n that.index = ++component.index; // 每创建一个实例,下标自增\r\n\r\n // 扩展配置项:传入选项 -> 全局选项 -> 默认选项 = 当前选项\r\n that.config = $.extend(true, {}, that.config, component.config, options);\r\n\r\n // 初始化之前的回调\r\n if (typeof settings.beforeInit === 'function') {\r\n settings.beforeInit.call(that, that.config);\r\n }\r\n\r\n // 初始化\r\n that.init();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = settings.config;\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options, type) {\r\n var that = this;\r\n that.config = $.extend(settings.isDeepReload, {}, 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 var elem = $(options.elem);\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n if (elem.length > 1) {\r\n layui.each(elem, function() {\r\n component.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 var layOptions = lay.options(elem[0]);\r\n if (rerender) {\r\n // 若重载渲染,则重载传入的 options 配置优先\r\n options = that.config = $.extend(layOptions, options);\r\n } else {\r\n $.extend(options, layOptions); // 若首次渲染,则 lay-options 配置优先\r\n }\r\n\r\n // 若重复执行 render则视为 reload 处理\r\n if (!rerender && elem.attr(MOD_ID)) {\r\n var newThat = component.getInst(elem.attr(MOD_ID));\r\n if (!newThat) return;\r\n return newThat.reload(options, type);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n\r\n // 初始化 id 属性 - 优先取 options.id > 元素 id > 自增索引\r\n options.id = lay.hasOwn(options, 'id') ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 记录当前实例对象\r\n instance.that[options.id] = that;\r\n\r\n // 渲染之前的回调\r\n if (typeof settings.beforeRender === 'function') {\r\n settings.beforeRender.call(that, options);\r\n }\r\n\r\n // 执行渲染\r\n var render = function() {\r\n component.cache.id[options.id] = null; // 记录所有实例 id用于批量操作如 resize\r\n elem.attr(MOD_ID, options.id); // 目标元素已渲染过的标记\r\n that.render(rerender); // 渲染核心\r\n };\r\n\r\n // 若绑定元素不存在\r\n if (!elem[0]) {\r\n return settings.isRenderWithoutElem ? render() : null; // 渲染是否无需指定目标元素\r\n };\r\n\r\n // 执行渲染 - 是否初始即渲染组件\r\n if((settings.isRenderOnEvent && options.show) || !settings.isRenderOnEvent) {\r\n render();\r\n }\r\n\r\n // 事件\r\n typeof settings.events === 'function' && that.events();\r\n };\r\n\r\n // 组件必传项\r\n Class.prototype.render = settings.render; // 渲染\r\n Class.prototype.events = settings.events; // 事件\r\n\r\n /**\r\n * 元素缓存操作\r\n * @param {string} key - 缓存键\r\n * @param {*} value - 缓存值\r\n * @param {boolean} remove - 是否删除缓存\r\n * @returns {*} - 若 value 未传,则返回缓存值\r\n */\r\n Class.prototype.cache = function(key, value, remove) {\r\n var that = this;\r\n var options = that.config;\r\n var elem = options.elem;\r\n var MOD_CACHE_NAME = MOD_ID + '-cache';\r\n if (!elem) return;\r\n\r\n var cache = elem.data(MOD_CACHE_NAME) || {};\r\n\r\n // value 未传则获取缓存值\r\n if (value === undefined) {\r\n return cache[key];\r\n }\r\n\r\n if (remove) {\r\n delete cache[key]; // 删除缓存\r\n } else {\r\n cache[key] = value; // 设置缓存\r\n }\r\n\r\n elem.data(MOD_CACHE_NAME, cache);\r\n };\r\n\r\n // 清除缓存\r\n Class.prototype.removeCache = function(key) {\r\n this.cache(key, null, true);\r\n };\r\n\r\n // 缓存所有实例对象\r\n instance.that = {};\r\n\r\n // 获取指定的实例对象\r\n component.getInst = component.getThis = function(id) {\r\n if (id === undefined) {\r\n throw new Error('ID argument required');\r\n }\r\n return instance.that[id];\r\n };\r\n\r\n // 获取所有实例\r\n component.getAllInst = function() {\r\n return instance.that;\r\n };\r\n\r\n // 移除指定的实例对象\r\n component.removeInst = function(id) {\r\n delete instance.that[id];\r\n };\r\n\r\n // 组件缓存\r\n component.cache = {\r\n id: {}\r\n };\r\n\r\n // 用于扩展原型\r\n component.Class = Class;\r\n\r\n /**\r\n * 组件完整重载\r\n * @param {string} id - 实例 id\r\n * @param {Object} options - 配置项\r\n * @returns\r\n */\r\n component.reload = function(id, options) {\r\n var that = component.getInst(id);\r\n if (!that) return;\r\n\r\n that.reload(options);\r\n return instance.call(that);\r\n };\r\n\r\n /**\r\n * 组件渲染\r\n * @param {Object} options - 配置项\r\n * @returns\r\n */\r\n component.render = function(options) {\r\n var inst = new Class(options);\r\n return instance.call(inst);\r\n };\r\n\r\n return component;\r\n });\r\n});\r\n","/**\r\n * layer\r\n * 通用 Web 弹出层组件\r\n */\r\n//@ts-ignore\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.tagName.toUpperCase() === 'SCRIPT') ? document.currentScript.src : function(){\r\n var js = document.getElementsByTagName('script');\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 beforeEnd: {},\r\n events: {resize: {}}, \r\n minStackIndex: 0,\r\n minStackArr: [],\r\n btn: ['确定', '取消'],\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\nvar SHADE_KEY = 'LAYUI-LAYER-SHADE-KEY';\r\nvar RECORD_HEIGHT_KEY = 'LAYUI_LAYER_CONTENT_RECORD_HEIGHT';\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: '信息',\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 var setAnim = function(layero){\r\n // anim 兼容旧版 shift\r\n if(config.shift){\r\n config.anim = config.shift;\r\n }\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 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 // 若 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 setAnim(layero);\r\n setTimeout(function(){\r\n elemShade.css({opacity: elemShade.data(SHADE_KEY)});\r\n }, 10);\r\n }\r\n })();\r\n }\r\n\r\n // 是否移除活动元素的焦点\r\n if(config.removeFocus && document.activeElement) {\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 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 ,'transition': config.shade[2] || ''\r\n });\r\n that.shadeo.data(SHADE_KEY, config.shade[0] || config.shade);\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 // 记录配置信息\r\n that.layero.data('config', config);\r\n \r\n // 自动关闭\r\n config.time <= 0 || setTimeout(function(){\r\n layer.close(that.index);\r\n }, config.time);\r\n\r\n\r\n that.move().callback();\r\n setAnim(that.layero);\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.area[0] === 'auto') && 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] === '' || config.area[1] === 'auto'){\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.btnLoading = function(btnElem, isLoading){\r\n if(isLoading){\r\n var loadingTpl = '<i class=\"layui-layer-btn-loading-icon layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>';\r\n if(btnElem.find('.layui-layer-btn-loading-icon')[0]) return;\r\n btnElem.addClass('layui-layer-btn-is-loading').attr({disabled: ''}).prepend(loadingTpl);\r\n }else{\r\n btnElem.removeClass('layui-layer-btn-is-loading').removeAttr('disabled').find('.layui-layer-btn-loading-icon').remove();\r\n }\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 btnElem = $(this);\r\n var index = btnElem.index();\r\n if(btnElem.attr('disabled')) return;\r\n\r\n // 若为异步按钮\r\n if(config.btnAsync){\r\n var btnCallback = index === 0 ? (config.yes || config['btn1']) : config['btn'+(index+1)];\r\n that.loading = function(isLoading){\r\n that.btnLoading(btnElem, isLoading);\r\n }\r\n\r\n if(btnCallback){\r\n ready.promiseLikeResolve(btnCallback.call(config, that.index, layero, that))\r\n .then(function(result){\r\n if(result !== false){\r\n layer.close(that.index)\r\n }\r\n }, function(reason){\r\n reason !== undefined && window.console && window.console.error('layer error hint: ' + reason);\r\n });\r\n }else{\r\n layer.close(that.index);\r\n }\r\n } else { // 普通按钮\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 // 取消\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 config.beforeEnd && (ready.beforeEnd[that.index] = $.proxy(config.beforeEnd, config, layero, that.index, that));\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 type = layero.attr('type');\r\n var contentElem = layero.find('.layui-layer-content');\r\n var contentRecordHeightElem = type === ready.type[2] ? contentElem.children('iframe') : contentElem;\r\n var area = [\r\n layero[0].style.width || ready.getStyle(layero[0], 'width'),\r\n layero[0].style.height || ready.getStyle(layero[0], '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 contentElem.data(RECORD_HEIGHT_KEY, ready.getStyle(contentRecordHeightElem[0], 'height'));\r\n};\r\n\r\n// 设置页面滚动条\r\nready.setScrollbar = function(index){\r\n doms.html.css('overflow', 'hidden');\r\n};\r\n\r\n// 恢复页面滚动条\r\nready.restScrollbar = function(index) {\r\n if(!doms.html.css('overflow')) return;\r\n \r\n // 关闭和大小化, layer-full 处理\r\n var targetEl = $('.'+ doms[0]).filter(function(){ \r\n var layero = $(this);\r\n var options = layero.data('config') || {};\r\n return options.scrollbar === false\r\n && layero.data('maxminStatus') !== 'min'\r\n && layero.attr('times') !== String(index);\r\n });\r\n if(targetEl.length === 0){\r\n doms.html.css('overflow', '');\r\n }\r\n};\r\n\r\n// 类似 Promise.resolve\r\nready.promiseLikeResolve = function(value){\r\n var deferred = $.Deferred();\r\n\r\n if(value && typeof value.then === 'function'){\r\n value.then(deferred.resolve, deferred.reject);\r\n }else{\r\n deferred.resolve(value);\r\n }\r\n return deferred.promise();\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 if(!name) return;\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 contentElem = 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 contentElem.css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n - parseFloat(contentElem.css('padding-top'))\r\n - parseFloat(contentElem.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 contentElem = layero.find('.layui-layer-content');\r\n var area = layero.attr('area').split(',');\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n var contentRecordHeight = contentElem.data(RECORD_HEIGHT_KEY);\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 // #1604\r\n if(contentRecordHeight !== undefined){\r\n contentElem.removeData(RECORD_HEIGHT_KEY);\r\n var contentRecordHeightElem = type === ready.type[2] ? contentElem.children('iframe') : contentElem;\r\n contentRecordHeightElem.css({height: contentRecordHeight});\r\n }\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 ready.setScrollbar(index);\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 var executor = function(){\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 shadeo = $('#'+ doms.SHADE + index);\r\n if((layer.ie && layer.ie < 10) || !options.isOutAnim){\r\n shadeo[hideOnClose ? 'hide' : 'remove']();\r\n }else{\r\n shadeo.css({opacity: 0});\r\n setTimeout(function(){\r\n shadeo[hideOnClose ? 'hide' : 'remove']();\r\n }, 350);\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 if(!hideOnClose && typeof ready.beforeEnd[index] === 'function'){\r\n ready.promiseLikeResolve(ready.beforeEnd[index]())\r\n .then(function(result){\r\n if(result !== false){\r\n delete ready.beforeEnd[index];\r\n executor();\r\n }\r\n }, function(reason){\r\n reason !== undefined && window.console && window.console.error('layer error hint: ' + reason);\r\n });\r\n }else{\r\n delete ready.beforeEnd[index];\r\n executor();\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 var layerIndexList = [];\r\n var isArrayType = $.isArray(type);\r\n $(typeof type === 'string' ? '.layui-layer-' + type : '.layui-layer').each(function(i, el){\r\n var layero = $(el);\r\n var shouldSkip = (isArrayType && type.indexOf(layero.attr('type')) === -1) || layero.css('display') === 'none';\r\n if(shouldSkip) return true;\r\n layerIndexList.push(Number(layero.attr('times')));\r\n });\r\n if(layerIndexList.length > 0){\r\n var layerIndexMax = Math.max.apply(null, layerIndexList);\r\n layer.close(layerIndexMax, callback);\r\n }\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: ['确定','取消'],\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('最多输入'+ (options.maxlength || 500) +'个字符', 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 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('没有图片');\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 // 滑动切换图片事件,仅限 layui 中 \r\n if(window.layui || window.lay){\r\n var lay = window.layui.lay || window.lay;\r\n var touchEndCallback = function(e, state){\r\n var duration = Date.now() - state.timeStart;\r\n var speed = state.distanceX / duration;\r\n var threshold = win.width() / 3;\r\n var shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(state.distanceX) > threshold;\r\n if(!shouldSwipe) return;\r\n if(state.direction === 'left'){\r\n dict.imgnext(true);\r\n }else if(state.direction === 'right'){\r\n dict.imgprev(true);\r\n }\r\n }\r\n\r\n $.each([that.shadeo, dict.main], function(i, elem){\r\n lay.touchSwipe(elem, {\r\n onTouchEnd: touchEndCallback\r\n })\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, undefined, 'unset'],\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, undefined, 'unset'],\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('当前图片地址异常,<br>是否继续查看下一张?', {\r\n time: 30000, \r\n btn: ['下一张', '不看了'], \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','lay'], 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","/**\r\n * util 工具组件\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\r\n // 外部接口\r\n var util = {\r\n // 固定块\r\n fixbar: function(options){\r\n var ELEM = 'layui-fixbar';\r\n var $doc = $(document);\r\n\r\n // 默认可选项\r\n options = $.extend(true, {\r\n target: 'body', // fixbar 的插入目标选择器\r\n bars: [], // bar 信息\r\n \"default\": true, // 是否显示默认 bar\r\n margin: 160, // 出现 top bar 的滚动条高度临界值\r\n duration: 320 // top bar 等动画时长(毫秒)\r\n }, options);\r\n\r\n // 目标元素对象\r\n var $target = $(options.target);\r\n\r\n // 滚动条所在元素对象\r\n var $scroll = options.scroll\r\n ? $(options.scroll)\r\n : $(options.target === 'body' ? $doc : $target)\r\n\r\n // 是否提供默认图标\r\n if(options['default']){\r\n // 兼容旧版本的一些属性\r\n if(options.bar1){\r\n options.bars.push({\r\n type: 'bar1',\r\n icon: 'layui-icon-chat'\r\n });\r\n }\r\n if(options.bar2){\r\n options.bars.push({\r\n type: 'bar2',\r\n icon: 'layui-icon-help'\r\n });\r\n }\r\n // 默认 top bar\r\n options.bars.push({\r\n type: 'top',\r\n icon: 'layui-icon-top'\r\n });\r\n }\r\n\r\n var elem = $('<ul>').addClass(ELEM);\r\n var elemTopBar;\r\n\r\n // 遍历生成 bars 节点\r\n layui.each(options.bars, function(i, item){\r\n var elemBar = $('<li class=\"layui-icon\">');\r\n\r\n // 设置 bar 相关属性\r\n elemBar.addClass(item.icon).attr({\r\n 'lay-type': item.type,\r\n 'style': item.style || (options.bgcolor ? 'background-color: '+ options.bgcolor : '')\r\n }).html(item.content);\r\n\r\n // bar 点击事件\r\n elemBar.on('click', function(){\r\n var type = $(this).attr('lay-type');\r\n if(type === 'top'){\r\n (\r\n options.target === 'body'\r\n ? $('html,body')\r\n : $scroll\r\n ).animate({\r\n scrollTop : 0\r\n }, options.duration);\r\n }\r\n typeof options.click === 'function' && options.click.call(this, type);\r\n });\r\n\r\n // 自定义任意事件\r\n if(layui.type(options.on) === 'object'){\r\n layui.each(options.on, function(eventName, callback){\r\n elemBar.on(eventName, function(){\r\n var type = $(this).attr('lay-type');\r\n typeof callback === 'function' && callback.call(this, type);\r\n });\r\n })\r\n }\r\n\r\n // 获得 top bar 节点\r\n if(item.type === 'top'){\r\n elemBar.addClass('layui-fixbar-top');\r\n elemTopBar = elemBar;\r\n }\r\n\r\n elem.append(elemBar); // 插入 bar 节点\r\n });\r\n\r\n // 若目标元素已存在 fixbar则移除旧的节点\r\n $target.find('.'+ ELEM).remove();\r\n\r\n // 向目标元素插入 fixbar 节点\r\n typeof options.css === 'object' && elem.css(options.css);\r\n $target.append(elem);\r\n\r\n // top bar 的显示隐藏\r\n if(elemTopBar){\r\n var lock;\r\n var setTopBar = (function setTopBar(){\r\n var top = $scroll.scrollTop();\r\n if(top >= options.margin){\r\n lock || (elemTopBar.show(), lock = 1);\r\n } else {\r\n lock && (elemTopBar.hide(), lock = 0);\r\n }\r\n return setTopBar;\r\n })();\r\n }\r\n\r\n // 根据 scrollbar 设置 fixbar 相关状态\r\n var timer;\r\n $scroll.on('scroll', function(){\r\n if(!setTopBar) return;\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n setTopBar();\r\n }, 100);\r\n });\r\n },\r\n\r\n // 倒计时\r\n countdown: function(options){\r\n var that = this;\r\n\r\n // 默认可选项\r\n options = $.extend(true, {\r\n date: new Date(),\r\n now: new Date()\r\n }, options);\r\n\r\n // 兼容旧版参数\r\n var args = arguments;\r\n if(args.length > 1){\r\n options.date = new Date(args[0]);\r\n options.now = new Date(args[1]);\r\n options.clock = args[2];\r\n }\r\n\r\n // 实例对象\r\n var inst = {\r\n options: options,\r\n clear: function(){ // 清除计时器\r\n clearTimeout(inst.timer);\r\n },\r\n reload: function(opts){ // 重置倒计时\r\n this.clear();\r\n $.extend(true, this.options, {\r\n now: new Date()\r\n }, opts);\r\n count();\r\n }\r\n };\r\n\r\n typeof options.ready === 'function' && options.ready();\r\n\r\n // 计算倒计时\r\n var count = (function fn(){\r\n var date = new Date(options.date);\r\n var now = new Date(options.now);\r\n var countTime = function(time){\r\n return time > 0 ? time : 0;\r\n }(date.getTime() - now.getTime());\r\n var result = {\r\n d: Math.floor(countTime/(1000*60*60*24)), // 天\r\n h: Math.floor(countTime/(1000*60*60)) % 24, // 时\r\n m: Math.floor(countTime/(1000*60)) % 60, // 分\r\n s: Math.floor(countTime/1000) % 60 // 秒\r\n };\r\n var next = function(){\r\n now.setTime(now.getTime() + 1000);\r\n options.now = now;\r\n count();\r\n };\r\n\r\n // 兼容旧版返回值\r\n if(args.length > 1) result = [result.d,result.h,result.m,result.s]\r\n\r\n // 计时 - 以秒间隔\r\n inst.timer = setTimeout(next, 1000);\r\n typeof options.clock === 'function' && options.clock(result, inst);\r\n\r\n // 计时完成\r\n if(countTime <= 0){\r\n clearTimeout(inst.timer);\r\n typeof options.done === 'function' && options.done(result, inst);\r\n }\r\n\r\n return fn;\r\n })();\r\n\r\n return inst;\r\n },\r\n\r\n // 某个时间在当前时间的多久前\r\n timeAgo: function(time, onlyDate){\r\n var that = this;\r\n var arr = [[], []];\r\n var stamp = new Date().getTime() - new Date(time).getTime();\r\n\r\n // 返回具体日期\r\n if(stamp > 1000*60*60*24*31){\r\n stamp = new Date(time);\r\n arr[0][0] = that.digit(stamp.getFullYear(), 4);\r\n arr[0][1] = that.digit(stamp.getMonth() + 1);\r\n arr[0][2] = that.digit(stamp.getDate());\r\n\r\n // 是否输出时间\r\n if(!onlyDate){\r\n arr[1][0] = that.digit(stamp.getHours());\r\n arr[1][1] = that.digit(stamp.getMinutes());\r\n arr[1][2] = that.digit(stamp.getSeconds());\r\n }\r\n return arr[0].join('-') + ' ' + arr[1].join(':');\r\n }\r\n\r\n // 30 天以内,返回「多久前」\r\n if(stamp >= 1000*60*60*24){\r\n return ((stamp/1000/60/60/24)|0) + ' 天前';\r\n } else if(stamp >= 1000*60*60){\r\n return ((stamp/1000/60/60)|0) + ' 小时前';\r\n } else if(stamp >= 1000*60*3){ // 3 分钟以内为:刚刚\r\n return ((stamp/1000/60)|0) + ' 分钟前';\r\n } else if(stamp < 0){\r\n return '未来';\r\n } else {\r\n return '刚刚';\r\n }\r\n },\r\n\r\n // 数字前置补零\r\n digit: function(num, length){\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|0) : num;\r\n },\r\n\r\n // 转化为日期格式字符\r\n toDateString: function(time, format, options){\r\n // 若 null 或空字符,则返回空字符\r\n if(time === null || time === '') return '';\r\n\r\n // 引用自 dayjs\r\n // https://github.com/iamkun/dayjs/blob/v1.11.9/src/constant.js#L30\r\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;\r\n var REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\r\n var that = this;\r\n\r\n var normalizeDate = function(date) {\r\n if(typeof date === 'undefined'){\r\n return new Date();\r\n }\r\n if(!isNaN(date)){\r\n return new Date(typeof date === 'string' ? parseInt(date) : date);\r\n }\r\n if(typeof date === 'string' && !/Z$/i.test(date)){\r\n var d = date.match(REGEX_PARSE);\r\n if(d){\r\n var m = d[2] - 1 || 0;\r\n var ms = (d[7] || '0').substring(0, 3);\r\n return new Date(\r\n d[1],\r\n m,\r\n d[3] || 1,\r\n d[4] || 0,\r\n d[5] || 0,\r\n d[6] || 0,\r\n ms\r\n );\r\n }\r\n }\r\n \r\n return new Date(date)\r\n }\r\n var date = normalizeDate(time);\r\n\r\n if(!date.getDate()) return hint.error('Invalid millisecond for \"util.toDateString(millisecond)\"'), '';\r\n\r\n var years = date.getFullYear();\r\n var month = date.getMonth();\r\n var days = date.getDate();\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n var seconds = date.getSeconds();\r\n var milliseconds = date.getMilliseconds();\r\n\r\n var defaultMeridiem = function(hours, minutes){\r\n var hm = hours * 100 + minutes;\r\n if (hm < 600) {\r\n return '凌晨';\r\n } else if (hm < 900) {\r\n return '早上';\r\n } else if (hm < 1100) {\r\n return '上午';\r\n } else if (hm < 1300) {\r\n return '中午';\r\n } else if (hm < 1800) {\r\n return '下午';\r\n }\r\n return '晚上';\r\n };\r\n\r\n var meridiem = (options && options.customMeridiem) || defaultMeridiem;\r\n\r\n var matches = {\r\n yy: function(){return String(years).slice(-2);},\r\n yyyy: function(){return that.digit(years, 4);},\r\n M: function(){return String(month + 1);},\r\n MM: function(){return that.digit(month + 1);},\r\n d: function(){return String(days);},\r\n dd: function(){return that.digit(days);},\r\n H: function(){return String(hours);},\r\n HH: function(){return that.digit(hours);},\r\n h: function(){return String(hours % 12 || 12);},\r\n hh: function(){return that.digit(hours % 12 || 12);},\r\n A: function(){return meridiem(hours, minutes);},\r\n m: function(){return String(minutes);},\r\n mm: function(){return that.digit(minutes);},\r\n s: function(){return String(seconds);},\r\n ss: function(){return that.digit(seconds);},\r\n SSS: function(){return that.digit(milliseconds, 3);}\r\n }\r\n\r\n format = format || 'yyyy-MM-dd HH:mm:ss';\r\n\r\n return format.replace(REGEX_FORMAT, function(match, $1) {\r\n return $1 || (matches[match] && matches[match]()) || match;\r\n });\r\n },\r\n\r\n // 转义 html\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 // 还原转义的 html\r\n unescape: function(html){\r\n if(html === undefined || html === null) html = '';\r\n html += '';\r\n\r\n return html.replace(/\\&amp;/g, '&')\r\n .replace(/\\&lt;/g, '<').replace(/\\&gt;/g, '>')\r\n .replace(/\\&#39;/g, '\\'').replace(/\\&quot;/g, '\"');\r\n },\r\n\r\n // 打开新窗口\r\n openWin: function(options){\r\n var win;\r\n options = options || {};\r\n win = options.window || window.open((options.url || ''), options.target, options.specs);\r\n if(options.url) return;\r\n win.document.open('text/html', 'replace');\r\n win.document.write(options.content || '');\r\n win.document.close();\r\n },\r\n\r\n // 让指定的元素保持在可视区域\r\n toVisibleArea: function(options){\r\n options = $.extend({\r\n margin: 160, // 触发动作的边界值\r\n duration: 200, // 动画持续毫秒数\r\n type: 'y' // 触发方向x 水平、y 垂直\r\n }, options);\r\n\r\n if(!options.scrollElem[0] || !options.thisElem[0]) return;\r\n\r\n var scrollElem = options.scrollElem // 滚动元素\r\n var thisElem = options.thisElem // 目标元素\r\n var vertical = options.type === 'y' // 是否垂直方向\r\n var SCROLL_NAME = vertical ? 'scrollTop' : 'scrollLeft' // 滚动方法\r\n var OFFSET_NAME = vertical ? 'top' : 'left' // 坐标方式\r\n var scrollValue = scrollElem[SCROLL_NAME]() // 当前滚动距离\r\n var size = scrollElem[vertical ? 'height' : 'width']() // 滚动元素的尺寸\r\n var scrollOffset = scrollElem.offset()[OFFSET_NAME] // 滚动元素所处位置\r\n var thisOffset = thisElem.offset()[OFFSET_NAME] - scrollOffset // 目标元素当前的所在位置\r\n var obj = {};\r\n\r\n // 边界满足条件\r\n if(thisOffset > size - options.margin || thisOffset < options.margin){\r\n obj[SCROLL_NAME] = thisOffset - size/2 + scrollValue\r\n scrollElem.animate(obj, options.duration);\r\n }\r\n },\r\n\r\n /**\r\n * 批量事件\r\n * @param {string} [attr=\"lay-on\"] - 触发事件的元素属性名\r\n * @param {Object.<string, Function>} events - 事件集合\r\n * @param {Object} [options] - 参数的更多选项\r\n * @param {(string|HTMLElement|JQuery)} [options.elem=\"body\"] - 触发事件的委托元素\r\n * @param {string} [options.trigger=\"click\"] - 事件触发的方式\r\n * @returns {Object} 返回当前 events 参数设置的事件集合\r\n */\r\n on: function(attr, events, options) {\r\n // 若参数一为 object 类型,则为事件集,且省略 attr\r\n if (typeof attr === 'object') {\r\n options = events || {};\r\n events = attr;\r\n attr = options.attr || 'lay-on'; // 默认属性名\r\n }\r\n\r\n // 更多选项\r\n options = $.extend({\r\n elem: 'body',\r\n trigger: 'click'\r\n }, typeof options === 'object' ? options : {\r\n trigger: options // 兼容旧版\r\n });\r\n\r\n var elem = options.elem = $(options.elem);\r\n var attrSelector = '['+ attr +']';\r\n var DATANAME = 'UTIL_ON_DATA'; // 缓存在委托元素上的 data-* 属性名\r\n\r\n if (!elem[0]) return; // 若委托元素不存在\r\n\r\n // 初始化 data 默认值,以委托元素为存储单元\r\n if (!elem.data(DATANAME)) {\r\n elem.data(DATANAME, {\r\n events: {}\r\n });\r\n }\r\n\r\n // 读取 data 缓存\r\n var dataCache = elem.data(DATANAME);\r\n\r\n // 根据 attr 和 trigger 的组合作为 key\r\n var key = attr + '_' + options.trigger;\r\n\r\n // 根据 key 记录事件集合\r\n events = dataCache.events[key] = $.extend(true, dataCache.events[key], events);\r\n\r\n\r\n // 清除事件委托,避免重复绑定\r\n var trigger = options.trigger + '.lay_util_on';\r\n elem.off(trigger, attrSelector);\r\n\r\n // 绑定事件委托\r\n elem.on(trigger, attrSelector, function(e) {\r\n var othis = $(this);\r\n var attrValue = othis.attr(attr);\r\n typeof events[attrValue] === 'function' && events[attrValue].call(this, othis, e);\r\n });\r\n\r\n return events;\r\n }\r\n };\r\n\r\n // 兼容旧版\r\n util.event = util.on;\r\n\r\n // 输出接口\r\n exports('util', util);\r\n});\r\n","/**\n * dropdown \n * 下拉菜单组件\n */\n\nlayui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){\n \"use strict\";\n \n var $ = layui.$;\n var laytpl = layui.laytpl;\n var util = layui.util;\n var hint = layui.hint();\n var device = layui.device();\n var clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown');\n \n // 模块名\n var MOD_NAME = 'dropdown';\n var MOD_INDEX = 'layui_'+ MOD_NAME +'_index'; // 模块索引名\n var MOD_INDEX_OPENED = MOD_INDEX + '_opened';\n var MOD_ID = 'lay-' + MOD_NAME + '-id';\n\n // 外部接口\n var dropdown = {\n config: {\n customName: { // 自定义 data 字段名\n id: 'id',\n title: 'title',\n children: 'child'\n }\n },\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\n\n // 设置全局项\n set: function(options){\n var that = this;\n that.config = $.extend({}, that.config, options);\n return that;\n },\n \n // 事件\n on: function(events, callback){\n return layui.onevent.call(this, MOD_NAME, events, callback);\n }\n };\n\n // 操作当前实例\n var thisModule = function(){\n var that = this;\n var options = that.config;\n var id = options.id;\n\n return {\n config: options,\n // 重置实例\n reload: function(options){\n that.reload.call(that, options);\n },\n reloadData: function(options){\n dropdown.reloadData(id, options);\n },\n close: function () {\n that.remove()\n },\n open: function () {\n that.render()\n }\n }\n };\n\n // 字符常量\n var STR_ELEM = 'layui-dropdown';\n var STR_HIDE = 'layui-hide';\n var STR_DISABLED = 'layui-disabled';\n var STR_NONE = 'layui-none';\n var STR_ITEM_UP = 'layui-menu-item-up';\n var STR_ITEM_DOWN = 'layui-menu-item-down';\n var STR_MENU_TITLE = 'layui-menu-body-title';\n var STR_ITEM_GROUP = 'layui-menu-item-group';\n var STR_ITEM_PARENT = 'layui-menu-item-parent';\n var STR_ITEM_DIV = 'layui-menu-item-divider';\n var STR_ITEM_CHECKED = 'layui-menu-item-checked';\n var STR_ITEM_CHECKED2 = 'layui-menu-item-checked2';\n var STR_MENU_PANEL = 'layui-menu-body-panel';\n var STR_MENU_PANEL_L = 'layui-menu-body-panel-left';\n var STR_ELEM_SHADE = 'layui-dropdown-shade';\n \n var STR_GROUP_TITLE = '.'+ STR_ITEM_GROUP + '>.'+ STR_MENU_TITLE;\n\n // 构造器\n var Class = function(options){\n var that = this;\n that.index = ++dropdown.index;\n that.config = $.extend({}, that.config, dropdown.config, options);\n that.init();\n };\n\n // 默认配置\n Class.prototype.config = {\n trigger: 'click', // 事件类型\n content: '', // 自定义菜单内容\n className: '', // 自定义样式类名\n style: '', // 设置面板 style 属性\n show: false, // 是否初始即显示菜单面板\n isAllowSpread: true, // 是否允许菜单组展开收缩\n isSpreadItem: true, // 是否初始展开子菜单\n data: [], // 菜单数据结构\n delay: [200, 300], // 延时显示或隐藏的毫秒数,若为 number 类型则表示显示和隐藏的延迟时间相同trigger 为 hover 时才生效\n shade: 0, // 遮罩\n accordion: false, // 手风琴效果,仅菜单组生效。基础菜单需要在容器上追加 'lay-accordion' 属性。\n closeOnClick: true // 面板打开后,再次点击目标元素时是否关闭面板。行为取决于所使用的触发事件类型\n };\n \n // 重载实例\n Class.prototype.reload = function(options, type){\n var that = this;\n that.config = $.extend({}, that.config, options);\n that.init(true, type);\n };\n\n // 初始化准备\n Class.prototype.init = function(rerender, type){\n var that = this;\n var options = that.config;\n \n // 若 elem 非唯一\n var elem = $(options.elem);\n if(elem.length > 1){\n layui.each(elem, function(){\n dropdown.render($.extend({}, options, {\n elem: this\n }));\n });\n return that;\n }\n\n // 合并 lay-options 属性上的配置信息\n $.extend(options, lay.options(elem[0]));\n\n // 若重复执行 render则视为 reload 处理\n if(!rerender && elem.attr(MOD_ID)){\n var newThat = thisModule.getThis(elem.attr(MOD_ID));\n if(!newThat) return;\n return newThat.reload(options, type);\n }\n\n options.elem = $(options.elem);\n options.target = $('body'); // 后续考虑开放 target 元素\n \n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\n options.id = 'id' in options ? options.id : (\n elem.attr('id') || that.index\n );\n\n thisModule.that[options.id] = that; // 记录当前实例对象\n elem.attr(MOD_ID, options.id); // 目标元素已渲染过的标记\n\n // 初始化自定义字段名\n options.customName = $.extend({}, dropdown.config.customName, options.customName);\n\n // 若传入 hover则解析为 mouseenter\n if (options.trigger === 'hover') {\n options.trigger = 'mouseenter';\n }\n\n // 初始即显示或者面板弹出之后执行了刷新数据\n if(options.show || (type === 'reloadData' && that.mainElem && options.target.find(that.mainElem.get(0)).length)) that.render(type);\n\n // 事件\n that.events();\n };\n \n // 渲染\n Class.prototype.render = function(type) {\n var that = this;\n var options = that.config;\n var customName = options.customName;\n \n // 默认菜单内容\n var getDefaultView = function(){\n var elemUl = $('<ul class=\"layui-menu layui-dropdown-menu\"></ul>');\n if(options.data.length > 0 ){\n eachItemView(elemUl, options.data)\n } else {\n elemUl.html('<li class=\"layui-menu-item-none\">暂无数据</li>');\n }\n return elemUl;\n };\n \n // 遍历菜单项\n var eachItemView = function(views, data){\n // var views = [];\n\n layui.each(data, function(index, item){\n // 是否存在子级\n var isChild = item[customName.children] && item[customName.children].length > 0;\n var isSpreadItem = ('isSpreadItem' in item) ? item.isSpreadItem : options.isSpreadItem\n var title = function(title){\n var templet = item.templet || options.templet;\n if(templet){\n title = typeof templet === 'function' \n ? templet(item)\n : laytpl(templet).render(item);\n }\n return title;\n }(util.escape(item[customName.title]));\n \n // 初始类型\n var type = function(){\n if(isChild){\n item.type = item.type || 'parent';\n }\n if(item.type){\n return ({\n group: 'group'\n ,parent: 'parent'\n ,'-': '-'\n })[item.type] || 'parent';\n }\n return '';\n }();\n\n if(type !== '-' && (!item[customName.title] && !item[customName.id] && !isChild)) return;\n \n //列表元素\n var viewLi = $(['<li'+ function(){\n var className = {\n group: 'layui-menu-item-group'+ (\n options.isAllowSpread ? (\n isSpreadItem ? ' layui-menu-item-down' : ' layui-menu-item-up'\n ) : ''\n )\n ,parent: STR_ITEM_PARENT\n ,'-': 'layui-menu-item-divider'\n };\n if(isChild || type){\n return ' class=\"'+ className[type] +'\"';\n }\n return item.disabled ? ' class=\"'+ STR_DISABLED +'\"' : '';\n }() +'>'\n \n //标题区\n ,function(){\n //是否超文本\n var viewText = ('href' in item) ? (\n '<a href=\"'+ item.href +'\" target=\"'+ (item.target || '_self') +'\">'+ title +'</a>'\n ) : title;\n \n //是否存在子级\n if(isChild){\n return '<div class=\"'+ STR_MENU_TITLE +'\">'+ viewText + function(){\n if(type === 'parent'){\n return '<i class=\"layui-icon layui-icon-right\"></i>';\n } else if(type === 'group' && options.isAllowSpread){\n return '<i class=\"layui-icon layui-icon-'+ (isSpreadItem ? 'up' : 'down') +'\"></i>';\n } else {\n return '';\n }\n }() +'</div>'\n \n }\n return '<div class=\"'+ STR_MENU_TITLE +'\">'+ viewText +'</div>';\n }()\n ,'</li>'].join(''));\n \n viewLi.data('item', item);\n \n //子级区\n if(isChild){\n var elemPanel = $('<div class=\"layui-panel layui-menu-body-panel\"></div>');\n var elemUl = $('<ul></ul>');\n\n if(type === 'parent'){\n elemPanel.append(eachItemView(elemUl, item[customName.children]));\n viewLi.append(elemPanel);\n } else {\n viewLi.append(eachItemView(elemUl, item[customName.children]));\n }\n }\n\n views.append(viewLi);\n });\n return views;\n };\n \n // 主模板\n var TPL_MAIN = [\n '<div class=\"layui-dropdown layui-border-box layui-panel layui-anim layui-anim-downbit\" ' + MOD_ID + '=\"' + options.id + '\">',\n '</div>'\n ].join('');\n\n // 重载或插入面板内容\n var content = options.content || getDefaultView();\n var mainElemExisted = thisModule.findMainElem(options.id);\n if (type === 'reloadData' && mainElemExisted.length) { // 是否仅重载数据\n var mainElem = that.mainElem = mainElemExisted;\n mainElemExisted.html(content);\n } else { // 常规渲染\n var mainElem = that.mainElem = $(TPL_MAIN);\n mainElem.append(content);\n\n // 初始化某些属性\n mainElem.addClass(options.className);\n mainElem.attr('style', options.style);\n\n // 辞旧迎新\n that.remove(dropdown.thisId);\n options.target.append(mainElem);\n options.elem.data(MOD_INDEX_OPENED, true); // 面板已打开的标记\n\n // 遮罩\n var shade = options.shade ? ('<div class=\"'+ STR_ELEM_SHADE +'\" style=\"'+ ('z-index:'+ (mainElem.css('z-index')-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'\"></div>') : '';\n mainElem.before(shade);\n\n // 如果是鼠标移入事件,则鼠标移出时自动关闭\n if(options.trigger === 'mouseenter'){\n mainElem.on('mouseenter', function(){\n clearTimeout(thisModule.timer);\n }).on('mouseleave', function(){\n that.delayRemove();\n });\n }\n }\n\n that.position(); // 定位坐标\n dropdown.thisId = options.id; // 当前打开的面板 id\n\n // 阻止全局事件\n mainElem.find('.layui-menu').on(clickOrMousedown, function(e){\n layui.stope(e);\n });\n\n // 触发菜单列表事件\n mainElem.find('.layui-menu li').on('click', function(e){\n var othis = $(this);\n var data = othis.data('item') || {};\n var isChild = data[customName.children] && data[customName.children].length > 0;\n var isClickAllScope = options.clickScope === 'all'; // 是否所有父子菜单均触发点击事件\n\n if(data.disabled) return; // 菜单项禁用状态\n \n // 普通菜单项点击后的回调及关闭面板\n if((!isChild || isClickAllScope) && data.type !== '-'){\n var ret = typeof options.click === 'function' \n ? options.click(data, othis, e) \n : null;\n \n ret === false || (isChild || that.remove());\n layui.stope(e);\n }\n });\n \n // 触发菜单组展开收缩\n mainElem.find(STR_GROUP_TITLE).on('click', function(e){\n var othis = $(this);\n var elemGroup = othis.parent();\n var data = elemGroup.data('item') || {};\n \n if(data.type === 'group' && options.isAllowSpread){\n thisModule.spread(elemGroup, options.accordion);\n }\n });\n\n // 组件打开完毕的事件\n typeof options.ready === 'function' && options.ready(mainElem, options.elem);\n };\n \n // 位置定位\n Class.prototype.position = function(obj){\n var that = this;\n var options = that.config;\n \n lay.position(options.elem[0], that.mainElem[0], {\n position: options.position,\n e: that.e,\n clickType: options.trigger === 'contextmenu' ? 'right' : null,\n align: options.align || null\n });\n };\n \n // 移除面板\n Class.prototype.remove = function(id) {\n id = id || this.config.id;\n var that = thisModule.getThis(id); // 根据 id 查找对应的实例\n if (!that) return;\n\n var options = that.config;\n var mainElem = thisModule.findMainElem(id);\n\n // 若存在已打开的面板元素,则移除\n if (mainElem[0]) {\n mainElem.prev('.' + STR_ELEM_SHADE).remove(); // 先移除遮罩\n mainElem.remove();\n options.elem.removeData(MOD_INDEX_OPENED);\n delete dropdown.thisId;\n typeof options.close === 'function' && options.close(options.elem);\n }\n };\n\n Class.prototype.normalizedDelay = function(){\n var that = this;\n var options = that.config;\n var delay = [].concat(options.delay);\n \n return {\n show: delay[0],\n hide: delay[1] !== undefined ? delay[1] : delay[0] \n }\n }\n \n // 延迟移除面板\n Class.prototype.delayRemove = function(){\n var that = this;\n var options = that.config;\n clearTimeout(thisModule.timer);\n\n thisModule.timer = setTimeout(function(){\n that.remove();\n }, that.normalizedDelay().hide);\n };\n \n // 事件\n Class.prototype.events = function(){\n var that = this;\n var options = that.config;\n\n // 是否鼠标移入时触发\n var isMouseEnter = options.trigger === 'mouseenter';\n var trigger = options.trigger + '.lay_dropdown_render';\n\n // 始终先解除上一个触发元素的事件(如重载时改变 elem 的情况)\n if (that.thisEventElem) that.thisEventElem.off(trigger);\n that.thisEventElem = options.elem;\n\n // 触发元素事件\n options.elem.off(trigger).on(trigger, function(e) {\n clearTimeout(thisModule.timer);\n that.e = e;\n\n // 主面板是否已打开\n var opened = options.elem.data(MOD_INDEX_OPENED);\n\n // 若为鼠标移入事件,则延迟触发\n if (isMouseEnter) {\n if (!opened) {\n thisModule.timer = setTimeout(function(){\n that.render();\n }, that.normalizedDelay().show);\n }\n } else {\n // 若为 click 事件,则根据主面板状态,自动切换打开与关闭\n if (options.closeOnClick && opened && options.trigger === 'click') {\n that.remove();\n } else {\n that.render();\n }\n }\n\n e.preventDefault();\n });\n \n // 如果是鼠标移入事件\n if (isMouseEnter) {\n // 执行鼠标移出事件\n options.elem.on('mouseleave', function(){\n that.delayRemove();\n });\n }\n };\n \n // 记录所有实例\n thisModule.that = {}; // 记录所有实例对象\n \n // 获取当前实例对象\n thisModule.getThis = function(id) {\n if (id === undefined) {\n throw new Error('ID argument required');\n }\n return thisModule.that[id];\n };\n\n // 根据 id 从页面查找组件主面板元素\n thisModule.findMainElem = function(id) {\n return $('.' + STR_ELEM + '[' + MOD_ID + '=\"' + id + '\"]');\n };\n \n // 设置菜单组展开和收缩状态\n thisModule.spread = function(othis, isAccordion){\n var contentElem = othis.children('ul');\n var needSpread = othis.hasClass(STR_ITEM_UP);\n var ANIM_MS = 200;\n\n // 动画执行完成后的操作\n var complete = function() {\n $(this).css({'display': ''}); // 剔除临时 style以适配外部样式的状态重置;\n };\n\n // 动画是否正在执行\n if (contentElem.is(':animated')) return;\n\n // 展开\n if (needSpread) {\n othis.removeClass(STR_ITEM_UP).addClass(STR_ITEM_DOWN);\n contentElem.hide().stop().slideDown(ANIM_MS, complete);\n } else { // 收缩\n contentElem.stop().slideUp(ANIM_MS, complete);\n othis.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\n }\n\n // 手风琴\n if (needSpread && isAccordion) {\n var groupSibs = othis.siblings('.' + STR_ITEM_DOWN);\n groupSibs.children('ul').stop().slideUp(ANIM_MS, complete);\n groupSibs.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\n }\n };\n \n // 全局事件\n (function(){\n var _WIN = $(window);\n var _DOC = $(document);\n \n // 自适应定位\n _WIN.on('resize', function(){\n if(!dropdown.thisId) return;\n var that = thisModule.getThis(dropdown.thisId);\n if(!that) return;\n \n if((that.mainElem && !that.mainElem[0]) || !$('.'+ STR_ELEM)[0]){\n return false;\n }\n \n var options = that.config;\n \n if(options.trigger === 'contextmenu'){\n that.remove();\n } else {\n that.position();\n }\n });\n \n \n \n // 点击任意处关闭\n lay(_DOC).on(clickOrMousedown, function(e){\n if(!dropdown.thisId) return;\n var that = thisModule.getThis(dropdown.thisId)\n if(!that) return;\n \n var options = that.config;\n var isTopElem = lay.isTopElem(options.elem[0]);\n var isCtxMenu = options.trigger === 'contextmenu';\n \n // 若触发的是绑定的元素,或者属于绑定元素的子元素,则不关闭\n // 满足条件:当前绑定的元素是 body document或者是鼠标右键事件时忽略绑定元素\n var isTriggerTarget = !(isTopElem || isCtxMenu) && (options.elem[0] === e.target || options.elem.find(e.target)[0]);\n var isPanelTarget = that.mainElem && (e.target === that.mainElem[0] || that.mainElem.find(e.target)[0]);\n if(isTriggerTarget || isPanelTarget) return;\n // 处理移动端点击穿透问题\n if(e.type === 'touchstart' && options.elem.data(MOD_INDEX_OPENED)){\n $(e.target).hasClass(STR_ELEM_SHADE) && e.preventDefault();\n }\n\n // 点击 dropdown 外部时的回调\n if(typeof options.onClickOutside === 'function'){\n var shouldClose = options.onClickOutside(e);\n if(shouldClose === false) return;\n }\n \n that.remove();\n }, {passive: false});\n \n // 基础菜单的静态元素事件\n var ELEM_LI = '.layui-menu:not(.layui-dropdown-menu) li';\n _DOC.on('click', ELEM_LI, function(e){\n var othis = $(this);\n var parent = othis.parents('.layui-menu').eq(0);\n var isChild = othis.hasClass(STR_ITEM_GROUP) || othis.hasClass(STR_ITEM_PARENT);\n var filter = parent.attr('lay-filter') || parent.attr('id');\n var options = lay.options(this);\n \n // 非触发元素\n if(othis.hasClass(STR_ITEM_DIV)) return;\n\n // 非菜单组\n if(!isChild){\n // 选中\n parent.find('.'+ STR_ITEM_CHECKED).removeClass(STR_ITEM_CHECKED); // 清除选中样式\n parent.find('.'+ STR_ITEM_CHECKED2).removeClass(STR_ITEM_CHECKED2); // 清除父级菜单选中样式\n othis.addClass(STR_ITEM_CHECKED); //添加选中样式\n othis.parents('.'+ STR_ITEM_PARENT).addClass(STR_ITEM_CHECKED2); // 添加父级菜单选中样式\n\n options.title = options.title || $.trim(othis.children('.'+ STR_MENU_TITLE).text());\n \n // 触发事件\n layui.event.call(this, MOD_NAME, 'click('+ filter +')', options);\n }\n });\n \n // 基础菜单的展开收缩事件\n _DOC.on('click', (ELEM_LI + STR_GROUP_TITLE), function(e){\n var othis = $(this);\n var elemGroup = othis.parents('.'+ STR_ITEM_GROUP +':eq(0)');\n var options = lay.options(elemGroup[0]);\n var isAccordion = typeof othis.parents('.layui-menu').eq(0).attr('lay-accordion') === 'string';\n\n if(('isAllowSpread' in options) ? options.isAllowSpread : true){\n thisModule.spread(elemGroup, isAccordion);\n }\n });\n \n // 判断子级菜单是否超出屏幕\n var ELEM_LI_PAR = '.layui-menu .'+ STR_ITEM_PARENT\n _DOC.on('mouseenter', ELEM_LI_PAR, function(e){\n var othis = $(this);\n var elemPanel = othis.find('.'+ STR_MENU_PANEL);\n\n if(!elemPanel[0]) return;\n var rect = elemPanel[0].getBoundingClientRect();\n \n // 是否超出右侧屏幕\n if(rect.right > _WIN.width()){\n elemPanel.addClass(STR_MENU_PANEL_L);\n // 不允许超出左侧屏幕\n rect = elemPanel[0].getBoundingClientRect();\n if(rect.left < 0){\n elemPanel.removeClass(STR_MENU_PANEL_L);\n }\n }\n \n // 是否超出底部屏幕\n if(rect.bottom > _WIN.height()){\n elemPanel.eq(0).css('margin-top', -(rect.bottom - _WIN.height() + 5));\n }\n }).on('mouseleave', ELEM_LI_PAR, function(e){\n var othis = $(this)\n var elemPanel = othis.children('.'+ STR_MENU_PANEL);\n \n elemPanel.removeClass(STR_MENU_PANEL_L);\n elemPanel.css('margin-top', 0);\n });\n \n })();\n\n // 关闭面板\n dropdown.close = function(id){\n var that = thisModule.getThis(id);\n if(!that) return this;\n \n that.remove();\n return thisModule.call(that);\n };\n\n // 打开面板\n dropdown.open = function(id){\n var that = thisModule.getThis(id);\n if(!that) return this;\n \n that.render();\n return thisModule.call(that);\n }\n \n // 重载实例\n dropdown.reload = function(id, options, type){\n var that = thisModule.getThis(id);\n if(!that) return this;\n\n that.reload(options, type);\n return thisModule.call(that);\n };\n\n // 仅重载数据\n dropdown.reloadData = function(){\n var args = $.extend([], arguments);\n args[2] = 'reloadData';\n\n // 重载时,与数据相关的参数\n var dataParams = new RegExp('^('+ [\n 'data', 'templet', 'content'\n ].join('|') + ')$');\n\n // 过滤与数据无关的参数\n layui.each(args[1], function (key, value) {\n if(!dataParams.test(key)){\n delete args[1][key];\n }\n });\n\n return dropdown.reload.apply(null, args);\n };\n\n // 核心入口\n dropdown.render = function(options){\n var inst = new Class(options);\n return thisModule.call(inst);\n };\n\n exports(MOD_NAME, dropdown);\n});\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 var 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 tipsAlways: false, //文字提示,始终开启\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.precision = function(){\r\n var that = this;\r\n var options = that.config;\r\n var precisions = $.map([options.min, options.max, options.step], function(v, i){\r\n var decimalArr = String(v).split('.');\r\n return decimalArr[1] ? decimalArr[1].length : 0;\r\n })\r\n return Math.max.apply(null, precisions);\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 //间隔值不能小于等于 0\r\n if(options.step <= 0) 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 = (options.value[0] - options.min) / (options.max - options.min) * 100;\r\n var scaleSec = (options.value[1] - options.min) / (options.max - options.min) * 100;\r\n var 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 = (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 +'\" '+ (options.tipsAlways ? '' : 'style=\"display:none;\"') +'></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 var 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 * @description 设置提示文本内容\r\n * @param {Element} sliderWrapBtnElem 提示文本节点元素\r\n */\r\n function setSliderTipsTxt(sliderWrapBtnElem) {\r\n var value = sliderWrapBtnElem.parent().data('value');\r\n var tipsTxt = options.setTips ? options.setTips(value) : value;\r\n that.elemTemp.find('.' + SLIDER_TIPS).html(tipsTxt);\r\n }\r\n\r\n /**\r\n * @description 计算提示文本元素的 position left\r\n * @param {Element} sliderWrapBtnElem 提示文本节点元素\r\n */\r\n function calcSliderTipsLeft(sliderWrapBtnElem){\r\n var sliderWidth = options.type === 'vertical' ? options.height : that.elemTemp[0].offsetWidth;\r\n var sliderWrap = that.elemTemp.find('.' + SLIDER_WRAP);\r\n var tipsLeft = options.type === 'vertical' ? (sliderWidth - sliderWrapBtnElem.parent()[0].offsetTop - sliderWrap.height()) : sliderWrapBtnElem.parent()[0].offsetLeft;\r\n var left = tipsLeft / sliderWidth * 100;\r\n return left\r\n }\r\n\r\n /**\r\n * @description 设置提示文本元素的 position left\r\n * @param {number} left 要设置的 left 的大小\r\n */\r\n function setSliderTipsLeft(left) {\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 }\r\n\r\n //判断是否要始终显示提示文本\r\n if(options.tips){\r\n if(options.tipsAlways){\r\n var sliderWrapBtnElem = that.elemTemp.find('.' + SLIDER_WRAP_BTN);\r\n setSliderTipsTxt(sliderWrapBtnElem)\r\n var left = calcSliderTipsLeft(sliderWrapBtnElem);\r\n setSliderTipsLeft(left)\r\n }else{\r\n //划过滑块显示数值\r\n var timer;\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).on('mouseover', function(){\r\n setSliderTipsTxt($(this))\r\n var left = calcSliderTipsLeft($(this));\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n setSliderTipsLeft(left)\r\n }, 300);\r\n }).on('mouseout', function(){\r\n clearTimeout(timer);\r\n if(!options.tipsAlways){\r\n that.elemTemp.find('.' + SLIDER_TIPS).css(\"display\", \"none\");\r\n }\r\n });\r\n }\r\n }\r\n };\r\n\r\n //滑块滑动\r\n Class.prototype.slide = function(setValue, value, i){\r\n var that = this;\r\n var options = that.config;\r\n var sliderAct = that.elemTemp;\r\n var sliderWidth = function(){\r\n return options.type === 'vertical' ? options.height : sliderAct[0].offsetWidth\r\n };\r\n var sliderWrap = sliderAct.find('.' + SLIDER_WRAP);\r\n var sliderTxt = sliderAct.next('.' + SLIDER_INPUT);\r\n var inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val();\r\n var step = 100 / ((options.max - options.min) / options.step);\r\n var precision = that.precision();\r\n var 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 var 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 + (options.max - options.min) * offsetValue / 100;\r\n selfValue = Number(parseFloat(selfValue).toFixed(precision));\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 var valueTo = function(value){\r\n var oldLeft = value / sliderWidth() * 100 / step;\r\n var 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 var elemMove = $(['<div class=\"layui-auxiliar-moving\" id=\"LAY-slider-moving\"></div'].join(''));\r\n var createMoveElem = function(sliderBtnElem, move, up){\r\n var upCall = function(){\r\n // 移动端延时一秒关闭\r\n up && up(lay.touchEventsSupported() ? 1000 : 0);\r\n elemMove.remove();\r\n options.done && options.done(that.value);\r\n // 移动端\r\n if (lay.touchEventsSupported()) {\r\n sliderBtnElem[0].removeEventListener('touchmove', move, lay.passiveSupported ? { passive: false } : false);\r\n sliderBtnElem[0].removeEventListener('touchend', upCall);\r\n sliderBtnElem[0].removeEventListener('touchcancel', upCall);\r\n }\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 if (lay.touchEventsSupported()) {\r\n sliderBtnElem[0].addEventListener('touchmove', move, lay.passiveSupported ? { passive: false } : false);\r\n sliderBtnElem[0].addEventListener('touchend', upCall);\r\n sliderBtnElem[0].addEventListener('touchcancel', upCall);\r\n }\r\n };\r\n\r\n //动态赋值\r\n if(setValue === 'set'){\r\n return change((value - options.min) / (options.max - options.min) * 100 / step, i, 'done');\r\n } \r\n\r\n //滑块滑动\r\n sliderAct.find('.' + SLIDER_WRAP_BTN).each(function(index){\r\n var othis = $(this);\r\n othis.on('mousedown touchstart', function(e){\r\n e = e || window.event;\r\n if(e.type === 'touchstart'){\r\n e.clientX = e.originalEvent.touches[0].clientX;\r\n e.clientY = e.originalEvent.touches[0].clientY;\r\n }\r\n\r\n var oldleft = othis.parent()[0].offsetLeft;\r\n var 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 if (e.type === 'touchmove') {\r\n e.clientX = e.touches[0].clientX;\r\n e.clientY = e.touches[0].clientY;\r\n }\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(delay){\r\n othis.removeClass(ELEM_HOVER);\r\n if(!options.tipsAlways){\r\n setTimeout(function(){\r\n sliderAct.find('.' + SLIDER_TIPS).hide();\r\n }, delay);\r\n }\r\n };\r\n\r\n createMoveElem(othis, 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 var 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)/180*100\r\n ,_s = (choose[0].offsetLeft)/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 // 1. 不触发游标上绑定的事件,以提高性能,使滑动更流畅\r\n // 2. 游标上的事件需要冒泡到颜色拾取区域,用来模拟拖动游标的效果\r\n var needTrigger = true;\r\n var needStopPropagation = true;\r\n\r\n //右侧主色选择\r\n slider.on('mousedown', function(e, triggerEvent){\r\n var oldtop = this.offsetTop;\r\n var oldy = e.clientY === undefined ? triggerEvent.clientY : 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 needStopPropagation && layui.stope(e);\r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n \r\n side.on('mousedown', 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 needTrigger && slider.trigger('mousedown', e);\r\n });\r\n \r\n //中间小圆点颜色选择\r\n choose.on('mousedown', function(e, triggerEvent){\r\n var oldtop = this.offsetTop;\r\n var oldleft = this.offsetLeft;\r\n var oldy = e.clientY === undefined ? triggerEvent.clientY : e.clientY;\r\n var oldx = e.clientX === undefined ? triggerEvent.clientX : 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\r\n ,maxw = basis[0].offsetWidth;\r\n if(top < 0)top = 0;\r\n if(top > maxh)top = maxh;\r\n if(left < 0)left = 0;\r\n if(left > maxw)left = maxw;\r\n var s = left/260*100\r\n ,b = 100 - top/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 needStopPropagation && 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 + $win.scrollTop()\r\n ,left = e.clientX - $(this).offset().left + $win.scrollLeft()\r\n if(top < 0)top = 0;\r\n if(top > this.offsetHeight)top = this.offsetHeight;\r\n if(left < 0)left = 0;\r\n if(left > this.offsetWidth)left = this.offsetWidth;\r\n var s = left/260*100\r\n ,b = 100 - top/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 needTrigger && choose.trigger('mousedown', e);\r\n });\r\n \r\n //底部透明度选择\r\n alphaslider.on('mousedown', function(e, triggerEvent){\r\n var oldleft = this.offsetLeft;\r\n var oldx = e.clientX === undefined ? triggerEvent.clientX : 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 needStopPropagation && layui.stope(e);\r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n alphacolor.on('mousedown', 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 needTrigger && alphaslider.trigger('mousedown', e);\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 if(!lay.touchEventsSupported()) return;\r\n // 触摸事件模拟\r\n layui.each([\r\n {elem: side, eventType: 'mousedown'},\r\n {elem: alphacolor, eventType: 'mousedown'},\r\n {elem: basis, eventType: 'mousedown'}\r\n ], function(i, obj){\r\n lay.touchSwipe(obj.elem, {\r\n onTouchStart: function(){\r\n needTrigger = false;\r\n needStopPropagation = false;\r\n },\r\n onTouchMove: function(e){\r\n touchHandler(e, obj.eventType)\r\n },\r\n onTouchEnd: function(){\r\n elemMove.remove();\r\n needTrigger = true;\r\n needStopPropagation = true;\r\n }\r\n })\r\n })\r\n\r\n function touchHandler(event, eventType) {\r\n var pointer = event.touches[0];\r\n var simulatedEvent = document.createEvent(\"MouseEvent\");\r\n\r\n simulatedEvent.initMouseEvent(eventType, \r\n true, true, window, 1, \r\n pointer.screenX, pointer.screenY,pointer.clientX, pointer.clientY, \r\n false, false, false, false, 0, null\r\n );\r\n pointer.target.dispatchEvent(simulatedEvent);\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;\r\n var left = s/100*260;\r\n var basisElem = that.elemPicker.find('.' + PICKER_BASIS)[0];\r\n \r\n that.elemPicker.find('.' + PICKER_SIDE_SLIDER).css(\"top\", sidetop); //滑块的top\r\n basisElem.style.background = '#' + hex; //颜色选择器的背景\r\n \r\n //选择器的top left\r\n that.elemPicker.find('.' + PICKER_BASIS_CUR).css({\r\n \"top\": top / basisElem.offsetHeight * 100 + '%',\r\n \"left\": left / basisElem.offsetWidth * 100 + '%' \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.id ? 'lay-id=\"' + options.id + '\"' : '') + '>'+ (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, tabElem);\r\n return this;\r\n };\r\n \r\n /**\r\n * 外部 Tab 删除\r\n * @param {string} filter - 标签主容器 lay-filter 值\r\n * @param {string} layid - 标签头 lay-id 值\r\n * @param {boolean} force - 是否强制删除\r\n * @returns {this}\r\n */\r\n Element.prototype.tabDelete = function(filter, layid, force){\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.call(liElem[0], {\r\n liElem: liElem,\r\n force: force\r\n });\r\n return this;\r\n };\r\n \r\n /**\r\n * 外部 Tab 切换\r\n * @param {string} filter - 标签主容器 lay-filter 值\r\n * @param {string} layid - 标签头 lay-id 值\r\n * @param {boolean} force - 是否强制切换\r\n * @returns {this}\r\n */\r\n Element.prototype.tabChange = function(filter, layid, force){\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 force: force\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 = $(options.headerElem).index($(this));\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 var hasId = othis.attr('lay-id');\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 // 若非强制切换,则根据 tabBeforeChange 事件的返回结果决定是否切换\r\n if (!obj.force) {\r\n var liThis = othis.siblings('.' + THIS);\r\n var shouldChange = layui.event.call(this, MOD_NAME, 'tabBeforeChange('+ filter +')', {\r\n elem: parents,\r\n from: {\r\n index: othis.parent().children('li').index(liThis),\r\n id: liThis.attr('lay-id')\r\n },\r\n to: {\r\n index: index,\r\n id: hasId\r\n },\r\n });\r\n if(shouldChange === false) return;\r\n }\r\n \r\n // 执行切换\r\n if(!(isJump || unselect)){\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n if(hasId){\r\n var contentElem = item.filter('[lay-id=\"' + hasId + '\"]');\r\n contentElem = contentElem.length ? contentElem : item.eq(index);\r\n contentElem.addClass(SHOW).siblings().removeClass(SHOW);\r\n }else{\r\n item.eq(index).addClass(SHOW).siblings().removeClass(SHOW);\r\n }\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'tab('+ filter +')', {\r\n elem: parents,\r\n index: index,\r\n id: hasId\r\n });\r\n }\r\n \r\n // Tab 删除\r\n ,tabDelete: function(obj){\r\n obj = obj || {};\r\n\r\n var li = obj.liElem || $(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 var hasId = li.attr('lay-id');\r\n\r\n // 若非强制删除,则根据 tabBeforeDelete 事件的返回结果决定是否删除\r\n if (!obj.force) {\r\n var shouldClose = layui.event.call(li[0], MOD_NAME, 'tabBeforeDelete('+ filter +')', {\r\n elem: tabElem,\r\n index: index,\r\n id: hasId\r\n });\r\n if(shouldClose === false) return;\r\n }\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 if(hasId){\r\n var contentElem = item.filter('[lay-id=\"' + hasId + '\"]');\r\n contentElem = contentElem.length ? contentElem : item.eq(index)\r\n contentElem.remove()\r\n }else{\r\n item.eq(index).remove();\r\n }\r\n setTimeout(function(){\r\n call.tabAuto(null, tabElem);\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 id: hasId\r\n });\r\n }\r\n \r\n // Tab 自适应\r\n ,tabAuto: function(spread, elem){\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 var targetElem = elem || $('.layui-tab');\r\n \r\n targetElem.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 var allowclose = othis.attr('lay-allowclose');\r\n if(allowclose && allowclose !== 'false'){\r\n title.find('li').each(function(){\r\n var li = $(this);\r\n if(!li.find('.'+CLOSE)[0] && li.attr('lay-allowclose') !== 'false'){\r\n var close = $('<i class=\"layui-icon layui-icon-close layui-unselect '+ CLOSE +'\"></i>');\r\n close.on('click', function(e) {\r\n call.tabDelete.call(this, {\r\n e: e\r\n });\r\n });\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 (typeof filter === 'string' && filter) ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }(), items = {\r\n \r\n // Tab 选项卡\r\n tab: function(elem){\r\n var TAB_ELEM = '.layui-tab';\r\n var targetElem = elem || $(TAB_ELEM + elemFilter);\r\n call.tabAuto.call({}, null, targetElem);\r\n }\r\n \r\n // 导航菜单\r\n ,nav: function(elem){\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 var targetElem = elem || $(NAV_ELEM + elemFilter);\r\n targetElem.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 var hasBarElem = othis.find('.'+NAV_BAR);\r\n if (hasBarElem[0]) hasBarElem.remove();\r\n othis.append(bar);\r\n ( othis.hasClass(NAV_TREE)\r\n ? itemElem.find('dd,>.'+ NAV_TITLE) \r\n : itemElem\r\n ).off('mouseenter.lay_nav').on('mouseenter.lay_nav', function() {\r\n follow.call(this, bar, othis, index);\r\n }).off('mouseleave.lay_nav').on('mouseleave.lay_nav', 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.off('mouseleave.lay_nav').on('mouseleave.lay_nav', 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 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(elem){\r\n var ELEM = '.layui-breadcrumb';\r\n var targetElem = elem || $(ELEM + elemFilter);\r\n\r\n targetElem.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(elem){\r\n var ELEM = 'layui-progress';\r\n var targetElem = elem || $('.' + ELEM + elemFilter);\r\n\r\n targetElem.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(elem){\r\n var ELEM = 'layui-collapse';\r\n var targetElem = elem || $('.' + ELEM + elemFilter);\r\n \r\n targetElem.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 if(type && typeof filter === 'object' && filter instanceof $){\r\n var targetElem = filter;\r\n return items[type](targetElem);\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' \r\n ? sets.unified ? value() : value(sets.index, sets.file)\r\n : 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, e.responseText, e);\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 forceConvert = function(src) {\r\n if(options.force === 'json'){\r\n if(typeof src !== 'object'){\r\n try {\r\n return {\r\n status: \"CONVERTED\",\r\n data: JSON.parse(src)\r\n };\r\n } catch(e){\r\n that.msg(text['data-format-error']);\r\n return {\r\n status: \"FORMAT_ERROR\",\r\n data: {}\r\n };\r\n }\r\n }\r\n }\r\n return { status: \"DO_NOTHING\", data: {} }\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 var convert = forceConvert(res);\r\n\r\n switch(convert.status) {\r\n case \"CONVERTED\":\r\n res = convert.data;\r\n break;\r\n case \"FORMAT_ERROR\":\r\n return;\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, res, xhr){\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n\r\n var convert = forceConvert(res);\r\n\r\n switch(convert.status) {\r\n case \"CONVERTED\":\r\n res = convert.data;\r\n break;\r\n case \"FORMAT_ERROR\":\r\n return;\r\n }\r\n\r\n typeof options.error === 'function' && options.error(index || 0, function(files){\r\n that.upload(files);\r\n }, res, xhr);\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 getChooseFiles: function(){\r\n return that.chooseFiles;\r\n }\r\n };\r\n \r\n // 提交上传\r\n var send = function(){\r\n var ready = function(){\r\n // IE 兼容处理\r\n if(device.ie){\r\n return device.ie > 9 ? ajaxSend() : iframeSend();\r\n }\r\n ajaxSend();\r\n }\r\n // 上传前的回调 - 如果回调函数明确返回 false 或 Promise.reject则停止上传\r\n if(typeof options.before === 'function'){\r\n upload.util.promiseLikeResolve(options.before(args))\r\n .then(function(result){\r\n if(result !== false){\r\n ready();\r\n } else {\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n }\r\n }, function(error){\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n error !== undefined && layui.hint().error(error);\r\n })\r\n }else{\r\n ready();\r\n }\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|webp') +')$', '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 * 判断文件是否加入排队\r\n * @param {File} file\r\n * @return {boolean}\r\n */\r\n var checkFile = function (file) {\r\n var result = true;\r\n layui.each(that.files, function (index, item) {\r\n result = !(item.name === file.name);\r\n if(!result) return true;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * 扩展文件信息\r\n * @template {File | FileList} T\r\n * @param {T} obj\r\n * @return {T}\r\n */\r\n var extendInfo = function (obj) {\r\n\r\n var extInfo = function (file) {\r\n //文件扩展名\r\n file.ext = file.name.substr(file.name.lastIndexOf('.') + 1).toLowerCase();\r\n // 文件大小\r\n file.sizes = upload.util.parseSize(file.size);\r\n // 可以继续扩展\r\n }\r\n\r\n //FileList对象\r\n if (obj instanceof FileList) {\r\n layui.each(obj, function (index, item) {\r\n extInfo(item);\r\n });\r\n } else {\r\n extInfo(obj);\r\n }\r\n\r\n return obj;\r\n }\r\n \r\n /**\r\n * 检查获取文件\r\n * @param {FileList} files\r\n * @return {Array<File>|FileList}\r\n */\r\n var getFiles = function (files) {\r\n files = files || [];\r\n if (!files.length) return [];\r\n if (!that.files) return extendInfo(files);\r\n var result = [];\r\n layui.each(files, function (index, item) {\r\n if (checkFile(item)) {\r\n result.push(extendInfo(item));\r\n }\r\n });\r\n return result;\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 = getFiles(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 = getFiles(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 * 上传组件辅助方法\r\n */\r\n upload.util = {\r\n /**\r\n * 文件大小处理\r\n * @param {number | string} size -文件大小\r\n * @param {number} [precision] - 数值精度\r\n * @return {string}\r\n */\r\n parseSize: function (size, precision) {\r\n precision = precision || 2;\r\n if (null == size || !size) {\r\n return '0';\r\n }\r\n var unitArr = [\"Bytes\", \"Kb\", \"Mb\", \"Gb\", \"Tb\", \"Pb\", \"Eb\", \"Zb\", \"Yb\"];\r\n var index;\r\n var formatSize = typeof size === 'string' ? parseFloat(size) : size;\r\n index = Math.floor(Math.log(formatSize) / Math.log(1024));\r\n size = formatSize / Math.pow(1024, index);\r\n size = size % 1 === 0 ? size : parseFloat(size.toFixed(precision));//保留的小数位数\r\n return size + unitArr[index];\r\n },\r\n /**\r\n * 将给定的值转换为一个 JQueryDeferred 对象\r\n */\r\n promiseLikeResolve:function(value){\r\n var deferred = $.Deferred();\r\n\r\n if(value && typeof value.then === 'function'){\r\n value.then(deferred.resolve, deferred.reject);\r\n }else{\r\n deferred.resolve(value);\r\n }\r\n return deferred.promise();\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 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 var needCheckboxFallback = lay.ie && parseFloat(lay.ie) === 8;\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 var BAD_INPUT = 'layui-input-number-invalid';\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) || value === undefined || value === null) {\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 for(var key in object){\r\n if(!lay.hasOwn(object, key)) continue;\r\n\r\n var type;\r\n var value = object[key];\r\n var itemElem = itemForm.find('[name=\"'+ key +'\"]');\r\n \r\n // 如果对应的表单不存在,则不执行\r\n if(!itemElem[0]) continue;\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 // select 多选用 jQuery 方式取值,未选中 option 时,\r\n // jQuery v2.2.4 及以下版本返回 null以上(3.x) 返回 []。\r\n // 统一规范化为 [],参考 https://github.com/jquery/jquery/issues/2562\r\n field[init_name || item.name] = (this.tagName === 'SELECT' && typeof this.getAttribute('multiple') === 'string') \r\n ? othis.val() || []\r\n : this.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 var isBadInput = isNaN(value);\r\n var isStepStrictly = typeof elem.attr('lay-step-strictly') === 'string';\r\n\r\n elem.toggleClass(BAD_INPUT, isBadInput);\r\n if(isBadInput) return; // 若非数字,则不作处理\r\n\r\n if(eventType === 'click'){\r\n // 兼容旧版行为2.10 以前 readonly 不禁用控制按钮\r\n if(elem[0].type === 'text' && typeof elem.attr('readonly') === 'string') return;\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 // 赋值\r\n if (!noAction) {\r\n // 初始渲染时只处理数字精度\r\n if (!isInit) {\r\n if(isStepStrictly){\r\n value = Math.round(value / step) * step;\r\n }\r\n if(value <= min) value = min;\r\n if(value >= max) value = max;\r\n }\r\n // 若 `lay-precision` 为 0, 则表示只保留整数\r\n if (precision === 0) {\r\n value = parseInt(value);\r\n } else if(precision > 0) { // 小数位精度\r\n value = value.toFixed(precision);\r\n }\r\n\r\n elem.val(value);\r\n elem.attr('lay-input-mirror', elem.val())\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 // 旧版浏览器不支持更改 input 元素的 type 属性,需要主动设置 text\r\n if(elem.attr('type') === 'text' || elem[0].type === 'text'){\r\n var ns = '.lay_input_number';\r\n var skipCheck = false;\r\n var isComposition = false;\r\n var isReadonly = typeof elem.attr('readonly') === 'string';\r\n var isMouseWheel = typeof elem.attr('lay-wheel') === 'string';\r\n var btnElem = elem.next('.layui-input-number').children('i');\r\n // 旧版浏览器不支持 beforeInput 事件,需要设置一个 attr 存储输入前的值\r\n elem.attr('lay-input-mirror', elem.val());\r\n elem.off(ns);\r\n // 旧版浏览器不支持 event.inputType 属性,需要用 keydown 事件来判断是否跳过输入检查\r\n elem.on('keydown' + ns, function (e) {\r\n skipCheck = false;\r\n if (e.keyCode === 8 || e.keyCode === 46) { // Backspace || Delete\r\n skipCheck = true;\r\n }\r\n // Up & Down 键盘事件处理\r\n if(!isReadonly && btnElem.length === 2 && (e.keyCode === 38 || e.keyCode === 40)){\r\n e.preventDefault();\r\n btnElem.eq(e.keyCode === 38 ? 0 : 1).click();\r\n }\r\n })\r\n elem.on('input' + ns + ' propertychange' + ns, function (e) {\r\n if (isComposition || (e.type === 'propertychange' && e.originalEvent.propertyName !== 'value')) return;\r\n if (skipCheck || canInputNumber(this.value)) {\r\n elem.attr('lay-input-mirror', this.value);\r\n } else {\r\n // 恢复输入前的值\r\n this.value = elem.attr('lay-input-mirror');\r\n }\r\n elem.toggleClass(BAD_INPUT, isNaN(Number(this.value)));\r\n });\r\n elem.on('compositionstart' + ns, function () {\r\n isComposition = true;\r\n });\r\n elem.on('compositionend' + ns, function () {\r\n isComposition = false;\r\n elem.trigger('input');\r\n })\r\n // 响应鼠标滚轮或触摸板\r\n if(isMouseWheel){\r\n elem.on(['wheel','mousewheel','DOMMouseScroll'].join(ns + ' ') + ns, function (e) {\r\n if(!btnElem.length) return;\r\n if(!$(this).is(':focus')) return;\r\n var direction = 0;\r\n e.preventDefault();\r\n // IE9+chrome 和 firefox 同时添加 'wheel' 和 'mousewheel' 事件时,只执行 'wheel' 事件\r\n if(e.type === 'wheel'){\r\n e.deltaX = e.originalEvent.deltaX;\r\n e.deltaY = e.originalEvent.deltaY;\r\n direction = Math.abs(e.deltaX) >= Math.abs(e.deltaY) ? e.deltaX : e.deltaY;\r\n }else if(e.type === 'mousewheel' ){\r\n direction = -e.originalEvent.wheelDelta;\r\n }else if(e.type === 'DOMMouseScroll'){\r\n direction = e.originalEvent.detail;\r\n }\r\n btnElem.eq(direction > 0 ? 1 : 0).click();\r\n })\r\n }\r\n\r\n if(isReadonly){\r\n btnElem.addClass(DISABLED);\r\n }\r\n }\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 CREATE_OPTION = 'layui-select-create-option';\r\n var PANEL_WRAP = 'layui-select-panel-wrap'\r\n var PANEL_ELEM_DATA = 'layui-select-panel-elem-data';\r\n var selects = elem || elemForm.find('select');\r\n\r\n // 各种事件\r\n var events = function(reElem, titleElem, disabled, isSearch, isCreatable, isAppendTo){\r\n var select = $(this);\r\n var title = titleElem;\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 initValue = '';\r\n var removeClickOutsideEvent;\r\n \r\n if(disabled) return;\r\n\r\n /**\r\n * 搜索项 \r\n * @typedef searchOption\r\n * @prop {boolean} [caseSensitive=false] 是否区分大小写\r\n * @prop {boolean} [fuzzy=false] 是否开启模糊匹配,开启后将会忽略模式出现在字符串中的位置。\r\n */\r\n /** @type {searchOption} */\r\n var laySearch = select.attr('lay-search') === 'cs' ? {caseSensitive:true} : lay.options(select, {attr:'lay-search'});\r\n // 目前只支持 body\r\n var appendTarget = select.attr('lay-append-to') || 'body';\r\n var appendPosition = select.attr('lay-append-position');\r\n\r\n // #1449\r\n // IE10 和 11 中,带有占位符的 input 元素获得/失去焦点时,会触发 input 事件\r\n // 当鼠标按下时,根据 input 元素上的 __ieph 标识忽略 input 事件\r\n var needPlaceholderPatch = !!(lay.ie && (lay.ie === '10' || lay.ie === '11') && input.attr('placeholder'));\r\n \r\n // 展开下拉\r\n var showDown = function(){\r\n if(isAppendTo){\r\n // 如果追加面板元素后出现滚动条,触发元素宽度可能会有变化,所以先追加面板元素\r\n reElem.appendTo(appendTarget).css({width: title.width() + 'px'});\r\n\r\n var updatePosition = function(){\r\n lay.position(title[0], reElem[0], {\r\n position: appendPosition,\r\n allowBottomOut: true,\r\n offset: [0, 5]\r\n });\r\n }\r\n\r\n updatePosition();\r\n $(window).on('resize.lay_select_resize', updatePosition);\r\n }\r\n var top = reElem.offset().top + reElem.outerHeight() + 5 - $win.scrollTop();\r\n var dlHeight = dl.outerHeight();\r\n var dds = dl.children('dd');\r\n \r\n index = select[0].selectedIndex; // 获取最新的 selectedIndex\r\n title.parent().addClass(CLASS+'ed');\r\n dds.removeClass(HIDE);\r\n dts.removeClass(HIDE);\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 if(needPlaceholderPatch){\r\n dl.off('mousedown.lay_select_ieph').on('mousedown.lay_select_ieph', function(){\r\n input[0].__ieph = true;\r\n setTimeout(function(){\r\n input[0].__ieph = false;\r\n }, 60)\r\n });\r\n }\r\n\r\n removeClickOutsideEvent = lay.onClickOutside(\r\n isAppendTo ? reElem[0] : dl[0],\r\n function(){\r\n hideDown();\r\n initValue && input.val(initValue);\r\n },\r\n {ignore: title}\r\n );\r\n };\r\n \r\n // 隐藏下拉\r\n var hideDown = function(choose){\r\n title.parent().removeClass(CLASS+'ed ' + CLASS+'up');\r\n input.blur();\r\n isCreatable && dl.children('.' + CREATE_OPTION).remove();\r\n removeClickOutsideEvent && removeClickOutsideEvent();\r\n if(isAppendTo){\r\n reElem.detach();\r\n $(window).off('resize.lay_select_resize');\r\n }\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 title.parent().hasClass(CLASS+'ed') ? (\r\n hideDown()\r\n ) : (\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){\r\n e.preventDefault();\r\n var allDisplayedElem = dl.children('dd:not(.'+ HIDE +',.'+ DISABLED +')');\r\n if(!allDisplayedElem.length) return;\r\n var firstIndex = 0;\r\n var lastIndex = allDisplayedElem.length - 1;\r\n var selectedIndex = -1;\r\n\r\n layui.each(allDisplayedElem, function(index, el){\r\n if($(el).hasClass(THIS)){\r\n selectedIndex = index;\r\n return true;\r\n }\r\n })\r\n \r\n var nextIndex = prevNext === 'prev'\r\n ? (selectedIndex - 1 < firstIndex ? lastIndex : selectedIndex - 1)\r\n : (selectedIndex + 1 > lastIndex ? firstIndex : selectedIndex + 1)\r\n\r\n var selectedElem = allDisplayedElem.eq(nextIndex);\r\n selectedElem.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 }).on('paste', function(){\r\n showDown();\r\n });\r\n \r\n // 检测值是否不属于 select 项\r\n var notOption = function(value, callback, origin){\r\n var num = 0;\r\n var dds = dl.children('dd');\r\n var hasEquals = false;\r\n var rawValue = value;\r\n var fuzzyMatchRE;\r\n if(!laySearch.caseSensitive){\r\n value = value.toLowerCase();\r\n }\r\n if(laySearch.fuzzy){\r\n fuzzyMatchRE = fuzzyMatchRegExp(value, laySearch.caseSensitive);\r\n }\r\n layui.each(dds, function(){\r\n var othis = $(this);\r\n var text = othis.text();\r\n var isCreateOption = isCreatable && othis.hasClass(CREATE_OPTION);\r\n\r\n // 需要区分大小写\r\n if(isCreatable && !isCreateOption && text === rawValue){\r\n hasEquals = true;\r\n }\r\n\r\n // 是否区分大小写\r\n if(!laySearch.caseSensitive){\r\n text = text.toLowerCase();\r\n }\r\n \r\n // 匹配\r\n var not = laySearch.fuzzy ? !fuzzyMatchRE.test(text) : text.indexOf(value) === -1;\r\n \r\n if(value === '' || (origin === 'blur') ? value !== text : not) num++;\r\n origin === 'keyup' && othis[(isCreatable ? (not && !isCreateOption) : not) ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n // 处理 select 分组元素\r\n origin === 'keyup' && layui.each(dts, function(){\r\n var othis = $(this);\r\n var thisDds = othis.nextUntil('dt').filter('dd'); // 当前分组下的dd元素\r\n if(isCreatable) thisDds = thisDds.not('.' + CREATE_OPTION);\r\n var 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, hasEquals), 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 if(needPlaceholderPatch && e.target.__ieph){\r\n e.target.__ieph = false;\r\n return false;\r\n }\r\n \r\n notOption(value, function(none, hasEquals){\r\n if(isCreatable){\r\n if(hasEquals){\r\n dl.children('.' + CREATE_OPTION).remove();\r\n }else{\r\n var createOptionElem = dl.children('.' + CREATE_OPTION);\r\n if(createOptionElem[0]){\r\n createOptionElem.attr('lay-value', value).html(util.escape(value));\r\n }else{\r\n // 临时显示在顶部\r\n var ddElem = $('<dd>').addClass(CREATE_OPTION).attr('lay-value', value).html(util.escape(value));\r\n var firstOptionELem = dl.children().eq(0);\r\n var hasTips = firstOptionELem.hasClass('layui-select-tips');\r\n firstOptionELem[hasTips ? 'after' : 'before'](ddElem);\r\n }\r\n }\r\n }else{\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 }\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 isCreatable && dl.children('.' + CREATE_OPTION).remove();\r\n }\r\n \r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(isSearch){\r\n input.on('input propertychange', layui.debounce(search, 50)).on('blur', function(e){\r\n var selectedIndex = select[0].selectedIndex;\r\n \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 dl.on('click', 'dd', 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 // 将新增的 option 元素添加到末尾\r\n if(isCreatable && othis.hasClass(CREATE_OPTION)){\r\n dl.append(othis.removeClass(CREATE_OPTION));\r\n var optionElem = $('<option>').attr('value', value).text(othis.text());\r\n select.append(optionElem);\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 // 用于开启 lay-append-to 时兼容 dropdown\r\n dl.on('mousedown pointerdown touchstart', function(e){\r\n layui.stope(e);\r\n })\r\n \r\n reElem.find('dl>dt').on('click', function(e){\r\n return false;\r\n });\r\n\r\n if(isAppendTo){\r\n titleElem.on('_lay-select-destroy', function(){\r\n reElem.remove();\r\n })\r\n }\r\n }\r\n\r\n // 仅 appendTo 使用,移除触发元素时,自动移除面板元素\r\n $.event.special['_lay-select-destroy'] = {\r\n remove: function( handleObj ) {\r\n handleObj.handler();\r\n }\r\n };\r\n \r\n // 初始渲染 select 组件选项\r\n selects.each(function(index, select){\r\n var othis = $(this);\r\n var hasRender = othis.next('.'+CLASS);\r\n var disabled = this.disabled;\r\n var value = select.value;\r\n var selected = $(select.options[select.selectedIndex]); // 获取当前选中项\r\n var optionsFirst = select.options[0];\r\n \r\n if (othis.closest('[lay-ignore]').length) return othis.show();\r\n \r\n var isSearch = typeof othis.attr('lay-search') === 'string'\r\n var isCreatable = typeof othis.attr('lay-creatable') === 'string' && isSearch\r\n var isAppendTo = typeof othis.attr('lay-append-to') === 'string'\r\n var 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' : '') + '\"></div>'].join(''));\r\n\r\n var triggerElem = $([\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>'\r\n ,'</div>'].join(''));\r\n\r\n var contentElem = $(['<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 ].join(''));\r\n \r\n // 如果已经渲染则Rerender\r\n if(hasRender[0]){\r\n if(isAppendTo){\r\n var panelWrapElem = hasRender.data(PANEL_ELEM_DATA);\r\n panelWrapElem && panelWrapElem.remove();\r\n }\r\n hasRender.remove();\r\n }\r\n if(isAppendTo){\r\n reElem.append(triggerElem);\r\n othis.after(reElem);\r\n var contentWrapElem = $('<div class=\"'+ CLASS + ' ' + PANEL_WRAP +'\"></div>').append(contentElem);\r\n reElem.data(PANEL_ELEM_DATA, contentWrapElem); // 将面板元素对象记录在触发元素 data 中,重新渲染时需要清理旧面板元素\r\n events.call(this, contentWrapElem, triggerElem, disabled, isSearch, isCreatable, isAppendTo);\r\n }else{\r\n reElem.append(triggerElem).append(contentElem);\r\n othis.after(reElem);\r\n events.call(this, reElem, triggerElem, disabled, isSearch, isCreatable, isAppendTo);\r\n }\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 var skin = check.attr('lay-skin') || 'primary';\r\n var isSwitch = skin === 'switch';\r\n var isPrimary = skin === 'primary';\r\n \r\n // 勾选\r\n reElem.on('click', function(){\r\n var filter = check.attr('lay-filter') // 获取过滤器\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 }\r\n\r\n // 开关\r\n check[0].checked = !check[0].checked\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 that.syncAppearanceOnPropChanged(this, 'checked', function(){\r\n if(isSwitch){\r\n var title = (reElem.next('*[lay-checkbox]')[0] \r\n ? reElem.next().html()\r\n : check.attr('title') || ''\r\n ).split('|');\r\n reElem.children('div').html(this.checked ? title[0] : title[1] || title[0]);\r\n }\r\n reElem.toggleClass(RE_CLASS[1], this.checked);\r\n });\r\n\r\n if(isPrimary){\r\n that.syncAppearanceOnPropChanged(this, 'indeterminate', function(){\r\n if(this.indeterminate){\r\n reElem.children('.layui-icon-ok').removeClass('layui-icon-ok').addClass(CLASS.SUBTRA);\r\n }else{\r\n reElem.children('.'+ CLASS.SUBTRA).removeClass(CLASS.SUBTRA).addClass('layui-icon-ok');\r\n }\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 var titleTplAttrs = [];\r\n if(othis.next('[lay-checkbox]')[0]){\r\n var titleTplElem = othis.next();\r\n title = titleTplElem.html() || '';\r\n if(titleTplElem[0].attributes.length > 1){\r\n layui.each(titleTplElem[0].attributes, function(i, attr){\r\n if(attr.name !== 'lay-checkbox'){\r\n titleTplAttrs.push(attr.name + '=\"' + attr.value + '\"')\r\n }\r\n })\r\n }\r\n }\r\n titleTplAttrs = titleTplAttrs.join(' ');\r\n\r\n // 若为开关,则对 title 进行分隔解析\r\n title = skin === 'switch' ? title.split('|') : [title];\r\n \r\n if (othis.closest('[lay-ignore]').length) return othis.show();\r\n\r\n // 处理 IE8 indeterminate 属性重新定义 get set 后无法设置值的问题\r\n if(needCheckboxFallback){\r\n toggleAttribute.call(check, 'lay-form-sync-checked', check.checked);\r\n !check.checked && toggleAttribute.call(check, 'lay-form-sync-indeterminate', check.indeterminate);\r\n }\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 ' + titleTplAttrs +'>'+ 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] || title[0])) || '') +'</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 filter = radio.attr('lay-filter'); // 获取过滤器\r\n \r\n if(radio[0].disabled) return;\r\n \r\n radio[0].checked = true;\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 that.syncAppearanceOnPropChanged(this, 'checked', function(){\r\n var radioEl = this;\r\n if(radioEl.checked){\r\n reElem.addClass(CLASS + 'ed');\r\n reElem.children('.layui-icon').addClass(ANIM + ' ' + ICON[0]);\r\n var forms = radio.parents(ELEM);\r\n var sameRadios = forms.find('input[name='+ radioEl.name.replace(/(\\.|#|\\[|\\])/g, '\\\\$1') +']'); // 找到相同name的兄弟\r\n layui.each(sameRadios, function(){\r\n if(radioEl === this)return;\r\n this.checked = false;\r\n });\r\n }else{\r\n reElem.removeClass(CLASS + 'ed');\r\n reElem.children('.layui-icon').removeClass(ANIM + ' ' + ICON[0]).addClass(ICON[1]);\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 var skin = othis.attr('lay-skin');\r\n \r\n if (othis.closest('[lay-ignore]').length) return othis.show();\r\n\r\n if(needCheckboxFallback){\r\n toggleAttribute.call(radio, 'lay-form-sync-checked', radio.checked);\r\n }\r\n\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染则Rerender\r\n\r\n var title = util.escape(radio.title || '');\r\n var titleTplAttrs = [];\r\n if(othis.next('[lay-radio]')[0]){\r\n var titleTplElem = othis.next();\r\n title = titleTplElem.html() || '';\r\n if(titleTplElem[0].attributes.length > 1){\r\n layui.each(titleTplElem[0].attributes, function(i, attr){\r\n if(attr.name !== 'lay-radio'){\r\n titleTplAttrs.push(attr.name + '=\"' + attr.value + '\"')\r\n }\r\n })\r\n }\r\n }\r\n titleTplAttrs = titleTplAttrs.join(' ');\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 (skin ? ' lay-skin=\"'+ skin +'\"' : ''),\r\n '>',\r\n '<i class=\"layui-anim layui-icon '+ ICON[radio.checked ? 0 : 1] +'\"></i>',\r\n '<div ' + titleTplAttrs +'>'+ title +'</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 * checkbox 和 radio 指定属性变化时自动更新 UI\r\n * 只能用于 boolean 属性\r\n * @param {HTMLInputElement} elem - HTMLInput 元素\r\n * @param {'checked' | 'indeterminate'} propName - 属性名\r\n * @param {() => void} handler - 属性值改变时执行的回调\r\n * @see https://learn.microsoft.com/zh-cn/previous-versions//ff382725(v=vs.85)?redirectedfrom=MSDN\r\n */\r\n Form.prototype.syncAppearanceOnPropChanged = function(){\r\n // 处理 IE8 indeterminate 属性重新定义 get set 后无法设置值的问题\r\n // 此处性能敏感,不希望每次赋值取值时都判断是否需要 fallback\r\n if (needCheckboxFallback) {\r\n return function(elem, propName, handler) {\r\n var originProps = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, propName);\r\n\r\n Object.defineProperty(elem, propName,\r\n lay.extend({}, originProps, {\r\n // 此处的 get 是为了兼容 IE<9\r\n get: function(){\r\n return typeof this.getAttribute('lay-form-sync-' + propName) === 'string';\r\n },\r\n set: function (newValue) {\r\n toggleAttribute.call(this, 'lay-form-sync-' + propName, newValue);\r\n handler.call(this);\r\n }\r\n })\r\n ); \r\n }\r\n }\r\n return function(elem, propName, handler){\r\n var originProps = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, propName);\r\n \r\n Object.defineProperty(elem, propName,\r\n lay.extend({}, originProps, {\r\n // 此处的 get 是为了兼容 IE<9\r\n get: function(){\r\n return originProps.get.call(this);\r\n },\r\n set: function (newValue) {\r\n originProps.set.call(this, newValue);\r\n handler.call(this);\r\n }\r\n })\r\n );\r\n }\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 = othis.val();\r\n value = typeof value === 'string' ? $.trim(value) : value;\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 (!othis.closest('[lay-ignore]').length) {\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 function fuzzyMatchRegExp(keyword, caseSensitive) {\r\n var wordMap = {};\r\n var regexPattern = ['^'];\r\n var escapeRegExp = function(str){\r\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\r\n }\r\n\r\n if(!caseSensitive)keyword = keyword.toLowerCase();\r\n\r\n // 统计关键字中各字符出现次数\r\n var wordArr = keyword.trim().split('');\r\n for (var i = 0; i < wordArr.length; i++) {\r\n var c = wordArr[i];\r\n wordMap[c] = (wordMap[c] || 0) + 1;\r\n }\r\n\r\n // 构建正则表达式模式\r\n for (c in wordMap) {\r\n regexPattern.push('(?=.*');\r\n for (var i = 0; i < wordMap[c]; i++) {\r\n regexPattern.push(escapeRegExp(c));\r\n if (i !== wordMap[c] - 1) {\r\n regexPattern.push('.*'); // 在字符之间添加任意字符匹配\r\n }\r\n }\r\n regexPattern.push(')');\r\n }\r\n regexPattern.push('.*');\r\n\r\n return new RegExp(regexPattern.join(''), !caseSensitive ? 'i' : undefined);\r\n }\r\n\r\n // 引用自 https://github.com/msn0/mdn-polyfills/blob/master/src/Element.prototype.toggleAttribute/toggleattribute.js\r\n function toggleAttribute(name, force) {\r\n var forcePassed = arguments.length === 2;\r\n var forceOn = !!force;\r\n var forceOff = forcePassed && !force;\r\n\r\n if (this.getAttribute(name) !== null) {\r\n if (forceOn) return true;\r\n\r\n this.removeAttribute(name);\r\n return false;\r\n } else {\r\n if (forceOff) return false;\r\n\r\n this.setAttribute(name, '');\r\n return true;\r\n }\r\n }\r\n\r\n // 修改自 https://github.com/Tencent/tdesign-common/blob/53786c58752401e648cc45918f2a4dbb9e8cecfa/js/input-number/number.ts#L209\r\n var specialCode = ['-', '.', 'e', 'E', '+'];\r\n function canInputNumber(number) {\r\n if (number === '') return true;\r\n // 数字最前方不允许出现连续的两个 0\r\n if (number.slice(0, 2) === '00') return false;\r\n // 不能出现空格\r\n if (number.match(/\\s/g)) return false;\r\n // 只能出现一个点(.\r\n var tempMatched = number.match(/\\./g);\r\n if (tempMatched && tempMatched.length > 1) return false;\r\n // 只能出现一个ee\r\n tempMatched = number.match(/e/g);\r\n if (tempMatched && tempMatched.length > 1) return false;\r\n // 只能出现一个负号(-)或 一个正号(+),并且在第一个位置;但允许 3e+10 这种形式\r\n var tempNumber = number.slice(1);\r\n tempMatched = tempNumber.match(/(\\+|-)/g);\r\n if (tempMatched && (!/e(\\+|-)/i.test(tempNumber) || tempMatched.length > 1)) return false;\r\n // 允许输入数字字符\r\n var isNumber = !isNaN(Number(number));\r\n if (!isNumber && !(specialCode.indexOf(number.slice(-1)) !== -1)) return false;\r\n if (/e/i.test(number) && (!/\\de/i.test(number) || /e\\./.test(number))) return false;\r\n return true;\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 initIndexName: 'LAY_INDEX_INIT', // 初始下标索引名,仅用于内部恢复当前页表格排序\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(err){\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 MOD_ID = 'lay-' + MOD_NAME + '-id';\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 var DISABLED_TRANSITION = 'layui-table-disabled-transition';\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\">'\r\n ,'<div class=\"layui-table-loading-icon\">'\r\n ,'{{# if(typeof d.data.loading === \"string\"){ }}'\r\n ,'{{- d.data.loading}}'\r\n ,'{{# } else{ }}'\r\n ,'<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>'\r\n ,'{{# } }}'\r\n ,'</div>'\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(function(){\r\n var obj = {\r\n 'lay-filter': 'LAY-TABLE-FORM-DF-'+ that.index,\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 }\r\n obj[MOD_ID] = options.id;\r\n return obj;\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 that.setColsWidth({isInit: true});\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;\r\n var isNone;\r\n parent = parent || options.elem.parent();\r\n\r\n width = that.getContentWidth(parent);\r\n\r\n try {\r\n isNone = parent.css('display') === 'none';\r\n } catch(e){}\r\n var parentElem = parent.parent();\r\n if(parent[0] && parentElem && parentElem[0] && (!width || isNone)) return getWidth(parentElem);\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 = ['width: ', (item2.width || options.cellMinWidth), '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 var filter = options.elem.attr('lay-filter');\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 defaultConfig = {\r\n filter: {\r\n title: '筛选列',\r\n layEvent: 'LAYTABLE_COLS',\r\n icon: 'layui-icon-cols',\r\n onClick: function(obj) {\r\n var options = obj.config;\r\n var openPanel = obj.openPanel;\r\n\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 }\r\n },\r\n exports: {\r\n title: '导出',\r\n layEvent: 'LAYTABLE_EXPORT',\r\n icon: 'layui-icon-export',\r\n onClick: function(obj) { // 自带导出\r\n var data = obj.data;\r\n var options = obj.config;\r\n var openPanel = obj.openPanel;\r\n var elem = obj.elem;\r\n\r\n if (!data.length) return layer.tips('当前表格无数据', elem, {tips: 3});\r\n if(device.ie){\r\n layer.tips('导出功能不支持 IE请用 Chrome 等高级浏览器导出', elem, {\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 ].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 }\r\n },\r\n print: {\r\n title: '打印',\r\n layEvent: 'LAYTABLE_PRINT',\r\n icon: 'layui-icon-print',\r\n onClick: function(obj) {\r\n var data = obj.data;\r\n var options = obj.config;\r\n var elem = obj.elem;\r\n\r\n if (!data.length) return layer.tips('当前表格无数据', elem, {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 }\r\n }\r\n };\r\n\r\n // 若开启 defaultToolbar\r\n if (typeof options.defaultToolbar === 'object') {\r\n var iconElem = [];\r\n options.defaultToolbar = $.map(options.defaultToolbar, function(item, i) {\r\n var itemIsName = typeof item === 'string';\r\n var thisItem = itemIsName ? defaultConfig[item] : item;\r\n if (thisItem) {\r\n // 根据 name 匹配默认工具并合并\r\n if (thisItem.name && defaultConfig[thisItem.name]) {\r\n thisItem = $.extend({}, defaultConfig[thisItem.name], thisItem);\r\n }\r\n // 初始化默认工具 name\r\n if (!thisItem.name && itemIsName) {\r\n thisItem.name = item;\r\n }\r\n // 图标列表\r\n iconElem.push(\r\n '<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 return thisItem;\r\n });\r\n that.layTool.find('.layui-table-tool-self').html(iconElem.join(''));\r\n }\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(opt){\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 var borderWidth = parseFloat(layui.getStyle(that.elem[0], 'border-left-width'));\r\n var lastSpreadCol;\r\n var headerTableElem = that.layHeader.first().children('table');\r\n var mainTableElem = that.layMain.find('table');\r\n var isEmptyTable = that.layMain.find('tbody').is(\":empty\");\r\n var isInit = opt && opt.isInit;\r\n\r\n // 统计列个数和最后一个分配宽度的列\r\n that.eachCols(function(i, item){\r\n if(!item.hide){\r\n colNums++;\r\n if(!(item.width || item.type !== 'normal')){\r\n lastSpreadCol = item;\r\n }\r\n }\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 }() * borderWidth - that.getScrollWidth(that.layMain[0]);\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 = (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 var pixelsForLastCol = cntrWidth;\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 || (lastSpreadCol && lastSpreadCol.key === item3.key)) return;\r\n\r\n // 给未分配宽的列平均分配宽\r\n if(item3.width === 0){\r\n that.cssRules(item3.key, function(item){\r\n var newWidth = Math.round(function(){\r\n if(autoWidth < minWidth) return minWidth;\r\n if(autoWidth > maxWidth) return maxWidth;\r\n return autoWidth;\r\n }());\r\n item.style.width = newWidth + 'px';\r\n pixelsForLastCol = pixelsForLastCol - newWidth;\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.round((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 pixelsForLastCol = pixelsForLastCol - width;\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 pixelsForLastCol = pixelsForLastCol - item3.width;\r\n });\r\n }\r\n });\r\n // 最后一列获取剩余的空间,避免舍入导致的布局问题\r\n if(lastSpreadCol){\r\n that.cssRules(lastSpreadCol.key, function(item){\r\n var minWidth = lastSpreadCol.minWidth || options.cellMinWidth;\r\n var maxWidth = lastSpreadCol.maxWidth || options.cellMaxWidth;\r\n var newWidth = Math.max(Math.min(pixelsForLastCol, maxWidth), minWidth);\r\n item.style.width = newWidth + 'px';\r\n\r\n if (!isInit && isEmptyTable){\r\n // 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段\r\n mainTableElem.width(that.getContentWidth(headerTableElem));\r\n }\r\n // 二次校验,如果仍然出现横向滚动条(通常是 1px 的误差导致)\r\n // 不同屏幕分辨率、缩放水平以及浏览器渲染差异,可能会触发这个问题 \r\n if(that.layMain.prop('offsetHeight') > that.layMain.prop('clientHeight')){\r\n item.style.width = (parseFloat(item.style.width) - borderWidth) + 'px';\r\n }\r\n });\r\n }\r\n\r\n if (!isInit && isEmptyTable) {\r\n // 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段\r\n mainTableElem.width(that.getContentWidth(headerTableElem));\r\n } else {\r\n mainTableElem.width('auto');\r\n }\r\n\r\n that.setGroupWidth();\r\n\r\n };\r\n\r\n // 重置表格尺寸/结构\r\n Class.prototype.resize = function(){\r\n var that = this;\r\n\r\n var tableElemIsConnected = that.layMain && ('isConnected' in that.layMain[0]\r\n ? that.layMain[0].isConnected \r\n : $.contains(document.body, that.layMain[0]));\r\n\r\n if(!tableElemIsConnected) 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 that.loading(false);\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 that.loading(false);\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(true);\r\n\r\n // 4代表响应已完成\r\n if (that._xhr && that._xhr.readyState !== 4) {\r\n that._xhrAbort = true;\r\n that._xhr.abort();\r\n }\r\n that._xhr = $.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 // 当前页不能超过总页数\r\n var count = res[response.countName];\r\n var pages = Math.ceil(count / options.limit) || 1;\r\n if(curr > pages){\r\n curr = pages;\r\n }\r\n that.totalRow = res[response.totalRowName];\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: count,\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, opts.type);\r\n },\r\n error: function(e, msg){\r\n if (e && e.status === 0 && that._xhrAbort){\r\n that._xhrAbort = false;\r\n return;\r\n }\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, opts.type);\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 item1[table.config.indexName] = i1;\r\n if(!sort) item1[table.config.initIndexName] = 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\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 // 合计内容\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 // td 显示内容\r\n var tdContent = 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\r\n return content;\r\n }();\r\n\r\n // 合计原始结果\r\n item3.field && that.dataTotal.push({\r\n field: item3.field,\r\n total: $('<div>'+ tdContent +'</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 }() +'>' + tdContent,\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.renderFormByElem = function(elem){\r\n layui.each(['input', 'select'], function(i, formType){\r\n form.render(elem.find(formType));\r\n })\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 };\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 var isCheckAllOrMult = isCheckAll || isCheckMult; // 是否全选或多选\r\n\r\n // treeTable 内部已处理选中,此处不再处理\r\n if(options.tree && options.tree.view) return;\r\n\r\n // 全选或多选时\r\n if (isCheckAllOrMult) {\r\n that.layBox.addClass(DISABLED_TRANSITION); // 减少回流\r\n if (opts.type === 'radio') return; // radio 不允许全选或多选\r\n }\r\n\r\n if(isCheckMult){\r\n var makeMap = {}\r\n layui.each(opts.index, function(i,v){\r\n makeMap[v] = true;\r\n })\r\n opts.index = makeMap;\r\n }\r\n\r\n // 匹配行元素\r\n var tbody = that.layBody.children('.layui-table').children('tbody');\r\n var selector = isCheckAllOrMult ? 'tr' : 'tr[data-index=\"'+ opts.index +'\"]';\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[dataIndex];\r\n } : '[data-index=\"'+ opts.index +'\"]');\r\n }(tbody.children(selector));\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 var radioCheckedIndex;\r\n\r\n // 给匹配行设置选中状态\r\n tr.each(function() {\r\n var el = $(this);\r\n var i = el.attr('data-index');\r\n var item = thisData[i];\r\n\r\n if (!i) return; // 此时 el 通常为静态表格嵌套时的原始模板\r\n\r\n // 绕过空项和禁用项\r\n if (layui.type(item) === 'array' || item[options.disabledName]) {\r\n return;\r\n }\r\n\r\n // 标记数据选中状态\r\n var checked = item[options.checkName] = getChecked(el.hasClass(ELEM_CHECKED));\r\n\r\n // 标记当前行背景色\r\n el.toggleClass(ELEM_CHECKED, !!checked);\r\n\r\n // 若为 radio 类型,则取消其他行选中背景色\r\n if (opts.type === 'radio') {\r\n radioCheckedIndex = i;\r\n el.siblings().removeClass(ELEM_CHECKED);\r\n }\r\n });\r\n\r\n // 若为 radio 类型,移除其他行数据选中状态\r\n if (radioCheckedIndex) {\r\n layui.each(thisData, function(i, item) {\r\n if (Number(radioCheckedIndex) !== Number(i)) {\r\n delete item[options.checkName];\r\n }\r\n });\r\n }\r\n\r\n // 若存在复选框或单选框,则标注选中状态样式\r\n var td = tr.children('td').children('.layui-table-cell');\r\n var checkedElem = td.children('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\r\n if(isCheckAllOrMult){\r\n setTimeout(function(){\r\n that.layBox.removeClass(DISABLED_TRANSITION);\r\n }, 100)\r\n }\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.initIndexName, 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(show){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(options.loading){\r\n that.layBox.find(ELEM_INIT).toggleClass(HIDE, !show); \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 callback(item);\r\n return 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);\r\n };\r\n\r\n /**\r\n * @typedef updateRowOptions\r\n * @prop {number} index - 行索引\r\n * @prop {Object.<string, any>} data - 行数据\r\n * @prop {boolean | ((field, index) => boolean)} [related] - 更新其他包含自定义模板且可能有所关联的列视图\r\n */\r\n /**\r\n * 更新指定行\r\n * @param {updateRowOptions | updateRowOptions[]} opts \r\n * @param {(field: string, value: any) => void} [callback] - 更新每个字段时的回调函数\r\n */\r\n Class.prototype.updateRow = function(opts, callback){\r\n var that = this;\r\n var ELEM_CELL = '.layui-table-cell';\r\n var opts = layui.type(opts) === 'array' ? opts : [opts];\r\n var dataCache = table.cache[that.key] || [];\r\n\r\n var update = function(opt){\r\n var index = opt.index;\r\n var row = opt.data;\r\n var related = opt.related;\r\n\r\n var data = dataCache[index] || {};\r\n var tr = that.layBody.find('tr[data-index=\"' + index + '\"]');\r\n\r\n // 更新缓存中的数据\r\n layui.each(row, function (key, value) {\r\n data[key] = value;\r\n callback && callback(key, value);\r\n });\r\n\r\n // 更新单元格\r\n that.eachCols(function (i, item3) {\r\n var field = String(item3.field || i);\r\n var shouldUpdate = field in row || ((typeof related === 'function' ? related(field, i) : related) && (item3.templet || item3.toolbar));\r\n if(shouldUpdate){\r\n var td = tr.children('td[data-field=\"' + field + '\"]');\r\n var cell = td.children(ELEM_CELL);\r\n var content = data[item3.field];\r\n 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 td.data(\"content\", content);\r\n that.renderFormByElem(cell);\r\n }\r\n });\r\n }\r\n\r\n layui.each(opts, function(i, opt){\r\n update(opt);\r\n });\r\n };\r\n\r\n /**\r\n * 更新指定行\r\n * @param {string} id - table ID\r\n * @param {updateRowOptions | updateRowOptions[]} options \r\n */\r\n table.updateRow = function (id, options){\r\n var that = getThisTable(id);\r\n return that.updateRow(options);\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\r\n // 弹出工具下拉面板\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 // 头部工具栏右侧图标\r\n layui.each(options.defaultToolbar, function(index, item) {\r\n if (item.layEvent === events) {\r\n typeof item.onClick === 'function' && item.onClick({\r\n data: data,\r\n config: options,\r\n openPanel: openPanel,\r\n elem: othis\r\n });\r\n return true;\r\n }\r\n });\r\n\r\n // table toolbar 事件\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 dict.allowResize = false;\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(MOD_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(MOD_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 that.updateRow({\r\n index: index,\r\n data: fields,\r\n related: related\r\n }, function(key, value){\r\n obj.data[key] = value;\r\n });\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 }\r\n\r\n layui.stope(e);\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 setRowEvent.call(this, 'row', e);\r\n }).on('dblclick', 'tr', function(e){ // 双击行\r\n setRowEvent.call(this, 'rowDouble', e);\r\n }).on('contextmenu', 'tr', function(e){ // 菜单\r\n if (!options.defaultContextmenu) e.preventDefault();\r\n setRowEvent.call(this, 'rowContextmenu', e);\r\n });\r\n\r\n // 创建行单击、双击、菜单事件\r\n var setRowEvent = function(eventType, e){\r\n var othis = $(this);\r\n if(othis.data('off')) return; // 不触发事件\r\n\r\n // 不触发「行单/双击事件」的子元素\r\n if (eventType !== 'rowContextmenu') {\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\r\n if($(e.target).is(UNROW) || $(e.target).closest(UNROW)[0]){\r\n return;\r\n }\r\n }\r\n\r\n layui.event.call(\r\n this,\r\n MOD_NAME, eventType + '('+ filter +')',\r\n commonMember.call(othis.children('td')[0], {\r\n e: e\r\n })\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.prop('clientWidth') ||\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 elemCell.scrollTop(0);\r\n elemCell.scrollLeft(0); \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 var rAF = window.requestAnimationFrame || function(fn){return setTimeout(fn, 1000 / 60)};\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 = 100;\r\n var rAFStep = 10;\r\n\r\n e.preventDefault();\r\n var cb = function(){\r\n if(step > 0){\r\n step -= rAFStep;\r\n scrollTop += (delta > 0 ? -rAFStep : rAFStep);\r\n that.layMain.scrollTop(scrollTop);\r\n rAF(cb);\r\n }\r\n }\r\n rAF(cb);\r\n });\r\n }\r\n\r\n /**\r\n * 获取元素的大小\r\n * @param {HTMLElement} elem - HTML 元素\r\n */\r\n Class.prototype.getElementSize = function(elem){\r\n if(!window.getComputedStyle) return;\r\n\r\n var style = window.getComputedStyle(elem, null);\r\n return {\r\n height: parseFloat(style.height || '0'),\r\n width: parseFloat(style.width || '0'),\r\n borderTopWidth: parseFloat(style.borderTopWidth || '0'),\r\n borderRightWidth: parseFloat(style.borderRightWidth || '0'),\r\n borderBottomWidth: parseFloat(style.borderBottomWidth || '0'),\r\n borderLeftWidth: parseFloat(style.borderLeftWidth || '0'),\r\n paddingTop: parseFloat(style.paddingTop || '0'),\r\n paddingRight: parseFloat(style.paddingRight || '0'),\r\n paddingBottom: parseFloat(style.paddingBottom || '0'),\r\n paddingLeft: parseFloat(style.paddingLeft || '0'),\r\n marginTop: parseFloat(style.marginTop || '0'),\r\n marginRight: parseFloat(style.marginRight || '0'),\r\n marginBottom: parseFloat(style.marginBottom || '0'),\r\n marginLeft: parseFloat(style.marginLeft || '0'),\r\n boxSizing: style.boxSizing\r\n }\r\n }\r\n\r\n /**\r\n * 获取元素 content 区域宽度值\r\n * \r\n * layui 内置 jQuery v1.12.4 中的 jQuery.fn.width 始终对值四舍五入(3.x 已修复),\r\n * 在支持 subpixel Rendering 的浏览器中渲染表格,由于列宽分配时计算值精度不足,\r\n * 可能会导致一些小问题(#1726)\r\n * \r\n * 这个方法使用 getComputedStyle 获取精确的宽度值进行计算,为了尽可能和以前的行为\r\n * 保持一致(主要是隐藏元素内渲染 table 递归获取父元素宽度 https://github.com/layui/layui/discussions/2398)\r\n * 任何非预期的值,都回退到 jQuery.fn.width。未来的版本使用 ResizeObserver 时,可以直接获取表格视图元素的宽度,\r\n * 并移除兼容性代码\r\n * \r\n * @param {JQuery} elem - 元素的 jQuery 对象\r\n * \r\n * @see {@link https://learn.microsoft.com/zh-cn/archive/blogs/ie_cn/css-3}\r\n */\r\n Class.prototype.getContentWidth = function(elem){\r\n var that = this;\r\n\r\n if(\r\n // document\r\n elem[0].nodeType === 9 ||\r\n // IE 中 border-box 盒模型getComputedStyle 得到的 width/height 是按照 content-box 计算出来的\r\n (lay.ie && elem.css('box-sizing') === 'border-box') ||\r\n elem.css('display') === 'none'\r\n ){\r\n return elem.width();\r\n }\r\n\r\n var size = that.getElementSize(elem[0]);\r\n\r\n // display: none|inline 元素getComputedStyle 无法得到准确的 width/height\r\n if(typeof size === 'undefined' || !size.width){\r\n return elem.width();\r\n }else{\r\n return size.boxSizing === 'border-box'\r\n ? size.width - size.paddingLeft - size.paddingRight - size.borderLeftWidth - size.borderRightWidth\r\n : size.width\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 invalidNum = 0;\r\n var arr = [];\r\n var dataCache = [];\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 arr.push(table.clearCacheKey(item));\r\n dataCache.push(item);\r\n }\r\n });\r\n\r\n return {\r\n data: arr, // 选中的数据\r\n dataCache: dataCache, // 选中的原始缓存数据,包含内部特定字段\r\n isAll: (data.length && arr.length) ? (arr.length === (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 var isTreeTable = config.tree && config.tree.view;\r\n if (isTreeTable) {\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 if (isTreeTable) i1 = item1['LAY_DATA_INDEX']; // 兼容 treeTable 索引\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 }else if(item3.field && item3.type !== 'normal'){\r\n // https://gitee.com/layui/layui/issues/I8PHCR\r\n if(i1 == 0) fieldsIsHide[item3.field] = true;\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.initIndexName];\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","/**\r\n * layui.treeTable\r\n * 树表组件\r\n */\r\n\r\nlayui.define(['table'], function (exports) {\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var form = layui.form;\r\n var table = layui.table;\r\n var hint = layui.hint();\r\n\r\n // api\r\n var treeTable = {\r\n config: {},\r\n // 事件\r\n on: table.on,\r\n // 遍历字段\r\n eachCols: table.eachCols,\r\n index: table.index,\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 resize: table.resize,\r\n getOptions: table.getOptions,\r\n hideCol: table.hideCol,\r\n renderData: table.renderData\r\n };\r\n\r\n // 操作当前实例\r\n var thisTreeTable = 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 treeTable.reloadData(id, options, deep);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 获取当前实例\r\n * @param {string} id 表格id\r\n * @returns {Class}\r\n */\r\n var getThisTable = function (id) {\r\n var that = thisTreeTable.that[id];\r\n if (!that) hint.error(id ? ('The treeTable instance with ID \\'' + id + '\\' not found') : 'ID argument required');\r\n return that || null;\r\n }\r\n\r\n // 字符\r\n var MOD_NAME = 'treeTable';\r\n var MOD_ID = 'lay-table-id';\r\n var HIDE = 'layui-hide';\r\n\r\n var ELEM_VIEW = '.layui-table-view';\r\n var ELEM_TREE = '.layui-table-tree';\r\n var ELEM_TOOL = '.layui-table-tool';\r\n var ELEM_BOX = '.layui-table-box';\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_CHECKED = 'layui-table-checked';\r\n\r\n var TABLE_TREE = 'layui-table-tree';\r\n var LAY_DATA_INDEX = 'LAY_DATA_INDEX';\r\n var LAY_DATA_INDEX_HISTORY = 'LAY_DATA_INDEX_HISTORY';\r\n var LAY_PARENT_INDEX = 'LAY_PARENT_INDEX';\r\n var LAY_CHECKBOX_HALF = 'LAY_CHECKBOX_HALF';\r\n var LAY_EXPAND = 'LAY_EXPAND';\r\n var LAY_HAS_EXPANDED = 'LAY_HAS_EXPANDED';\r\n var LAY_ASYNC_STATUS = 'LAY_ASYNC_STATUS';\r\n var LAY_CASCADE = ['all', 'parent', 'children', 'none'];\r\n var HTML_TAG_RE = /<[^>]+?>/;\r\n var ICON_PROPS = ['flexIconClose', 'flexIconOpen', 'iconClose', 'iconOpen', 'iconLeaf', 'icon']\r\n\r\n /**\r\n * 构造器\r\n * @class\r\n */\r\n var Class = function (options) {\r\n var that = this;\r\n that.index = ++treeTable.index;\r\n that.config = $.extend(true, {}, that.config, treeTable.config, options);\r\n // 处理一些属性\r\n that.init();\r\n that.render();\r\n };\r\n\r\n var updateCache = function (id, childrenKey, data) {\r\n var tableCache = table.cache[id];\r\n layui.each(data || tableCache, function (index, item) {\r\n var itemDataIndex = item[LAY_DATA_INDEX] || '';\r\n if (itemDataIndex.indexOf('-') !== -1) {\r\n tableCache[itemDataIndex] = item;\r\n }\r\n item[childrenKey] && updateCache(id, childrenKey, item[childrenKey]);\r\n })\r\n }\r\n\r\n var updateOptions = function (id, options, reload) {\r\n var that = getThisTable(id);\r\n reload === 'reloadData' || (that.status = { // 用于记录一些状态信息\r\n expand: {} // 折叠状态\r\n });\r\n var thatOptionsTemp = $.extend(true, {}, that.getOptions(), options);\r\n var treeOptions = thatOptionsTemp.tree;\r\n var childrenKey = treeOptions.customName.children;\r\n var idKey = treeOptions.customName.id;\r\n // 处理属性\r\n delete options.hasNumberCol;\r\n delete options.hasChecboxCol;\r\n delete options.hasRadioCol;\r\n table.eachCols(null, function (i1, item1) {\r\n if (item1.type === 'numbers') {\r\n options.hasNumberCol = true;\r\n } else if (item1.type === 'checkbox') {\r\n options.hasChecboxCol = true;\r\n } else if (item1.type === 'radio') {\r\n options.hasRadioCol = true;\r\n }\r\n }, thatOptionsTemp.cols)\r\n\r\n var parseData = options.parseData;\r\n var done = options.done;\r\n\r\n // treeTable重载数据时会先加载显示顶层节点然后根据重载数据前的子节点展开状态展开相应的子节点\r\n // 那么如果重载数据前有滚动条滚动在某个位子,重新加载时顶层节点如果比较少,只显示顶层节点时没有滚动条的情况下,\r\n // 自动展开子节点后,滚动条就会显示在顶部,无法保持在重载数据之前的位置。\r\n // 处理保持滚动条的问题,重载数据前记录滚动条的位置\r\n if(reload === 'reloadData' && thatOptionsTemp.scrollPos === 'fixed'){\r\n that.scrollTopCache = that.config.elem.next().find(ELEM_BODY).scrollTop();\r\n }\r\n\r\n if (thatOptionsTemp.url) {\r\n // 异步加载的时候需要处理parseData进行转换\r\n if (!reload || (reload && parseData && !parseData.mod)) {\r\n options.parseData = function () {\r\n var parseDataThat = this;\r\n var args = arguments;\r\n var retData = args[0];\r\n if (layui.type(parseData) === 'function') {\r\n retData = parseData.apply(parseDataThat, args) || args[0];\r\n }\r\n var dataName = parseDataThat.response.dataName;\r\n // 处理 isSimpleData\r\n if (treeOptions.data.isSimpleData && !treeOptions.async.enable) { // 异步加载和 isSimpleData 不应该一起使用\r\n retData[dataName] = that.flatToTree(retData[dataName]);\r\n }\r\n // 处理节点状态\r\n updateStatus(retData[dataName], function (item) {\r\n item[LAY_EXPAND] = LAY_EXPAND in item ? item[LAY_EXPAND] : (item[idKey] !== undefined && that.status.expand[item[idKey]])\r\n }, childrenKey);\r\n\r\n if (parseDataThat.autoSort && parseDataThat.initSort && parseDataThat.initSort.type) {\r\n layui.sort(retData[dataName], parseDataThat.initSort.field, parseDataThat.initSort.type === 'desc', true)\r\n }\r\n\r\n that.initData(retData[dataName]);\r\n\r\n return retData;\r\n }\r\n options.parseData.mod = true\r\n }\r\n } else {\r\n if(options.data !== undefined){\r\n options.data = options.data || [];\r\n // 处理 isSimpleData\r\n if (treeOptions.data.isSimpleData) {\r\n options.data = that.flatToTree(options.data);\r\n }\r\n that.initData(options.data);\r\n }\r\n }\r\n\r\n if (!reload || (reload && done && !done.mod)) {\r\n options.done = function () {\r\n var args = arguments;\r\n var doneThat = this;\r\n // undefined: 初始 render 或 reload两者本质没有区别可以不做区分\r\n // 'reloadData': 重载数据\r\n // 'renderData': 重新渲染数据\r\n var renderType = args[3];\r\n var isRenderData = renderType === 'renderData';\r\n if (!isRenderData) {\r\n delete that.isExpandAll;\r\n }\r\n\r\n var tableView = this.elem.next();\r\n that.updateStatus(null, {\r\n LAY_HAS_EXPANDED: false // 去除已经打开过的状态\r\n });\r\n // 更新cache中的内容 将子节点也存到cache中\r\n updateCache(id, childrenKey);\r\n // 更新全选框的状态\r\n var layTableAllChooseElem = tableView.find('[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]');\r\n if (layTableAllChooseElem.length) {\r\n var checkStatus = treeTable.checkStatus(id);\r\n layTableAllChooseElem.prop({\r\n checked: checkStatus.isAll && checkStatus.data.length,\r\n indeterminate: !checkStatus.isAll && checkStatus.data.length\r\n })\r\n }\r\n if (!isRenderData && thatOptionsTemp.autoSort && thatOptionsTemp.initSort && thatOptionsTemp.initSort.type) {\r\n treeTable.sort(id);\r\n }\r\n\r\n that.renderTreeTable(tableView);\r\n\r\n // 恢复滚动条位置\r\n if(renderType === 'reloadData' && doneThat.scrollPos === 'fixed'){\r\n tableView.find(ELEM_BODY).scrollTop(that.scrollTopCache);\r\n }\r\n\r\n if (layui.type(done) === 'function') {\r\n return done.apply(doneThat, args);\r\n }\r\n }\r\n options.done.mod = true;\r\n }\r\n\r\n // 处理图标\r\n if(options && options.tree && options.tree.view){\r\n layui.each(ICON_PROPS, function(i, iconProp){\r\n if(options.tree.view[iconProp] !== undefined){\r\n options.tree.view[iconProp] = that.normalizedIcon(options.tree.view[iconProp]);\r\n }\r\n })\r\n }\r\n }\r\n\r\n Class.prototype.init = function () {\r\n var that = this;\r\n var options = that.config;\r\n var cascade = options.tree.data.cascade;\r\n if (LAY_CASCADE.indexOf(cascade) === -1) {\r\n options.tree.data.cascade = 'all'; // 超出范围的都重置为全联动\r\n }\r\n\r\n // 先初始一个空的表格以便拿到对应的表格实例信息\r\n var tableIns = table.render($.extend({}, options, {\r\n data: [],\r\n url: '',\r\n done: null\r\n }))\r\n var id = tableIns.config.id;\r\n thisTreeTable.that[id] = that; // 记录当前实例对象\r\n that.tableIns = tableIns;\r\n\r\n updateOptions(id, options);\r\n }\r\n\r\n // 初始默认配置\r\n Class.prototype.config = {\r\n tree: {\r\n customName: {\r\n children: \"children\", // 节点数据中保存子节点数据的属性名称\r\n isParent: \"isParent\", // 节点数据保存节点是否为父节点的属性名称\r\n name: \"name\", // 节点数据保存节点名称的属性名称\r\n id: \"id\", // 唯一标识的属性名称\r\n pid: \"parentId\", // 父节点唯一标识的属性名称\r\n icon: \"icon\" // 图标的属性名称\r\n },\r\n view: {\r\n indent: 14, // 层级缩进量\r\n flexIconClose: '<i class=\"layui-icon layui-icon-triangle-r\"></i>', // 关闭时候的折叠图标\r\n flexIconOpen: '<i class=\"layui-icon layui-icon-triangle-d\"></i>', // 打开时候的折叠图标\r\n showIcon: true, // 是否显示图标(节点类型图标)\r\n icon: '', // 节点图标,如果设置了这个属性或者数据中有这个字段信息,不管打开还是关闭都以这个图标的值为准\r\n iconClose: '<i class=\"layui-icon layui-icon-folder\"></i>', // 关闭时候的图标\r\n iconOpen: '<i class=\"layui-icon layui-icon-folder-open\"></i>', // 打开时候的图标\r\n iconLeaf: '<i class=\"layui-icon layui-icon-leaf\"></i>', // 叶子节点的图标\r\n showFlexIconIfNotParent: false, // 当节点不是父节点的时候是否显示折叠图标\r\n dblClickExpand: true, // 双击节点时,是否自动展开父节点的标识\r\n expandAllDefault: false // 默认展开所有节点\r\n },\r\n data: {\r\n isSimpleData: false, // 是否简单数据模式\r\n rootPid: null, // 根节点的父 ID 值\r\n cascade: 'all' // 级联方式 默认全部级联all 可选 级联父 parent 级联子 children\r\n },\r\n async: {\r\n enable: false, // 是否开启异步加载模式,只有开启的时候其他参数才起作用\r\n url: '', // 异步加载的接口,可以根据需要设置与顶层接口不同的接口,如果相同可以不设置该参数\r\n type: null, // 请求的接口类型,设置可缺省同上\r\n contentType: null, // 提交参数的数据类型,设置可缺省同上\r\n headers: null, // 设置可缺省同上\r\n where: null, // 设置可缺省同上\r\n autoParam: [] // 自动参数\r\n },\r\n callback: {\r\n beforeExpand: null, // 展开前的回调 return false 可以阻止展开的动作\r\n onExpand: null // 展开之后的回调\r\n }\r\n },\r\n };\r\n\r\n Class.prototype.normalizedIcon = function(iconStr){\r\n return iconStr\r\n ? HTML_TAG_RE.test(iconStr) ? iconStr : '<i class=\"' + iconStr +'\"></i>'\r\n : ''\r\n }\r\n\r\n Class.prototype.getOptions = function () {\r\n var that = this;\r\n if (that.tableIns) {\r\n return table.getOptions(that.tableIns.config.id); // 获取表格的实时配置信息\r\n } else {\r\n return that.config;\r\n }\r\n };\r\n\r\n function flatToTree(flatArr, idKey, pIdKey, childrenKey, rootPid) {\r\n idKey = idKey || 'id';\r\n pIdKey = pIdKey || 'parentId';\r\n childrenKey = childrenKey || 'children';\r\n // 创建一个空的 map 对象,用于保存所有的节点\r\n var map = {};\r\n var rootNodes = [];\r\n\r\n var idTemp = '';\r\n var pidTemp = '';\r\n layui.each(flatArr, function(index, item){\r\n idTemp = idKey + item[idKey];\r\n pidTemp = idKey + item[pIdKey];\r\n\r\n // 将节点存入 map 对象\r\n if(!map[idTemp]){\r\n map[idTemp] = {};\r\n map[idTemp][childrenKey] = [];\r\n }\r\n\r\n // 合并节点\r\n var tempObj = {};\r\n tempObj[childrenKey] = map[idTemp][childrenKey];\r\n map[idTemp] = $.extend({}, item, tempObj);\r\n\r\n var isRootNode = (rootPid ? map[idTemp][pIdKey] === rootPid : !map[idTemp][pIdKey]);\r\n if(isRootNode){\r\n rootNodes.push(map[idTemp]);\r\n }else{\r\n if(!map[pidTemp]){\r\n map[pidTemp] = {};\r\n map[pidTemp][childrenKey] = [];\r\n }\r\n map[pidTemp][childrenKey].push(map[idTemp]);\r\n }\r\n });\r\n\r\n return rootNodes;\r\n }\r\n\r\n Class.prototype.flatToTree = function (tableData) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var tableId = options.id;\r\n\r\n tableData = tableData || table.cache[tableId];\r\n\r\n return flatToTree(tableData, customName.id, customName.pid, customName.children, treeOptions.data.rootPid)\r\n }\r\n\r\n Class.prototype.treeToFlat = function (tableData, parentId, parentIndex) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var childrenKey = customName.children;\r\n var pIdKey = customName.pid;\r\n\r\n var flat = [];\r\n layui.each(tableData, function (i1, item1) {\r\n var dataIndex = (parentIndex ? parentIndex + '-' : '') + i1;\r\n var dataNew = $.extend({}, item1);\r\n \r\n dataNew[pIdKey] = typeof item1[pIdKey] !== 'undefined' ? item1[pIdKey] : parentId;\r\n flat.push(dataNew);\r\n flat = flat.concat(that.treeToFlat(item1[childrenKey], item1[customName.id], dataIndex));\r\n });\r\n\r\n return flat;\r\n }\r\n\r\n // 通过当前行数据返回 treeNode 信息\r\n Class.prototype.getTreeNode = function (data) {\r\n var that = this;\r\n if (!data) {\r\n return hint.error('找不到节点数据');\r\n }\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var customName = treeOptions.customName;\r\n\r\n // 带上一些常用的方法\r\n return {\r\n data: data,\r\n dataIndex: data[LAY_DATA_INDEX],\r\n getParentNode: function () {\r\n return that.getNodeByIndex(data[LAY_PARENT_INDEX])\r\n },\r\n };\r\n }\r\n\r\n // 通过 index 返回节点信息\r\n Class.prototype.getNodeByIndex = function (index) {\r\n var that = this;\r\n var treeNodeData = that.getNodeDataByIndex(index);\r\n if (!treeNodeData) {\r\n return hint.error('找不到节点数据');\r\n }\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var parentKey = customName.parent;\r\n var tableId = options.id;\r\n\r\n var treeNode = {\r\n data: treeNodeData,\r\n dataIndex: treeNodeData[LAY_DATA_INDEX],\r\n getParentNode: function () {\r\n return that.getNodeByIndex(treeNodeData[LAY_PARENT_INDEX])\r\n },\r\n update: function (data) {\r\n return treeTable.updateNode(tableId, index, data)\r\n },\r\n remove: function () {\r\n return treeTable.removeNode(tableId, index)\r\n },\r\n expand: function (opts) {\r\n return treeTable.expandNode(tableId, $.extend({}, opts, {\r\n index: index\r\n }))\r\n },\r\n setChecked: function (opts) {\r\n return treeTable.setRowChecked(tableId, $.extend({}, opts, {\r\n index: index\r\n }))\r\n }\r\n };\r\n\r\n treeNode.dataIndex = index;\r\n return treeNode;\r\n }\r\n\r\n // 通过 id 获取节点信息\r\n Class.prototype.getNodeById = function (id) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var idKey = customName.id;\r\n\r\n // 通过 id 拿到数据的 dataIndex\r\n var dataIndex = '';\r\n var tableDataFlat = treeTable.getData(options.id, true);\r\n layui.each(tableDataFlat, function (i1, item1) {\r\n if (item1[idKey] === id) {\r\n dataIndex = item1[LAY_DATA_INDEX];\r\n return true;\r\n }\r\n })\r\n if (!dataIndex) {\r\n return;\r\n }\r\n\r\n // 用 index\r\n return that.getNodeByIndex(dataIndex);\r\n }\r\n\r\n // 通过 index 获取节点数据\r\n Class.prototype.getNodeDataByIndex = function (index, clone, newValue) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var tableCache = table.cache[tableId];\r\n\r\n // 获取当前行中的数据\r\n var dataCache = tableCache[index];\r\n\r\n // 若非删除操作,则返回合并后的数据\r\n if (newValue !== 'delete' && dataCache) {\r\n $.extend(dataCache, newValue);\r\n return clone ? $.extend({}, dataCache) : dataCache;\r\n }\r\n\r\n // 删除操作\r\n var dataRet = tableCache;\r\n var indexArr = String(index).split('-');\r\n\r\n // if (options.url || indexArr.length > 1) tableCache = null // 只有在删除根节点的时候才需要处理\r\n\r\n // 根据 index 进行数据处理\r\n for (var i = 0, childrenKey = treeOptions.customName.children; i < indexArr.length; i++) {\r\n if (newValue && i === indexArr.length - 1) {\r\n if (newValue === 'delete') { // 删除并返回当前数据\r\n // 同步 cache --- 此段代码注释缘由data 属性模式造成数据重复执行 splice (@Gitee: #I7Z0A/I82E2S)\r\n /*if (tableCache) {\r\n layui.each(tableCache, function (i1, item1) {\r\n if (item1[LAY_DATA_INDEX] === index) {\r\n tableCache.splice(i1, 1);\r\n return true;\r\n }\r\n })\r\n }*/\r\n return (i ? dataRet[childrenKey] : dataRet).splice(indexArr[i], 1)[0];\r\n } else { // 更新值\r\n $.extend((i ? dataRet[childrenKey] : dataRet)[indexArr[i]], newValue);\r\n }\r\n }\r\n dataRet = i ? dataRet[childrenKey][indexArr[i]] : dataRet[indexArr[i]];\r\n }\r\n return clone ? $.extend({}, dataRet) : dataRet;\r\n }\r\n\r\n treeTable.getNodeDataByIndex = function (id, index) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n return that.getNodeDataByIndex(index, true);\r\n }\r\n\r\n // 判断是否是父节点\r\n var checkIsParent = function (data, isParentKey, childrenKey) {\r\n isParentKey = isParentKey || 'isParent';\r\n childrenKey = childrenKey || 'children';\r\n layui.each(data, function (i1, item1) {\r\n if (!(isParentKey in item1)) {\r\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\r\n checkIsParent(item1[childrenKey]);\r\n }\r\n })\r\n }\r\n\r\n Class.prototype.initData = function (data, parentIndex) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n\r\n data = data || that.getTableData();\r\n\r\n var customName = treeOptions.customName;\r\n var isParentKey = customName.isParent;\r\n var childrenKey = customName.children;\r\n\r\n var update = function(data, parentIndex){\r\n layui.each(data, function (i1, item1) {\r\n if (!(isParentKey in item1)) {\r\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\r\n }\r\n item1[LAY_DATA_INDEX_HISTORY] = item1[LAY_DATA_INDEX];\r\n item1[LAY_PARENT_INDEX] = parentIndex = parentIndex || '';\r\n var dataIndex = item1[LAY_DATA_INDEX] = (parentIndex ? parentIndex + '-' : '') + i1;\r\n update(item1[childrenKey] || [], dataIndex);\r\n });\r\n }\r\n\r\n update(data, parentIndex);\r\n\r\n updateCache(tableId, childrenKey, data);\r\n\r\n return data;\r\n }\r\n\r\n // 与 tableId 有关带防抖的方法\r\n var debounceFn = (function () {\r\n var fn = {};\r\n return function (tableId, func, wait) {\r\n if (!fn[tableId]) {\r\n fn[tableId] = layui.debounce(func, wait);\r\n }\r\n return fn[tableId];\r\n }\r\n })()\r\n\r\n // 优化参数,添加一个 getNodeByIndex 方法 只传 表格id 和行 dataIndex 分几步优化 todo\r\n var expandNode = function (treeNode, expandFlag, sonSign, focus, callbackFlag) {\r\n // treeNode // 需要展开的节点\r\n var trElem = treeNode.trElem;\r\n var tableViewElem = treeNode.tableViewElem || trElem.closest(ELEM_VIEW);\r\n var tableId = treeNode.tableId || tableViewElem.attr(MOD_ID);\r\n var options = treeNode.options || table.getOptions(tableId);\r\n var dataIndex = treeNode.dataIndex || trElem.attr('lay-data-index'); // 可能出现多层\r\n var treeTableThat = getThisTable(tableId);\r\n\r\n var treeOptions = options.tree || {};\r\n var customName = treeOptions.customName || {};\r\n var isParentKey = customName.isParent;\r\n\r\n var trData = treeTableThat.getNodeDataByIndex(dataIndex);\r\n\r\n // 后续调优:对已经展开的节点进行展开和已经关闭的节点进行关闭应该做优化减少不必要的代码执行 todo\r\n var isToggle = layui.type(expandFlag) !== 'boolean';\r\n var trExpand = isToggle ? !trData[LAY_EXPAND] : expandFlag;\r\n var retValue = trData[isParentKey] ? trExpand : null;\r\n\r\n if (callbackFlag && trExpand != trData[LAY_EXPAND] && (!trData[LAY_ASYNC_STATUS] || trData[LAY_ASYNC_STATUS] === 'local')) {\r\n var beforeExpand = treeOptions.callback.beforeExpand;\r\n if (layui.type(beforeExpand) === 'function') {\r\n if (beforeExpand(tableId, trData, expandFlag) === false) {\r\n return retValue;\r\n }\r\n }\r\n }\r\n\r\n var trExpanded = trData[LAY_HAS_EXPANDED]; // 展开过,包括异步加载\r\n\r\n // 找到表格中的同类节点需要找到lay-data-index一致的所有行\r\n var trsElem = tableViewElem.find('tr[lay-data-index=\"' + dataIndex + '\"]');\r\n var flexIconElem = trsElem.find('.layui-table-tree-flexIcon');\r\n treeTableThat.updateNodeIcon({\r\n scopeEl: trsElem,\r\n isExpand: trExpand,\r\n isParent: trData[isParentKey]\r\n });\r\n trData[LAY_EXPAND] = trExpand;\r\n var trDataId = trData[customName.id];\r\n trDataId !== undefined && (treeTableThat.status.expand[trDataId] = trExpand);\r\n if (retValue === null) {\r\n return retValue;\r\n }\r\n\r\n var childNodes = trData[customName.children] || [];\r\n // 处理子节点展示与否\r\n if (trExpand) {\r\n // 展开\r\n if (trExpanded) { // 已经展开过\r\n if (!childNodes.length) return ;//异步如果子节点没有数据情况下双点行展开所有已展开的节点问题解决\r\n trsElem.nextAll(childNodes.map(function (value, index, array) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).removeClass(HIDE);\r\n layui.each(childNodes, function (i1, item1) {\r\n if (!item1[isParentKey]) {\r\n return;\r\n }\r\n\r\n if (sonSign && !isToggle && !item1[LAY_EXPAND]) { // 非状态切换的情况下\r\n // 级联展开子节点\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, expandFlag, sonSign, focus, callbackFlag);\r\n } else if (item1[LAY_EXPAND]) { // 初始化级联展开\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, true);\r\n }\r\n });\r\n } else {\r\n var asyncSetting = treeOptions.async || {};\r\n var asyncUrl = asyncSetting.url || options.url;\r\n if (asyncSetting.enable && trData[isParentKey] && (!trData[LAY_ASYNC_STATUS] || trData[LAY_ASYNC_STATUS] === 'error')) {\r\n trData[LAY_ASYNC_STATUS] = 'loading';\r\n flexIconElem.html('<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-loop layui-anim-rotate\"></i>');\r\n\r\n // 异步获取子节点数据成功之后处理方法\r\n var asyncSuccessFn = function (data) {\r\n trData[LAY_ASYNC_STATUS] = 'success';\r\n trData[customName.children] = data;\r\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX])\r\n expandNode(treeNode, true, isToggle ? false : sonSign, focus, callbackFlag);\r\n }\r\n\r\n var format = asyncSetting.format; // 自定义数据返回方法\r\n if (layui.type(format) === 'function') {\r\n format(trData, options, asyncSuccessFn);\r\n return retValue;\r\n }\r\n\r\n var params = {};\r\n // 参数\r\n var data = $.extend(params, asyncSetting.where || options.where);\r\n var asyncAutoParam = asyncSetting.autoParam;\r\n layui.each(asyncAutoParam, function (index, item) {\r\n var itemStr = item;\r\n var itemArr = item.split('=');\r\n data[itemArr[0].trim()] = trData[(itemArr[1] || itemArr[0]).trim()]\r\n })\r\n\r\n var asyncContentType = asyncSetting.contentType || options.contentType;\r\n if (asyncContentType && asyncContentType.indexOf(\"application/json\") == 0) { // 提交 json 格式\r\n data = JSON.stringify(data);\r\n }\r\n var asyncType = asyncSetting.method || options.method;\r\n var asyncDataType = asyncSetting.dataType || options.dataType;\r\n var asyncJsonpCallback = asyncSetting.jsonpCallback || options.jsonpCallback;\r\n var asyncHeaders = asyncSetting.headers || options.headers;\r\n var asyncParseData = asyncSetting.parseData || options.parseData;\r\n var asyncResponse = asyncSetting.response || options.response;\r\n\r\n $.ajax({\r\n type: asyncType || 'get',\r\n url: asyncUrl,\r\n contentType: asyncContentType,\r\n data: data,\r\n dataType: asyncDataType || 'json',\r\n jsonpCallback: asyncJsonpCallback,\r\n headers: asyncHeaders || {},\r\n success: function (res) {\r\n // 若有数据解析的回调,则获得其返回的数据\r\n if (typeof asyncParseData === 'function') {\r\n res = asyncParseData.call(options, res) || res;\r\n }\r\n // 检查数据格式是否符合规范\r\n if (res[asyncResponse.statusName] != asyncResponse.statusCode) {\r\n trData[LAY_ASYNC_STATUS] = 'error';\r\n trData[LAY_EXPAND] = false;\r\n // 异常处理 todo\r\n flexIconElem.html('<i class=\"layui-icon layui-icon-refresh\"></i>');\r\n // 事件\r\n } else {\r\n // 正常返回\r\n asyncSuccessFn(res[asyncResponse.dataName]);\r\n }\r\n },\r\n error: function (e, msg) {\r\n trData[LAY_ASYNC_STATUS] = 'error';\r\n trData[LAY_EXPAND] = false;\r\n // 异常处理 todo\r\n typeof options.error === 'function' && options.error(e, msg);\r\n }\r\n });\r\n return retValue;\r\n }\r\n trExpanded = trData[LAY_HAS_EXPANDED] = true;\r\n if (childNodes.length) {\r\n // 判断是否需要排序\r\n if (options.initSort && (!options.url || options.autoSort)) {\r\n var initSort = options.initSort;\r\n if (initSort.type) {\r\n layui.sort(childNodes, initSort.field, initSort.type === 'desc', true);\r\n } else {\r\n // 恢复默认\r\n layui.sort(childNodes, table.config.indexName, null, true);\r\n }\r\n }\r\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX]);\r\n // 将数据通过模板得出节点的html代码\r\n var str2 = table.getTrHtml(tableId, childNodes, null, null, dataIndex);\r\n\r\n var str2Obj = {\r\n trs: $(str2.trs.join('')),\r\n trs_fixed: $(str2.trs_fixed.join('')),\r\n trs_fixed_r: $(str2.trs_fixed_r.join(''))\r\n }\r\n var dataLevel = dataIndex.split('-').length - 1;\r\n var dataLevelNew = (dataLevel || 0) + 1;\r\n layui.each(childNodes, function (childIndex, childItem) {\r\n str2Obj.trs.eq(childIndex).attr({\r\n 'data-index': childItem[LAY_DATA_INDEX],\r\n 'lay-data-index': childItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevelNew\r\n }).data('index', childItem[LAY_DATA_INDEX]);\r\n\r\n str2Obj.trs_fixed.eq(childIndex).attr({\r\n 'data-index': childItem[LAY_DATA_INDEX],\r\n 'lay-data-index': childItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevelNew\r\n }).data('index', childItem[LAY_DATA_INDEX]);\r\n\r\n str2Obj.trs_fixed_r.eq(childIndex).attr({\r\n 'data-index': childItem[LAY_DATA_INDEX],\r\n 'lay-data-index': childItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevelNew\r\n }).data('index', childItem[LAY_DATA_INDEX]);\r\n })\r\n\r\n tableViewElem.find(ELEM_MAIN).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs);\r\n tableViewElem.find(ELEM_FIXL).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed);\r\n tableViewElem.find(ELEM_FIXR).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed_r);\r\n\r\n // 初始化新增的节点中的内容\r\n treeTableThat.renderTreeTable(str2Obj.trs, dataLevelNew);\r\n\r\n if (sonSign && !isToggle) { // 非状态切换的情况下\r\n // 级联展开/关闭子节点\r\n layui.each(childNodes, function (i1, item1) {\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, expandFlag, sonSign, focus, callbackFlag);\r\n })\r\n }\r\n }\r\n }\r\n } else {\r\n treeTableThat.isExpandAll = false;\r\n // 关闭\r\n if (sonSign && !isToggle) { // 非状态切换的情况下\r\n layui.each(childNodes, function (i1, item1) {\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, expandFlag, sonSign, focus, callbackFlag);\r\n });\r\n tableViewElem.find(childNodes.map(function (value, index, array) { // 只隐藏直接子节点,其他由递归的处理\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).addClass(HIDE);\r\n } else {\r\n var childNodesFlat = treeTableThat.treeToFlat(childNodes, trData[customName.id], dataIndex);\r\n tableViewElem.find(childNodesFlat.map(function (value, index, array) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).addClass(HIDE);\r\n }\r\n }\r\n\r\n\r\n debounceFn('resize-' + tableId, function () {\r\n treeTable.resize(tableId);\r\n }, 0)();\r\n\r\n if (callbackFlag && trData[LAY_ASYNC_STATUS] !== 'loading') {\r\n var onExpand = treeOptions.callback.onExpand;\r\n layui.type(onExpand) === 'function' && onExpand(tableId, trData, trExpand);\r\n }\r\n\r\n return retValue;\r\n }\r\n\r\n /**\r\n * 展开或关闭一个节点\r\n * @param {String} id 树表id\r\n * @param {Object} opts\r\n * @param {Number|String} opts.index 展开行的数据下标\r\n * @param {Boolean} [opts.expandFlag] 展开、关闭、切换\r\n * @param {Boolean} [opts.inherit] 是否级联子节点\r\n * @param {Boolean} [opts.callbackFlag] 是否触发事件\r\n * @return [{Boolean}] 状态结果\r\n * */\r\n treeTable.expandNode = function (id, opts) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n opts = opts || {};\r\n\r\n var index = opts.index;\r\n var expandFlag = opts.expandFlag;\r\n var sonSign = opts.inherit;\r\n var callbackFlag = opts.callbackFlag;\r\n\r\n var options = that.getOptions();\r\n var tableViewElem = options.elem.next();\r\n return expandNode({\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + index + '\"]').first()\r\n }, expandFlag, sonSign, null, callbackFlag)\r\n };\r\n\r\n /**\r\n * 展开或关闭全部节点\r\n * @param {String} id 树表id\r\n * @param {Boolean} expandFlag 展开或关闭\r\n * */\r\n treeTable.expandAll = function (id, expandFlag) {\r\n if (layui.type(expandFlag) !== 'boolean') {\r\n return hint.error('expandAll 的展开状态参数只接收true/false')\r\n }\r\n\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n that.isExpandAll = expandFlag;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableView = options.elem.next();\r\n var isParentKey = treeOptions.customName.isParent;\r\n var idKey = treeOptions.customName.id;\r\n var showFlexIconIfNotParent = treeOptions.view.showFlexIconIfNotParent;\r\n\r\n if (!expandFlag) {\r\n // 关闭所有\r\n // 将所有已经打开的节点的状态设置为关闭,\r\n that.updateStatus(null, function (d) {\r\n if (d[isParentKey] || showFlexIconIfNotParent) {\r\n d[LAY_EXPAND] = false;\r\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = false);\r\n }\r\n }) // 只处理当前页如果需要处理全部表格需要用treeTable.updateStatus\r\n // 隐藏所有非顶层的节点\r\n tableView.find('.layui-table-box tbody tr[data-level!=\"0\"]').addClass(HIDE);\r\n\r\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconClose);\r\n treeOptions.view.showIcon && tableView\r\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\r\n .html(treeOptions.view.iconClose);\r\n } else {\r\n var tableDataFlat = treeTable.getData(id, true);\r\n // 展开所有\r\n // 存在异步加载\r\n if (treeOptions.async.enable) {\r\n // 判断是否有未加载过的节点\r\n var isAllAsyncDone = true;\r\n layui.each(tableDataFlat, function (i1, item1) {\r\n if (item1[isParentKey] && !item1[LAY_ASYNC_STATUS]) {\r\n isAllAsyncDone = false;\r\n return true;\r\n }\r\n })\r\n // 有未加载过的节点\r\n if (!isAllAsyncDone) {\r\n // 逐个展开\r\n layui.each(treeTable.getData(id), function (i1, item1) {\r\n treeTable.expandNode(id, {\r\n index: item1[LAY_DATA_INDEX],\r\n expandFlag: true,\r\n inherit: true\r\n })\r\n })\r\n return;\r\n }\r\n }\r\n\r\n // 先判断是否全部打开过了\r\n var isAllExpanded = true;\r\n layui.each(tableDataFlat, function (i1, item1) {\r\n if (item1[isParentKey] && !item1[LAY_HAS_EXPANDED]) {\r\n isAllExpanded = false;\r\n return true;\r\n }\r\n })\r\n // 如果全部节点已经都打开过,就可以简单处理跟隐藏所有节点反操作\r\n if (isAllExpanded) {\r\n that.updateStatus(null, function (d) {\r\n if (d[isParentKey] || showFlexIconIfNotParent) {\r\n d[LAY_EXPAND] = true;\r\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\r\n }\r\n });\r\n // 显示所有子节点\r\n tableView.find('tbody tr[data-level!=\"0\"]').removeClass(HIDE);\r\n // 处理节点的图标\r\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconOpen);\r\n treeOptions.view.showIcon && tableView\r\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\r\n .html(treeOptions.view.iconOpen);\r\n } else {\r\n // 如果有未打开过的父节点,将 tr 内容全部重新生成\r\n that.updateStatus(null, function (d) {\r\n if (d[isParentKey] || showFlexIconIfNotParent) {\r\n d[LAY_EXPAND] = true;\r\n d[LAY_HAS_EXPANDED] = true;\r\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\r\n }\r\n });\r\n if (options.initSort && options.initSort.type && options.autoSort) {\r\n return treeTable.sort(id);\r\n }\r\n var trAll = table.getTrHtml(id, tableDataFlat);\r\n\r\n var trAllObj = {\r\n trs: $(trAll.trs.join('')),\r\n trs_fixed: $(trAll.trs_fixed.join('')),\r\n trs_fixed_r: $(trAll.trs_fixed_r.join(''))\r\n }\r\n var props;\r\n layui.each(tableDataFlat, function (dataIndex, dataItem) {\r\n var dataLevel = dataItem[LAY_DATA_INDEX].split('-').length - 1;\r\n props = {\r\n 'data-index': dataItem[LAY_DATA_INDEX],\r\n 'lay-data-index': dataItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevel\r\n };\r\n trAllObj.trs.eq(dataIndex).attr(props).data('index', dataItem[LAY_DATA_INDEX]);\r\n trAllObj.trs_fixed.eq(dataIndex).attr(props).data('index', dataItem[LAY_DATA_INDEX]);\r\n trAllObj.trs_fixed_r.eq(dataIndex).attr(props).data('index', dataItem[LAY_DATA_INDEX]);\r\n })\r\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\r\n tableView.find('.layui-table-' + item + ' tbody').html(trAllObj[['trs', 'trs_fixed', 'trs_fixed_r'][i]]);\r\n });\r\n that.renderTreeTable(tableView, 0, false);\r\n }\r\n }\r\n treeTable.resize(id);\r\n }\r\n\r\n /**\r\n * @typedef updateNodeIconOptions\r\n * @prop {JQuery} scopeEl - tr 元素\r\n * @prop {boolean} isExpand - 是否是展开图标\r\n * @prop {boolean} isParent - 是否是父节点图标\r\n */\r\n /**\r\n * 更新节点图标\r\n * @param {updateNodeIconOptions} opts\r\n */\r\n Class.prototype.updateNodeIcon = function(opts){\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree || {};\r\n var scopeEl = opts.scopeEl;\r\n var isExpand = opts.isExpand;\r\n var isParent = opts.isParent;\r\n\r\n // 处理折叠按钮图标\r\n var flexIconElem = scopeEl.find('.layui-table-tree-flexIcon');\r\n\r\n flexIconElem\r\n .css('visibility', isParent || treeOptions.view.showFlexIconIfNotParent ? 'visible' : 'hidden')\r\n .html(isExpand ? treeOptions.view.flexIconOpen : treeOptions.view.flexIconClose);\r\n // 处理节点图标\r\n if(treeOptions.view.showIcon){\r\n var nodeIconElem = scopeEl.find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom)');\r\n var nodeIcon = isParent \r\n ? (isExpand ? treeOptions.view.iconOpen : treeOptions.view.iconClose)\r\n : treeOptions.view.iconLeaf;\r\n\r\n nodeIconElem\r\n .toggleClass('layui-table-tree-iconLeaf', !isParent)\r\n .html(nodeIcon);\r\n }\r\n }\r\n\r\n Class.prototype.renderTreeTable = function (tableView, level, sonSign) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var tableViewElem = options.elem.next();\r\n !tableViewElem.hasClass(TABLE_TREE) && tableViewElem.addClass(TABLE_TREE);\r\n var tableId = options.id;\r\n var treeOptions = options.tree || {};\r\n var treeOptionsData = treeOptions.data || {};\r\n var treeOptionsView = treeOptions.view || {};\r\n var customName = treeOptions.customName || {};\r\n var isParentKey = customName.isParent;\r\n var tableFilterId = tableViewElem.attr('lay-filter');\r\n var treeTableThat = that;\r\n var existsData = options.data.length; // 是否直接赋值 data\r\n // var tableData = treeTableThat.getTableData();\r\n\r\n level = level || 0;\r\n\r\n if (!level) {\r\n // 初始化的表格里面没有level信息可以作为顶层节点的判断\r\n tableViewElem.find('.layui-table-body tr:not([data-level])').attr('data-level', level);\r\n layui.each(table.cache[tableId], function (dataIndex, dataItem) {\r\n // fix: 修正直接赋值 data 时顶层节点 LAY_DATA_INDEX 值的异常问题\r\n if (existsData) {\r\n dataItem[LAY_DATA_INDEX] = String(dataIndex);\r\n }\r\n var layDataIndex = dataItem[LAY_DATA_INDEX];\r\n tableViewElem.find('.layui-table-main tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', layDataIndex);\r\n tableViewElem.find('.layui-table-fixed-l tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', layDataIndex);\r\n tableViewElem.find('.layui-table-fixed-r tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', layDataIndex);\r\n })\r\n }\r\n\r\n var dataExpand = null; // 记录需要展开的数据\r\n var nameKey = customName.name;\r\n var indent = treeOptionsView.indent || 14;\r\n layui.each(tableView.find('td[data-field=\"' + nameKey + '\"]'), function (index, item) {\r\n item = $(item);\r\n var trElem = item.closest('tr');\r\n var itemCell = item.children('.layui-table-cell');\r\n if (itemCell.hasClass('layui-table-tree-item')) {\r\n return;\r\n }\r\n var trIndex = trElem.attr('lay-data-index');\r\n if (!trIndex) { // 排除在统计行中的节点\r\n return;\r\n }\r\n trElem = tableViewElem.find('tr[lay-data-index=\"' + trIndex + '\"]');\r\n var trData = treeTableThat.getNodeDataByIndex(trIndex);\r\n\r\n if (trData[LAY_EXPAND] && trData[isParentKey]) {\r\n // 需要展开\r\n dataExpand = dataExpand || {};\r\n dataExpand[trIndex] = true;\r\n }\r\n if (trData[LAY_CHECKBOX_HALF]) {\r\n trElem.find('input[type=\"checkbox\"][name=\"layTableCheckbox\"]').prop('indeterminate', true);\r\n }\r\n\r\n var htmlTemp = itemCell.html();\r\n itemCell = trElem.find('td[data-field=\"' + nameKey + '\"]>div.layui-table-cell');\r\n itemCell.addClass('layui-table-tree-item');\r\n var flexIconElem = itemCell\r\n .html(['<div class=\"layui-inline layui-table-tree-flexIcon\" ',\r\n 'style=\"',\r\n 'margin-left: ' + (indent * trElem.attr('data-level')) + 'px;',\r\n (trData[isParentKey] || treeOptionsView.showFlexIconIfNotParent) ? '' : ' visibility: hidden;',\r\n '\">',\r\n trData[LAY_EXPAND] ? treeOptionsView.flexIconOpen : treeOptionsView.flexIconClose, // 折叠图标\r\n '</div>',\r\n treeOptionsView.showIcon ? '<div class=\"layui-inline layui-table-tree-nodeIcon' +\r\n ((trData[customName.icon] || treeOptionsView.icon) ? ' layui-table-tree-iconCustom' : '') +\r\n (trData[isParentKey] ? '' : ' layui-table-tree-iconLeaf') +\r\n '\">' +\r\n (that.normalizedIcon(trData[customName.icon]) || treeOptionsView.icon ||\r\n (trData[isParentKey] ?\r\n (trData[LAY_EXPAND] ? treeOptionsView.iconOpen : treeOptionsView.iconClose) :\r\n treeOptionsView.iconLeaf) ||\r\n '') + '</div>' : '', // 区分父子节点\r\n htmlTemp].join('')) // 图标要可定制\r\n .find('.layui-table-tree-flexIcon');\r\n\r\n // 添加展开按钮的事件\r\n flexIconElem.on('click', function (event) {\r\n layui.stope(event);\r\n // 处理数据\r\n // var trElem = item.closest('tr');\r\n expandNode({trElem: trElem}, null, null, null, true);\r\n });\r\n });\r\n\r\n if (!level && treeOptions.view.expandAllDefault && that.isExpandAll === undefined) {\r\n return treeTable.expandAll(tableId, true); // 默认展开全部\r\n }\r\n\r\n // 当前层的数据看看是否需要展开\r\n if (sonSign !== false && dataExpand) {\r\n layui.each(dataExpand, function (index, item) {\r\n var trDefaultExpand = tableViewElem.find('tr[lay-data-index=\"' + index + '\"]');\r\n trDefaultExpand.find('.layui-table-tree-flexIcon').html(treeOptionsView.flexIconOpen);\r\n expandNode({trElem: trDefaultExpand.first()}, true);\r\n });\r\n // #1463 expandNode 中已经展开过的节点不会重新渲染\r\n debounceFn('renderTreeTable2-' + tableId, function () {\r\n form.render($('.layui-table-tree[' + MOD_ID + '=\"' + tableId + '\"]'));\r\n }, 0)();\r\n } else {\r\n debounceFn('renderTreeTable-' + tableId, function () {\r\n options.hasNumberCol && formatNumber(that);\r\n form.render($('.layui-table-tree[' + MOD_ID + '=\"' + tableId + '\"]'));\r\n }, 0)();\r\n }\r\n }\r\n\r\n var formatNumber = function (that) {\r\n var options = that.getOptions();\r\n var tableViewElem = options.elem.next();\r\n\r\n var num = 0;\r\n var trMain = tableViewElem.find('.layui-table-main tbody tr');\r\n var trFixedL = tableViewElem.find('.layui-table-fixed-l tbody tr');\r\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr');\r\n layui.each(that.treeToFlat(table.cache[options.id]), function (i1, item1) {\r\n if (item1['LAY_HIDE']) return;\r\n var itemData = that.getNodeDataByIndex(item1[LAY_DATA_INDEX]);\r\n itemData['LAY_NUM'] = ++num;\r\n trMain.eq(i1).find('.laytable-cell-numbers').html(num);\r\n trFixedL.eq(i1).find('.laytable-cell-numbers').html(num);\r\n trFixedR.eq(i1).find('.laytable-cell-numbers').html(num);\r\n })\r\n }\r\n\r\n // 树表渲染\r\n Class.prototype.render = function (type) {\r\n var that = this;\r\n that.tableIns = table[type === 'reloadData' ? 'reloadData' : 'reload'](that.tableIns.config.id, $.extend(true, {}, that.config));\r\n that.config = that.tableIns.config;\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 // 根据需要处理options中的一些参数\r\n updateOptions(that.getOptions().id, options, type || true);\r\n\r\n // 对参数进行深度或浅扩展\r\n that.config = $.extend(deep, {}, that.config, options);\r\n\r\n // 执行渲染\r\n that.render(type);\r\n };\r\n\r\n // 仅重载数据\r\n treeTable.reloadData = function () {\r\n var args = $.extend(true, [], arguments);\r\n args[3] = 'reloadData';\r\n\r\n return treeTable.reload.apply(null, args);\r\n };\r\n\r\n var updateStatus = function (data, statusObj, childrenKey, notCascade) {\r\n var dataUpdated = [];\r\n layui.each(data, function (i1, item1) {\r\n if (layui.type(statusObj) === 'function') {\r\n statusObj(item1);\r\n } else {\r\n $.extend(item1, statusObj);\r\n }\r\n dataUpdated.push($.extend({}, item1));\r\n notCascade || (dataUpdated = dataUpdated.concat(updateStatus(item1[childrenKey], statusObj, childrenKey, notCascade)));\r\n });\r\n return dataUpdated;\r\n }\r\n\r\n Class.prototype.updateStatus = function (data, statusObj, notCascade) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n data = data || table.cache[options.id];\r\n\r\n return updateStatus(data, statusObj, treeOptions.customName.children, notCascade);\r\n }\r\n\r\n Class.prototype.getTableData = function () {\r\n var that = this;\r\n var options = that.getOptions();\r\n // return options.url ? table.cache[options.id] : options.data;\r\n return table.cache[options.id];\r\n }\r\n\r\n treeTable.updateStatus = function (id, statusObj, data) {\r\n var that = getThisTable(id);\r\n var options = that.getOptions();\r\n if (!data) {\r\n if (options.url) {\r\n data = table.cache[options.id];\r\n } else {\r\n data = options.data;\r\n }\r\n }\r\n return that.updateStatus(data, statusObj);\r\n }\r\n\r\n treeTable.sort = function (id) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n\r\n var tableData = treeTable.getData(id);\r\n var customName = treeOptions.customName;\r\n var childrenKey = customName.children;\r\n\r\n // 只和同级节点排序\r\n var sort = function(data, field, type){\r\n layui.sort(data, field, type, true);\r\n layui.each(data, function(rowIndex, trData){\r\n sort(trData[childrenKey] || [], field, type);\r\n })\r\n }\r\n\r\n if (options.autoSort) {\r\n var initSort = options.initSort;\r\n if (initSort.type) {\r\n sort(tableData, initSort.field, initSort.type === 'desc');\r\n } else {\r\n // 恢复默认\r\n sort(tableData, table.config.indexName, null);\r\n }\r\n // 更新缓存中数据的顺序\r\n table.cache[id] = tableData;\r\n // 重新初始化缓存数据\r\n that.initData(tableData);\r\n treeTable.renderData(id);\r\n }\r\n }\r\n\r\n // 处理事件\r\n var updateObjParams = function (obj) {\r\n var tableId = obj.config.id;\r\n var tableThat = getThisTable(tableId);\r\n var trData = obj.data = treeTable.getNodeDataByIndex(tableId, obj.index); // 克隆的\r\n var trIndex = trData[LAY_DATA_INDEX];\r\n obj.dataIndex = trIndex;\r\n\r\n // 处理update方法\r\n var updateFn = obj.update;\r\n obj.update = function () {\r\n var updateThat = this;\r\n var args = arguments;\r\n $.extend(tableThat.getNodeDataByIndex(trIndex), args[0]);\r\n var ret = updateFn.apply(updateThat, args); // 主要负责更新节点内容\r\n var nameKey = obj.config.tree.customName.name;\r\n nameKey in args[0] && obj.tr.find('td[data-field=\"' + nameKey + '\"]').children('div.layui-table-cell').removeClass('layui-table-tree-item');\r\n tableThat.renderTreeTable(obj.tr, obj.tr.attr('data-level'), false);\r\n return ret;\r\n }\r\n\r\n // 处理del方法\r\n obj.del = function () {\r\n treeTable.removeNode(tableId, trData);\r\n }\r\n\r\n // 处理setRowChecked\r\n obj.setRowChecked = function (checked) {\r\n treeTable.setRowChecked(tableId, {\r\n index: trData,\r\n checked: checked\r\n });\r\n }\r\n }\r\n\r\n // 更新数据\r\n treeTable.updateNode = function (id, index, newNode) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableView = options.elem.next();\r\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\r\n var trIndex = trElem.attr('data-index');\r\n var trLevel = trElem.attr('data-level')\r\n\r\n if (!newNode) {\r\n return;\r\n }\r\n // 更新值\r\n var newNodeTemp = that.getNodeDataByIndex(index, false, newNode);\r\n // 获取新的tr替换\r\n var trNew = table.getTrHtml(id, [newNodeTemp]);\r\n // 重新渲染tr\r\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\r\n tableView.find('.layui-table-' + item + ' tbody tr[lay-data-index=\"' + index + '\"]').replaceWith($(trNew[['trs', 'trs_fixed', 'trs_fixed_r'][i]].join('')).attr({\r\n 'data-index': trIndex,\r\n 'lay-data-index': index,\r\n 'data-level': trLevel\r\n }).data('index', trIndex));\r\n });\r\n that.renderTreeTable(tableView.find('tr[lay-data-index=\"' + index + '\"]'), trLevel);\r\n }\r\n\r\n // 删除数据\r\n // _keepParent 暂时为私有参数,仅供内部使用\r\n treeTable.removeNode = function (id, node, _keepParent) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var isParentKey = treeOptions.customName.isParent;\r\n var childrenKey = treeOptions.customName.children;\r\n var tableView = options.elem.next();\r\n var delNode;\r\n var indexArr = [];\r\n var tableCache = table.cache[id];\r\n delNode = that.getNodeDataByIndex(layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX], false, 'delete');\r\n var nodeP = that.getNodeDataByIndex(delNode[LAY_PARENT_INDEX]);\r\n that.updateCheckStatus(nodeP);\r\n var delNodesFlat = that.treeToFlat([delNode], delNode[treeOptions.customName.pid], delNode[LAY_PARENT_INDEX]);\r\n layui.each(delNodesFlat, function (i2, delNode) {\r\n var delNodeDataIndex = delNode[LAY_DATA_INDEX];\r\n indexArr.push('tr[lay-data-index=\"' + delNodeDataIndex + '\"]');\r\n // 删除临时 key\r\n if(delNodeDataIndex.indexOf('-') !== -1){\r\n delete tableCache[delNodeDataIndex]; \r\n }\r\n })\r\n\r\n tableView.find(indexArr.join(',')).remove(); // 删除行\r\n\r\n var deleteCacheKey = function(){\r\n for (var key in tableCache) {\r\n // 根节点 getNodeDataByIndex 内部已处理\r\n if(key.indexOf('-') !== -1){\r\n // L93 updateCache() 中cacheKey 取自 rowData 中的 LAY_DATA_INDEX\r\n // 两者不同说明当前 cacheKey 引用的 rowData 已被更新\r\n if(key !== tableCache[key][LAY_DATA_INDEX]){\r\n delete tableCache[key]\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 重新整理数据\r\n var tableData = that.initData();\r\n deleteCacheKey();\r\n // index发生变化需要更新页面tr中对应的lay-data-index 新增和删除都要注意数据结构变动之后的index问题\r\n layui.each(that.treeToFlat(tableData), function (i3, item3) {\r\n if (item3[LAY_DATA_INDEX_HISTORY] && item3[LAY_DATA_INDEX_HISTORY] !== item3[LAY_DATA_INDEX]) {\r\n tableView.find('tr[lay-data-index=\"' + item3[LAY_DATA_INDEX_HISTORY] + '\"]').attr({\r\n 'data-index': item3[LAY_DATA_INDEX],\r\n 'lay-data-index': item3[LAY_DATA_INDEX],\r\n }).data('index', item3[LAY_DATA_INDEX]);\r\n // item3[LAY_DATA_INDEX_HISTORY] = item3[LAY_DATA_INDEX]\r\n }\r\n });\r\n // 重新更新顶层节点的data-index;\r\n layui.each(tableCache, function (i4, item4) {\r\n tableView.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]')\r\n .attr('data-index', i4)\r\n .data('index', i4);\r\n })\r\n options.hasNumberCol && formatNumber(that);\r\n // 更新父节点状态\r\n if(nodeP){\r\n var trEl = tableView.find('tr[lay-data-index=\"' + nodeP[LAY_DATA_INDEX] + '\"]');\r\n\r\n if(!_keepParent){\r\n nodeP[isParentKey] = !!(nodeP[childrenKey] && nodeP[childrenKey].length);\r\n }\r\n\r\n that.updateNodeIcon({\r\n scopeEl: trEl,\r\n isExpand: nodeP[LAY_EXPAND],\r\n isParent: nodeP[isParentKey],\r\n }); \r\n }\r\n\r\n // 重新适配尺寸\r\n treeTable.resize(id);\r\n }\r\n\r\n /**\r\n * 新增数据节点\r\n * @param {String} id 树表id\r\n * @param {Object} opts\r\n * @param {String|Number} opts.parentIndex 指定的父节点,如果增加根节点,请设置 parentIndex 为 null 即可\r\n * @param {Number} opts.index 新节点插入的位置(从 0 开始index = -1(默认) 时,插入到最后\r\n * @param {Object|Array} opts.data 新增的节点,单个或者多个\r\n * @param {Boolean} opts.focus 新增的节点,单个或者多个\r\n * @return {Array} 新增的节点\r\n * */\r\n treeTable.addNodes = function (id, opts) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableViewElem = options.elem.next();\r\n var checkName = table.config.checkName;\r\n\r\n opts = opts || {};\r\n\r\n var parentIndex = opts.parentIndex;\r\n var index = opts.index;\r\n var newNodes = opts.data;\r\n var focus = opts.focus;\r\n\r\n parentIndex = layui.type(parentIndex) === 'number' ? parentIndex.toString() : parentIndex;\r\n var parentNode = parentIndex ? that.getNodeDataByIndex(parentIndex) : null;\r\n index = layui.type(index) === 'number' ? index : -1;\r\n\r\n // 添加数据\r\n newNodes = $.extend(true, [], (layui.isArray(newNodes) ? newNodes : [newNodes]));\r\n\r\n // 若未传入 LAY_CHECKED 属性,则继承父节点的 checked 状态\r\n layui.each(newNodes, function(i, item){\r\n if(!(checkName in item) && parentNode){\r\n item[checkName] = parentNode[checkName];\r\n }\r\n })\r\n\r\n var tableData = that.getTableData(), dataAfter;\r\n if (!parentNode) {\r\n // 添加到根节点\r\n dataAfter = table.cache[id].splice(index === -1 ? table.cache[id].length : index);\r\n table.cache[id] = table.cache[id].concat(newNodes, dataAfter);\r\n if (!options.url) {\r\n // 静态data模式\r\n if (!options.page) {\r\n options.data = table.cache[id];\r\n } else {\r\n var pageOptions = options.page;\r\n options.data.splice.apply(options.data, [pageOptions.limit * (pageOptions.curr - 1), pageOptions.limit].concat(table.cache[id]))\r\n }\r\n }\r\n // 将新节点添加到页面\r\n tableData = that.initData();\r\n\r\n if (tableViewElem.find('.layui-none').length) {\r\n table.renderData(id);\r\n return newNodes;\r\n }\r\n\r\n var newNodesHtml = table.getTrHtml(id, newNodes);\r\n var newNodesHtmlObj = {\r\n trs: $(newNodesHtml.trs.join('')),\r\n trs_fixed: $(newNodesHtml.trs_fixed.join('')),\r\n trs_fixed_r: $(newNodesHtml.trs_fixed_r.join(''))\r\n }\r\n\r\n var attrs = {};\r\n layui.each(newNodes, function (newNodeIndex, newNodeItem) {\r\n attrs = {\r\n 'data-index': newNodeItem[LAY_DATA_INDEX],\r\n 'lay-data-index': newNodeItem[LAY_DATA_INDEX],\r\n 'data-level': '0'\r\n };\r\n newNodesHtmlObj.trs.eq(newNodeIndex).attr(attrs).data('index', newNodeItem[LAY_DATA_INDEX]);\r\n newNodesHtmlObj.trs_fixed.eq(newNodeIndex).attr(attrs).data('index', newNodeItem[LAY_DATA_INDEX]);\r\n newNodesHtmlObj.trs_fixed_r.eq(newNodeIndex).attr(attrs).data('index', newNodeItem[LAY_DATA_INDEX]);\r\n })\r\n var trIndexPrev = parseInt(newNodes[0][LAY_DATA_INDEX]) - 1;\r\n var tableViewElemMAIN = tableViewElem.find(ELEM_MAIN);\r\n var tableViewElemFIXL = tableViewElem.find(ELEM_FIXL);\r\n var tableViewElemFIXR = tableViewElem.find(ELEM_FIXR);\r\n if (trIndexPrev === -1) {\r\n // 插入到开头\r\n var hasTr = tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"0\"]')[0];\r\n if(hasTr){\r\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed_r);\r\n }else{\r\n tableViewElemMAIN.find('tbody').prepend(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tbody').prepend(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tbody').prepend(newNodesHtmlObj.trs_fixed_r);\r\n }\r\n } else {\r\n if (index === -1) {\r\n // 追加到最后\r\n tableViewElemMAIN.find('tbody').append(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tbody').append(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tbody').append(newNodesHtmlObj.trs_fixed_r);\r\n } else {\r\n var trIndexNext = dataAfter[0][LAY_DATA_INDEX_HISTORY];\r\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed_r);\r\n }\r\n\r\n }\r\n\r\n // 重新更新顶层节点的data-index;\r\n layui.each(table.cache[id], function (i4, item4) {\r\n tableViewElem.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]')\r\n .attr('data-index', i4)\r\n .data('index', i4);\r\n })\r\n\r\n that.renderTreeTable(tableViewElem.find(newNodes.map(function (value, index, array) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')));\r\n } else {\r\n var isParentKey = treeOptions.customName.isParent;\r\n var childKey = treeOptions.customName.children;\r\n\r\n parentNode[isParentKey] = true;\r\n var childrenNodes = parentNode[childKey];\r\n if (!childrenNodes) {\r\n childrenNodes = parentNode[childKey] = newNodes;\r\n } else {\r\n dataAfter = childrenNodes.splice(index === -1 ? childrenNodes.length : index);\r\n childrenNodes = parentNode[childKey] = childrenNodes.concat(newNodes, dataAfter);\r\n }\r\n // 删除已经存在的同级节点以及他们的子节点并且把中间节点的已展开过的状态设置为false\r\n that.updateStatus(childrenNodes, function (d) {\r\n if (d[isParentKey] || treeOptions.view.showFlexIconIfNotParent) {\r\n d[LAY_HAS_EXPANDED] = false;\r\n }\r\n });\r\n var childrenNodesFlat = that.treeToFlat(childrenNodes);\r\n tableViewElem.find(childrenNodesFlat.map(function (value) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).remove();\r\n\r\n tableData = that.initData();\r\n // 去掉父节点的已经展开过的状态,重新执行一次展开的方法\r\n parentNode[LAY_HAS_EXPANDED] = false;\r\n parentNode[LAY_ASYNC_STATUS] = 'local'; // 转为本地数据应该规定异步加载子节点的时候addNodes的规则\r\n expandNode({trElem: tableViewElem.find('tr[lay-data-index=\"' + parentIndex + '\"]')}, true)\r\n }\r\n that.updateCheckStatus(parentNode);\r\n // 更新父节点图标状态\r\n if(parentNode){\r\n var trEl = tableViewElem.find('tr[lay-data-index=\"' + parentNode[LAY_DATA_INDEX] + '\"]');\r\n that.updateNodeIcon({\r\n scopeEl: trEl,\r\n isExpand: parentNode[LAY_EXPAND],\r\n isParent: parentNode[isParentKey],\r\n }); \r\n }\r\n treeTable.resize(id);\r\n if (focus) {\r\n // 滚动到第一个新增的节点\r\n tableViewElem.find(ELEM_MAIN).find('tr[lay-data-index=\"' + newNodes[0][LAY_DATA_INDEX] + '\"]').get(0).scrollIntoViewIfNeeded();\r\n }\r\n\r\n return newNodes;\r\n }\r\n\r\n // 获取表格选中状态\r\n treeTable.checkStatus = function (id, includeHalfCheck) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var checkName = table.config.checkName;\r\n\r\n // 需要区分单双选\r\n var tableData = treeTable.getData(id, true);\r\n var checkedData = tableData.filter(function (value, index, array) {\r\n return value[checkName] || (includeHalfCheck && value[LAY_CHECKBOX_HALF]);\r\n });\r\n\r\n var isAll = true;\r\n layui.each(treeOptions.data.cascade === 'all' ? table.cache[id] : treeTable.getData(id, true), function (i1, item1) {\r\n if (!item1[checkName]) {\r\n isAll = false;\r\n return true;\r\n }\r\n })\r\n\r\n return {\r\n data: checkedData,\r\n isAll: isAll\r\n }\r\n }\r\n\r\n // 排序之后重新渲染成树表\r\n treeTable.on('sort', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n treeTable.sort(tableId);\r\n }\r\n });\r\n\r\n // 行点击\r\n treeTable.on('row', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n }\r\n })\r\n\r\n // 行双击\r\n treeTable.on('rowDouble', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n\r\n var treeOptions = options.tree || {};\r\n if (treeOptions.view.dblClickExpand) {\r\n expandNode({trElem: obj.tr.first()}, null, null, null, true);\r\n }\r\n }\r\n })\r\n\r\n // 菜单\r\n treeTable.on('rowContextmenu', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n }\r\n })\r\n\r\n // tr中带lay-event节点点击\r\n treeTable.on('tool', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n }\r\n })\r\n\r\n // 行内编辑\r\n treeTable.on('edit', function (obj) {\r\n // 如果编辑涉及到关键的name字段需要重新更新一下tr节点\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n if (obj.field === options.tree.customName.name) {\r\n var updateData = {};\r\n updateData[obj.field] = obj.value;\r\n obj.update(updateData); // 通过update调用执行tr节点的更新\r\n }\r\n }\r\n });\r\n\r\n // 单选\r\n treeTable.on('radio', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n var that = getThisTable(tableId);\r\n updateObjParams(obj);\r\n checkNode.call(that, obj.tr, obj.checked)\r\n }\r\n })\r\n\r\n // 设置或取消行选中样式\r\n Class.prototype.setRowCheckedClass = function(tr, checked){\r\n var that = this;\r\n var options = that.getOptions();\r\n\r\n var index = tr.data('index');\r\n var tableViewElem = options.elem.next();\r\n \r\n tr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED); // 主体行\r\n\r\n // 右侧固定行\r\n tr.each(function(){\r\n var index = $(this).data('index');\r\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr[data-index=\"'+ index +'\"]');\r\n trFixedR[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED);\r\n });\r\n };\r\n\r\n // 更新表格的复选框状态\r\n Class.prototype.updateCheckStatus = function (dataP, checked) {\r\n var that = this;\r\n var options = that.getOptions();\r\n if (!options.hasChecboxCol) {\r\n return false; // 如果没有复选列则不需要更新状态\r\n }\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var tableView = options.elem.next();\r\n\r\n var checkName = table.config.checkName;\r\n\r\n var cascade = treeOptions.data.cascade;\r\n var isCascadeParent = cascade === 'all' || cascade === 'parent';\r\n\r\n // 如有必要更新父节点们的状态\r\n if (isCascadeParent && dataP) {\r\n var trsP = that.updateParentCheckStatus(dataP, layui.type(checked) === 'boolean' ? checked : null);\r\n layui.each(trsP, function (indexP, itemP) {\r\n var checkboxElem = tableView.find('tr[lay-data-index=\"' + itemP[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)');\r\n var checked = itemP[checkName];\r\n\r\n // 标记父节点行背景色\r\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked);\r\n \r\n // 设置原始复选框 checked 属性值并渲染\r\n checkboxElem.prop({\r\n checked: checked,\r\n indeterminate: itemP[LAY_CHECKBOX_HALF]\r\n })\r\n })\r\n }\r\n\r\n // 更新全选的状态\r\n var isAll = true;\r\n var isIndeterminate = false;\r\n var data = treeOptions.data.cascade === 'all' ? table.cache[tableId] : treeTable.getData(tableId, true);\r\n data = data.filter(function (item) {\r\n return !item[options.disabledName];\r\n });\r\n\r\n if(data.length > 0){\r\n layui.each(data, function (i1, item1) {\r\n if (item1[checkName] || item1[LAY_CHECKBOX_HALF]) {\r\n isIndeterminate = true;\r\n }\r\n if (!item1[checkName]) {\r\n isAll = false;\r\n }\r\n if (isIndeterminate && !isAll) {\r\n return true;\r\n }\r\n })\r\n }else{\r\n isAll = false;\r\n }\r\n \r\n isIndeterminate = isIndeterminate && !isAll;\r\n tableView.find('input[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]').prop({\r\n 'checked': isAll,\r\n indeterminate: isIndeterminate\r\n })\r\n\r\n return isAll\r\n }\r\n\r\n // 更新父节点的选中状态\r\n Class.prototype.updateParentCheckStatus = function (dataP, checked) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var checkName = table.config.checkName;\r\n var childrenKey = treeOptions.customName.children;\r\n\r\n var dataRet = [];\r\n dataP[LAY_CHECKBOX_HALF] = false; // 先设置为非半选,是否为半选又下面逻辑判断\r\n if (checked === true) {\r\n // 为真需要判断子节点的情况\r\n if (!dataP[childrenKey].length) {\r\n checked = false;\r\n } else {\r\n layui.each(dataP[childrenKey], function (index, item) {\r\n if (!item[checkName]) { // 只要有一个子节点为false\r\n checked = false;\r\n dataP[LAY_CHECKBOX_HALF] = true;\r\n return true; // 跳出循环\r\n }\r\n });\r\n }\r\n } else if (checked === false) {\r\n // 判断是否为半选\r\n layui.each(dataP[childrenKey], function (index, item) {\r\n if (item[checkName] || item[LAY_CHECKBOX_HALF]) { // 只要有一个子节点为选中或者半选状态\r\n dataP[LAY_CHECKBOX_HALF] = true;\r\n return true;\r\n }\r\n });\r\n } else {\r\n // 状态不确定的情况下根据子节点的信息\r\n checked = false;\r\n var checkedNum = 0;\r\n layui.each(dataP[childrenKey], function (index, item) {\r\n if (item[checkName]) {\r\n checkedNum++;\r\n }\r\n });\r\n checked = dataP[childrenKey].length ? dataP[childrenKey].length === checkedNum : dataP[checkName]; // 如果没有子节点保留原来的状态;\r\n dataP[LAY_CHECKBOX_HALF] = checked ? false : checkedNum > 0;\r\n }\r\n dataP[checkName] = checked;\r\n dataRet.push($.extend({}, dataP));\r\n if (dataP[LAY_PARENT_INDEX]) {\r\n dataRet = dataRet.concat(that.updateParentCheckStatus(table.cache[tableId][dataP[LAY_PARENT_INDEX]], checked));\r\n }\r\n return dataRet\r\n }\r\n\r\n var checkNode = function (trElem, checked, callbackFlag) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var tableView = options.elem.next();\r\n var inputElem = (trElem.length ? trElem : tableView).find('.laytable-cell-radio, .laytable-cell-checkbox').children('input').last();\r\n // 判断是单选还是多选 不应该同时存在radio列和checkbox列\r\n var isRadio = inputElem.attr('type') === 'radio';\r\n\r\n if (callbackFlag) {\r\n var triggerEvent = function () {\r\n var fn = function (event) {\r\n layui.stope(event);\r\n }\r\n inputElem.parent().on('click', fn); // 添加临时的阻止冒泡事件\r\n inputElem.next().click();\r\n inputElem.parent().off('click', fn);\r\n }\r\n // 如果需要触发事件可以简单的触发对应节点的click事件\r\n if (isRadio) {\r\n // 单选只能选中或者切换其他的不能取消选中 后续看是否有支持的必要 todo\r\n if (checked && !inputElem.prop('checked')) {\r\n triggerEvent()\r\n }\r\n } else {\r\n if (layui.type(checked) === 'boolean') {\r\n if (inputElem.prop('checked') !== checked) {\r\n // 如果当前已经是想要修改的状态则不做处理\r\n triggerEvent()\r\n }\r\n } else {\r\n // 切换\r\n triggerEvent()\r\n }\r\n }\r\n } else {\r\n var trData = that.getNodeDataByIndex(trElem.attr('data-index'));\r\n var checkName = table.config.checkName;\r\n // 如果不触发事件应该有一个方法可以更新数据以及页面的节点\r\n if (isRadio) {\r\n if (!trData) {\r\n // 单选必须是一个存在的行\r\n return;\r\n }\r\n var statusChecked = {};\r\n statusChecked[checkName] = false;\r\n // that.updateStatus(null, statusChecked); // 取消其他的选中状态\r\n that.updateStatus(null, function (d) {\r\n if (d[checkName]) {\r\n var radioElem = tableView.find('tr[lay-data-index=\"' + d[LAY_DATA_INDEX] + '\"] input[type=\"radio\"][lay-type=\"layTableRadio\"]');\r\n d[checkName] = false;\r\n\r\n // 取消当前选中行背景色\r\n that.setRowCheckedClass(radioElem.closest('tr'), false);\r\n radioElem.prop('checked', false);\r\n }\r\n }); // 取消其他的选中状态\r\n trData[checkName] = checked;\r\n\r\n that.setRowCheckedClass(trElem, checked); // 标记当前选中行背景色\r\n that.setRowCheckedClass(trElem.siblings(), false); // 取消其他行背景色\r\n\r\n trElem.find('input[type=\"radio\"][lay-type=\"layTableRadio\"]').prop('checked', checked);\r\n } else {\r\n // 切换只能用到单条,全选到这一步的时候应该是一个确定的状态\r\n checked = layui.type(checked) === 'boolean' ? checked : !trData[checkName]; // 状态切换,如果遇到不可操作的节点待处理 todo\r\n // 全选或者是一个父节点,将子节点的状态同步为当前节点的状态\r\n // 处理不可操作的信息\r\n var checkedStatusFn = function (d) {\r\n if (!d[table.config.disabledName]) { // 节点不可操作的不处理\r\n d[checkName] = checked;\r\n d[LAY_CHECKBOX_HALF] = false;\r\n }\r\n }\r\n\r\n var trs = that.updateStatus(trData ? [trData] : table.cache[tableId], checkedStatusFn, trData && ['parent', 'none'].indexOf(treeOptions.data.cascade) !== -1);\r\n var checkboxElem = tableView.find(trs.map(function (value) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)';\r\n }).join(','));\r\n\r\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked); // 标记当前选中行背景色\r\n checkboxElem.prop({checked: checked, indeterminate: false});\r\n\r\n var trDataP;\r\n\r\n // 更新父节点以及更上层节点的状态\r\n if (trData && trData[LAY_PARENT_INDEX]) {\r\n // 找到父节点,然后判断父节点的子节点是否全部选中\r\n trDataP = that.getNodeDataByIndex(trData[LAY_PARENT_INDEX]);\r\n }\r\n \r\n return that.updateCheckStatus(trDataP, checked);\r\n }\r\n }\r\n }\r\n\r\n // 多选\r\n treeTable.on('checkbox', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n var that = getThisTable(tableId);\r\n var checked = obj.checked;\r\n updateObjParams(obj)\r\n obj.isAll = checkNode.call(that, obj.tr, checked);\r\n }\r\n })\r\n\r\n /**\r\n * 设置行选中状态\r\n * @param {String} id 树表id\r\n * @param {Object} opts\r\n * @param {Object|String} opts.index 节点下标\r\n * @param {Boolean} opts.checked 选中或取消\r\n * @param {Boolean} [opts.callbackFlag] 是否触发事件回调\r\n * */\r\n treeTable.setRowChecked = function (id, opts) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var tableView = options.elem.next();\r\n\r\n opts = opts || {};\r\n\r\n var node = opts.index;\r\n var checked = opts.checked;\r\n var callbackFlag = opts.callbackFlag;\r\n\r\n var dataIndex = layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX];\r\n // 判断是否在当前页面中\r\n var nodeData = that.getNodeDataByIndex(dataIndex);\r\n if (!nodeData) {\r\n // 目前只能处理当前页的数据\r\n return;\r\n }\r\n\r\n var collectNeedExpandNodeIndex = function(index){\r\n needExpandIndex.push(index);\r\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\r\n if (!trElem.length) {\r\n var nodeData = that.getNodeDataByIndex(index);\r\n var parentIndex = nodeData[LAY_PARENT_INDEX];\r\n parentIndex && collectNeedExpandNodeIndex(parentIndex);\r\n }\r\n }\r\n\r\n // 判断是否展开过\r\n var trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\r\n if (!trElem.length) {\r\n var parentIndex = nodeData[LAY_PARENT_INDEX];\r\n var needExpandIndex = [];\r\n collectNeedExpandNodeIndex(parentIndex);\r\n // 如果还没有展开没有渲染的要先渲染出来\r\n layui.each(needExpandIndex.reverse(),function(index, nodeIndex){\r\n treeTable.expandNode(id, {\r\n index: nodeIndex,\r\n expandFlag: true\r\n });\r\n })\r\n trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\r\n }\r\n checkNode.call(that, trElem, checked, callbackFlag);\r\n }\r\n\r\n treeTable.checkAllNodes = function (id, checked) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var tableView = options.elem.next();\r\n\r\n checkNode.call(that, tableView.find('tr[data-index=\"NONE\"]'), !!checked)\r\n }\r\n\r\n /**\r\n * 获得数据\r\n * @param {String} id 表格id\r\n * @param {Boolean} [isSimpleData] 是否返回平铺结构的数据\r\n * @return {Array} 表格数据\r\n * */\r\n treeTable.getData = function (id, isSimpleData) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n var tableData = [];\r\n layui.each($.extend(true, [], table.cache[id] || []), function (index, item) {\r\n // 遍历排除掉临时的数据\r\n tableData.push(item);\r\n })\r\n return isSimpleData ? that.treeToFlat(tableData) : tableData;\r\n }\r\n\r\n /**\r\n * 重新加载子节点\r\n * @param {String} id 表格id\r\n * @param {String} dataIndex 父节点的dataIndex\r\n * */\r\n treeTable.reloadAsyncNode = function (id, dataIndex) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n if (!treeOptions.async || !treeOptions.async.enable) {\r\n return;\r\n }\r\n var dataP = that.getNodeDataByIndex(dataIndex);\r\n if (!dataP) {\r\n return;\r\n }\r\n dataP[LAY_HAS_EXPANDED] = false;\r\n dataP[LAY_EXPAND] = false;\r\n dataP[LAY_ASYNC_STATUS] = false;\r\n layui.each(that.treeToFlat(dataP[treeOptions.customName.children]).reverse(), function (i1, item1) {\r\n treeTable.removeNode(id, item1[LAY_DATA_INDEX], true);\r\n })\r\n // 重新展开\r\n treeTable.expandNode(id, {\r\n index: dataIndex,\r\n expandFlag: true,\r\n callbackFlag: true,\r\n })\r\n }\r\n\r\n /**\r\n * 通过数据id获取节点对象\r\n * */\r\n treeTable.getNodeById = function (id, dataId) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n return that.getNodeById(dataId);\r\n }\r\n\r\n /**\r\n * 根据自定义规则搜索节点数据\r\n * @param {String} id 树表id\r\n * @param {Function} filter 自定义过滤器函数\r\n * @param {Object} [opts]\r\n * @param {Boolean} [opts.isSingle] 是否只找到第一个\r\n * @param {Object} [opts.parentNode] 在指定在某个父节点下的子节点中搜索\r\n * @return {Object} 节点对象\r\n * */\r\n treeTable.getNodesByFilter = function (id, filter, opts) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n var options = that.getOptions();\r\n\r\n opts = opts || {};\r\n var isSingle = opts.isSingle;\r\n var parentNode = opts.parentNode;\r\n var dataP = parentNode && parentNode.data;\r\n // dataP = dataP || table.cache[id];\r\n var nodes = that.treeToFlat(dataP ? (dataP[options.tree.customName.children] || []) : table.cache[id]).filter(filter);\r\n var nodesResult = [];\r\n layui.each(nodes, function (i1, item1) {\r\n nodesResult.push(that.getNodeByIndex(item1[LAY_DATA_INDEX]));\r\n if (isSingle) {\r\n return true;\r\n }\r\n });\r\n\r\n return nodesResult;\r\n }\r\n\r\n\r\n // 记录所有实例\r\n thisTreeTable.that = {}; // 记录所有实例对象\r\n // thisTreeTable.config = {}; // 记录所有实例配置项\r\n\r\n // 重载\r\n treeTable.reload = function (id, options, deep, type) {\r\n // deep = deep !== false; // 默认采用深拷贝\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n that.reload(options, deep, type);\r\n return thisTreeTable.call(that);\r\n };\r\n\r\n // 核心入口\r\n treeTable.render = function (options) {\r\n var inst = new Class(options);\r\n return thisTreeTable.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, treeTable);\r\n});\r\n","/**\r\n * tabs\r\n * 标签页组件\r\n */\r\n\r\nlayui.define('component', function(exports) {\r\n 'use strict';\r\n\r\n var $ = layui.$;\r\n\r\n // 创建组件\r\n var component = layui.component({\r\n name: 'tabs', // 组件名\r\n\r\n // 默认配置\r\n config: {\r\n elem: '.layui-tabs',\r\n trigger: 'click', // 标签切换的触发事件\r\n headerMode: 'auto' // 标签头部的显示模式 auto | scroll | normal\r\n },\r\n\r\n CONST: {\r\n ELEM: 'layui-tabs',\r\n HEADER: 'layui-tabs-header',\r\n CLOSE: 'layui-tabs-close',\r\n BODY: 'layui-tabs-body',\r\n ITEM: 'layui-tabs-item',\r\n CARD: 'layui-tabs-card'\r\n },\r\n\r\n isRenderOnEvent: false,\r\n\r\n // 渲染\r\n render: function() {\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 标签页元素项\r\n that.headerElem = ['.'+ component.CONST.HEADER + ':eq(0)', '>li'];\r\n that.bodyElem = ['.'+ component.CONST.BODY + ':eq(0)', '>.'+ component.CONST.ITEM];\r\n\r\n // 获取标签容器中的 header body 相关元素\r\n that.getContainer = function() {\r\n var elem = that.documentElem || options.elem;\r\n return {\r\n header: {\r\n elem: elem.find(that.headerElem[0]),\r\n items: elem.find(that.headerElem.join(''))\r\n },\r\n body: {\r\n elem: elem.find(that.bodyElem[0]),\r\n items: elem.find(that.bodyElem.join(''))\r\n }\r\n };\r\n };\r\n\r\n // 若 header 选项类型为数组\r\n if (layui.type(options.header) === 'array') {\r\n if (options.header.length === 0) return;\r\n\r\n // 给任意元素绑定 tabs 切换功能\r\n if (typeof options.header[0] === 'string') {\r\n that.headerElem = options.header.concat();\r\n that.documentElem = $(document);\r\n } else { // 方法传值渲染\r\n that.elemView = $('<div class=\"layui-tabs\"></div>');\r\n if (options.className) that.elemView.addClass(options.className);\r\n\r\n var headerElem = $('<ul class=\"layui-tabs-header\"></ul>');\r\n var bodyElem = $('<div class=\"layui-tabs-body\"></div>');\r\n\r\n // 生成标签项\r\n layui.each(options.header, function(i, item){\r\n var elemHeaderItem = that.renderHeaderItem(item);\r\n headerElem.append(elemHeaderItem);\r\n });\r\n layui.each(options.body, function(i, item){\r\n var elemBodyItem = that.renderBodyItem(item);\r\n bodyElem.append(elemBodyItem);\r\n });\r\n\r\n that.elemView.append(headerElem).append(bodyElem);\r\n options.elem.html(that.elemView);\r\n }\r\n } else {\r\n that.renderClose(); // 初始化标签关闭结构\r\n }\r\n\r\n // 若 body 选项类型为数组\r\n if (layui.type(options.body) === 'array') {\r\n if (typeof options.body[0] === 'string') {\r\n that.documentElem = $(document);\r\n that.bodyElem = options.body.concat();\r\n }\r\n }\r\n\r\n // 初始选中项\r\n var data = that.data();\r\n if ('index' in options && data.index != options.index) {\r\n that.change(that.findHeaderItem(options.index), true);\r\n } else if (data.index === -1) { // 初始选中项为空时,默认选中第一个\r\n that.change(that.findHeaderItem(0), true);\r\n }\r\n\r\n // 初始化滚动结构\r\n that.roll('auto');\r\n\r\n // 清除隐藏占位\r\n if (options.elem.hasClass(component.CONST.CLASS_HIDEV)) {\r\n options.elem.removeClass(component.CONST.CLASS_HIDEV);\r\n }\r\n\r\n // 回调\r\n typeof options.afterRender === 'function' && options.afterRender(data);\r\n\r\n // 渲染成功后的事件\r\n layui.event.call(\r\n options.elem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterRender('+ options.id +')',\r\n data\r\n );\r\n },\r\n\r\n // 事件\r\n events: function() {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var MOD_NAME = component.CONST.MOD_NAME;\r\n var TRIGGER_NAMESPACE = '.lay_'+ MOD_NAME + '_trigger';\r\n var delegatedElement = that.documentElem ? container.header.elem : options.elem;\r\n\r\n // 标签头部事件\r\n var trigger = options.trigger + TRIGGER_NAMESPACE;\r\n var elemHeaderItem = that.documentElem ? that.headerElem[1] : that.headerElem.join('');\r\n delegatedElement.off(trigger).on(trigger, elemHeaderItem, function() {\r\n that.change($(this));\r\n });\r\n\r\n // 窗口 resize 事件\r\n if (!inner.onresize) {\r\n var timer;\r\n $(window).on('resize', function() {\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n layui.each(component.cache.id, function(key) {\r\n var that = component.getInst(key);\r\n if(!that) return;\r\n that.roll('init');\r\n });\r\n }, 50);\r\n });\r\n inner.onresize = true;\r\n }\r\n }\r\n });\r\n\r\n // 内部变量集\r\n var inner = {};\r\n\r\n /**\r\n * 扩展组件原型方法\r\n */\r\n\r\n var Class = component.Class;\r\n\r\n /**\r\n * 增加标签\r\n * @param {Object} opts\r\n * @param {string} opts.title - 标签标题\r\n * @param {string} opts.content - 标签内容\r\n * @param {string} opts.id - 标签的 lay-id 属性值\r\n * @param {string} [opts.index] - 活动标签索引,默认取当前选中标签的索引\r\n * @param {('append'|'prepend'|'after'|'before')} [opts.mode='append'] - 标签插入方式\r\n * @param {string} [opts.closable] - 标签是否可关闭。初始值取决于 options.closable\r\n * @param {string} [opts.headerItem] - 自定义标签头部元素\r\n * @param {string} [opts.bodyItem] - 自定义标签内容元素\r\n * @param {Function} [opts.done] - 标签添加成功后执行的回调函数\r\n */\r\n Class.prototype.add = function(opts) {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var newHeaderItem = that.renderHeaderItem(opts);\r\n var newBodyItem = that.renderBodyItem(opts);\r\n\r\n // 插入方式\r\n if (/(before|after)/.test(opts.mode)) { // 在活动标签前后插入\r\n var data = that.data();\r\n var hasOwnIndex = opts.hasOwnProperty('index');\r\n var headerItem = hasOwnIndex ? that.findHeaderItem(opts.index) : data.thisHeaderItem;\r\n var bodyItem = hasOwnIndex ? that.findBodyItem(opts.index) : data.thisHeaderItem;\r\n headerItem[opts.mode](newHeaderItem);\r\n bodyItem[opts.mode](newBodyItem);\r\n } else { // 在标签最前后插入\r\n var mode = ({\r\n prepend: 'prepend', // 插入标签到最前\r\n append: 'append' // 插入标签到最后\r\n })[opts.mode || 'append'] || 'append';\r\n container.header.elem[mode](newHeaderItem);\r\n container.body.elem[mode](newBodyItem);\r\n }\r\n\r\n // 将插入项切换为当前标签\r\n that.change(newHeaderItem, true);\r\n\r\n // 回调\r\n var params = that.data();\r\n typeof opts.done === 'function' && opts.done(params);\r\n };\r\n\r\n /**\r\n * 关闭指定标签\r\n * @param {Object} thisHeaderItem - 当前标签头部项元素\r\n * @param {boolean} force - 是否强制删除\r\n */\r\n Class.prototype.close = function(thisHeaderItem, force) {\r\n if(!thisHeaderItem || !thisHeaderItem[0]) return;\r\n\r\n var that = this;\r\n var options = that.config;\r\n var index = thisHeaderItem.index();\r\n\r\n if (!thisHeaderItem[0]) return;\r\n\r\n // 标签是否不可关闭\r\n if (thisHeaderItem.attr('lay-closable') === 'false') {\r\n return;\r\n }\r\n\r\n // 当前标签相关数据\r\n var params = that.data();\r\n\r\n // 标签关闭前的事件。若非强制关闭,可则根据事件的返回结果决定是否关闭\r\n if (!force) {\r\n var closable = layui.event.call(\r\n thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'beforeClose('+ options.id +')',\r\n $.extend(params, {\r\n index: thisHeaderItem.index()\r\n })\r\n );\r\n\r\n // 是否阻止关闭\r\n if (closable === false) {\r\n return;\r\n }\r\n }\r\n\r\n // 如果关闭的是当前标签,则更换当前标签索引\r\n if (thisHeaderItem.hasClass(component.CONST.CLASS_THIS)) {\r\n if (thisHeaderItem.next()[0]) {\r\n that.change(thisHeaderItem.next(), true);\r\n } else if(thisHeaderItem.prev()[0]) {\r\n that.change(thisHeaderItem.prev(), true);\r\n }\r\n }\r\n\r\n // 移除元素\r\n thisHeaderItem.remove();\r\n that.findBodyItem(index).remove();\r\n\r\n that.roll('auto', index);\r\n\r\n // 获取当前标签相关数据\r\n var params = that.data();\r\n\r\n // 标签关闭后的事件\r\n layui.event.call(\r\n params.thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterClose('+ options.id +')',\r\n params\r\n );\r\n };\r\n\r\n /**\r\n * 批量关闭标签\r\n * @see tabs.close\r\n */\r\n Class.prototype.closeMult = function(mode, index) {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var data = that.data();\r\n var headers = container.header.items;\r\n var bodys = container.body.items;\r\n var DISABLED_CLOSE_SELECTOR = '[lay-closable=\"false\"]'; // 不可关闭标签选择器\r\n var FILTER = ':not('+ DISABLED_CLOSE_SELECTOR +')'; // 不可关闭标签过滤器\r\n\r\n index = index === undefined ? data.index : index;\r\n\r\n // 将标签头 lay-closable 属性值同步到 body 项\r\n headers.each(function(i) {\r\n var othis = $(this);\r\n var closableAttr = othis.attr('lay-closable');\r\n if (closableAttr) {\r\n bodys.eq(i).attr('lay-closable', closableAttr);\r\n }\r\n });\r\n\r\n // 若当前选中标签也允许关闭,则尝试寻找不可关闭的标签并将其选中\r\n if (data.thisHeaderItem.attr('lay-closable') !== 'false') {\r\n if(mode === 'all' || !mode){\r\n var nextHeader = headers.filter(':gt('+ data.index +')'+ DISABLED_CLOSE_SELECTOR).eq(0);\r\n var prevHeader = $(headers.filter(':lt('+ data.index +')'+ DISABLED_CLOSE_SELECTOR).get().reverse()).eq(0);\r\n if (nextHeader[0]) {\r\n that.change(nextHeader, true);\r\n } else if(prevHeader[0]) {\r\n that.change(prevHeader, true);\r\n }\r\n } else if(index !== data.index) { // 自动切换到活动标签(功能可取消)\r\n that.change(that.findHeaderItem(index), true);\r\n }\r\n }\r\n\r\n // 执行批量关闭标签\r\n if (mode === 'other') { // 关闭其他标签\r\n headers.eq(index).siblings(FILTER).remove();\r\n bodys.eq(index).siblings(FILTER).remove();\r\n } else if(mode === 'right') { // 关闭右侧标签\r\n headers.filter(':gt('+ index +')'+ FILTER).remove();\r\n bodys.filter(':gt('+ index +')'+ FILTER).remove();\r\n } else { // 关闭所有标签\r\n headers.filter(FILTER).remove();\r\n bodys.filter(FILTER).remove();\r\n }\r\n\r\n that.roll('auto');\r\n\r\n // 回调\r\n var params = that.data();\r\n\r\n // 标签关闭后的事件\r\n layui.event.call(\r\n params.thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterClose('+ options.id +')',\r\n params\r\n );\r\n };\r\n\r\n /**\r\n * 切换标签\r\n * @param {Object} thisHeaderItem - 当前标签头部项元素\r\n * @param {boolean} [force=false] - 是否强制切换\r\n * @returns\r\n */\r\n Class.prototype.change = function(thisHeaderItem, force) {\r\n if (!thisHeaderItem || !thisHeaderItem[0]) return;\r\n\r\n var that = this;\r\n var options = that.config;\r\n var index = thisHeaderItem.index();\r\n var thatA = thisHeaderItem.find('a');\r\n // 是否存在跳转链接\r\n var isLink = typeof thatA.attr('href') === 'string' && thatA.attr('target') === '_blank';\r\n // 是否不允许选中\r\n var unselect = typeof thisHeaderItem.attr('lay-unselect') === 'string';\r\n\r\n // 不满足切换的条件\r\n if (isLink || unselect) {\r\n return;\r\n }\r\n\r\n // 当前标签相关数据\r\n var params = that.data();\r\n\r\n // 标签关闭前的事件。若非强制关闭,可则根据事件的返回结果决定是否关闭\r\n if (!force) {\r\n var enable = layui.event.call(\r\n thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'beforeChange('+ options.id +')',\r\n $.extend(params, {\r\n from: {\r\n index: params.index,\r\n headerItem: params.thisHeaderItem\r\n },\r\n to: {\r\n index: thisHeaderItem.index(),\r\n headerItem: thisHeaderItem\r\n }\r\n })\r\n );\r\n\r\n // 是否阻止切换\r\n if (enable === false) {\r\n return;\r\n }\r\n }\r\n\r\n // 执行标签头部切换\r\n thisHeaderItem.addClass(component.CONST.CLASS_THIS).siblings()\r\n .removeClass(component.CONST.CLASS_THIS);\r\n\r\n // 执行标签内容切换\r\n that.findBodyItem(index).addClass(component.CONST.CLASS_SHOW)\r\n .siblings().removeClass(component.CONST.CLASS_SHOW);\r\n\r\n that.roll('auto', index);\r\n\r\n // 重新获取标签相关数据\r\n var params = that.data();\r\n\r\n // 标签切换后的事件\r\n layui.event.call(\r\n params.thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterChange('+ options.id +')',\r\n params\r\n );\r\n };\r\n\r\n /**\r\n * 渲染标签头部项\r\n * @param {Object} opts - 标签项配置信息\r\n */\r\n Class.prototype.renderHeaderItem = function(opts) {\r\n var that = this;\r\n var options = that.config;\r\n var headerItem = $(opts.headerItem || options.headerItem || '<li></li>');\r\n\r\n headerItem.html(opts.title || 'New Tab');\r\n\r\n // 追加属性\r\n layui.each(opts, function(key, value){\r\n if(/^(title|content|mode|done)$/.test(key)) return;\r\n headerItem.attr('lay-'+ key, value);\r\n });\r\n\r\n // 追加标签关闭元素\r\n that.appendClose(headerItem, opts);\r\n\r\n return headerItem;\r\n };\r\n\r\n /**\r\n * 渲染标签内容项\r\n * @param {Object} opts - 标签项配置信息\r\n */\r\n Class.prototype.renderBodyItem = function(opts) {\r\n var that = this\r\n var options = that.config\r\n var bodyItem = $(opts.bodyItem || options.bodyItem || '<div class=\"'+ component.CONST.ITEM +'\"></div>');\r\n\r\n bodyItem.html(opts.content || '');\r\n return bodyItem;\r\n };\r\n\r\n /**\r\n * 给某一个标签项追加可关闭元素\r\n * @param {Object} headerItem - 标签项元素\r\n * @param {Object} opts - 标签项配置信息\r\n */\r\n Class.prototype.appendClose = function(headerItem, opts) {\r\n var that = this\r\n var options = that.config;\r\n\r\n if (!options.closable) return;\r\n\r\n opts = opts || {};\r\n\r\n // 不可关闭项\r\n if (opts.closable === 'false' || headerItem.attr('lay-closable') === 'false') {\r\n return;\r\n }\r\n\r\n // 可关闭项追加关闭按钮\r\n if (!headerItem.find('.'+ component.CONST.CLOSE)[0]) {\r\n var close = $('<i class=\"layui-icon layui-icon-close layui-unselect '+ component.CONST.CLOSE +'\"></i>');\r\n close.on('click', function(){\r\n that.close($(this).parent());\r\n return false;\r\n });\r\n headerItem.append(close);\r\n }\r\n };\r\n\r\n // 渲染标签可关闭元素\r\n Class.prototype.renderClose = function() {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n\r\n // 是否开启关闭\r\n if (options.closable) {\r\n container.header.items.each(function() {\r\n that.appendClose($(this));\r\n });\r\n } else {\r\n container.header.items.each(function() {\r\n $(this).find('.'+ component.CONST.CLOSE).remove();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * 标签头滚动\r\n * @param {('auto'|'prev'|'next'|'init')} [mode='next'] - 滚动方式\r\n * @param {number} index - 标签索引。默认取当前选中标签的索引值\r\n * @returns\r\n */\r\n Class.prototype.roll = function(mode, index) {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var headerElem = container.header.elem;\r\n var headerItems = container.header.items;\r\n var scrollWidth = headerElem.prop('scrollWidth'); // 实际总长度\r\n var outerWidth = Math.ceil(headerElem.outerWidth()); // 可视区域的长度\r\n var tabsLeft = headerElem.data('left') || 0;\r\n var scrollMode = options.headerMode === 'scroll'; // 标签头部是否始终保持滚动模式\r\n\r\n // 让选中标签始终保持在可视区域\r\n var rollToVisibleArea = function() {\r\n index = isNaN(index) ? that.data().index : index;\r\n\r\n var thisItemElem = headerItems.eq(index);\r\n if (!thisItemElem[0]) return;\r\n\r\n // 当前标签的相对水平坐标值\r\n var thisLeft = Math.ceil(thisItemElem.position().left);\r\n var padding = 1; // 让边界额外保持一定间距\r\n\r\n // 当选中标签溢出在可视区域「左侧」时\r\n var countWidth = thisLeft - (thisItemElem.prev().outerWidth() || 0); // 始终空出上一个标签\r\n if (countWidth > 0) countWidth = countWidth - padding;\r\n\r\n // 左侧临界值\r\n if (tabsLeft + countWidth < 0) {\r\n tabsLeft = countWidth >= 0 ? countWidth : 0; // 标签的复原位移不能超出 0\r\n return headerElem.css('left', -tabsLeft).data('left', -tabsLeft);\r\n }\r\n\r\n // 当选中标签溢出在可视区域「右侧」时,\r\n var countWidth = thisLeft + thisItemElem.outerWidth()\r\n + (thisItemElem.next().outerWidth() || 0) + padding; // 始终空出下一个标签\r\n\r\n // 右侧临界值\r\n if (tabsLeft + countWidth - outerWidth > 0) {\r\n tabsLeft = countWidth - outerWidth;\r\n headerElem.css('left', -tabsLeft).data('left', -tabsLeft);\r\n }\r\n };\r\n\r\n // css 类名\r\n var CLASS_SCROLL = 'layui-tabs-scroll';\r\n var CLASS_BAR = 'layui-tabs-bar';\r\n var CLASS_BAR_ICON = ['layui-icon-prev', 'layui-icon-next'];\r\n\r\n // 滚动结构\r\n var rollElem = {\r\n elem: $('<div class=\"'+ CLASS_SCROLL +' layui-unselect\"></div>'),\r\n bar: $([\r\n '<div class=\"'+ CLASS_BAR +'\">',\r\n '<i class=\"layui-icon '+ CLASS_BAR_ICON[0] +'\" lay-mode=\"prev\"></i>',\r\n '<i class=\"layui-icon '+ CLASS_BAR_ICON[1] +'\" lay-mode=\"next\"></i>',\r\n '</div>'\r\n ].join(''))\r\n };\r\n\r\n // 不渲染头部滚动结构\r\n if (options.headerMode === 'normal') return;\r\n\r\n // 是否渲染滚动结构\r\n var elemScroll = headerElem.parent('.'+ CLASS_SCROLL);\r\n if (scrollMode || (!scrollMode && scrollWidth > outerWidth)) {\r\n if (!elemScroll[0]) {\r\n if (options.elem.hasClass(component.CONST.CARD)) {\r\n rollElem.elem.addClass(component.CONST.CARD);\r\n }\r\n headerElem.wrap(rollElem.elem);\r\n headerElem.after(rollElem.bar);\r\n\r\n // 点击左右箭头\r\n rollElem.bar.children().on('click', function(){\r\n var othis = $(this);\r\n var mode = othis.attr('lay-mode');\r\n if ($(this).hasClass(component.CONST.CLASS_DISABLED)) return;\r\n mode && that.roll(mode);\r\n });\r\n }\r\n } else if(!scrollMode) {\r\n if (elemScroll[0]) {\r\n elemScroll.find('.'+ CLASS_BAR).remove();\r\n headerElem.unwrap().css('left', 0).data('left', 0);\r\n } else {\r\n return;\r\n }\r\n }\r\n\r\n // 初始化滚动模式\r\n if (mode === 'init') return;\r\n\r\n // 重新获取\r\n scrollWidth = headerElem.prop('scrollWidth') // 实际总长度\r\n outerWidth = headerElem.outerWidth() // 可视区域的长度\r\n elemScroll = headerElem.parent('.'+ CLASS_SCROLL);\r\n\r\n // 左箭头(往右滚动)\r\n if (mode === 'prev') {\r\n // 当前的 left 减去可视宽度,用于与上一轮的页签比较\r\n var prevLeft = -tabsLeft - outerWidth;\r\n if(prevLeft < 0) prevLeft = 0;\r\n headerItems.each(function(i, item){\r\n var li = $(item);\r\n var left = Math.ceil(li.position().left);\r\n\r\n if (left >= prevLeft) {\r\n headerElem.css('left', -left).data('left', -left);\r\n return false;\r\n }\r\n });\r\n } else if(mode === 'auto') { // 自动识别滚动\r\n rollToVisibleArea();\r\n } else { // 右箭头(往左滚动) 默认 next\r\n headerItems.each(function(i, item){\r\n var li = $(item);\r\n var left = Math.ceil(li.position().left);\r\n\r\n if (left + li.outerWidth() >= outerWidth - tabsLeft) {\r\n headerElem.css('left', -left).data('left', -left);\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n // 同步箭头状态\r\n tabsLeft = headerElem.data('left') || 0;\r\n\r\n // 左\r\n elemScroll.find('.'+ CLASS_BAR_ICON[0])[\r\n tabsLeft < 0 ? 'removeClass' : 'addClass'\r\n ](component.CONST.CLASS_DISABLED);\r\n // 右\r\n elemScroll.find('.'+ CLASS_BAR_ICON[1])[\r\n parseFloat(tabsLeft + scrollWidth) - outerWidth > 0\r\n ? 'removeClass'\r\n : 'addClass'\r\n ](component.CONST.CLASS_DISABLED);\r\n };\r\n\r\n /**\r\n * 根据 id 或 index 获取相关标签头部项\r\n * @param {number|string} index - 标签索引或 id\r\n */\r\n Class.prototype.findHeaderItem = function(index) {\r\n if(!(\r\n typeof index === 'number'\r\n || (typeof index === 'string' && index)\r\n )) return;\r\n var headerItems = this.getContainer().header.items;\r\n var item = headerItems.filter('[lay-id=\"'+ index +'\"]');\r\n return item[0] ? item : headerItems.eq(index);\r\n };\r\n\r\n /**\r\n * 根据 index 获取相关标签内容项\r\n * @param {number} index - 标签索引\r\n */\r\n Class.prototype.findBodyItem = function(index) {\r\n return this.getContainer().body.items.eq(index);\r\n };\r\n\r\n /**\r\n * 返回给回调的公共信息\r\n * @returns\r\n */\r\n Class.prototype.data = function() {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var thisHeaderItem = container.header.items.filter('.'+ component.CONST.CLASS_THIS);\r\n var index = thisHeaderItem.index();\r\n\r\n return {\r\n options: options, // 标签配置信息\r\n container: container, // 标签容器的相关元素\r\n thisHeaderItem: thisHeaderItem, // 当前标签头部项\r\n thisBodyItem: that.findBodyItem(index), // 当前标签内容项\r\n index: index, // 当前标签索引\r\n length: container.header.items.length // 当前标签数\r\n }\r\n };\r\n\r\n // 扩展组件接口\r\n $.extend(component, {\r\n /**\r\n * 添加标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {Object} opts - 添加标签的配置项,详见 Class.prototype.add\r\n */\r\n add: function(id, opts) {\r\n var that = component.getInst(id);\r\n if(!that) return;\r\n that.add(opts);\r\n },\r\n\r\n /**\r\n * 关闭标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n * @param {boolean} [force=false] - 是否强制关闭\r\n */\r\n close: function(id, index, force) {\r\n var that = component.getInst(id);\r\n if(!that) return;\r\n if(index === undefined) index = that.data().index; // index 若不传,则表示关闭当前标签\r\n that.close(that.findHeaderItem(index), force);\r\n },\r\n\r\n /**\r\n * 关闭多个标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {('other'|'right'|'all')} [mode=\"all\"] - 关闭方式\r\n * @param {number} index - 活动标签的索引,默认取当前选中标签的索引。一般用于标签右键事件\r\n */\r\n closeMult: function(id, mode, index, force) {\r\n var that = component.getInst(id);\r\n if(!that) return;\r\n that.closeMult(mode, index, force);\r\n },\r\n\r\n /**\r\n * 切换标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n */\r\n change: function(id, index, force) {\r\n var that = component.getInst(id);\r\n if(!that) return;\r\n that.change(that.findHeaderItem(index), force);\r\n },\r\n\r\n /**\r\n * 获取标签信息\r\n * @param {string} id - 渲染时的实例 ID\r\n */\r\n data: function(id) {\r\n var that = component.getInst(id);\r\n return that ? that.data() : {};\r\n },\r\n\r\n /**\r\n * 获取标签指定头部项\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n * @returns\r\n */\r\n getHeaderItem: function(id, index) {\r\n var that = component.getInst(id);\r\n if(!that) return;\r\n return that.findHeaderItem(index);\r\n },\r\n\r\n /**\r\n * 获取标签指定内容项\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n * @returns\r\n */\r\n getBodyItem: function(id, index) {\r\n var that = component.getInst(id);\r\n if(!that) return;\r\n return that.findBodyItem(index);\r\n },\r\n\r\n /**\r\n * 刷新标签视图结构\r\n * @param {string} id - 渲染时的实例 ID\r\n */\r\n refresh: function(id) {\r\n var that = component.getInst(id);\r\n if (!that) return;\r\n that.roll('auto');\r\n }\r\n });\r\n\r\n // 初始化渲染\r\n $(function() {\r\n component.render();\r\n });\r\n\r\n exports(component.CONST.MOD_NAME, component);\r\n});\r\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 = util.escape(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","/**\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 var 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 var thisDataElem = othis.find('.'+ ELEM_DATA);\r\n var allElemCheckbox = othis.find('.'+ ELEM_HEADER).find('input[type=\"checkbox\"]');\r\n var listElemCheckbox = thisDataElem.find('input[type=\"checkbox\"]');\r\n \r\n // 同步复选框和按钮状态\r\n var nums = 0;\r\n var haveChecked = false;\r\n\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 var options = that.config;\r\n var arr = [];\r\n\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 var options = that.config;\r\n var 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 var options = that.config;\r\n var 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 var options = that.config;\r\n var thisBoxElem = that.layBox.eq(_index);\r\n var arr = [];\r\n\r\n if (!elem) {\r\n // 通过按钮触发找到选中的进行移动\r\n thisBoxElem.each(function(_index){\r\n var othis = $(this);\r\n var thisDataElem = othis.find('.'+ ELEM_DATA);\r\n\r\n thisDataElem.children('li').each(function(){\r\n var thisList = $(this);\r\n var thisElemCheckbox = thisList.find('input[type=\"checkbox\"]');\r\n var 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 var 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 var 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 var checked = thisElemCheckbox[0].checked;\r\n var 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 var thisElemCheckbox = elemThis.children('input[type=\"checkbox\"]');\r\n var thisDataElem = elemThis.parent();\r\n var thisBoxElem = thisDataElem.parent();\r\n var index = thisBoxElem.data('index');\r\n\r\n if(thisElemCheckbox[0].disabled) return;\r\n\r\n // 根据 dblclick 回调函数返回值决定是否执行穿梭 --- 2.9.3+\r\n var ret = typeof options.dblclick === 'function' ? options.dblclick({\r\n elem: elemThis,\r\n data: that.getData([thisElemCheckbox[0].value])[0],\r\n index: index\r\n }) : null;\r\n\r\n if(ret === false) return;\r\n\r\n that.transfer(index, elemThis);\r\n })\r\n\r\n // 穿梭按钮事件\r\n that.layBtn.on('click', function(){\r\n var othis = $(this);\r\n var _index = othis.data('index');\r\n\r\n if(othis.hasClass(DISABLED)) return;\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 that.indicator();\r\n that.arrow();\r\n that.autoplay();\r\n\r\n if (that.elemItem.length > 1) {\r\n that.events();\r\n }\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 var itemsCount = that.elemItem.length;\r\n \r\n if(!options.autoplay) return;\r\n clearInterval(that.timer);\r\n \r\n if (itemsCount > 1) {\r\n that.timer = setInterval(function(){\r\n that.slide();\r\n }, options.interval);\r\n }\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 var itemsCount = that.elemItem.length;\r\n \r\n // 模板\r\n var tplArrow = $([\r\n '<button type=\"button\" class=\"layui-icon '+ (options.anim === 'updown' ? 'layui-icon-up' : 'layui-icon-left') + ' ' + ELEM_ARROW +'\" lay-type=\"sub\"></button>',\r\n '<button type=\"button\" class=\"layui-icon '+ (options.anim === 'updown' ? 'layui-icon-down' : 'layui-icon-right') + ' ' + ELEM_ARROW +'\" lay-type=\"add\"></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 itemsCount > 1 ? options.elem.append(tplArrow) : tplArrow.remove();\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 var itemsCount = that.elemItem.length;\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\r\n itemsCount > 1 ? options.elem.append(tplInd) : tplInd.remove();\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 itemsCount = elemItem.length;\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 || itemsCount <= 1) 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 // 移入移出容器\r\n options.elem.on('mouseenter touchstart', function(){\r\n if (that.config.autoplay === 'always') return;\r\n clearInterval(that.timer);\r\n }).on('mouseleave touchend', function(){\r\n if (that.config.autoplay === 'always') return;\r\n that.autoplay();\r\n });\r\n\r\n var touchEl = options.elem;\r\n var isVertical = options.anim === 'updown';\r\n lay.touchSwipe(touchEl, {\r\n onTouchEnd: function(e, state){\r\n var duration = Date.now() - state.timeStart;\r\n var distance = isVertical ? state.distanceY : state.distanceX;\r\n var speed = distance / duration;\r\n var shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(distance) > touchEl[isVertical ? 'height' : 'width']() / 3;\r\n if(shouldSwipe){\r\n that.slide(distance > 0 ? '' : 'sub');\r\n }\r\n }\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 var liElems = _ul.children(\"li\");\r\n\r\n liElems.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 lay.touchSwipe(_ul, {\r\n onTouchMove: function(e, state){\r\n if(Date.now() - state.timeStart <= 200) return;\r\n var pageX = e.touches[0].pageX;\r\n var rateElemWidth = _ul.width();\r\n var itemElemWidth = rateElemWidth / options.length; // 单颗星的宽度\r\n var offsetX = pageX - _ul.offset().left;\r\n var num = offsetX / itemElemWidth; // 原始值\r\n var remainder = num % 1;\r\n var integer = num - remainder;\r\n\r\n // 最终值\r\n var score = remainder <= 0.5 && options.half ? integer + 0.5 : Math.ceil(num);\r\n if(score > options.length) score = options.length;\r\n if(score < 0) score = 0;\r\n\r\n liElems.each(function(index){\r\n var iconElem = $(this).children('i');\r\n var isActiveIcon = (Math.ceil(score) - index === 1);\r\n var needSelect = Math.ceil(score) > index;\r\n var shouldHalfIcon = (score - index === 0.5);\r\n\r\n if(needSelect){\r\n // 设置选中样式\r\n iconElem.addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE);\r\n if(options.half && shouldHalfIcon){\r\n iconElem.addClass(ICON_RATE_HALF).removeClass(ICON_RATE_SOLID);\r\n }\r\n }else{\r\n // 恢复初始样式\r\n iconElem.addClass(ICON_RATE).removeClass(ICON_SOLID_HALF);\r\n }\r\n\r\n // 设置缩放样式\r\n iconElem.toggleClass('layui-rate-hover', isActiveIcon);\r\n });\r\n\r\n // 更新最终值\r\n options.value = score;\r\n if(options.text) _ul.next(\"span\").text(options.value + \"星\");\r\n options.setText && options.setText(options.value);\r\n },\r\n onTouchEnd: function(e, state){\r\n if(Date.now() - state.timeStart <= 200) return;\r\n _ul.find('i').removeClass('layui-rate-hover');\r\n options.choose && options.choose(options.value);\r\n options.setText && options.setText(options.value);\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 threshold = 'mb' in options ? options.mb : 50; // 临界距离\r\n var isAuto = 'isAuto' in options ? options.isAuto : true; // 否自动滚动加载\r\n var moreText = options.moreText || \"加载更多\"; // 手动加载时,加载更多按钮文案\r\n var end = options.end || '没有更多了'; // “末页”显示文案\r\n var direction = options.direction || 'bottom';\r\n var isTop = direction === 'top';\r\n\r\n // 重复执行时清理旧的事件绑定\r\n that._cleanup(elem, scrollElem);\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //加载更多\r\n var ELEM_TEXT = '<cite>' + moreText + '</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[isTop ? 'prepend' : 'append'](more);\r\n }\r\n\r\n //加载下一个元素\r\n var next = function(html, over){\r\n var scrollHeightStart = notDocument ? scrollElem.prop('scrollHeight') : document.documentElement.scrollHeight;\r\n var scrollTopStart = scrollElem.scrollTop();\r\n html = $(html);\r\n more[isTop ? 'after' : '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 if(isTop){\r\n var scrollHeightEnd = notDocument ? scrollElem.prop('scrollHeight') : document.documentElement.scrollHeight;\r\n if(page === 1){\r\n // 首次渲染后滑动到底部\r\n scrollElem.scrollTop(scrollHeightEnd);\r\n }else if(page > 1){\r\n var nextElementHeight = scrollHeightEnd - scrollHeightStart;\r\n scrollElem.scrollTop(scrollTopStart + nextElementHeight);\r\n }\r\n }\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.flow', 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 ,direction: options.direction\r\n });\r\n }\r\n\r\n if(!isAuto) return that;\r\n\r\n scrollElem.on('scroll.flow', 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(!isTop ? scrollHeight - top - height <= threshold : top <= threshold){\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 var direction = options.direction || 'bottom';\r\n var isTop = direction === 'top';\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((isTop ? elemTop + item.height() : 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.lazyimg' , 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 Flow.prototype._cleanup = function(elem, scrollElem){\r\n scrollElem.off('scroll.flow').off('scroll.lazyimg');\r\n elem.find('.layui-flow-more').find('a').off('click.flow');\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', 'tabs', '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 tabs = layui.tabs;\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 var hasOnCopy = typeof options.onCopy === 'function';\r\n\r\n // 写入剪切板\r\n lay.clipboard.writeText({\r\n text: code,\r\n done: function() {\r\n if(hasOnCopy){\r\n var ret = options.onCopy(code, true);\r\n if(ret === false) return;\r\n }\r\n\r\n layer.msg('已复制', {icon: 1});\r\n },\r\n error: function() {\r\n if(hasOnCopy){\r\n var ret = options.onCopy(code, false);\r\n if(ret === false) return;\r\n }\r\n layer.msg('复制失败', {icon: 2});\r\n }\r\n });\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 tabs.render({\r\n elem: ['.'+ CONST.ELEM_PREVIEW, '.layui-tabs'].join(' ')\r\n });\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"]}