You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.0 MiB
1 lines
2.0 MiB
{"version":3,"sources":["../src/lib/jquery/core/js/jquery.js","../src/lib/jquery/ui/js/jquery-ui.js","../src/framework/core/js/Fluid.js","../src/framework/core/js/FluidPromises.js","../src/framework/core/js/FluidDocument.js","../src/framework/core/js/FluidDOMUtilities.js","../src/framework/core/js/JavaProperties.js","../src/framework/core/js/FluidDebugging.js","../src/framework/core/js/FluidIoC.js","../src/framework/core/js/DataBinding.js","../src/framework/core/js/ModelTransformation.js","../src/framework/core/js/ModelTransformationTransforms.js","../src/framework/core/js/jquery.keyboard-a11y.js","../src/framework/core/js/FluidView.js","../src/framework/core/js/FluidRequests.js","../src/framework/core/js/ResourceLoader.js","../src/framework/enhancement/js/ContextAwareness.js","../src/framework/enhancement/js/ProgressiveEnhancement.js","../src/lib/fastXmlPull/js/fastXmlPull.js","../src/framework/renderer/js/fluidParser.js","../src/framework/renderer/js/fluidRenderer.js","../src/framework/renderer/js/RendererUtilities.js","../src/components/slidingPanel/js/SlidingPanel.js","../src/lib/jquery/plugins/touchPunch/js/jquery.ui.touch-punch.js","../src/components/textfieldSlider/js/TextfieldSlider.js","../src/components/tableOfContents/js/TableOfContents.js","../src/components/textToSpeech/js/TextToSpeech.js","../src/framework/preferences/js/URLUtilities.js","../src/framework/preferences/js/Store.js","../src/framework/preferences/js/UIEnhancer.js","../src/framework/preferences/js/PrefsEditor.js","../src/framework/preferences/js/Panels.js","../src/framework/preferences/js/SelfVoicingPanel.js","../src/framework/preferences/js/Enactors.js","../src/framework/preferences/js/SelfVoicingEnactor.js","../src/framework/preferences/js/StarterGrades.js","../src/framework/preferences/js/SeparatedPanelPrefsEditor.js","../src/framework/preferences/js/FullNoPreviewPrefsEditor.js","../src/framework/preferences/js/FullPreviewPrefsEditor.js","../src/framework/preferences/js/PrimaryBuilder.js","../src/framework/preferences/js/AuxBuilder.js","../src/framework/preferences/js/StarterSchemas.js","../src/framework/preferences/js/SelfVoicingSchemas.js","../src/framework/preferences/js/Builder.js","../src/components/uiOptions/js/UIOptions.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","DOMEval","code","doc","script","createElement","text","head","appendChild","parentNode","removeChild","isArrayLike","obj","length","type","jQuery","isWindow","winnow","elements","qualifier","not","isFunction","grep","elem","i","call","nodeType","risSimple","test","filter","indexOf","sibling","cur","dir","createOptions","options","object","each","match","rnotwhite","_","flag","Identity","v","Thrower","ex","adoptValue","value","resolve","reject","method","promise","done","fail","then","undefined","completed","removeEventListener","ready","Data","expando","uid","dataAttr","key","data","name","replace","rmultiDash","toLowerCase","getAttribute","rbrace","JSON","parse","e","dataUser","set","adjustCSS","prop","valueParts","tween","adjusted","scale","maxIterations","currentValue","css","initial","unit","cssNumber","initialInUnit","rcssNum","exec","style","start","end","getDefaultDisplay","temp","ownerDocument","nodeName","display","defaultDisplayMap","body","showHide","show","values","index","dataPriv","get","isHiddenWithinTree","getAll","context","tag","ret","getElementsByTagName","querySelectorAll","merge","setGlobalEval","elems","refElements","l","buildFragment","scripts","selection","ignored","tmp","wrap","contains","j","fragment","createDocumentFragment","nodes","rhtml","rtagName","wrapMap","_default","innerHTML","htmlPrefilter","lastChild","childNodes","firstChild","textContent","push","createTextNode","inArray","rscriptType","returnTrue","returnFalse","safeActiveElement","activeElement","err","on","types","selector","fn","one","origFn","event","off","apply","arguments","guid","add","manipulationTarget","content","disableScript","restoreScript","rscriptTypeMasked","removeAttribute","cloneCopyEvent","src","dest","pdataOld","pdataCur","udataOld","udataCur","events","hasData","access","handle","extend","fixInput","rcheckableType","checked","defaultValue","domManip","collection","args","callback","concat","first","hasScripts","node","iNoClone","support","checkClone","rchecked","self","eq","html","map","clone","_evalUrl","rcleanScript","remove","keepData","cleanData","curCSS","computed","width","minWidth","maxWidth","getStyles","getPropertyValue","pixelMarginRight","rnumnonpx","rmargin","addGetHookIf","conditionFn","hookFn","vendorPropName","emptyStyle","capName","toUpperCase","slice","cssPrefixes","setPositiveNumber","subtract","matches","Math","max","augmentWidthOrHeight","extra","isBorderBox","styles","val","cssExpand","getWidthOrHeight","valueIsBorderBox","getClientRects","getBoundingClientRect","boxSizingReliable","parseFloat","Tween","easing","prototype","init","raf","timerId","requestAnimationFrame","fx","tick","createFxNow","setTimeout","fxNow","now","genFx","includeWidth","which","attrs","height","opacity","createTween","animation","Animation","tweeners","defaultPrefilter","props","opts","toggle","hooks","oldfire","propTween","restoreDisplay","isBox","anim","orig","hidden","dataShow","queue","_queueHooks","unqueued","empty","fire","always","rfxtypes","isEmptyObject","overflow","overflowX","overflowY","propFilter","specialEasing","camelCase","isArray","cssHooks","expand","properties","result","stopped","prefilters","deferred","Deferred","currentTime","remaining","startTime","duration","percent","tweens","run","notifyWith","resolveWith","originalProperties","originalOptions","stop","gotoEnd","rejectWith","proxy","timer","progress","complete","getClass","buildParams","prefix","traditional","rbracket","addToPrefiltersOrTransports","structure","dataTypeExpression","func","dataType","dataTypes","unshift","inspectPrefiltersOrTransports","jqXHR","inspect","selected","inspected","prefilterOrFactory","dataTypeOrTransport","seekingTransport","transports","ajaxExtend","target","deep","flatOptions","ajaxSettings","ajaxHandleResponses","s","responses","ct","finalDataType","firstDataType","contents","shift","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","prev","responseFields","dataFilter","split","state","error","getWindow","defaultView","arr","getProto","Object","getPrototypeOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","version","rtrim","rmsPrefix","rdashAlpha","fcamelCase","all","letter","jquery","constructor","toArray","num","pushStack","prevObject","last","len","sort","splice","copy","copyIsArray","isPlainObject","random","isReady","msg","noop","Array","isNumeric","isNaN","proto","Ctor","globalEval","string","trim","makeArray","results","second","invert","callbackInverse","callbackExpect","arg","Date","Symbol","iterator","Sizzle","seed","m","nid","groups","newSelector","newContext","preferredDoc","setDocument","documentIsHTML","rquickExpr","getElementById","id","getElementsByClassName","qsa","compilerCache","rbuggyQSA","rcssescape","fcssescape","setAttribute","tokenize","toSelector","join","rsibling","testContext","qsaError","select","createCache","cache","keys","Expr","cacheLength","markFunction","assert","el","addHandle","handler","attrHandle","siblingCheck","a","b","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","disabled","isDisabled","disabledAncestor","createPositionalPseudo","argument","matchIndexes","setFilters","tokens","addCombinator","matcher","combinator","base","skip","next","checkNonElements","doneName","xml","oldCache","uniqueCache","outerCache","newCache","dirruns","uniqueID","elementMatcher","matchers","multipleContexts","contexts","condense","unmatched","newUnmatched","mapped","setMatcher","preFilter","postFilter","postFinder","postSelector","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","relative","implicitRelative","matchContext","matchAnyContext","outermostContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","find","dirrunsUnique","pop","uniqueSort","getText","isXML","compile","sortInput","hasDuplicate","docElem","rbuggyMatches","classCache","tokenCache","sortOrder","push_native","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","runescape","funescape","escaped","escapedWhitespace","high","String","fromCharCode","ch","asCodePoint","charCodeAt","unloadHandler","els","documentElement","hasCompare","subWindow","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","attrId","getAttributeNode","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","expr","attr","specified","escape","sel","duplicates","detectDuplicates","sortStable","nodeValue","selectors","createPseudo",">"," ","+","~","excess","unquoted","nodeNameSelector","pattern","operator","check","what","simple","forward","ofType","nodeIndex","parent","useCache","pseudo","idx","matched","has","innerText","lang","elemLang","hash","location","root","focus","hasFocus","href","tabIndex","enabled","selectedIndex","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","soFar","preFilters","cached","token","compiled","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","rootjQuery","parseHTML","rparentsprev","guaranteedUnique","children","targets","closest","prevAll","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","reverse","Callbacks","firing","memory","fired","locked","firingIndex","once","stopOnFalse","disable","lock","fireWith","tuples","catch","pipe","fns","newDefer","tuple","returned","notify","onFulfilled","onRejected","onProgress","depth","special","that","mightThrow","maxDepth","TypeError","process","exceptionHook","stackTrace","getStackHook","stateString","when","singleValue","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","readyWait","holdReady","hold","wait","readyState","doScroll","chainable","emptyGet","raw","bulk","acceptData","owner","defineProperty","configurable","removeData","_data","_removeData","dequeue","startLength","setter","clearQueue","count","defer","pnum","source","swap","old","hide","option","thead","col","tr","td","optgroup","tbody","tfoot","colgroup","caption","th","div","cloneNode","noCloneChecked","rkeyEvent","rmouseEvent","rtypenamespace","handleObjIn","eventHandle","t","handleObj","handlers","namespaces","origType","elemData","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","preventDefault","stopPropagation","postDispatch","addProp","hook","Event","enumerable","originalEvent","writable","load","noBubble","trigger","blur","click","beforeunload","returnValue","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","isSimulated","stopImmediatePropagation","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","mouseenter","mouseleave","pointerenter","pointerleave","related","rxhtmlTag","rnoInnerhtml","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","opener","getComputedStyle","computeStyleTests","cssText","container","divStyle","pixelPositionVal","reliableMarginLeftVal","marginLeft","boxSizingReliableVal","marginRight","pixelMarginRightVal","backgroundClip","clearCloneStyle","pixelPosition","reliableMarginLeft","rdisplayswap","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","zIndex","zoom","cssProps","float","origName","isFinite","left","margin","padding","border","suffix","expanded","parts","propHooks","eased","pos","step","scrollTop","scrollLeft","linear","p","swing","cos","PI","rrun","*","tweener","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","cancelAnimationFrame","clearInterval","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","removeProp","propFix","tabindex","parseInt","for","class","rclass","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","classNames","hasClass","rreturn","rspaces","valHooks","optionSet","rfocusMorph","onlyHandlers","bubbleType","ontype","eventPath","isTrigger","parentWindow","simulate","triggerHandler","hover","fnOver","fnOut","focusin","attaches","nonce","rquery","parseXML","DOMParser","parseFromString","rCRLF","rsubmitterTypes","rsubmittable","param","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","allTypes","originAnchor","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","status","nativeStatusText","headers","success","modified","statusText","timeoutTimer","transport","responseHeadersString","ifModified","cacheURL","callbackContext","statusCode","fireGlobals","globalEventContext","completeDeferred","responseHeaders","urlAnchor","uncached","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","overrideMimeType","abort","finalText","crossDomain","host","hasContent","beforeSend","send","getJSON","getScript","throws","wrapAll","firstElementChild","wrapInner","unwrap","visible","offsetWidth","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","onreadystatechange","responseType","responseText","binary","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","using","win","rect","pageYOffset","clientTop","pageXOffset","clientLeft","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","bind","unbind","delegate","undelegate","parseJSON","define","amd","_jQuery","_$","$","noConflict","element","ui","widgetUuid","widgetSlice","widget","existingConstructor","basePrototype","proxiedPrototype","fullName","Widget","_createWidget","_proto","_childConstructors","_super","_superApply","__super","__superApply","widgetEventPrefix","widgetName","widgetFullName","child","childPrototype","bridge","inputIndex","inputLength","isMethodCall","methodValue","instance","charAt","_init","defaultElement","create","uuid","eventNamespace","bindings","hoverable","focusable","classesElementLookup","_on","destroy","_getCreateOptions","_create","_setOptionDisabled","_trigger","_getCreateEventData","_destroy","_removeClass","curOption","_setOptions","_setOption","_setOptionClasses","classKey","currentElements","_classes","_toggleClass","enable","processClassString","checkOption","full","_untrackClassesElement","_addClass","suppressDisabledCheck","delegateElement","handlerProxy","eventName","_off","_delay","_hoverable","_focusable","focusout","defaultEffect","effect","hasOptions","effectName","effects","getOffsets","offsets","rpercent","parseCss","property","getDimensions","outerWidth","outerHeight","cachedScrollbarWidth","abs","rhorizontal","rvertical","roffset","rposition","_position","scrollbarWidth","w1","w2","innerDiv","clientWidth","getScrollInfo","within","isDocument","hasOverflowX","scrollWidth","hasOverflowY","scrollHeight","getWithinInfo","withinElement","hasOffset","of","atOffset","targetWidth","targetHeight","targetOffset","basePosition","dimensions","scrollInfo","collision","at","horizontalOffset","verticalOffset","collisionPosition","elemWidth","elemHeight","marginTop","collisionWidth","collisionHeight","myOffset","my","right","bottom","feedback","horizontal","vertical","important","fit","newOverRight","withinOffset","collisionPosLeft","overLeft","overRight","newOverBottom","collisionPosTop","overTop","overBottom","flip","newOverLeft","offsetLeft","newOverTop","offsetTop","flipfit","dataName","disableSelection","eventType","enableSelection","hasTabindex","mapName","img","focusableIfVisible","fieldset","mouseHandled","form","formResetMixin","_formResetHandler","instances","refresh","_bindFormResetHandler","_unbindFormResetHandler","BACKSPACE","COMMA","DELETE","DOWN","END","ENTER","ESCAPE","HOME","LEFT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","SPACE","TAB","UP","selectorEscape","labels","ancestor","ancestors","scrollParent","includeHidden","excludeStaticParent","overflowRegex","tabbable","uniqueId","removeUniqueId","ie","navigator","userAgent","cancel","distance","_mouseInit","_mouseDown","started","_mouseDestroy","_mouseMoveDelegate","_mouseUpDelegate","_mouseMoved","_mouseStarted","_mouseUp","_mouseDownEvent","btnIsLeft","elIsCancel","_mouseCapture","mouseDelayMet","_mouseDelayTimer","_mouseDistanceMet","_mouseDelayMet","_mouseStart","_mouseMove","documentMode","ignoreMissingWhich","_mouseDrag","_mouseStop","plugin","plugins","allowDisconnected","safeBlur","mouse","addClasses","axis","connectToSortable","containment","cursor","cursorAt","grid","helper","iframeFix","refreshPositions","revert","revertDuration","scope","scroll","scrollSensitivity","scrollSpeed","snap","snapMode","snapTolerance","drag","_setPositionRelative","_setHandleClassName","_removeHandleClassName","destroyOnClear","o","_getHandle","_blurActiveElement","_blockFrames","iframeBlocks","iframe","_unblockFrames","_createHelper","_cacheHelperProportions","ddmanager","_cacheMargins","cssPosition","hasFixedAncestor","positionAbs","_refreshOffsets","originalPosition","_generatePosition","originalPageX","originalPageY","_adjustOffsetFromHelper","_setContainment","_clear","dropBehaviour","prepareOffsets","dragStart","margins","_getParentOffset","_getRelativeOffset","noPropagation","_convertPositionTo","_uiHash","dropped","drop","dragStop","handleElement","helperIsFunction","helperProportions","_isRootNode","tagName","po","scrollIsRootNode","isUserScrollable","c","ce","relativeContainer","d","mod","constrainPosition","co","round","cancelHelperRemoval","draggable","uiSortable","item","sortables","sortable","isOver","_storedCSS","placeholder","_helper","innermostIntersecting","_intersectsWith","containerCache","_parent","currentItem","fromOutside","_revert","_cursor","_opacity","scrollParentNotHidden","overflowOffset","scrolled","snapElements","items","$t","$o","inst","ts","bs","ls","rs","r","x1","x2","y1","y2","snapping","release","snapItem","min","group","_zIndex","alsoResize","animateDuration","animateEasing","aspectRatio","autoHide","ui-resizable-se","ghost","handles","maxHeight","minHeight","resize","_num","_isNumber","_hasScroll","_aspectRatio","originalElement","_proportionallyResizeElements","resizable","elementIsWrapper","marginBottom","originalResizeStyle","_proportionallyResize","_setupHandles","_handles","resizing","wrapper","exp","_removeHandles","hname","se","sw","ne","nw","_renderAxis","padPos","padWrapper","mousedown","capture","curleft","curtop","_renderProxy","size","originalSize","sizeDiff","originalMousePosition","_propagate","smp","dx","dy","_change","_updatePrevProperties","_updateVirtualBoundaries","_updateRatio","_respectSize","_updateCache","_applyChanges","pr","ista","soffseth","soffsetw","prevPosition","prevSize","forceAspectRatio","pMinWidth","pMaxWidth","pMinHeight","pMaxHeight","Infinity","_vBoundaries","cpos","csize","ismaxw","ismaxh","isminw","isminh","dw","dh","cw","_getPaddingPlusBorderDimensions","widths","borders","paddings","prel","outerDimensions","elementOffset","cs","sp","oc","containerElement","containerOffset","containerPosition","parentData","containerSize","innerHeight","innerWidth","woset","hoset","isParent","isOffsetRelative","cp","pRatio","cop","continueResize","ho","h","os","op","delta","sum","uiBackCompat","gridX","gridY","ox","oy","newWidth","newHeight","isMaxWidth","isMaxHeight","isMinWidth","isMinHeight","controlgroupCornerRegex","direction","onlyVisible","controlgroupLabel","checkboxradio","selectmenu","spinner","_enhance","_callChildMethod","childWidgets","_initWidgets","instanceOptions","_resolveClassesValues","widgetElement","_updateCornerClass","_buildSimpleOptions","label","middle","only","_spinnerOptions","_buttonOptions","_checkboxradioOptions","_selectmenuOptions","ui-selectmenu-button-open","ui-selectmenu-button-closed","icon","ui-checkboxradio-label","ui-checkboxradio-icon","_readType","originalLabel","outerHTML","_updateLabel","change","_updateIcon","_getRadioGroup","nameSelector","_toggleClasses","iconSpace","toAdd","ui-button","iconPosition","showLabel","isInput","hasTitle","keyup","_updateTooltip","title","displayBlock","_attachIcon","_attachIconSpace","newShowLabel","newIcon","icons","primary","secondary","buttonset","controlgroup","autoOpen","ui-dialog","ui-dialog-titlebar","closeOnEscape","closeText","modal","topOffset","beforeClose","close","resizeStart","resizeStop","sizeRelatedOptions","resizableRelatedOptions","originalCss","originalTitle","_createWrapper","uiDialog","_createTitlebar","_createButtonPane","_makeDraggable","_makeResizable","_isOpen","_trackFocus","_appendTo","_untrackInstance","_destroyOverlay","_focusedElement","_hide","isOpen","moveToTop","_moveToTop","silent","moved","zIndices","zIndexMax","_focusTabbable","_size","_createOverlay","overlay","_show","_makeFocusTarget","uiDialogButtonPane","uiDialogTitlebarClose","_keepFocus","checkFocus","isActive","role","keydown","tabbables","aria-describedby","uiDialogTitle","uiDialogTitlebar","_title","aria-labelledby","uiButtonSet","_createButtons","buttonOptions","filteredUi","resizeHandles","_minHeight","_trackingInstances","exists","isVisible","resizableOptions","isDraggable","isResizable","nonContentHeight","minContentHeight","maxContentHeight","_allowInteraction","isOpening","overlays","dialog","dialogClass","ui-slider","ui-slider-handle","ui-slider-range","orientation","range","slide","numPages","_keySliding","_mouseSliding","_animateOff","_handleIndex","_detectOrientation","_calculateNewMax","_refresh","_createRange","_createHandles","_setupEvents","_refreshValue","handleCount","existingHandles","_valueMin","_handleEvents","normValue","closestHandle","allowed","mouseOverHandle","elementSize","x","y","_normValueFromMouse","_valueMax","thisDistance","_lastChangedValue","_start","_clickOffset","_slide","_stop","pixelTotal","pixelMouse","percentMouse","valueTotal","valueMouse","_trimAlignValue","uiHash","handleIndex","_hasMultipleValues","newVal","otherVal","newValues","newValue","_value","vals","_values","valsLength","_refreshRange","valModStep","alignValue","toFixed","aboveMin","_precision","precision","_precisionOf","str","decimal","lastValPercent","valPercent","valueMin","valueMax","oRange","_set","curVal","ui-tabs","ui-tabs-nav","ui-tabs-panel","ui-tabs-tab","collapsible","heightStyle","activate","beforeActivate","beforeLoad","_isLocal","anchor","anchorUrl","locationUrl","decodeURIComponent","running","_processTabs","_initialActive","tabs","li","anchors","_findActive","locationHash","substring","tab","panel","_getPanelForTab","_tabKeydown","focusedTab","goingForward","_handlePageNav","activating","_activate","_focusNextTab","_panelKeydown","_findNextTab","constrain","lastTabIndex","_setupHeightStyle","_sanitizeSelector","lis","tablist","aria-selected","aria-expanded","panels","aria-hidden","prevTabs","prevAnchors","prevPanels","_getList","panelId","anchorId","originalAriaControls","_createPanel","aria-controls","_eventHandler","clickedIsActive","collapsing","toShow","toHide","eventData","oldTab","oldPanel","newTab","newPanel","_toggle","_getIndex","_ajaxSettings","ui-tooltip","track","_addDescribedBy","describedby","_removeDescribedBy","mouseover","tooltips","liveRegion","aria-live","aria-relevant","disabledTitles","tooltipData","_updateContent","_disable","_enable","blurEvent","_registerCloseHandlers","contentOption","_open","positionOption","tooltip","delayedShow","a11yContent","_find","_tooltip","mousemove","fakeEvent","_removeTooltip","closing","hiding","tooltipClass","fluid_2_0_0","fluid","transformInternal","togo","transit","regenerateCursor","segs","limit","sourceStrategy","regenerateSources","sources","sourceStrategies","thisSource","environment","invokeLater","defeatLogging","activityTracing","activityTrace","activityParser","renderOneActivity","activity","nowhile","lastIndex","renderActivity","activityStack","renderer","transform","singleThreadLocal","initFunc","threadLocal","globalThreadLocal","getActivityStack","describeActivity","logActivity","rendered","log","doLog","pushActivity","record","getTime","passLogLevel","logLevel","TRACE","popActivity","popframes","popped","FluidError","logFailure","FAIL","renderLoggingArg","isPrimitive","stringify","builtinFail","failureEvent","expect","members","isLogging","logLevelStack","priority","IMPORTANT","isLogLevel","isMarker","testLogLevel","setLogging","setLogLevel","popLogging","debug","directArgs","userLogLevel","INFO","arg0","renderTimestamp","isValue","valueType","isArrayable","totest","strict","typeCode","isIoCReference","ref","isDOMNode","isComponent","componentConstructor","isUncopyable","isApplicable","identity","notImplemented","firstDefined","freshContainer","tocopy","copyRecurse","strategyRecursionBailout","pushArray","holder","member","topush","array","make_find","find_if","deffolt","disp","accumulate","remove_if","generate","generator","applyFunc","iota","getMembers","filterKeys","toFilter","exclude","censorKeys","toCensor","makeFlatten","thisValue","keyForValue","arrayToHash","stableSort","k","hashToArray","keyName","newEl","flatten","clear","compareStringLength","ascending","parseInteger","Number","NaN","freezeRecursive","tofreeze","freeze","marker","makeMarker","VALUE","NO_VALUE","EXPAND","logLevelsSpec","FATAL","WARN","model","copyModel","parseEL","EL","composePath","composeSegments","lastDotIndex","path","lastIndexOf","getToTailPath","lastdot","getTailPath","requireDataBinding","setWithStrategy","getWithStrategy","resolvePathSegment","segment","origEnv","parseToSegments","pathToSegments","config","parser","accessImpl","initSegs","returnSegs","traverser","initPos","uncess","accessSimple","traverseSimple","setSimple","getSimple","getImmediate","decodeAccessorArg","arg3","defaultGetConfig","defaultSetConfig","env","getGlobalValue","fnName","invokeGlobalFunction","functionPath","registerGlobalFunction","setGlobalValue","registerNamespace","naimspace","existing","dumpEl","generateUniquePrefix","floor","fluid_prefix","fluidInstance","fluid_guid","allocateGuid","extremePriority","priorityTypes","extremalPriorities","none","testing","authoring","parsePriorityConstraint","constraint","fixedOnly","site","lookup","parsePriority","fixed","multiplier","extremal","renderPriority","compareByPriority","recA","recB","honourConstraint","firstConstraint","matchIndex","sortByPriority","oldFirstConstraint","applied","holders","parsePriorityRecords","records","newElement","oldElement","identifyListener","listener","soft","$$fluid_guid","impersonateListener","origListener","newListener","sortListeners","listeners","oneNamespace","headHard","thisListener","softNamespace","resolveListener","listenerName","globalName","listenerFunc","nameComponent","typeName","nameEvent","makeEventFirer","lazyInit","byId","sortedListeners","addListener","listenerId","destroyed","thisListeners","eventId","ownerId","removeListener","rec","thisLis","lisrec","preventable","fireEvent","component","firer","addListenerToFirer","resolveListenerRecord","expandImmediate","material","mergeListeners","keydot","adderWrapper","eventFromRecord","eventSpec","eventKey","isIoCEvent","resolveEvent","instantiateFirers","mergeListenerPolicy","hasNamespace","arrayConcatPolicy","makeMergeListenersPolicy","merger","modelRelay","validateListenersImplemented","errors","componentSource","pushSoftFailure","condition","typeTag","gradeTick","gradeTickStore","defaultsStore","resolveGradesImpl","gs","gradeNames","gradeName","gradeHash","isDynamic","rawDefaults","thisTick","lastTick","gradeChain","oGradeNames","resolveGradeStructure","defaultName","gradeStruct","hasGrade","resolveGrade","defaults","mergeArgs","mergePolicy","mergedDefaults","mergedDefaultsCache","gradeNamesToKey","getMergedDefaults","searchGrades","upgradePrimitiveFunc","annotateListeners","componentName","onerec","invokers","entry","registerRawDefaults","optionsCopy","expandCompact","callerInfo","getCallerInfo","doIndexDefaults","indexSpec","requiredGrades","indexFunc","indexDefaults","indexName","gradedDefaults","makeComponentCreator","creator","initFunction","initComponent","blankGrades","emptyPolicy","derefMergePolicy","policy","compileMergePolicy","builtins","defaultValues","builtin","isDefaultValueMergePolicy","hasDefaults","mergeOneImpl","thisTarget","newPolicy","primitiveTarget","nomerge","fetchMergeChildren","thisPolicy","newSource","childPolicy","concreteTrundler","evaluateFully","strategy","inEvaluationMarker","__CURRENTLY_IN_EVALUATION__","makeMergeStrategy","isTracing","tracing","pathCount","oldTarget","mul","newPolicyHolder","newSources","driveStrategy","pathSegs","seg","makeMergeOptions","initter","simpleGingerBlock","recordType","block","mergeRecordTypes","userOptions","transformOptions","transRec","transFunc","transformer","findMergeBlocks","mergeBlocks","transformOptionsBlocks","recordTypes","blocks","dedupeDistributionNamespaces","byNamespace","mergeBlock","ns","contextThat","deliverOptionsStrategy","computeComponentAccessor","computeDynamicComponents","defaultValueMerge","subcomponentRecord","user","distribution","applyChangeRequest","request","destroyValue","mergeComponentOptions","localOptions","computeMergePolicy","mergeOptions","rootMergePolicy","compiledPolicy","sharedMergePolicy","expandComponentOptions","baseMergeOptions","updateBlocks","generateExpandBlock","localRecord","invokeGradedFunction","spec","argumentMap","noNamespaceDistributionPrefix","mergeOneDistribution","distributeOptionsPolicy","oneSource","mergingArray","membersMergePolicy","invokerStrategies","invokersMergePolicy","oneInvoker","oneT","key2","distributeOptions","noexpand","onCreate","onDestroy","afterDestroy","computeNickName","initLittleComponent","receiver","lifecycleStatus","makeRootDestroy","exceptions","diagnoseFailedView","doDestroy","isDestroyed","applier","initArgs","initDependents","initSubcomponentImpl","entryType","charStart","simpleCSSMatcher","regexp","charToTag","#",".","IoCSSMatcher","&","childSeg","parseSelector","selstring","atNode","segMatch","thisNode","targetTag","fullAtNode","predList","childMatch","stringToRegExp","flags","stringTemplate","template","re","onResolve","onReject","disposition","reason","isPromise","toPromise","promiseOrValue","follow","makeSequencer","resolvedSources","returns","progressSequence","retValue","resumeSequence","processSequenceReject","resolved","accumulator","accumulateRejectionReason","resolveResult","invokeNext","makeSequenceStrategy","sequence","sequencer","makeTransformerStrategy","makeTransformer","payload","filterNamespaces","fireTransformEvent","applyOp","uaMatch","ua","browser","msie","chrome","webkit","safari","NAMESPACE_KEY","getScopedData","setScopedData","lastFocusedElement","getLastFocusedElement","ENABLEMENT_KEY","initEnablement","resolveEventTarget","changeElementValue","dom","getNextNode","iterateDom","acceptor","allNodes","currentNode","prevNode","DOM_BAIL_DEPTH","isContainer","containee","getElementText","unUnicode","unescapeProperties","backpos","breakPos","parseJavaProperties","contin","valueComp","valueRaw","valueEsc","lines","line","breakpos","search","formatMessage","messageString","printImpl","small","out","output","big","indentChars","maxRenderChars","SYNTHETIC_PROPERTY","getSafeProperty","date","zeropad","numstr","getHours","getMinutes","getSeconds","getMilliseconds","summarisePathCount","toReallyGo","condensePathCount","prefixes","prefixCount","detectStackStyle","stackStyle","opera","stacktrace","obtainException","decodeStack","exceptionDecoders","firefox","delimiter","atind","atDepth","lastslash","nextColon","filename","generatePadding","desc","getOwnPropertyDescriptor","prettyPrintJSON","indent","visitComponentChildren","visitor","visited","flat","getContextHash","instantiator","shadow","idToShadow","contextHash","componentHasGrade","globalInstantiator","visitComponentsForMatching","getInstantiator","thatStack","contextHashes","visitorWrapper","getMemberNames","idToPath","visitComponentsForVisibility","memberNames","mountStrategy","toMount","invokerFromRecord","invokerec","invoker","makeInvoker","memberFromRecord","memberrecs","recordStrategy","optionsStrategy","recordPath","recordMaker","getForComponent","shadowForComponent","makeDistributionRecord","sourceRecord","sourcePath","targetSegs","exclusions","sourceType","exclusion","checkComponentRecord","filterBlocks","sourceBlocks","sourceSegs","removeSource","rescued","noteCollectedDistribution","parentShadow","memberName","isCollectedDistribution","clearCollectedDistributions","collectDistributions","distributedBlocks","lastMember","matchIoCSelector","registerCollectedClearer","collectedClearer","receiveDistributions","parentThat","getThatStack","rootComponent","shadows","thisThat","gradeNamesToHash","distributions","computeTreeDistance","path1","path2","computeDistributionPriority","targetThat","distributedBlock","targetStack","targetPath","sourceStack","applyDistributions","preBlocks","targetShadow","preBlock","thatpos","selpos","mustMatchHere","selel","pred","queryIoCSelector","isIoCSSSelector","pushDistributions","targetHead","clearDistribution","clearDistributions","outDistributions","outDist","targetComponent","distributionId","extractSelectorHead","parsedSelector","parseExpectedOptionsPath","replicateProperty","undistributableOptions","thatShadow","targetComp","targetRef","parseContextReference","headContext","resolveContext","fullExclusions","cacheShadowGrades","troo","ownScope","childrenScope","collectDistributedGrades","readyBlocks","gradeNamesList","accumulateDynamicGrades","applyDynamicGrades","oldGradeNames","newDefaults","seenGrades","defaultsBlock","newGradeNames","rawDynamic","plainDynamic","computeDynamicGrades","localDynamic","computeDynamicComponentKey","recordKey","sourceKey","registerDynamicRecord","cRecord","localSub","subcomponentLocal","createOnEvent","expandOptions","expandOneEvent","dynamicComponentCount","initDependent","recordListener","invokerStrategy","eventStrategyBlock","eventStrategy","memberStrategy","getConfig","strategies","funcResolverStrategy","makeGingerStrategy","singleRootType","typeNameToMemberName","computeGlobalMemberName","resolveRootComponent","clearComponent","recordKnownComponent","thisSeg","atval","parentPath","childPath","pathToComponent","subRecord","frameworkGrades","filterBuiltinGrades","dumpGradeNames","dumpThat","dumpThatStack","dumpComponentPath","pathForComponent","pathUtil","innerContext","triggerMismatchedPathError","rawValue","renderContextReference","foundComponent","getFullStack","makeStackFetcher","fetcher","makeStackResolverOptions","clearListeners","constructScopeObjects","childShadow","clearChildrenScope","recordComponent","created","injectedPaths","modelTransactions","onComponentAttach","onComponentClear","recordRoot","clearConcreteComponent","injectedPath","otherParent","nested","destroyRecs","gchild","gchildname","constructRootComponents","rootShadow","resolveRootShadow","outerExpandOptions","makeExpandOptions","localRecordExpected","mergeRecordsToList","mergeRecords","addPolicyBuiltins","expandComponentOptionsImpl","initRecord","defaultCopy","expandList","fabricateDestroyMethod","nickName","assembleCreatorArguments","upDefaults","fakeThat","componentRecord","argMap","findKeys","components","expander","invokeSpec","bindDeferredComponent","priorityForComponent","componentSort","assessTreeConstruction","unstableUp","markSubtree","construct","constructSingle","destroySingle","makeGradeLinkage","linkageName","inputNames","outputNames","componentForPath","probeToDistribution","probe","parsedPriority","registerProbes","probes","probeDistribution","deregisterProbes","probeName","thisistToApplicable","recthis","noThis","resolvedThis","resolvedFunc","changeToApplicable","mergeRecord","parseValidModelReference","changePath","modelSegs","recordToApplicable","standard","getGlobalValueNonComponent","invokePre","preExpand","finalArgs","expandImmediateImpl","makeTrackedListenerAdder","listenerEngine","adder","checkFire","notall","argstruc","oldstruc","dispatchListener","indirectArgs","dispatchPre","resolveSoftNamespace","lastpos","badRec","transRecs","methodist","origin","expandEvents","oneEvent","isMultiple","isComposite","dispatcher","outerArgs","withEnvironment","envAdd","fetchContextReference","directModel","elResolver","externalFetcher","resolveExternal","noDereference","makeEnvironmentFetcher","envGetter","coerceToPrimitive","compactStringToRec","openPos","closePos","trail","expandPrefix","expandCompactString","rem","singularPenRecord","modelListeners","singularRecord","expandCompactRec","guardCircularExpansion","pen","extractEL","ELstyle","i1","i2","extractELWithContext","reference","endcpos","isNested","endpos","resolveContextValue","fetch","bareContextRefs","subs","fetchExpandChildren","expandExpander","isUnexpandable","expandSource","deliverer","recurse","isTrunk","defaultEL","makeExpandStrategy","inCreationMarker","ELStyle","preExpandRecurse","rootSegs","pushExpander","expanders","typeFunc","inLocal","contextStatus","invokeFunc","funcEntry","tree","makeEnvironmentStrategy","defaultCreatorStrategy","defaultFetchStrategy","traverseWithStrategy","accepted","getValueAndSegments","accessWithStrategy","makeTrundler","valueSeg","resolver","resolvers","trundler","getPathSegmentImpl","accept","globalAccept","firstdot","composeSegment","toappend","escapeSegment","matchSegments","toMatch","unescapedParser","compose","escapedParser","escapedGetConfig","escapedSetConfig","initRelayModel","deenlistModelComponent","isModelComplete","enlistModelComponent","enlist","clearTransactions","clearLinkCounts","relaysAlso","relayCount","sortCompleteLast","reca","recb","completeOnInit","operateInitialTransaction","mrec","transac","transId","getModelTransactionRec","transacs","recel","initiate","applierId","transaction","recs","initModelEvent","initModels","initModel","fireChangeRequest","modelComplete","commit","incomplete","parseModelReference","implicitRelay","modelPoint","nonModel","contextSegs","relays","externalChanges","recordChangeListener","sourceListener","modelChanged","registerRelayTransaction","targetApplier","npOptions","newTrans","transEl","relayRecursionBailout","registerDirectChangeRelay","linkId","transducer","sourceApplier","oldValue","changeRequest","trans","relay","newHolder","isRelay","transactional","connectModelRelay","enlistComponent","update","forwardAdapter","forwardApplier","backwardAdapter","parseSourceExclusionSpec","targetSpec","sourceSpec","excludeSource","includeSource","isExcludedChangeSource","excluded","fullSources","guardedAdapter","cond","transformToAdapter","basedTransform","transformWithRules","finalApplier","makeTransformPackage","componentThat","forwardCond","backwardCond","forwardHolder","backwardHolder","generateAdapters","forwardAdapterImpl","invertConfiguration","backwardAdapterImpl","runTransform","makeHolderChangeApplier","isRelayApplier","invalidator","backwardApplier","implicitOptions","refCount","parseImplicitRelay","singleTransformToFull","singleTransform","withPath","inputPath","relayConditions","initOnly","liveOnly","never","parseRelayCondition","exclusionRec","parseModelRelay","mrrec","parsedSource","parsedTarget","backward","transformPackage","modelRec","innerValue","innerTrans","notifyExternal","allChanges","commitRelays","transactionId","updateRelays","updates","changeRecord","changes","establishModelRelay","optionsModel","optionsML","optionsMR","concludeTransaction","modelRelayEstablished","mergeModelListeners","preCommit","postCommit","changeApplierOptions","relayStyle","cullUnchanged","modelChangedToChange","invokeListener","resolveModelListener","registerModelListeners","paths","byTarget","parsedArray","segsArray","pathArray","fireChanges","isChangedPath","changeMap","setChangedPath","notePath","deltaMap","deltas","fetchChangeChildren","applyChangeStrategy","isSameValue","relError","targetSlot","sourceCode","targetCode","changedValue","unchanged","inverse","stepTargetAccess","startpos","oldTrunk","defaultAccessorConfig","resolverSetConfig","resolverGetConfig","applyHolderChangeRequest","atRoot","modela","modelb","typea","typeb","holdera","holderb","matchChanges","specSegs","outSegs","wildcard","storeExternalChange","invalidPath","pathString","keySegs","keyString","notifyModelChanges","oldHolder","multiplePaths","invalidPaths","isNull","sourceExcluded","bindELMethods","emptyHolder","preFireChangeRequest","bindRequestChange","isObjectSimple","mergeChangeSources","globalSources","globalSource","ChangeApplier","transListeners","ation","localSource","defeatPost","instanceId","hasChangeSource","pathToRule","literalValueToRule","composePaths","accumulateInputPath","inputPrefix","accumulateStandardInputPath","transformSpec","getValue","accumulateMultiInputPaths","inputVariables","literalValue","NONDEFAULT_OUTPUT_PATH_RETURN","setValue","userOutputPath","toset","outputPath","outputPrefix","resolveParam","def","matchValue","expected","actual","partialMatches","stats","invertPaths","oldOutput","prefixApplier","inputPrefixOp","outputPrefixOp","makePathStack","prefixName","newPath","doTransform","transformOpts","expdef","transformFn","transformArgs","inputs","transformed","doOutput","getPathSegment","getHeadPath","getFromHeadPath","matchPath","exact","spechead","pathhead","expandWildcards","q","queuedTransforms","pathOp","esCopy","hasWildcard","lookupType","maybePushWildcard","hw","sortByKeyLength","inObject","handleTransformStrategy","handleInvertStrategy","invertor","inverted","handleCollectStrategy","standardInput","multiInput","inputPaths","collector","collectInputPaths","collected","processRule","rule","transforms","transformHandler","collectedFlatSchemaOpts","makeStrategy","handleFn","rules","flatSchemaStrategy","flatSchema","defaultSchemaValue","schemaValue","isomorphicSchemaStrategy","decodeStrategy","isomorphic","schemaToCreatorStrategy","compareByPathLength","changea","changeb","pdiff","fireSortedChanges","setConfig","schemaStrategy","queuedChanges","rootSetConfig","typeStack","transformOne","transformMany","invertToIdentity","stringToNumber","numberToString","firstValue","factor","linearScale","extraInputs","factorPath","offsetPath","binaryLookup","===","!==","<=","<",">=","-","/","%","&&","||","binaryOp","fun","true","false","compareMatches","speca","specb","matchDiff","valueMapper","defaultInputPath","matchedEntry","longFormMatch","noMatch","defaultOutputPath","outputValue","outputUndefinedValue","defaultOutputValue","valueFromDefaultPath","matchPower","inputValue","outOption","origInputValue","defaultInputValue","collect","arrayToSetMembership","presentValue","missingValue","outPath","outVal","invertWithType","newType","newOptions","oldKey","setMembershipToArray","outputArr","outputVal","applyPaths","operation","expandInnerValues","innerValues","expandedInner","indexArrayByKey","newHash","pivot","newKey","keyType","deindexIntoArrayByKey","newArray","limitRange","excludeMin","excludeMax","notFound","parseIndexationOffset","originalIndex","invertArrayIndexation","dereference","transformName","parsedOffset","terms","free","quantize","ranges","rangeSpec","upperBound","NEGATIVE_INFINITY","inRange","thatistBridge","peer","funcname","move","normalizeTabindexName","canHaveDefaultTabindex","hasAttr","toIndex","attributeNode","a11y","HORIZONTAL","VERTICAL","BOTH","UP_DOWN_KEYMAP","previous","LEFT_RIGHT_KEYMAP","makeElementsTabFocussable","CONTEXT_KEY","NO_SELECTION","cleanUpWhenLeavingContainer","selectionContext","activeItemIndex","onLeaveContainer","selectables","onUnselect","rememberSelectionState","drawSelection","elementToSelect","eraseSelection","selectedElement","unselectElement","selectElement","newIndex","onSelect","selectableFocusHandler","selectableBlurHandler","selectablesTabindex","reifyIndex","sc_that","noWrap","prepareShift","selElm","focusNextElement","focusPreviousElement","arrowKeyHandler","keyMap","getKeyMapForDirection","tabKeyHandler","focusIsLeavingContainer","containerFocusHandler","shouldOrig","autoSelectFirstItem","shouldSelect","containerBlurHandler","makeElementsSelectable","selectableElements","selectableSelector","selectablesUpdated","focusedItem","noBubbleListeners","selectable","toSelect","selectNext","selectPrevious","currentSelection","checkForModifier","binding","modifier","modifierKey","isCtrlKeyPresent","isAltKeyPresent","isShiftKeyPresent","makeActivationHandler","activateHandler","makeElementsActivatable","onActivateHandler","defaultKeys","additionalBindings","activatable","dumpSelector","message1","checkTryCatchParameter","GETparams","notrycatch","userJQuery","containerSpec","fallible","createDomBinder","cacheKey","thisContainer","allocateSimpleId","locate","localContainer","selectorName","fastLocate","names","expectFilledSelector","initView","initDomBinder","findAncestor","findForm","nodeIn","multiple","BINDING_ROOT_KEY","findData","bindFossils","fossils","boundPathForNode","applyBoundChange","fossil","jById","dokkument","getId","simpleId","getDocument","labelAttribute","liveRegionMarkup","liveRegionId","generateLiveElement","ariaLabeller","dynamicLabel","live","liveEl","LABEL_KEY","getAriaLabeller","updateAriaLabel","dismissList","dismissFunc","globalDismissal","deadMansBlur","control","blurPending","lastCancel","canceller","noteProceeded","reArm","proceed","addExclusion","excludeEl","cancelByDefault","backDelay","canonUrl","explodeLocalisedName","fileName","locale","defaultLocale","lastDot","baseName","extension","exploded","shortSegs","resourceCache","pendingClass","fetchResources","resourceSpecs","operate","fetchResourcesImpl","resourceSpec","recurseFirer","amalgamateClasses","explodeForLocales","newRecord","localeExploded","condenseOneResource","localeCount","localeSpecs","localKey","lastNonError","fetchError","condenseForLocales","notifyResources","specs","pending","pendingrec","canon","timeSuccessCallback","timeSuccess","clearResourceCache","handleCachedRequest","$$firer$$","fetchClass","completeRequest","thisSpec","queued","completeTime","initTime","makeResourceCallback","resourceText","resourceKey","forceCache","textStatus","errorThrown","issueCachedRequest","composeCallbacks","internal","external","composePolicy","issueRequest","thisCallback","allSync","nodeId","callbackCalled","mozilla","primeCacheFromResources","resources","makeDefaultFetchOptions","successdisposer","failid","environmentdisposer","makeFetchExpander","disposer","resourceSpecCollector","fetchKey","deferredFetcher","disposed","onCreate.loadResources","resourceOptions","transformURL","resolveResources","onResourcesLoaded","resourceLoader","loadResources","contextAware","makeCheckMarkers","checks","markerTypeName","performChecks","checkHash","checkRecord","makeChecks","checkOptions","forgetChecks","markerNames","markerArray","markerName","contextAwareness","getCheckValue","checkOne","contextAwareRecord","contextValue","checkList","equals","defaultGradeNames","contextAwarenessOptions","contextAwareList","makeAdaptation","distributionName","targetName","adaptationName","checkName","isBrowser","fluid.browser","getPlatformName","platform","fluid.browser.platformName","XMLP","strXML","XMLPImpl","closedTags","abbr","br","link","meta","hr","area","embed","_NONE","_ELM_B","_ELM_E","_ELM_EMP","_ATT","_TEXT","_ENTITY","_PI","_CDATA","_COMMENT","_DTD","_ERROR","_CONT_XML","_CONT_ALT","_ATT_NAME","_ATT_VAL","_STATE_PROLOG","_STATE_DOCUMENT","_STATE_MISC","_errs","ERR_CLOSE_PI","ERR_CLOSE_DTD","ERR_CLOSE_COMMENT","ERR_CLOSE_CDATA","ERR_CLOSE_ELM","ERR_CLOSE_ENTITY","ERR_PI_TARGET","ERR_ELM_EMPTY","ERR_ELM_NAME","ERR_ELM_LT_NAME","ERR_ATT_VALUES","ERR_ATT_LT_NAME","ERR_ATT_LT_VALUE","ERR_ATT_DUP","ERR_ENTITY_UNKNOWN","ERR_INFINITELOOP","ERR_DOC_STRUCTURE","ERR_ELM_NESTING","_checkStructure","iEvent","m_stack","m_iState","getName","strTop","_setErr","_parseCDATA","iB","iE","m_xml","_setContent","m_iP","_parseComment","_parseDTD","strClose","iInt","iLast","_parsePI","iTB","iTE","iCB","iCE","SAXStrings","indexOfNonWhitespace","indexOfWhitespace","lastIndexOfNonWhitespace","m_name","_parseText","iSrc","m_cAlt","m_cB","m_cE","m_cSrc","iErr","strErr","_parseElement","iDE","iType","strN","nameRegex","nameMatch","m_emitSynthetic","m_attributes","attrStartRegex","attrMatch","attrval","attrname","valRegex","attrValRegex","attrValIERegex","closeRegex","closeMatch","matchclose","_parse","iP","c2","getColumnNumber","getContent","getContentBegin","getContentEnd","getLineNumber","WHITESPACE","QUOTES","strD","arrD","iLinePos","strF","strR","parseTemplate","baseURL","scanStart","cutpoints_in","isSimpleClassCutpoint","baseURLin","debugModeIn","cutpointsIn","rootlump","XMLLump","tagstack","lumpindex","nestingdepth","justended","defstart","defend","debugMode","simpleClassCutpoints","cutstatus","cutpoints","findTopContainer","lump","rsfID","newLump","column","lumps","addLump","mmap","checkContribute","scr","collectmap","debugLump","tagname","hasCssClass","matchNode","term","headlump","headclazz","attributemap","tagStartCut","simpleCut","cut","cutstat","nextterm","isMatch","tagEndCut","processTagEnd","endlump","oldtop","close_tag","processTagStart","isempty","backlump","firstdocumentindex","stacktop","uplump","ID_ATTRIBUTE","elide","downreg","downmap","globalmap","colpos","finallump","dumpAttributes","processDefaultTag","substr","newlump","XMLViewTemplate","idpos","brackpos","parseloop","getPrefix","SplitID","XMLEncode","attrcopy","attrvalue","aggregateMMap","targhas","parseTemplates","templateList","resource","debugPosition","fullID","computeFullID","localID","noID","processChild","isBoundPrimitive","componentType","unzip","unzipComponent","fixChildren","processed","fixupValue","uibound","valuebinding","upgradeBound","messagekey","fixupTree","childmap","childlist","functionname","childArgs","ComponentReference","markup","findNodeValue","rootNode","messageBase","resolveFunc","parseFunc","messageResolver","messagecodes","resolveOne","looked","messageLocator","duckMap","choiceindex","boundMap","UISelect","UILink","UIVerbatim","UIMessage","inferComponentType","applyComponentType","decorators","cType","NULL_STRING","LINK_ATTRIBUTES","frame","applet","decoratorComponentPrefix","IDtoComponentName","invokeFluidDecorator","parentComponent","templates","fossilsIn","getRewriteKey","resolveInScope","searchID","defprefix","deflump","scopelook","scopelump","resolveCall","sourcescope","jointID","noteCollected","seenset","resolveRecurse","basecontainer","parentlump","branch","branchmap","rewritemap","lumpid","fetchComponent","resolveID","resolveBranches","globalmapp","dumpTillLump","dumpScan","renderindex","basedepth","closeparent","insideleaf","isPlaceholder","openTag","trc","iselide","uselump","closeTag","renderUnchanged","isSelfClose","endopen","dumpTemplateBody","replaceAttributes","replaceAttributesOpen","selfClose","nextpos","replaceBody","rewriteLeaf","rewriteLeafOpen","rewriteUrl","renderOptions","urlRewriter","rewritten","rebaseURLs","protpos","dumpHiddenField","todump","isvirtual","virtual","outattrs","applyAutoBind","torender","finalID","autoBind","renderedbindings","outDecoratorsImpl","dumpBoundFields","fossilKey","submittingname","oldvalue","fossilizedbinding","fossilizedshaper","dumpSelectionBindings","uiselect","optionlist","optionnames","isSelectedValue","getRelativeComponent","relativeID","rewriteRewriteMap","from","adjustForID","late","forceID","baseid","usedIDs","assignSubmittingName","submitting","willinput","explodeDecorators","decorator","outDecorators","dumpBranchHead","targetlump","resolveArgs","degradeMessage","resArgs","renderComponent","makeFail","parentRelativeID","underlyingValue","directValue","ishtmlselect","ismultiple","linktext","rewriteIDRelation","renderComment","renderDebugMessage","reportPath","renderComponentSystem","torendero","outerendopen","outerclose","payloadlist","scrname","renderContainer","t2","firstchild","renderRecurse","fetchComponents","findChild","headlumps","renderCollect","collump","renderCollects","collist","processDecoratorQueue","decoratorQueue","ids","jnode","messageSource","resolveMessageSource","sanitizeAttrs","idMap","fakeNode","explodedDecorators","baselump","t1","closefinal","renderend","wasopentag","lengtn","newbase","renderTemplates","explode","basepath","explodeSelectionToInputs","rowID","inputID","selectID","labelID","messages","reRender","lastId","renderRaw","extractTemplate","armouring","render","selfRender","visitDecorators","clearDecorators","getDecoratorComponents","modeliseOptions","baseOptions","reverseMerge","createRendererSubcomponent","templateSource","nativeModel","rendererOptions","cascadeOptions","cutpointFn","cutpointGenerator","renderTarget","rendererOptions.idMap","protoTree","parentBundle","changeApplierOptions.resolverSetConfig","refreshView","produceTree","onResourcesFetched","prepareModelForRender","onRenderTree","afterRender","rendererComponent","renderOnInit","protoExpanderForComponent","expanderOptions","makeProtoExpander","rendererFnOptions","produceTreeOption","initRendererComponent","strings","messageResolverFunction","repeatingSelectors","selectorsToIgnore","rendererTargetSelector","rendererSub","removeSelectors","selectorToIgnore","markRepeated","selectorKey","repeatingSelector","selectorsToCutpoints","NO_COMPONENT","mergeComponents","rows","repeat","extractContextualPath","controlledBy","ifEmpty","pathAs","valueAs","expandrow","repeatID","expandLight","trueTree","falseTree","transformContextPath","fetched","makeExternalFetcher","fetchEL","detectBareBound","IDescape","expandBound","concrete","lightFilter","expandCond","expandLeafOrCond","expandEntry","comp","expandExternal","singleTarget","pusher","expandConfig","expandLeaf","leaf","expandChildren","childPusher","expandToTarget","condPusher","toggleButton","toggleButtonLabel","showText","hideText","panelLabel","onPanelHide","onPanelShow","afterPanelHide","afterPanelShow","onCreate.bindClick","onCreate.bindModelChange","onCreate.setAriaProps","onCreate.setInitialState","onPanelHide.setText","onPanelHide.setAriaLabel","onPanelShow.setText","onPanelShow.setAriaLabel","onPanelHide.operate","onPanelShow.operate","onCreate.setAriaStates","isShowing","operateHide","operateShow","hidePanel","showPanel","setAriaStates","setAriaProps","togglePanel","animationDurations","slidingPanel","setAriaProperties","aria-label","simulateMouseEvent","simulatedType","touch","simulatedEvent","createEvent","initMouseEvent","dispatchEvent","touchHandled","mouseProto","_touchStart","_touchMoved","_touchMove","_touchEnd","textfield","ariaOptions","slider","sliderOptions","sliderVariety","jQueryUI","stringValue","onCreate.bindChangeEvt","onCreate.initTextfieldAttributes","setModel","onCreate.initSliderAttributes","onCreate.bindSlideEvt","onCreate.bindRangeChangeEvt","thumb","combinedSliderOptions","setSliderValue","setSliderAriaValueNow","onCreate.initSliderAria","aria-valuenow","aria-valuemin","aria-valuemax","combineSliderOptions","tableOfContents","headingTextToAnchorInfo","heading","anchorInfo","locateHeadings","headings","ignoreForToC","headingsModel","modelBuilder","assembleModel","onRefresh","levels","{tableOfContents}.events.onRefresh","tocHeader","tocContainer","onReady","onCreate.refreshView","toModel","headingInfo","modelLevelFn","buildModelLevel","level","modelLevel","subHeadings","gradualModelLevelFn","subHeadingsClone","skippedModelLevelFn","convertToHeadingObjects","headingCalculator","getHeadingLevel","objModel","handleEmptyItemObj","itemObj","generateTree","currentLevel","levelObj","linkObj","level1","level2","level3","level4","level5","level6","items1","items2","items3","items4","items5","items6","link1","link2","link3","link4","link5","link6","onCreate.fetchResources","textToSpeech","isSupported","speechSynthesis","checkTTSSupport","toSpeak","SpeechSynthesisUtterance","volume","deferredSpeechSynthesisControl","onend","onStart","onStop","onError","onSpeechQueued","utteranceOpts","speaking","pauseRequested","resumeRequested","queueSpeech","pause","resume","getVoices","handleStart","handleEnd","handleError","handlePause","handleResume","throttle","later","leading","throttled","trailing","throttleControl","speak","requestControl","resetValues","paused","newModel","interrupt","errorFn","eventBinding","onstart","onpause","onresume","utterance","generateDepth","parsePathInfo","pathInfo","dotpos","parsePathInfoTrim","collapseSegs","makeRelPath","kettle","cononocolosePath","consume","parseUri","strictMode","uri","$0","$1","$2","loose","parseSegs","parsedSegs","directory","isAbsoluteUrl","parseRel","computeRelativePrefix","outerLocation","iframeLocation","relPath","relSegs","parsedOuter","parsedRel","parsedInner","back","front","cookie","expires","prefs","cookieStore","cookieName","cookiePrefix","startIndex","endIndex","cookieSection","assembleCookie","cookieOptions","cookieStr","tempStore","settingsStore","initialModel","preferences","updateModel","userGrades","uiEnhancer","ignorableGrades","filterEnhancerGrades","filterEnhancerOptions","originalUserOptions","onCreate.initModel","pageEnhancer","getSettings","prefsEditor","templateLoader","messageLoader","onPrefsEditorTemplatesLoaded","onPrefsEditorMessagesLoaded","onCreatePrefsEditorReady","templateLoaded","prefsEditorMessagesLoaded","prefsEditorLoader","getCompleteSettings","getSettingsFunc","savedSettings","setSettings","settingsSetter","userSettings","onCreate.addListener","onDestroy.removeListener","updateEnhancerModel","uiEnhancerRelay","applyChanges","save","saveAndApply","previewFrame","onSave","onCancel","beforeReset","afterReset","onAutoSave","onPrefsEditorRefresh","onUpdateEnhancerModel","onPrefsEditorMarkupReady","onCreate.init","onAutoSave.save","autoSave","completeModel","modelToSave","changedPrefs","pref","prevSettings","changedSelections","finishInit","bindHandlers","saveButton","handleAutoSave","enhancer","onCreate.startLoadingContainer","{prefsEditor}.events.modelChanged","onReady.updateModel","templateUrl","preview","startLoadingContainer","enhancerContainer","msgLookup","stringArrayIndex","stringLookup","singleLookup","multiLookup","lookupFn","onDomBind","onCreate.onDomBind","msgResolver","{compositePanel}.events.afterRender","afterRender.onDomBind","resetDomBinder","getDomBindGrade","onDomBind.domChange","subPanel","hasListener","safePrefKey","prefKey","generateRules","preferenceMap","prefObj","prefRule","compositePanel","arrayMergePolicy","subPanelOverrides","initSubPanels","onCreate.combineResources","onCreate.appendTemplate","onCreate.initSubPanels","onCreate.hideInactive","onCreate.surfaceSubpanelRendererSelectors","afterRender.hideInactive","getDistributeOptionsGrade","getSubPanelLifecycleBindings","combineResources","surfaceSubpanelRendererSelectors","produceSubPanelTrees","expandProtoTree","hideInactive","handleRenderOnPreference","conditionalCreateEvent","subPanelRepeatingSelectors","prefetchComponentOptions","isPanel","isActivePanel","assembleDistributeOptions","relayOption","componentOptions","componentRelayRules","definedOptions","refreshViewFunc","conditionalCreateEventFunc","componentNames","creationEventName","generateModelListeners","conditionals","subPanelLifecycleBindings","subPanelCreationOpts","default","creationEventOpt","renderOnPreference","onCreateListener","componentOpts","combineTemplates","resourceName","rebaseSelectorName","compOpts","compName","selName","surfaceRepeatingSelectors","rebasedRepeatingSelectors","rebaseID","rebaseParentRelativeID","slicePos","rebaseValueBinding","modelRelayRules","oldModelPath","newModelPath","rebaseTreeComp","treeComp","rebased","rebaseTree","modelValue","ownTree","subPanelTree","subTree","rebasedTree","{fluid.prefs.prefsEditor}.events.onPrefsEditorRefresh","fluid.prefs.textSize","model.textSize","range.min","range.max","textSize","textSizeDescr","textfieldSlider","panelOptions","labelId","fluid.prefs.textFont","model.value","controlValues.textFont","textFont","textFontDescr","classnameMap","controlValues","fluid.prefs.lineSpace","model.lineSpace","lineSpace","lineSpaceDescr","fluid.prefs.contrast","controlValues.theme","afterRender.style","themeRow","themeLabel","themeInput","contrastDescr","defaultThemeLabel","theme","contrast","defaultThemeName","defaultLabelStyle","themeValue","labelTheme","fluid.prefs.tableOfContents","model.toc","toc","tocDescr","fluid.prefs.emphasizeLinks","model.links","links","linksChoiceLabel","fluid.prefs.inputsLarger","model.inputsLarger","inputsLarger","inputsChoiceLabel","onCreate.decorateOptions","selectDecorator","decorateOptions","fluid.prefs.speak","model.speak","speakDescr","cssClass","elementsToStyle","applyStyle","resetStyle","handleStyle","enactor","styleElements","applyStyleFunc","resetStyleFunc","clearClasses","classStr","classSwapper","clearClassesFunc","joinClassStr","oneClassName","getTextSizeInPx","fontSizeMap","fontSize","times","getTextSizeInPxFunc","initialSize","targetSize","getLineHeight","getLineHeightMultiplier","getLineHeightMultiplierFunc","targetLineSpace","tocTemplate","afterRender.boilAfterTocRender","applyToc","onCreateTOCReady","afterTocRender","onLateRefreshRelay","model.enabled","tts","speechFn","handleSelfVoicing","readFromDOM","welcomeMsg","selfVoicing","ELEMENT_NODE","TEXT_NODE","elm","altText","comic","arial","verdana","bw","wb","by","yb","lgdg","xx-small","x-small","medium","large","x-large","xx-large","emphasizeLinks","textControls","layoutControls","linksControls","fluid_prefs_emphasizeLinks","fluid_prefs_inputsLarger","startTemplateLoaderPrefsWidgetType","getDocumentHeight","onCreateSlidingPanelReady","iframeRendered","templatesAndIframeReady","iframeReady","templatesLoaded","messagesLoaded","lazyLoad","separatedPanelPrefsWidgetType","onReady.bindEvents","onCreate.hideReset","bindReset","showTextAriaLabel","hideTextAriaLabel","iframeRenderer","iframeEnhancer","onSignificantDOMChange","modelChanged.save","onCreate.bindReset","afterReset.applyChanges","onReady.boilOnReady","outerEnhancerOptions","markupProps","separatedPanel","hideReset","templatePrefix","onCreate.startLoadingIframe","renderIframe","startLoadingIframe","iframeSrc","iframeWindow","contentWindow","iframeDocument","renderPrefsEditorContainer","updateView","bindEvents","separatedPanelId","onLazyLoad","onPrefsEditorMessagesPreloaded","onResourcesPreloaded","preloadResources","{separatedPanel}.events.onLazyLoad","toPreload","afterReset.save","outerUiEnhancerOptions","outerUiEnhancerGrades","onReady.boilOnPreviewReady","onReady.boilOnPrefsEditorReady","onPrefsEditorReady","onPreviewReady","schemas","schemaIndex","primarySchema","typeFilter","buildPrimary","primaryBuilder","suppliedPrimaryGradeName","schema","schemaGrades","defaultSchemaIndexer","auxiliarySchema","loaderGrades","expandSchemaValue","pathRef","addAtPath","existingObject","removeKey","rearrangeDirect","toPath","sourceValue","addCommonOptions","commonOptions","templateValues","existingValue","containerNeeded","checkPrimarySchema","expandSchemaComponents","auxSchema","componentConfig","modelCommonOptions","mappedDefaults","flattenedPrefKey","prefSchema","primaryPath","internalPath","internalModelName","externalModelName","expandSchemaImpl","schemaToExpand","altSource","expandedSchema","expandedVal","expandCompositePanels","compositePanelList","panelIndex","panelCommonOptions","subPanelCommonOptions","compositePanelBasedOnSubCommonOptions","panelModelCommonOptions","panelsToIgnore","compositeDetail","compositeKey","compositePanelOptions","thisCompositeOptions","subPanelList","subPanels","subPanelRenderOn","subpanelArray","onePanel","subPanelID","subPanelPrefsKey","safeSubPanelPrefsKey","subPanelOptions","subPanelType","renderOn","subPrefKey","expandSchema","indexes","topCommonOptions","elementCommonOptions","category","prefName","topOptions","enactors","options.gradeNames","options.resources.template","options.messageBase","panelModel","%internalModelName","compositePanelBasedOnSub","%subPrefKey","enactorModel","expandedAuxSchema","auxBuilder","prefMapIndexer","textSizeSliderVariety","lineSpaceSliderVariety","messagePrefix","minimum","maximum","divisibleBy","enum","assembledPrefsEditorGrade","componentGrades","assembledUIEGrade","constructedGrades","store","enhancerType","builder","generateGrade","gradeNameTemplate","constructGrades","gradeCategories","gradeOpts","parseAuxSchema","auxTypes","field","build"],"mappings":";;;;;;;CAcA,SAAYA,OAAQC,SAEnB,YAEuB,iBAAXC,SAAiD,gBAAnBA,QAAOC,QAShDD,OAAOC,QAAUH,OAAOI,SACvBH,QAASD,QAAQ,GACjB,SAAUK,GACT,I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YpnF,MAAMouE,MAAM4a,QAAQC,cAAc7B,SAAU3C,UAAUjsH,UAAW6wH,cAGhGR,mBAGX7oF,MAAMouE,MAAM4a,QAAQM,eAAiB,SAAU7E,WAC3C,GAAI8E,YAOJ,OANAvpF,OAAMl3D,KAAK27I,UAAW,SAAe+E,OACjC,GAAIjiJ,MAAOiiJ,MAAMjiJ,IACbA,OACAgiJ,SAASl6I,KAAK9H,QAGfgiJ,UAMXvpF,MAAMouE,MAAM97F,OAAS,SAAU/T,UAAW31B,SACtCA,QAAUA,WACV,IAAIogJ,SAAUhpF,MAAMouE,MAAM4a,QAAQpgJ,QAAQ6gJ,MAC1C,OAAOzpF,OAAMmL,qBAAqB69E,QAAQpgJ,QAAQ8/I,2BAA4BnqH,UAAW31B,QAAQgnI,gBAGtGpoI,OAAQu4D,YCpMX,IAAIA,aAAcA,iBAClB,SAAW1vB,EAAG2vB,OACV,YAGAA,OAAMouE,MAAM4a,SACR72E,YAAa,mCAGjBnS,MAAMiT,SAAS,+BACXd,YAAa,uCACbguE,UAAU,EACVxlE,oBACItY,OAAQ,0BACRxmD,OAAQ,2CAER0a,OAAQ,6BACR1a,OAAQ,0CAER0a,OAAQ,8BACR1a,OAAQ,2CAEZ22H,UACI73D,oBACIpkD,OAAQ,6BACR1a,OAAQ,qEAER0a,OAAQ,8BACR1a,OAAQ,0EAKrBrU,OAAQu4D","file":"infusion-uiOptions.js","sourcesContent":["/*eslint-disable no-unused-vars*/\n/*!\n * jQuery JavaScript Library v3.1.0\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2016-07-07T21:44Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar document = window.document;\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\n\n\n\tfunction DOMEval( code, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar script = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n/* global Symbol */\n// Defining this global in .eslintrc would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.1.0\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android <=4.0 only\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray,\n\n\tisWindow: function( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// As of jQuery 3.0, isNumeric is limited to\n\t\t// strings and numbers (primitives or objects)\n\t\t// that can be coerced to finite numbers (gh-2662)\n\t\tvar type = jQuery.type( obj );\n\t\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t\t// subtraction forces infinities to NaN\n\t\t\t!isNaN( obj - parseFloat( obj ) );\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\n\t\t/* eslint-disable no-unused-vars */\n\t\t// See https://github.com/eslint/eslint/issues/6125\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\n\t\t// Support: Android <=2.3 only (functionish RegExp)\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tDOMEval( code );\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Support: IE <=9 - 11, Edge 12 - 13\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android <=4.0 only\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar tmp, args, proxy;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: Date.now,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.0\n * https://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-01-04\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\0-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tdisabledAncestor = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = \"#\" + nid + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement(\"fieldset\");\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\t// Known :disabled false positives:\n\t// IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)\n\t// not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Check form elements and option elements for explicit disabling\n\t\treturn \"label\" in elem && elem.disabled === disabled ||\n\t\t\t\"form\" in elem && elem.disabled === disabled ||\n\n\t\t\t// Check non-disabled form elements for fieldset[disabled] ancestors\n\t\t\t\"form\" in elem && elem.disabled === false && (\n\t\t\t\t// Support: IE6-11+\n\t\t\t\t// Ancestry is covered for us\n\t\t\t\telem.isDisabled === disabled ||\n\n\t\t\t\t// Otherwise, assume any non-<option> under fieldset[disabled] is disabled\n\t\t\t\t/* jshint -W018 */\n\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t(\"label\" in elem || !disabledAncestor( elem )) !== disabled\n\t\t\t);\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( preferredDoc !== document &&\n\t\t(subWindow = document.defaultView) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( el ) {\n\t\tel.appendChild( document.createComment(\"\") );\n\t\treturn !el.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( el ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll(\":enabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll(\":disabled\").length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( el ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn (sel + \"\").replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( (oldCache = uniqueCache[ key ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( el ) {\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement(\"fieldset\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( el ) {\n\treturn el.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn elem.contentDocument || jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && jQuery.isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Support: Android 4.0 only\n\t\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\t\tresolve.call( undefined, value );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.call( undefined, value );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( jQuery.isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tjQuery.isFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tjQuery.isFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tjQuery.isFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the master Deferred\n\t\t\tmaster = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tmaster.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( master.state() === \"pending\" ||\n\t\t\t\tjQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn master.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\n\t\t}\n\n\t\treturn master.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlen ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ jQuery.camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ jQuery.camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( jQuery.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( jQuery.camelCase );\n\t\t\t} else {\n\t\t\t\tkey = jQuery.camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnotwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? JSON.parse( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tjQuery.contains( elem.ownerDocument, elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\nvar swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) ),\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]+)/i );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// Support: IE <=9 only\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\n// Support: IE <=9 only\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t[];\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], ret ) :\n\t\tret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, contains, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n} )();\nvar documentElement = document.documentElement;\n\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 only\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tvar event = jQuery.event.fix( nativeEvent );\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\t\t\thandlers = ( dataPriv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support: IE <=9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox <=42\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: jQuery.isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\tthis.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this.type === \"checkbox\" && this.click && jQuery.nodeName( this, \"input\" ) ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\n\twhich: function( event ) {\n\t\tvar button = event.button;\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\n\t\t\treturn event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\n\t\t\treturn ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t}\n\n\t\treturn event.which;\n\t}\n}, jQuery.event.addProp );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t/* eslint-disable max-len */\n\n\t// See https://github.com/eslint/eslint/issues/3229\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)[^>]*)\\/>/gi,\n\n\t/* eslint-enable */\n\n\t// Support: IE <=10 - 11, Edge 12 - 13\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\nfunction manipulationTarget( elem, content ) {\n\tif ( jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn elem.getElementsByTagName( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.access( src );\n\t\tpdataCur = dataPriv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rmargin = ( /^margin/ );\n\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdiv.style.cssText =\n\t\t\t\"box-sizing:border-box;\" +\n\t\t\t\"position:relative;display:block;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"top:1%;width:50%\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocumentElement.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = divStyle.marginLeft === \"2px\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\t// Support: Android 4.0 - 4.3 only\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.marginRight = \"50%\";\n\t\tpixelMarginRightVal = divStyle.marginRight === \"4px\";\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tcontainer.style.cssText = \"border:0;width:8px;height:0;top:0;left:-9999px;\" +\n\t\t\"padding:0;margin-top:1px;position:absolute\";\n\tcontainer.appendChild( div );\n\n\tjQuery.extend( support, {\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelMarginRight: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelMarginRightVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// Support: IE <=9 only\n\t// getPropertyValue is only needed for .css('filter') (#12537)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style;\n\n// Return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// At this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// At this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// At this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar val,\n\t\tvalueIsBorderBox = true,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// Support: IE <=11 only\n\t// Running getBoundingClientRect on a disconnected node\n\t// in IE throws an error.\n\tif ( elem.getClientRects().length ) {\n\t\tval = elem.getBoundingClientRect()[ name ];\n\t}\n\n\t// Some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test( val ) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// Use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t\"float\": \"cssFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\tif ( type === \"number\" ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tstyle[ name ] = value;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] ||\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = extra && getStyles( elem ),\n\t\t\t\tsubtract = extra && augmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t);\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ name ] = value;\n\t\t\t\tvalue = jQuery.css( elem, name );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction raf() {\n\tif ( timerId ) {\n\t\twindow.requestAnimationFrame( raf );\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 13\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tjQuery.proxy( result.stop, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnotwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off or if document is hidden\n\tif ( jQuery.fx.off || document.hidden ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\topt.duration = typeof opt.duration === \"number\" ?\n\t\t\topt.duration : opt.duration in jQuery.fx.speeds ?\n\t\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = window.requestAnimationFrame ?\n\t\t\twindow.requestAnimationFrame( raf ) :\n\t\t\twindow.setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\tif ( window.cancelAnimationFrame ) {\n\t\twindow.cancelAnimationFrame( timerId );\n\t} else {\n\t\twindow.clearInterval( timerId );\n\t}\n\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\treturn tabindex ?\n\t\t\t\t\tparseInt( tabindex, 10 ) :\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\n\t\t\t\t\t\t\t0 :\n\t\t\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tif ( typeof value === \"string\" && value ) {\n\t\t\tclasses = value.match( rnotwhite ) || [];\n\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 &&\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( type === \"string\" ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + getClass( elem ) + \" \" ).replace( rclass, \" \" )\n\t\t\t\t\t.indexOf( className ) > -1\n\t\t\t) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g,\n\trspaces = /[\\x20\\t\\r\\n\\f]+/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\n\t\t\t\t\t// Handle most common string cases\n\t\t\t\t\tret.replace( rreturn, \"\" ) :\n\n\t\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) ).replace( rspaces, \" \" );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\telem[ type ]();\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\njQuery.each( ( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n} );\n\njQuery.fn.extend( {\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\n\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = jQuery.now();\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = jQuery.isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t} ) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 13\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in uncached url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rts, \"\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce++ ) + uncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" ).prop( {\n\t\t\t\t\tcharset: s.scriptCharset,\n\t\t\t\t\tsrc: s.url\n\t\t\t\t} ).on(\n\t\t\t\t\t\"load error\",\n\t\t\t\t\tcallback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = jQuery.trim( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar docElem, win, rect, doc,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\trect = elem.getBoundingClientRect();\n\n\t\t// Make sure element is not hidden (display: none)\n\t\tif ( rect.width || rect.height ) {\n\t\t\tdoc = elem.ownerDocument;\n\t\t\twin = getWindow( doc );\n\t\t\tdocElem = doc.documentElement;\n\n\t\t\treturn {\n\t\t\t\ttop: rect.top + win.pageYOffset - docElem.clientTop,\n\t\t\t\tleft: rect.left + win.pageXOffset - docElem.clientLeft\n\t\t\t};\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden elements (gh-2310)\n\t\treturn rect;\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\n\t\t// because it is its only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume getBoundingClientRect is there when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset = {\n\t\t\t\ttop: parentOffset.top + jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true ),\n\t\t\t\tleft: parentOffset.left + jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true )\n\t\t\t};\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t// documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\t\tfunction( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t}\n} );\n\njQuery.parseJSON = JSON.parse;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( !noGlobal ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\nreturn jQuery;\n} );\n","/*! jQuery UI - v1.12.1 - 2016-09-16\n* http://jqueryui.com\n* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/resizable.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/dialog.js, widgets/mouse.js, widgets/slider.js, widgets/tabs.js, widgets/tooltip.js\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\n\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([ \"jquery\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\n$.ui = $.ui || {};\n\nvar version = $.ui.version = \"1.12.1\";\n\n\n/*!\n * jQuery UI Widget 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Widget\n//>>group: Core\n//>>description: Provides a factory for creating stateful widgets with a common API.\n//>>docs: http://api.jqueryui.com/jQuery.widget/\n//>>demos: http://jqueryui.com/widget/\n\n\n\nvar widgetUuid = 0;\nvar widgetSlice = Array.prototype.slice;\n\n$.cleanData = ( function( orig ) {\n\treturn function( elems ) {\n\t\tvar events, elem, i;\n\t\tfor ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\ttry {\n\n\t\t\t\t// Only trigger remove when necessary to save time\n\t\t\t\tevents = $._data( elem, \"events\" );\n\t\t\t\tif ( events && events.remove ) {\n\t\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t\t}\n\n\t\t\t// Http://bugs.jquery.com/ticket/8235\n\t\t\t} catch ( e ) {}\n\t\t}\n\t\torig( elems );\n\t};\n} )( $.cleanData );\n\n$.widget = function( name, base, prototype ) {\n\tvar existingConstructor, constructor, basePrototype;\n\n\t// ProxiedPrototype allows the provided prototype to remain unmodified\n\t// so that it can be used as a mixin for multiple widgets (#8876)\n\tvar proxiedPrototype = {};\n\n\tvar namespace = name.split( \".\" )[ 0 ];\n\tname = name.split( \".\" )[ 1 ];\n\tvar fullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\tif ( $.isArray( prototype ) ) {\n\t\tprototype = $.extend.apply( null, [ {} ].concat( prototype ) );\n\t}\n\n\t// Create selector for plugin\n\t$.expr[ \":\" ][ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\n\t\t// Allow instantiation without \"new\" keyword\n\t\tif ( !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// Allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\n\t// Extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\n\t\t// Copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\n\t\t// Track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t} );\n\n\tbasePrototype = new base();\n\n\t// We need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( !$.isFunction( value ) ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = ( function() {\n\t\t\tfunction _super() {\n\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t}\n\n\t\t\tfunction _superApply( args ) {\n\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t}\n\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super;\n\t\t\t\tvar __superApply = this._superApply;\n\t\t\t\tvar returnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t} )();\n\t} );\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t} );\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// Redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor,\n\t\t\t\tchild._proto );\n\t\t} );\n\n\t\t// Remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n\n\treturn constructor;\n};\n\n$.widget.extend = function( target ) {\n\tvar input = widgetSlice.call( arguments, 1 );\n\tvar inputIndex = 0;\n\tvar inputLength = input.length;\n\tvar key;\n\tvar value;\n\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\n\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\";\n\t\tvar args = widgetSlice.call( arguments, 1 );\n\t\tvar returnValue = this;\n\n\t\tif ( isMethodCall ) {\n\n\t\t\t// If this is an empty collection, we need to have the instance method\n\t\t\t// return undefined instead of the jQuery instance\n\t\t\tif ( !this.length && options === \"instance\" ) {\n\t\t\t\treturnValue = undefined;\n\t\t\t} else {\n\t\t\t\tthis.each( function() {\n\t\t\t\t\tvar methodValue;\n\t\t\t\t\tvar instance = $.data( this, fullName );\n\n\t\t\t\t\tif ( options === \"instance\" ) {\n\t\t\t\t\t\treturnValue = instance;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\treturn $.error( \"cannot call methods on \" + name +\n\t\t\t\t\t\t\t\" prior to initialization; \" +\n\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name +\n\t\t\t\t\t\t\t\" widget instance\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\n\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Allow multiple hashes to be passed on init\n\t\t\tif ( args.length ) {\n\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\n\t\t\t}\n\n\t\t\tthis.each( function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} );\n\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\n\toptions: {\n\t\tclasses: {},\n\t\tdisabled: false,\n\n\t\t// Callbacks\n\t\tcreate: null\n\t},\n\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = widgetUuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\t\tthis.classesElementLookup = {};\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\tthis.document = $( element.style ?\n\n\t\t\t\t// Element within the document\n\t\t\t\telement.ownerDocument :\n\n\t\t\t\t// Element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );\n\t\t}\n\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis._create();\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._setOptionDisabled( this.options.disabled );\n\t\t}\n\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\n\t_getCreateOptions: function() {\n\t\treturn {};\n\t},\n\n\t_getCreateEventData: $.noop,\n\n\t_create: $.noop,\n\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tvar that = this;\n\n\t\tthis._destroy();\n\t\t$.each( this.classesElementLookup, function( key, value ) {\n\t\t\tthat._removeClass( value, key );\n\t\t} );\n\n\t\t// We can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeData( this.widgetFullName );\n\t\tthis.widget()\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" );\n\n\t\t// Clean up events and states\n\t\tthis.bindings.off( this.eventNamespace );\n\t},\n\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key;\n\t\tvar parts;\n\t\tvar curOption;\n\t\tvar i;\n\n\t\tif ( arguments.length === 0 ) {\n\n\t\t\t// Don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\n\t\t\t// Handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"classes\" ) {\n\t\t\tthis._setOptionClasses( value );\n\t\t}\n\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._setOptionDisabled( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOptionClasses: function( value ) {\n\t\tvar classKey, elements, currentElements;\n\n\t\tfor ( classKey in value ) {\n\t\t\tcurrentElements = this.classesElementLookup[ classKey ];\n\t\t\tif ( value[ classKey ] === this.options.classes[ classKey ] ||\n\t\t\t\t\t!currentElements ||\n\t\t\t\t\t!currentElements.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We are doing this to create a new jQuery object because the _removeClass() call\n\t\t\t// on the next line is going to destroy the reference to the current elements being\n\t\t\t// tracked. We need to save a copy of this collection so that we can add the new classes\n\t\t\t// below.\n\t\t\telements = $( currentElements.get() );\n\t\t\tthis._removeClass( currentElements, classKey );\n\n\t\t\t// We don't use _addClass() here, because that uses this.options.classes\n\t\t\t// for generating the string of classes. We want to use the value passed in from\n\t\t\t// _setOption(), this is the new value of the classes option which was passed to\n\t\t\t// _setOption(). We pass this value directly to _classes().\n\t\t\telements.addClass( this._classes( {\n\t\t\t\telement: elements,\n\t\t\t\tkeys: classKey,\n\t\t\t\tclasses: value,\n\t\t\t\tadd: true\n\t\t\t} ) );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null, !!value );\n\n\t\t// If the widget is becoming disabled, then nothing is interactive\n\t\tif ( value ) {\n\t\t\tthis._removeClass( this.hoverable, null, \"ui-state-hover\" );\n\t\t\tthis._removeClass( this.focusable, null, \"ui-state-focus\" );\n\t\t}\n\t},\n\n\tenable: function() {\n\t\treturn this._setOptions( { disabled: false } );\n\t},\n\n\tdisable: function() {\n\t\treturn this._setOptions( { disabled: true } );\n\t},\n\n\t_classes: function( options ) {\n\t\tvar full = [];\n\t\tvar that = this;\n\n\t\toptions = $.extend( {\n\t\t\telement: this.element,\n\t\t\tclasses: this.options.classes || {}\n\t\t}, options );\n\n\t\tfunction processClassString( classes, checkOption ) {\n\t\t\tvar current, i;\n\t\t\tfor ( i = 0; i < classes.length; i++ ) {\n\t\t\t\tcurrent = that.classesElementLookup[ classes[ i ] ] || $();\n\t\t\t\tif ( options.add ) {\n\t\t\t\t\tcurrent = $( $.unique( current.get().concat( options.element.get() ) ) );\n\t\t\t\t} else {\n\t\t\t\t\tcurrent = $( current.not( options.element ).get() );\n\t\t\t\t}\n\t\t\t\tthat.classesElementLookup[ classes[ i ] ] = current;\n\t\t\t\tfull.push( classes[ i ] );\n\t\t\t\tif ( checkOption && options.classes[ classes[ i ] ] ) {\n\t\t\t\t\tfull.push( options.classes[ classes[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._on( options.element, {\n\t\t\t\"remove\": \"_untrackClassesElement\"\n\t\t} );\n\n\t\tif ( options.keys ) {\n\t\t\tprocessClassString( options.keys.match( /\\S+/g ) || [], true );\n\t\t}\n\t\tif ( options.extra ) {\n\t\t\tprocessClassString( options.extra.match( /\\S+/g ) || [] );\n\t\t}\n\n\t\treturn full.join( \" \" );\n\t},\n\n\t_untrackClassesElement: function( event ) {\n\t\tvar that = this;\n\t\t$.each( that.classesElementLookup, function( key, value ) {\n\t\t\tif ( $.inArray( event.target, value ) !== -1 ) {\n\t\t\t\tthat.classesElementLookup[ key ] = $( value.not( event.target ).get() );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_removeClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, false );\n\t},\n\n\t_addClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, true );\n\t},\n\n\t_toggleClass: function( element, keys, extra, add ) {\n\t\tadd = ( typeof add === \"boolean\" ) ? add : extra;\n\t\tvar shift = ( typeof element === \"string\" || element === null ),\n\t\t\toptions = {\n\t\t\t\textra: shift ? keys : extra,\n\t\t\t\tkeys: shift ? element : keys,\n\t\t\t\telement: shift ? this.element : element,\n\t\t\t\tadd: add\n\t\t\t};\n\t\toptions.element.toggleClass( this._classes( options ), add );\n\t\treturn this;\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement;\n\t\tvar instance = this;\n\n\t\t// No suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// No element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\n\t\t\t\t// Allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// Copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^([\\w:-]*)\\s*(.*)$/ );\n\t\t\tvar eventName = match[ 1 ] + instance.eventNamespace;\n\t\t\tvar selector = match[ 2 ];\n\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.on( eventName, selector, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.on( eventName, handlerProxy );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = ( eventName || \"\" ).split( \" \" ).join( this.eventNamespace + \" \" ) +\n\t\t\tthis.eventNamespace;\n\t\telement.off( eventName ).off( eventName );\n\n\t\t// Clear the stack to avoid memory leaks (#10056)\n\t\tthis.bindings = $( this.bindings.not( element ).get() );\n\t\tthis.focusable = $( this.focusable.not( element ).get() );\n\t\tthis.hoverable = $( this.hoverable.not( element ).get() );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig;\n\t\tvar callback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\n\t\t// The original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// Copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( $.isFunction( callback ) &&\n\t\t\tcallback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\n\t\tvar hasOptions;\n\t\tvar effectName = !options ?\n\t\t\tmethod :\n\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\tdefaultEffect :\n\t\t\t\toptions.effect || defaultEffect;\n\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t}\n\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue( function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t} );\n\t\t}\n\t};\n} );\n\nvar widget = $.widget;\n\n\n/*!\n * jQuery UI Position 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/position/\n */\n\n//>>label: Position\n//>>group: Core\n//>>description: Positions elements relative to other elements.\n//>>docs: http://api.jqueryui.com/position/\n//>>demos: http://jqueryui.com/position/\n\n\n( function() {\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[ 0 ];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( $.isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div \" +\n\t\t\t\t\"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>\" +\n\t\t\t\t\"<div style='height:100px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[ 0 ];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[ 0 ].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn ( cachedScrollbarWidth = w1 - w2 );\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[ 0 ].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[ 0 ].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisWindow = $.isWindow( withinElement[ 0 ] ),\n\t\t\tisDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,\n\t\t\thasOffset = !isWindow && !isDocument;\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isWindow,\n\t\t\tisDocument: isDocument,\n\t\t\toffset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: withinElement.outerWidth(),\n\t\t\theight: withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// Make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\t\ttarget = $( options.of ),\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[ 0 ].preventDefault ) {\n\n\t\t// Force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\n\t// Clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// Force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1 ) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// Calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// Reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t} );\n\n\t// Normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each( function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) +\n\t\t\t\tscrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) +\n\t\t\t\tscrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem: elem\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tif ( options.using ) {\n\n\t\t\t// Adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t} );\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// Element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\n\t\t\t\t// Element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\n\t\t\t\t// Element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\n\t\t\t\t// Element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\n\t\t\t// Too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// Element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\n\t\t\t\t// Element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\n\t\t\t\t// Element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\n\t\t\t\t// Element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\n\t\t\t// Too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -\n\t\t\t\t\touterWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +\n\t\t\t\t\tatOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -\n\t\t\t\t\touterHeight - withinOffset;\n\t\t\t\tif ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +\n\t\t\t\t\toffset - offsetTop;\n\t\t\t\tif ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n} )();\n\nvar position = $.ui.position;\n\n\n/*!\n * jQuery UI :data 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :data Selector\n//>>group: Core\n//>>description: Selects elements which have data stored under the specified key.\n//>>docs: http://api.jqueryui.com/data-selector/\n\n\nvar data = $.extend( $.expr[ \":\" ], {\n\tdata: $.expr.createPseudo ?\n\t\t$.expr.createPseudo( function( dataName ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t};\n\t\t} ) :\n\n\t\t// Support: jQuery <1.8\n\t\tfunction( elem, i, match ) {\n\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t}\n} );\n\n/*!\n * jQuery UI Disable Selection 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: disableSelection\n//>>group: Core\n//>>description: Disable selection of text content within the set of matched elements.\n//>>docs: http://api.jqueryui.com/disableSelection/\n\n// This file is deprecated\n\n\nvar disableSelection = $.fn.extend( {\n\tdisableSelection: ( function() {\n\t\tvar eventType = \"onselectstart\" in document.createElement( \"div\" ) ?\n\t\t\t\"selectstart\" :\n\t\t\t\"mousedown\";\n\n\t\treturn function() {\n\t\t\treturn this.on( eventType + \".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tenableSelection: function() {\n\t\treturn this.off( \".ui-disableSelection\" );\n\t}\n} );\n\n\n/*!\n * jQuery UI Focusable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :focusable Selector\n//>>group: Core\n//>>description: Selects elements which can be focused.\n//>>docs: http://api.jqueryui.com/focusable-selector/\n\n\n\n// Selectors\n$.ui.focusable = function( element, hasTabindex ) {\n\tvar map, mapName, img, focusableIfVisible, fieldset,\n\t\tnodeName = element.nodeName.toLowerCase();\n\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap='#\" + mapName + \"']\" );\n\t\treturn img.length > 0 && img.is( \":visible\" );\n\t}\n\n\tif ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {\n\t\tfocusableIfVisible = !element.disabled;\n\n\t\tif ( focusableIfVisible ) {\n\n\t\t\t// Form controls within a disabled fieldset are disabled.\n\t\t\t// However, controls within the fieldset's legend do not get disabled.\n\t\t\t// Since controls generally aren't placed inside legends, we skip\n\t\t\t// this portion of the check.\n\t\t\tfieldset = $( element ).closest( \"fieldset\" )[ 0 ];\n\t\t\tif ( fieldset ) {\n\t\t\t\tfocusableIfVisible = !fieldset.disabled;\n\t\t\t}\n\t\t}\n\t} else if ( \"a\" === nodeName ) {\n\t\tfocusableIfVisible = element.href || hasTabindex;\n\t} else {\n\t\tfocusableIfVisible = hasTabindex;\n\t}\n\n\treturn focusableIfVisible && $( element ).is( \":visible\" ) && visible( $( element ) );\n};\n\n// Support: IE 8 only\n// IE 8 doesn't resolve inherit to visible/hidden for computed values\nfunction visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}\n\n$.extend( $.expr[ \":\" ], {\n\tfocusable: function( element ) {\n\t\treturn $.ui.focusable( element, $.attr( element, \"tabindex\" ) != null );\n\t}\n} );\n\nvar focusable = $.ui.focusable;\n\n\n\n\n// Support: IE8 Only\n// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop\n// with a string, so we need to find the proper form.\nvar form = $.fn.form = function() {\n\treturn typeof this[ 0 ].form === \"string\" ? this.closest( \"form\" ) : $( this[ 0 ].form );\n};\n\n\n/*!\n * jQuery UI Form Reset Mixin 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Form Reset Mixin\n//>>group: Core\n//>>description: Refresh input widgets when their form is reset\n//>>docs: http://api.jqueryui.com/form-reset-mixin/\n\n\n\nvar formResetMixin = $.ui.formResetMixin = {\n\t_formResetHandler: function() {\n\t\tvar form = $( this );\n\n\t\t// Wait for the form reset to actually happen before refreshing\n\t\tsetTimeout( function() {\n\t\t\tvar instances = form.data( \"ui-form-reset-instances\" );\n\t\t\t$.each( instances, function() {\n\t\t\t\tthis.refresh();\n\t\t\t} );\n\t\t} );\n\t},\n\n\t_bindFormResetHandler: function() {\n\t\tthis.form = this.element.form();\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" ) || [];\n\t\tif ( !instances.length ) {\n\n\t\t\t// We don't use _on() here because we use a single event handler per form\n\t\t\tthis.form.on( \"reset.ui-form-reset\", this._formResetHandler );\n\t\t}\n\t\tinstances.push( this );\n\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t},\n\n\t_unbindFormResetHandler: function() {\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" );\n\t\tinstances.splice( $.inArray( this, instances ), 1 );\n\t\tif ( instances.length ) {\n\t\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t\t} else {\n\t\t\tthis.form\n\t\t\t\t.removeData( \"ui-form-reset-instances\" )\n\t\t\t\t.off( \"reset.ui-form-reset\" );\n\t\t}\n\t}\n};\n\n\n/*!\n * jQuery UI Keycode 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Keycode\n//>>group: Core\n//>>description: Provide keycodes as keynames\n//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/\n\n\nvar keycode = $.ui.keyCode = {\n\tBACKSPACE: 8,\n\tCOMMA: 188,\n\tDELETE: 46,\n\tDOWN: 40,\n\tEND: 35,\n\tENTER: 13,\n\tESCAPE: 27,\n\tHOME: 36,\n\tLEFT: 37,\n\tPAGE_DOWN: 34,\n\tPAGE_UP: 33,\n\tPERIOD: 190,\n\tRIGHT: 39,\n\tSPACE: 32,\n\tTAB: 9,\n\tUP: 38\n};\n\n\n\n\n// Internal use only\nvar escapeSelector = $.ui.escapeSelector = ( function() {\n\tvar selectorEscape = /([!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~])/g;\n\treturn function( selector ) {\n\t\treturn selector.replace( selectorEscape, \"\\\\$1\" );\n\t};\n} )();\n\n\n/*!\n * jQuery UI Labels 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: labels\n//>>group: Core\n//>>description: Find all the labels associated with a given input\n//>>docs: http://api.jqueryui.com/labels/\n\n\n\nvar labels = $.fn.labels = function() {\n\tvar ancestor, selector, id, labels, ancestors;\n\n\t// Check control.labels first\n\tif ( this[ 0 ].labels && this[ 0 ].labels.length ) {\n\t\treturn this.pushStack( this[ 0 ].labels );\n\t}\n\n\t// Support: IE <= 11, FF <= 37, Android <= 2.3 only\n\t// Above browsers do not support control.labels. Everything below is to support them\n\t// as well as document fragments. control.labels does not work on document fragments\n\tlabels = this.eq( 0 ).parents( \"label\" );\n\n\t// Look for the label based on the id\n\tid = this.attr( \"id\" );\n\tif ( id ) {\n\n\t\t// We don't search against the document in case the element\n\t\t// is disconnected from the DOM\n\t\tancestor = this.eq( 0 ).parents().last();\n\n\t\t// Get a full set of top level ancestors\n\t\tancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );\n\n\t\t// Create a selector for the label based on the id\n\t\tselector = \"label[for='\" + $.ui.escapeSelector( id ) + \"']\";\n\n\t\tlabels = labels.add( ancestors.find( selector ).addBack( selector ) );\n\n\t}\n\n\t// Return whatever we have found for labels\n\treturn this.pushStack( labels );\n};\n\n\n/*!\n * jQuery UI Scroll Parent 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: scrollParent\n//>>group: Core\n//>>description: Get the closest ancestor element that is scrollable.\n//>>docs: http://api.jqueryui.com/scrollParent/\n\n\n\nvar scrollParent = $.fn.scrollParent = function( includeHidden ) {\n\tvar position = this.css( \"position\" ),\n\t\texcludeStaticParent = position === \"absolute\",\n\t\toverflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n\t\tscrollParent = this.parents().filter( function() {\n\t\t\tvar parent = $( this );\n\t\t\tif ( excludeStaticParent && parent.css( \"position\" ) === \"static\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn overflowRegex.test( parent.css( \"overflow\" ) + parent.css( \"overflow-y\" ) +\n\t\t\t\tparent.css( \"overflow-x\" ) );\n\t\t} ).eq( 0 );\n\n\treturn position === \"fixed\" || !scrollParent.length ?\n\t\t$( this[ 0 ].ownerDocument || document ) :\n\t\tscrollParent;\n};\n\n\n/*!\n * jQuery UI Tabbable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :tabbable Selector\n//>>group: Core\n//>>description: Selects elements which can be tabbed to.\n//>>docs: http://api.jqueryui.com/tabbable-selector/\n\n\n\nvar tabbable = $.extend( $.expr[ \":\" ], {\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\thasTabindex = tabIndex != null;\n\t\treturn ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );\n\t}\n} );\n\n\n/*!\n * jQuery UI Unique ID 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: uniqueId\n//>>group: Core\n//>>description: Functions to generate and remove uniqueId's\n//>>docs: http://api.jqueryui.com/uniqueId/\n\n\n\nvar uniqueId = $.fn.extend( {\n\tuniqueId: ( function() {\n\t\tvar uuid = 0;\n\n\t\treturn function() {\n\t\t\treturn this.each( function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + ( ++uuid );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tremoveUniqueId: function() {\n\t\treturn this.each( function() {\n\t\t\tif ( /^ui-id-\\d+$/.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\n\n\n// This file is deprecated\nvar ie = $.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n\n/*!\n * jQuery UI Mouse 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Mouse\n//>>group: Widgets\n//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.\n//>>docs: http://api.jqueryui.com/mouse/\n\n\n\nvar mouseHandled = false;\n$( document ).on( \"mouseup\", function() {\n\tmouseHandled = false;\n} );\n\nvar widgetsMouse = $.widget( \"ui.mouse\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tcancel: \"input, textarea, button, select, option\",\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar that = this;\n\n\t\tthis.element\n\t\t\t.on( \"mousedown.\" + this.widgetName, function( event ) {\n\t\t\t\treturn that._mouseDown( event );\n\t\t\t} )\n\t\t\t.on( \"click.\" + this.widgetName, function( event ) {\n\t\t\t\tif ( true === $.data( event.target, that.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t\t\t$.removeData( event.target, that.widgetName + \".preventClickEvent\" );\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.off( \".\" + this.widgetName );\n\t\tif ( this._mouseMoveDelegate ) {\n\t\t\tthis.document\n\t\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\t\t}\n\t},\n\n\t_mouseDown: function( event ) {\n\n\t\t// don't let more than one widget handle mouseStart\n\t\tif ( mouseHandled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoved = false;\n\n\t\t// We may have missed mouseup (out of window)\n\t\t( this._mouseStarted && this._mouseUp( event ) );\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar that = this,\n\t\t\tbtnIsLeft = ( event.which === 1 ),\n\n\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t// disabled inputs (#7620)\n\t\t\telIsCancel = ( typeof this.options.cancel === \"string\" && event.target.nodeName ?\n\t\t\t\t$( event.target ).closest( this.options.cancel ).length : false );\n\t\tif ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif ( !this.mouseDelayMet ) {\n\t\t\tthis._mouseDelayTimer = setTimeout( function() {\n\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t}, this.options.delay );\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted = ( this._mouseStart( event ) !== false );\n\t\t\tif ( !this._mouseStarted ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif ( true === $.data( event.target, this.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t$.removeData( event.target, this.widgetName + \".preventClickEvent\" );\n\t\t}\n\n\t\t// These delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function( event ) {\n\t\t\treturn that._mouseMove( event );\n\t\t};\n\t\tthis._mouseUpDelegate = function( event ) {\n\t\t\treturn that._mouseUp( event );\n\t\t};\n\n\t\tthis.document\n\t\t\t.on( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.on( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tevent.preventDefault();\n\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function( event ) {\n\n\t\t// Only check for mouseups outside the document if you've moved inside the document\n\t\t// at least once. This prevents the firing of mouseup in the case of IE<9, which will\n\t\t// fire a mousemove event if content is placed under the cursor. See #7778\n\t\t// Support: IE <9\n\t\tif ( this._mouseMoved ) {\n\n\t\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\t\tif ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&\n\t\t\t\t\t!event.button ) {\n\t\t\t\treturn this._mouseUp( event );\n\n\t\t\t// Iframe mouseup check - mouseup occurred in another document\n\t\t\t} else if ( !event.which ) {\n\n\t\t\t\t// Support: Safari <=8 - 9\n\t\t\t\t// Safari sets which to 0 if you press any of the following keys\n\t\t\t\t// during a drag (#14461)\n\t\t\t\tif ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||\n\t\t\t\t\t\tevent.originalEvent.metaKey || event.originalEvent.shiftKey ) {\n\t\t\t\t\tthis.ignoreMissingWhich = true;\n\t\t\t\t} else if ( !this.ignoreMissingWhich ) {\n\t\t\t\t\treturn this._mouseUp( event );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( event.which || event.button ) {\n\t\t\tthis._mouseMoved = true;\n\t\t}\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseDrag( event );\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t( this._mouseStart( this._mouseDownEvent, event ) !== false );\n\t\t\t( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) );\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis.document\n\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif ( event.target === this._mouseDownEvent.target ) {\n\t\t\t\t$.data( event.target, this.widgetName + \".preventClickEvent\", true );\n\t\t\t}\n\n\t\t\tthis._mouseStop( event );\n\t\t}\n\n\t\tif ( this._mouseDelayTimer ) {\n\t\t\tclearTimeout( this._mouseDelayTimer );\n\t\t\tdelete this._mouseDelayTimer;\n\t\t}\n\n\t\tthis.ignoreMissingWhich = false;\n\t\tmouseHandled = false;\n\t\tevent.preventDefault();\n\t},\n\n\t_mouseDistanceMet: function( event ) {\n\t\treturn ( Math.max(\n\t\t\t\tMath.abs( this._mouseDownEvent.pageX - event.pageX ),\n\t\t\t\tMath.abs( this._mouseDownEvent.pageY - event.pageY )\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function( /* event */ ) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function( /* event */ ) {},\n\t_mouseDrag: function( /* event */ ) {},\n\t_mouseStop: function( /* event */ ) {},\n\t_mouseCapture: function( /* event */ ) { return true; }\n} );\n\n\n\n\n// $.ui.plugin is deprecated. Use $.widget() extensions instead.\nvar plugin = $.ui.plugin = {\n\tadd: function( module, option, set ) {\n\t\tvar i,\n\t\t\tproto = $.ui[ module ].prototype;\n\t\tfor ( i in set ) {\n\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t}\n\t},\n\tcall: function( instance, name, args, allowDisconnected ) {\n\t\tvar i,\n\t\t\tset = instance.plugins[ name ];\n\n\t\tif ( !set ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||\n\t\t\t\tinstance.element[ 0 ].parentNode.nodeType === 11 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n\nvar safeActiveElement = $.ui.safeActiveElement = function( document ) {\n\tvar activeElement;\n\n\t// Support: IE 9 only\n\t// IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n\ttry {\n\t\tactiveElement = document.activeElement;\n\t} catch ( error ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE may return null instead of an element\n\t// Interestingly, this only seems to occur when NOT in an iframe\n\tif ( !activeElement ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 11 only\n\t// IE11 returns a seemingly empty object in some cases when accessing\n\t// document.activeElement from an <iframe>\n\tif ( !activeElement.nodeName ) {\n\t\tactiveElement = document.body;\n\t}\n\n\treturn activeElement;\n};\n\n\n\nvar safeBlur = $.ui.safeBlur = function( element ) {\n\n\t// Support: IE9 - 10 only\n\t// If the <body> is blurred, IE will switch windows, see #9420\n\tif ( element && element.nodeName.toLowerCase() !== \"body\" ) {\n\t\t$( element ).trigger( \"blur\" );\n\t}\n};\n\n\n/*!\n * jQuery UI Draggable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Draggable\n//>>group: Interactions\n//>>description: Enables dragging functionality for any element.\n//>>docs: http://api.jqueryui.com/draggable/\n//>>demos: http://jqueryui.com/draggable/\n//>>css.structure: ../../themes/base/draggable.css\n\n\n\n$.widget( \"ui.draggable\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false,\n\n\t\t// Callbacks\n\t\tdrag: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tif ( this.options.helper === \"original\" ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\t\tif ( this.options.addClasses ) {\n\t\t\tthis._addClass( \"ui-draggable\" );\n\t\t}\n\t\tthis._setHandleClassName();\n\n\t\tthis._mouseInit();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._removeHandleClassName();\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tif ( ( this.helper || this.element ).is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis.destroyOnClear = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._removeHandleClassName();\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar o = this.options;\n\n\t\t// Among others, prevent a drag on a resizable-handle\n\t\tif ( this.helper || o.disabled ||\n\t\t\t\t$( event.target ).closest( \".ui-resizable-handle\" ).length > 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle( event );\n\t\tif ( !this.handle ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._blurActiveElement( event );\n\n\t\tthis._blockFrames( o.iframeFix === true ? \"iframe\" : o.iframeFix );\n\n\t\treturn true;\n\n\t},\n\n\t_blockFrames: function( selector ) {\n\t\tthis.iframeBlocks = this.document.find( selector ).map( function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( \"position\", \"absolute\" )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.outerWidth( iframe.outerWidth() )\n\t\t\t\t.outerHeight( iframe.outerHeight() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t} );\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_blurActiveElement: function( event ) {\n\t\tvar activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),\n\t\t\ttarget = $( event.target );\n\n\t\t// Don't blur if the event occurred on an element that is within\n\t\t// the currently focused element\n\t\t// See #10527, #12472\n\t\tif ( target.closest( activeElement ).length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Blur any element that currently has focus, see #4261\n\t\t$.ui.safeBlur( activeElement );\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper( event );\n\n\t\tthis._addClass( this.helper, \"ui-draggable-dragging\" );\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\tthis.scrollParent = this.helper.scrollParent( true );\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tthis.hasFixedAncestor = this.helper.parents().filter( function() {\n\t\t\t\treturn $( this ).css( \"position\" ) === \"fixed\";\n\t\t\t} ).length > 0;\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.positionAbs = this.element.offset();\n\t\tthis._refreshOffsets( event );\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition( event, false );\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );\n\n\t\t//Set a containment if given in the options\n\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif ( this._trigger( \"start\", event ) === false ) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t}\n\n\t\t// Execute the drag once - this causes the helper not to be visible before getting its\n\t\t// correct position\n\t\tthis._mouseDrag( event, true );\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has started\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStart( this, event );\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t_refreshOffsets: function( event ) {\n\t\tthis.offset = {\n\t\t\ttop: this.positionAbs.top - this.margins.top,\n\t\t\tleft: this.positionAbs.left - this.margins.left,\n\t\t\tscroll: false,\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset()\n\t\t};\n\n\t\tthis.offset.click = {\n\t\t\tleft: event.pageX - this.offset.left,\n\t\t\ttop: event.pageY - this.offset.top\n\t\t};\n\t},\n\n\t_mouseDrag: function( event, noPropagation ) {\n\n\t\t// reset any necessary cached properties (see #5009)\n\t\tif ( this.hasFixedAncestor ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event, true );\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif ( !noPropagation ) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif ( this._trigger( \"drag\", event, ui ) === false ) {\n\t\t\t\tthis._mouseUp( new $.Event( \"mouseup\", event ) );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.drag( this, event );\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar that = this,\n\t\t\tdropped = false;\n\t\tif ( $.ui.ddmanager && !this.options.dropBehaviour ) {\n\t\t\tdropped = $.ui.ddmanager.drop( this, event );\n\t\t}\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif ( this.dropped ) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\n\t\tif ( ( this.options.revert === \"invalid\" && !dropped ) ||\n\t\t\t\t( this.options.revert === \"valid\" && dropped ) ||\n\t\t\t\tthis.options.revert === true || ( $.isFunction( this.options.revert ) &&\n\t\t\t\tthis.options.revert.call( this.element, dropped ) )\n\t\t) {\n\t\t\t$( this.helper ).animate(\n\t\t\t\tthis.originalPosition,\n\t\t\t\tparseInt( this.options.revertDuration, 10 ),\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( that._trigger( \"stop\", event ) !== false ) {\n\t\t\t\t\t\tthat._clear();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tif ( this._trigger( \"stop\", event ) !== false ) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis._unblockFrames();\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has stopped\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStop( this, event );\n\t\t}\n\n\t\t// Only need to focus if the event occurred on the draggable itself, see #10527\n\t\tif ( this.handleElement.is( event.target ) ) {\n\n\t\t\t// The interaction is over; whether or not the click resulted in a drag,\n\t\t\t// focus the element\n\t\t\tthis.element.trigger( \"focus\" );\n\t\t}\n\n\t\treturn $.ui.mouse.prototype._mouseUp.call( this, event );\n\t},\n\n\tcancel: function() {\n\n\t\tif ( this.helper.is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis._mouseUp( new $.Event( \"mouseup\", { target: this.element[ 0 ] } ) );\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\t_getHandle: function( event ) {\n\t\treturn this.options.handle ?\n\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\ttrue;\n\t},\n\n\t_setHandleClassName: function() {\n\t\tthis.handleElement = this.options.handle ?\n\t\t\tthis.element.find( this.options.handle ) : this.element;\n\t\tthis._addClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_removeHandleClassName: function() {\n\t\tthis._removeClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_createHelper: function( event ) {\n\n\t\tvar o = this.options,\n\t\t\thelperIsFunction = $.isFunction( o.helper ),\n\t\t\thelper = helperIsFunction ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ?\n\t\t\t\t\tthis.element.clone().removeAttr( \"id\" ) :\n\t\t\t\t\tthis.element );\n\n\t\tif ( !helper.parents( \"body\" ).length ) {\n\t\t\thelper.appendTo( ( o.appendTo === \"parent\" ?\n\t\t\t\tthis.element[ 0 ].parentNode :\n\t\t\t\to.appendTo ) );\n\t\t}\n\n\t\t// Http://bugs.jqueryui.com/ticket/9446\n\t\t// a helper function can return the original element\n\t\t// which wouldn't have been set to relative in _create\n\t\tif ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\n\t\tif ( helper[ 0 ] !== this.element[ 0 ] &&\n\t\t\t\t!( /(fixed|absolute)/ ).test( helper.css( \"position\" ) ) ) {\n\t\t\thelper.css( \"position\", \"absolute\" );\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_setPositionRelative: function() {\n\t\tif ( !( /^(?:r|a|f)/ ).test( this.element.css( \"position\" ) ) ) {\n\t\t\tthis.element[ 0 ].style.position = \"relative\";\n\t\t}\n\t},\n\n\t_adjustOffsetFromHelper: function( obj ) {\n\t\tif ( typeof obj === \"string\" ) {\n\t\t\tobj = obj.split( \" \" );\n\t\t}\n\t\tif ( $.isArray( obj ) ) {\n\t\t\tobj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };\n\t\t}\n\t\tif ( \"left\" in obj ) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ( \"right\" in obj ) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ( \"top\" in obj ) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ( \"bottom\" in obj ) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_isRootNode: function( element ) {\n\t\treturn ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tvar po = this.offsetParent.offset(),\n\t\t\tdocument = this.document[ 0 ];\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the\n\t\t// following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the\n\t\t// next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n\t\t// the document, which means that the scroll is included in the initial calculation of the\n\t\t// offset of the parent, and never recalculated upon drag\n\t\tif ( this.cssPosition === \"absolute\" && this.scrollParent[ 0 ] !== document &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\tif ( this._isRootNode( this.offsetParent[ 0 ] ) ) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + ( parseInt( this.offsetParent.css( \"borderTopWidth\" ), 10 ) || 0 ),\n\t\t\tleft: po.left + ( parseInt( this.offsetParent.css( \"borderLeftWidth\" ), 10 ) || 0 )\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\t\tif ( this.cssPosition !== \"relative\" ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\tvar p = this.element.position(),\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: p.top - ( parseInt( this.helper.css( \"top\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),\n\t\t\tleft: p.left - ( parseInt( this.helper.css( \"left\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )\n\t\t};\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: ( parseInt( this.element.css( \"marginLeft\" ), 10 ) || 0 ),\n\t\t\ttop: ( parseInt( this.element.css( \"marginTop\" ), 10 ) || 0 ),\n\t\t\tright: ( parseInt( this.element.css( \"marginRight\" ), 10 ) || 0 ),\n\t\t\tbottom: ( parseInt( this.element.css( \"marginBottom\" ), 10 ) || 0 )\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar isUserScrollable, c, ce,\n\t\t\to = this.options,\n\t\t\tdocument = this.document[ 0 ];\n\n\t\tthis.relativeContainer = null;\n\n\t\tif ( !o.containment ) {\n\t\t\tthis.containment = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$( window ).scrollLeft() + $( window ).width() -\n\t\t\t\t\tthis.helperProportions.width - this.margins.left,\n\t\t\t\t$( window ).scrollTop() +\n\t\t\t\t\t( $( window ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"document\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment.constructor === Array ) {\n\t\t\tthis.containment = o.containment;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\n\t\tc = $( o.containment );\n\t\tce = c[ 0 ];\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tisUserScrollable = /(scroll|auto)/.test( c.css( \"overflow\" ) );\n\n\t\tthis.containment = [\n\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ),\n\t\t\t( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.width -\n\t\t\t\tthis.margins.left -\n\t\t\t\tthis.margins.right,\n\t\t\t( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.height -\n\t\t\t\tthis.margins.top -\n\t\t\t\tthis.margins.bottom\n\t\t];\n\t\tthis.relativeContainer = c;\n\t},\n\n\t_convertPositionTo: function( d, pos ) {\n\n\t\tif ( !pos ) {\n\t\t\tpos = this.position;\n\t\t}\n\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.top\t+\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top * mod -\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.left +\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left * mod\t-\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event, constrainPosition ) {\n\n\t\tvar containment, co, top, left,\n\t\t\to = this.options,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY;\n\n\t\t// Cache the scroll\n\t\tif ( !scrollIsRootNode || !this.offset.scroll ) {\n\t\t\tthis.offset.scroll = {\n\t\t\t\ttop: this.scrollParent.scrollTop(),\n\t\t\t\tleft: this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\t// If we are not dragging yet, we won't check for options\n\t\tif ( constrainPosition ) {\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( this.relativeContainer ) {\n\t\t\t\t\tco = this.relativeContainer.offset();\n\t\t\t\t\tcontainment = [\n\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t}\n\n\t\t\t\tif ( event.pageX - this.offset.click.left < containment[ 0 ] ) {\n\t\t\t\t\tpageX = containment[ 0 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top < containment[ 1 ] ) {\n\t\t\t\t\tpageY = containment[ 1 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif ( event.pageX - this.offset.click.left > containment[ 2 ] ) {\n\t\t\t\t\tpageX = containment[ 2 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top > containment[ 3 ] ) {\n\t\t\t\t\tpageY = containment[ 3 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.grid ) {\n\n\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid\n\t\t\t\t// argument errors in IE (see ticket #6950)\n\t\t\t\ttop = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -\n\t\t\t\t\tthis.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;\n\t\t\t\tpageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||\n\t\t\t\t\ttop - this.offset.click.top > containment[ 3 ] ) ?\n\t\t\t\t\t\ttop :\n\t\t\t\t\t\t( ( top - this.offset.click.top >= containment[ 1 ] ) ?\n\t\t\t\t\t\t\ttop - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;\n\n\t\t\t\tleft = o.grid[ 0 ] ? this.originalPageX +\n\t\t\t\t\tMath.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :\n\t\t\t\t\tthis.originalPageX;\n\t\t\t\tpageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||\n\t\t\t\t\tleft - this.offset.click.left > containment[ 2 ] ) ?\n\t\t\t\t\t\tleft :\n\t\t\t\t\t\t( ( left - this.offset.click.left >= containment[ 0 ] ) ?\n\t\t\t\t\t\t\tleft - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"y\" ) {\n\t\t\t\tpageX = this.originalPageX;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"x\" ) {\n\t\t\t\tpageY = this.originalPageY;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageY -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.top -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageX -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.left -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis._removeClass( this.helper, \"ui-draggable-dragging\" );\n\t\tif ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t\tif ( this.destroyOnClear ) {\n\t\t\tthis.destroy();\n\t\t}\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function( type, event, ui ) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call( this, type, [ event, ui, this ], true );\n\n\t\t// Absolute position and offset (see #6884 ) have to be recalculated after plugins\n\t\tif ( /^(drag|start|stop)/.test( type ) ) {\n\t\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\t\t\tui.offset = this.positionAbs;\n\t\t}\n\t\treturn $.Widget.prototype._trigger.call( this, type, event, ui );\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function() {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n} );\n\n$.ui.plugin.add( \"draggable\", \"connectToSortable\", {\n\tstart: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.sortables = [];\n\t\t$( draggable.options.connectToSortable ).each( function() {\n\t\t\tvar sortable = $( this ).sortable( \"instance\" );\n\n\t\t\tif ( sortable && !sortable.options.disabled ) {\n\t\t\t\tdraggable.sortables.push( sortable );\n\n\t\t\t\t// RefreshPositions is called at drag start to refresh the containerCache\n\t\t\t\t// which is used in drag. This ensures it's initialized and synchronized\n\t\t\t\t// with any changes that might have happened on the page since initialization.\n\t\t\t\tsortable.refreshPositions();\n\t\t\t\tsortable._trigger( \"activate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tstop: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.cancelHelperRemoval = false;\n\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar sortable = this;\n\n\t\t\tif ( sortable.isOver ) {\n\t\t\t\tsortable.isOver = 0;\n\n\t\t\t\t// Allow this sortable to handle removing the helper\n\t\t\t\tdraggable.cancelHelperRemoval = true;\n\t\t\t\tsortable.cancelHelperRemoval = false;\n\n\t\t\t\t// Use _storedCSS To restore properties in the sortable,\n\t\t\t\t// as this also handles revert (#9675) since the draggable\n\t\t\t\t// may have modified them in unexpected ways (#8809)\n\t\t\t\tsortable._storedCSS = {\n\t\t\t\t\tposition: sortable.placeholder.css( \"position\" ),\n\t\t\t\t\ttop: sortable.placeholder.css( \"top\" ),\n\t\t\t\t\tleft: sortable.placeholder.css( \"left\" )\n\t\t\t\t};\n\n\t\t\t\tsortable._mouseStop( event );\n\n\t\t\t\t// Once drag has ended, the sortable should return to using\n\t\t\t\t// its original helper, not the shared helper from draggable\n\t\t\t\tsortable.options.helper = sortable.options._helper;\n\t\t\t} else {\n\n\t\t\t\t// Prevent this Sortable from removing the helper.\n\t\t\t\t// However, don't set the draggable to remove the helper\n\t\t\t\t// either as another connected Sortable may yet handle the removal.\n\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\tsortable._trigger( \"deactivate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tdrag: function( event, ui, draggable ) {\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar innermostIntersecting = false,\n\t\t\t\tsortable = this;\n\n\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\tsortable.positionAbs = draggable.positionAbs;\n\t\t\tsortable.helperProportions = draggable.helperProportions;\n\t\t\tsortable.offset.click = draggable.offset.click;\n\n\t\t\tif ( sortable._intersectsWith( sortable.containerCache ) ) {\n\t\t\t\tinnermostIntersecting = true;\n\n\t\t\t\t$.each( draggable.sortables, function() {\n\n\t\t\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\t\t\tthis.positionAbs = draggable.positionAbs;\n\t\t\t\t\tthis.helperProportions = draggable.helperProportions;\n\t\t\t\t\tthis.offset.click = draggable.offset.click;\n\n\t\t\t\t\tif ( this !== sortable &&\n\t\t\t\t\t\t\tthis._intersectsWith( this.containerCache ) &&\n\t\t\t\t\t\t\t$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {\n\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( innermostIntersecting ) {\n\n\t\t\t\t// If it intersects, we use a little isOver variable and set it once,\n\t\t\t\t// so that the move-in stuff gets fired only once.\n\t\t\t\tif ( !sortable.isOver ) {\n\t\t\t\t\tsortable.isOver = 1;\n\n\t\t\t\t\t// Store draggable's parent in case we need to reappend to it later.\n\t\t\t\t\tdraggable._parent = ui.helper.parent();\n\n\t\t\t\t\tsortable.currentItem = ui.helper\n\t\t\t\t\t\t.appendTo( sortable.element )\n\t\t\t\t\t\t.data( \"ui-sortable-item\", true );\n\n\t\t\t\t\t// Store helper option to later restore it\n\t\t\t\t\tsortable.options._helper = sortable.options.helper;\n\n\t\t\t\t\tsortable.options.helper = function() {\n\t\t\t\t\t\treturn ui.helper[ 0 ];\n\t\t\t\t\t};\n\n\t\t\t\t\t// Fire the start events of the sortable with our passed browser event,\n\t\t\t\t\t// and our own helper (so it doesn't create a new one)\n\t\t\t\t\tevent.target = sortable.currentItem[ 0 ];\n\t\t\t\t\tsortable._mouseCapture( event, true );\n\t\t\t\t\tsortable._mouseStart( event, true, true );\n\n\t\t\t\t\t// Because the browser event is way off the new appended portlet,\n\t\t\t\t\t// modify necessary variables to reflect the changes\n\t\t\t\t\tsortable.offset.click.top = draggable.offset.click.top;\n\t\t\t\t\tsortable.offset.click.left = draggable.offset.click.left;\n\t\t\t\t\tsortable.offset.parent.left -= draggable.offset.parent.left -\n\t\t\t\t\t\tsortable.offset.parent.left;\n\t\t\t\t\tsortable.offset.parent.top -= draggable.offset.parent.top -\n\t\t\t\t\t\tsortable.offset.parent.top;\n\n\t\t\t\t\tdraggable._trigger( \"toSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is in a valid drop zone,\n\t\t\t\t\t// used solely in the revert option to handle \"valid/invalid\".\n\t\t\t\t\tdraggable.dropped = sortable.element;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables in the case that\n\t\t\t\t\t// adding to one sortable changes the location of the other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Hack so receive/update callbacks work (mostly)\n\t\t\t\t\tdraggable.currentItem = draggable.element;\n\t\t\t\t\tsortable.fromOutside = draggable;\n\t\t\t\t}\n\n\t\t\t\tif ( sortable.currentItem ) {\n\t\t\t\t\tsortable._mouseDrag( event );\n\n\t\t\t\t\t// Copy the sortable's position because the draggable's can potentially reflect\n\t\t\t\t\t// a relative position, while sortable is always absolute, which the dragged\n\t\t\t\t\t// element has now become. (#8809)\n\t\t\t\t\tui.position = sortable.position;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t// we fake the drag stop of the sortable, but make sure it doesn't remove\n\t\t\t\t// the helper by using cancelHelperRemoval.\n\t\t\t\tif ( sortable.isOver ) {\n\n\t\t\t\t\tsortable.isOver = 0;\n\t\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\t\t// Calling sortable's mouseStop would trigger a revert,\n\t\t\t\t\t// so revert must be temporarily false until after mouseStop is called.\n\t\t\t\t\tsortable.options._revert = sortable.options.revert;\n\t\t\t\t\tsortable.options.revert = false;\n\n\t\t\t\t\tsortable._trigger( \"out\", event, sortable._uiHash( sortable ) );\n\t\t\t\t\tsortable._mouseStop( event, true );\n\n\t\t\t\t\t// Restore sortable behaviors that were modfied\n\t\t\t\t\t// when the draggable entered the sortable area (#9481)\n\t\t\t\t\tsortable.options.revert = sortable.options._revert;\n\t\t\t\t\tsortable.options.helper = sortable.options._helper;\n\n\t\t\t\t\tif ( sortable.placeholder ) {\n\t\t\t\t\t\tsortable.placeholder.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restore and recalculate the draggable's offset considering the sortable\n\t\t\t\t\t// may have modified them in unexpected ways. (#8809, #10669)\n\t\t\t\t\tui.helper.appendTo( draggable._parent );\n\t\t\t\t\tdraggable._refreshOffsets( event );\n\t\t\t\t\tui.position = draggable._generatePosition( event, true );\n\n\t\t\t\t\tdraggable._trigger( \"fromSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is no longer in a valid drop zone\n\t\t\t\t\tdraggable.dropped = false;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables just in case removing\n\t\t\t\t\t// from one sortable changes the location of other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"cursor\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( \"body\" ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"cursor\" ) ) {\n\t\t\to._cursor = t.css( \"cursor\" );\n\t\t}\n\t\tt.css( \"cursor\", o.cursor );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._cursor ) {\n\t\t\t$( \"body\" ).css( \"cursor\", o._cursor );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"opacity\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\t\tif ( t.css( \"opacity\" ) ) {\n\t\t\to._opacity = t.css( \"opacity\" );\n\t\t}\n\t\tt.css( \"opacity\", o.opacity );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._opacity ) {\n\t\t\t$( ui.helper ).css( \"opacity\", o._opacity );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"scroll\", {\n\tstart: function( event, ui, i ) {\n\t\tif ( !i.scrollParentNotHidden ) {\n\t\t\ti.scrollParentNotHidden = i.helper.scrollParent( false );\n\t\t}\n\n\t\tif ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&\n\t\t\t\ti.scrollParentNotHidden[ 0 ].tagName !== \"HTML\" ) {\n\t\t\ti.overflowOffset = i.scrollParentNotHidden.offset();\n\t\t}\n\t},\n\tdrag: function( event, ui, i ) {\n\n\t\tvar o = i.options,\n\t\t\tscrolled = false,\n\t\t\tscrollParent = i.scrollParentNotHidden[ 0 ],\n\t\t\tdocument = i.document[ 0 ];\n\n\t\tif ( scrollParent !== document && scrollParent.tagName !== \"HTML\" ) {\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );\n\t\t\t\t} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() - o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() + o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( i, event );\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"snap\", {\n\tstart: function( event, ui, i ) {\n\n\t\tvar o = i.options;\n\n\t\ti.snapElements = [];\n\n\t\t$( o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap )\n\t\t\t.each( function() {\n\t\t\t\tvar $t = $( this ),\n\t\t\t\t\t$o = $t.offset();\n\t\t\t\tif ( this !== i.element[ 0 ] ) {\n\t\t\t\t\ti.snapElements.push( {\n\t\t\t\t\t\titem: this,\n\t\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t},\n\tdrag: function( event, ui, inst ) {\n\n\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\to = inst.options,\n\t\t\td = o.snapTolerance,\n\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor ( i = inst.snapElements.length - 1; i >= 0; i-- ) {\n\n\t\t\tl = inst.snapElements[ i ].left - inst.margins.left;\n\t\t\tr = l + inst.snapElements[ i ].width;\n\t\t\tt = inst.snapElements[ i ].top - inst.margins.top;\n\t\t\tb = t + inst.snapElements[ i ].height;\n\n\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||\n\t\t\t\t\t!$.contains( inst.snapElements[ i ].item.ownerDocument,\n\t\t\t\t\tinst.snapElements[ i ].item ) ) {\n\t\t\t\tif ( inst.snapElements[ i ].snapping ) {\n\t\t\t\t\t( inst.options.snap.release &&\n\t\t\t\t\t\tinst.options.snap.release.call(\n\t\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )\n\t\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\tinst.snapElements[ i ].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( o.snapMode !== \"inner\" ) {\n\t\t\t\tts = Math.abs( t - y2 ) <= d;\n\t\t\t\tbs = Math.abs( b - y1 ) <= d;\n\t\t\t\tls = Math.abs( l - x2 ) <= d;\n\t\t\t\trs = Math.abs( r - x1 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfirst = ( ts || bs || ls || rs );\n\n\t\t\tif ( o.snapMode !== \"outer\" ) {\n\t\t\t\tts = Math.abs( t - y1 ) <= d;\n\t\t\t\tbs = Math.abs( b - y2 ) <= d;\n\t\t\t\tls = Math.abs( l - x1 ) <= d;\n\t\t\t\trs = Math.abs( r - x2 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {\n\t\t\t\t( inst.options.snap.snap &&\n\t\t\t\t\tinst.options.snap.snap.call(\n\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\t$.extend( inst._uiHash(), {\n\t\t\t\t\t\t\tsnapItem: inst.snapElements[ i ].item\n\t\t\t\t\t\t} ) ) );\n\t\t\t}\n\t\t\tinst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );\n\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"stack\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar min,\n\t\t\to = instance.options,\n\t\t\tgroup = $.makeArray( $( o.stack ) ).sort( function( a, b ) {\n\t\t\t\treturn ( parseInt( $( a ).css( \"zIndex\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( b ).css( \"zIndex\" ), 10 ) || 0 );\n\t\t\t} );\n\n\t\tif ( !group.length ) { return; }\n\n\t\tmin = parseInt( $( group[ 0 ] ).css( \"zIndex\" ), 10 ) || 0;\n\t\t$( group ).each( function( i ) {\n\t\t\t$( this ).css( \"zIndex\", min + i );\n\t\t} );\n\t\tthis.css( \"zIndex\", ( min + group.length ) );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"zIndex\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"zIndex\" ) ) {\n\t\t\to._zIndex = t.css( \"zIndex\" );\n\t\t}\n\t\tt.css( \"zIndex\", o.zIndex );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\n\t\tif ( o._zIndex ) {\n\t\t\t$( ui.helper ).css( \"zIndex\", o._zIndex );\n\t\t}\n\t}\n} );\n\nvar widgetsDraggable = $.ui.draggable;\n\n\n/*!\n * jQuery UI Resizable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Resizable\n//>>group: Interactions\n//>>description: Enables resize functionality for any element.\n//>>docs: http://api.jqueryui.com/resizable/\n//>>demos: http://jqueryui.com/resizable/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/resizable.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.resizable\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tclasses: {\n\t\t\t\"ui-resizable-se\": \"ui-icon ui-icon-gripsmall-diagonal-se\"\n\t\t},\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\n\t\t// See #7960\n\t\tzIndex: 90,\n\n\t\t// Callbacks\n\t\tresize: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_num: function( value ) {\n\t\treturn parseFloat( value ) || 0;\n\t},\n\n\t_isNumber: function( value ) {\n\t\treturn !isNaN( parseFloat( value ) );\n\t},\n\n\t_hasScroll: function( el, a ) {\n\n\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\thas = false;\n\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\tel[ scroll ] = 1;\n\t\thas = ( el[ scroll ] > 0 );\n\t\tel[ scroll ] = 0;\n\t\treturn has;\n\t},\n\n\t_create: function() {\n\n\t\tvar margins,\n\t\t\to = this.options,\n\t\t\tthat = this;\n\t\tthis._addClass( \"ui-resizable\" );\n\n\t\t$.extend( this, {\n\t\t\t_aspectRatio: !!( o.aspectRatio ),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t} );\n\n\t\t// Wrap the element if it cannot hold child nodes\n\t\tif ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {\n\n\t\t\tthis.element.wrap(\n\t\t\t\t$( \"<div class='ui-wrapper' style='overflow: hidden;'></div>\" ).css( {\n\t\t\t\t\tposition: this.element.css( \"position\" ),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css( \"top\" ),\n\t\t\t\t\tleft: this.element.css( \"left\" )\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"ui-resizable\", this.element.resizable( \"instance\" )\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\tmargins = {\n\t\t\t\tmarginTop: this.originalElement.css( \"marginTop\" ),\n\t\t\t\tmarginRight: this.originalElement.css( \"marginRight\" ),\n\t\t\t\tmarginBottom: this.originalElement.css( \"marginBottom\" ),\n\t\t\t\tmarginLeft: this.originalElement.css( \"marginLeft\" )\n\t\t\t};\n\n\t\t\tthis.element.css( margins );\n\t\t\tthis.originalElement.css( \"margin\", 0 );\n\n\t\t\t// support: Safari\n\t\t\t// Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css( \"resize\" );\n\t\t\tthis.originalElement.css( \"resize\", \"none\" );\n\n\t\t\tthis._proportionallyResizeElements.push( this.originalElement.css( {\n\t\t\t\tposition: \"static\",\n\t\t\t\tzoom: 1,\n\t\t\t\tdisplay: \"block\"\n\t\t\t} ) );\n\n\t\t\t// Support: IE9\n\t\t\t// avoid IE jump (hard set the margin)\n\t\t\tthis.originalElement.css( margins );\n\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tthis._setupHandles();\n\n\t\tif ( o.autoHide ) {\n\t\t\t$( this.element )\n\t\t\t\t.on( \"mouseenter\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthat._removeClass( \"ui-resizable-autohide\" );\n\t\t\t\t\tthat._handles.show();\n\t\t\t\t} )\n\t\t\t\t.on( \"mouseleave\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( !that.resizing ) {\n\t\t\t\t\t\tthat._addClass( \"ui-resizable-autohide\" );\n\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\n\t\tthis._mouseInit();\n\t},\n\n\t_destroy: function() {\n\n\t\tthis._mouseDestroy();\n\n\t\tvar wrapper,\n\t\t\t_destroy = function( exp ) {\n\t\t\t\t$( exp )\n\t\t\t\t\t.removeData( \"resizable\" )\n\t\t\t\t\t.removeData( \"ui-resizable\" )\n\t\t\t\t\t.off( \".resizable\" )\n\t\t\t\t\t.find( \".ui-resizable-handle\" )\n\t\t\t\t\t\t.remove();\n\t\t\t};\n\n\t\t// TODO: Unwrap at same DOM position\n\t\tif ( this.elementIsWrapper ) {\n\t\t\t_destroy( this.element );\n\t\t\twrapper = this.element;\n\t\t\tthis.originalElement.css( {\n\t\t\t\tposition: wrapper.css( \"position\" ),\n\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\ttop: wrapper.css( \"top\" ),\n\t\t\t\tleft: wrapper.css( \"left\" )\n\t\t\t} ).insertAfter( wrapper );\n\t\t\twrapper.remove();\n\t\t}\n\n\t\tthis.originalElement.css( \"resize\", this.originalResizeStyle );\n\t\t_destroy( this.originalElement );\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tswitch ( key ) {\n\t\tcase \"handles\":\n\t\t\tthis._removeHandles();\n\t\t\tthis._setupHandles();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t},\n\n\t_setupHandles: function() {\n\t\tvar o = this.options, handle, i, n, hname, axis, that = this;\n\t\tthis.handles = o.handles ||\n\t\t\t( !$( \".ui-resizable-handle\", this.element ).length ?\n\t\t\t\t\"e,s,se\" : {\n\t\t\t\t\tn: \".ui-resizable-n\",\n\t\t\t\t\te: \".ui-resizable-e\",\n\t\t\t\t\ts: \".ui-resizable-s\",\n\t\t\t\t\tw: \".ui-resizable-w\",\n\t\t\t\t\tse: \".ui-resizable-se\",\n\t\t\t\t\tsw: \".ui-resizable-sw\",\n\t\t\t\t\tne: \".ui-resizable-ne\",\n\t\t\t\t\tnw: \".ui-resizable-nw\"\n\t\t\t\t} );\n\n\t\tthis._handles = $();\n\t\tif ( this.handles.constructor === String ) {\n\n\t\t\tif ( this.handles === \"all\" ) {\n\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t}\n\n\t\t\tn = this.handles.split( \",\" );\n\t\t\tthis.handles = {};\n\n\t\t\tfor ( i = 0; i < n.length; i++ ) {\n\n\t\t\t\thandle = $.trim( n[ i ] );\n\t\t\t\thname = \"ui-resizable-\" + handle;\n\t\t\t\taxis = $( \"<div>\" );\n\t\t\t\tthis._addClass( axis, \"ui-resizable-handle \" + hname );\n\n\t\t\t\taxis.css( { zIndex: o.zIndex } );\n\n\t\t\t\tthis.handles[ handle ] = \".ui-resizable-\" + handle;\n\t\t\t\tthis.element.append( axis );\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function( target ) {\n\n\t\t\tvar i, axis, padPos, padWrapper;\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor ( i in this.handles ) {\n\n\t\t\t\tif ( this.handles[ i ].constructor === String ) {\n\t\t\t\t\tthis.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();\n\t\t\t\t} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {\n\t\t\t\t\tthis.handles[ i ] = $( this.handles[ i ] );\n\t\t\t\t\tthis._on( this.handles[ i ], { \"mousedown\": that._mouseDown } );\n\t\t\t\t}\n\n\t\t\t\tif ( this.elementIsWrapper &&\n\t\t\t\t\t\tthis.originalElement[ 0 ]\n\t\t\t\t\t\t\t.nodeName\n\t\t\t\t\t\t\t.match( /^(textarea|input|select|button)$/i ) ) {\n\t\t\t\t\taxis = $( this.handles[ i ], this.element );\n\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test( i ) ?\n\t\t\t\t\t\taxis.outerHeight() :\n\t\t\t\t\t\taxis.outerWidth();\n\n\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t/ne|nw|n/.test( i ) ? \"Top\" :\n\t\t\t\t\t\t/se|sw|s/.test( i ) ? \"Bottom\" :\n\t\t\t\t\t\t/^e$/.test( i ) ? \"Right\" : \"Left\" ].join( \"\" );\n\n\t\t\t\t\ttarget.css( padPos, padWrapper );\n\n\t\t\t\t\tthis._proportionallyResize();\n\t\t\t\t}\n\n\t\t\t\tthis._handles = this._handles.add( this.handles[ i ] );\n\t\t\t}\n\t\t};\n\n\t\t// TODO: make renderAxis a prototype function\n\t\tthis._renderAxis( this.element );\n\n\t\tthis._handles = this._handles.add( this.element.find( \".ui-resizable-handle\" ) );\n\t\tthis._handles.disableSelection();\n\n\t\tthis._handles.on( \"mouseover\", function() {\n\t\t\tif ( !that.resizing ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\taxis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );\n\t\t\t\t}\n\t\t\t\tthat.axis = axis && axis[ 1 ] ? axis[ 1 ] : \"se\";\n\t\t\t}\n\t\t} );\n\n\t\tif ( o.autoHide ) {\n\t\t\tthis._handles.hide();\n\t\t\tthis._addClass( \"ui-resizable-autohide\" );\n\t\t}\n\t},\n\n\t_removeHandles: function() {\n\t\tthis._handles.remove();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar i, handle,\n\t\t\tcapture = false;\n\n\t\tfor ( i in this.handles ) {\n\t\t\thandle = $( this.handles[ i ] )[ 0 ];\n\t\t\tif ( handle === event.target || $.contains( handle, event.target ) ) {\n\t\t\t\tcapture = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && capture;\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar curleft, curtop, cursor,\n\t\t\to = this.options,\n\t\t\tel = this.element;\n\n\t\tthis.resizing = true;\n\n\t\tthis._renderProxy();\n\n\t\tcurleft = this._num( this.helper.css( \"left\" ) );\n\t\tcurtop = this._num( this.helper.css( \"top\" ) );\n\n\t\tif ( o.containment ) {\n\t\t\tcurleft += $( o.containment ).scrollLeft() || 0;\n\t\t\tcurtop += $( o.containment ).scrollTop() || 0;\n\t\t}\n\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\n\t\tthis.size = this._helper ? {\n\t\t\t\twidth: this.helper.width(),\n\t\t\t\theight: this.helper.height()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.originalSize = this._helper ? {\n\t\t\t\twidth: el.outerWidth(),\n\t\t\t\theight: el.outerHeight()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.sizeDiff = {\n\t\t\twidth: el.outerWidth() - el.width(),\n\t\t\theight: el.outerHeight() - el.height()\n\t\t};\n\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\tthis.aspectRatio = ( typeof o.aspectRatio === \"number\" ) ?\n\t\t\to.aspectRatio :\n\t\t\t( ( this.originalSize.width / this.originalSize.height ) || 1 );\n\n\t\tcursor = $( \".ui-resizable-\" + this.axis ).css( \"cursor\" );\n\t\t$( \"body\" ).css( \"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor );\n\n\t\tthis._addClass( \"ui-resizable-resizing\" );\n\t\tthis._propagate( \"start\", event );\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\n\t\tvar data, props,\n\t\t\tsmp = this.originalMousePosition,\n\t\t\ta = this.axis,\n\t\t\tdx = ( event.pageX - smp.left ) || 0,\n\t\t\tdy = ( event.pageY - smp.top ) || 0,\n\t\t\ttrigger = this._change[ a ];\n\n\t\tthis._updatePrevProperties();\n\n\t\tif ( !trigger ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdata = trigger.apply( this, [ event, dx, dy ] );\n\n\t\tthis._updateVirtualBoundaries( event.shiftKey );\n\t\tif ( this._aspectRatio || event.shiftKey ) {\n\t\t\tdata = this._updateRatio( data, event );\n\t\t}\n\n\t\tdata = this._respectSize( data, event );\n\n\t\tthis._updateCache( data );\n\n\t\tthis._propagate( \"resize\", event );\n\n\t\tprops = this._applyChanges();\n\n\t\tif ( !this._helper && this._proportionallyResizeElements.length ) {\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tif ( !$.isEmptyObject( props ) ) {\n\t\t\tthis._updatePrevProperties();\n\t\t\tthis._trigger( \"resize\", event, this.ui() );\n\t\t\tthis._applyChanges();\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\tthis.resizing = false;\n\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\to = this.options, that = this;\n\n\t\tif ( this._helper ) {\n\n\t\t\tpr = this._proportionallyResizeElements;\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );\n\t\t\tsoffseth = ista && this._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height;\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\n\t\t\ts = {\n\t\t\t\twidth: ( that.helper.width() - soffsetw ),\n\t\t\t\theight: ( that.helper.height() - soffseth )\n\t\t\t};\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null;\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\t\tif ( !o.animate ) {\n\t\t\t\tthis.element.css( $.extend( s, { top: top, left: left } ) );\n\t\t\t}\n\n\t\t\tthat.helper.height( that.size.height );\n\t\t\tthat.helper.width( that.size.width );\n\n\t\t\tif ( this._helper && !o.animate ) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\t}\n\n\t\t$( \"body\" ).css( \"cursor\", \"auto\" );\n\n\t\tthis._removeClass( \"ui-resizable-resizing\" );\n\n\t\tthis._propagate( \"stop\", event );\n\n\t\tif ( this._helper ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\t_updatePrevProperties: function() {\n\t\tthis.prevPosition = {\n\t\t\ttop: this.position.top,\n\t\t\tleft: this.position.left\n\t\t};\n\t\tthis.prevSize = {\n\t\t\twidth: this.size.width,\n\t\t\theight: this.size.height\n\t\t};\n\t},\n\n\t_applyChanges: function() {\n\t\tvar props = {};\n\n\t\tif ( this.position.top !== this.prevPosition.top ) {\n\t\t\tprops.top = this.position.top + \"px\";\n\t\t}\n\t\tif ( this.position.left !== this.prevPosition.left ) {\n\t\t\tprops.left = this.position.left + \"px\";\n\t\t}\n\t\tif ( this.size.width !== this.prevSize.width ) {\n\t\t\tprops.width = this.size.width + \"px\";\n\t\t}\n\t\tif ( this.size.height !== this.prevSize.height ) {\n\t\t\tprops.height = this.size.height + \"px\";\n\t\t}\n\n\t\tthis.helper.css( props );\n\n\t\treturn props;\n\t},\n\n\t_updateVirtualBoundaries: function( forceAspectRatio ) {\n\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\to = this.options;\n\n\t\tb = {\n\t\t\tminWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,\n\t\t\tmaxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,\n\t\t\tminHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,\n\t\t\tmaxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity\n\t\t};\n\n\t\tif ( this._aspectRatio || forceAspectRatio ) {\n\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\n\t\t\tif ( pMinWidth > b.minWidth ) {\n\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t}\n\t\t\tif ( pMinHeight > b.minHeight ) {\n\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t}\n\t\t\tif ( pMaxWidth < b.maxWidth ) {\n\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t}\n\t\t\tif ( pMaxHeight < b.maxHeight ) {\n\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t}\n\t\t}\n\t\tthis._vBoundaries = b;\n\t},\n\n\t_updateCache: function( data ) {\n\t\tthis.offset = this.helper.offset();\n\t\tif ( this._isNumber( data.left ) ) {\n\t\t\tthis.position.left = data.left;\n\t\t}\n\t\tif ( this._isNumber( data.top ) ) {\n\t\t\tthis.position.top = data.top;\n\t\t}\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tthis.size.height = data.height;\n\t\t}\n\t\tif ( this._isNumber( data.width ) ) {\n\t\t\tthis.size.width = data.width;\n\t\t}\n\t},\n\n\t_updateRatio: function( data ) {\n\n\t\tvar cpos = this.position,\n\t\t\tcsize = this.size,\n\t\t\ta = this.axis;\n\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tdata.width = ( data.height * this.aspectRatio );\n\t\t} else if ( this._isNumber( data.width ) ) {\n\t\t\tdata.height = ( data.width / this.aspectRatio );\n\t\t}\n\n\t\tif ( a === \"sw\" ) {\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t\tdata.top = null;\n\t\t}\n\t\tif ( a === \"nw\" ) {\n\t\t\tdata.top = cpos.top + ( csize.height - data.height );\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function( data ) {\n\n\t\tvar o = this._vBoundaries,\n\t\t\ta = this.axis,\n\t\t\tismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),\n\t\t\tismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),\n\t\t\tisminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),\n\t\t\tisminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),\n\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\tdh = this.originalPosition.top + this.originalSize.height,\n\t\t\tcw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );\n\t\tif ( isminw ) {\n\t\t\tdata.width = o.minWidth;\n\t\t}\n\t\tif ( isminh ) {\n\t\t\tdata.height = o.minHeight;\n\t\t}\n\t\tif ( ismaxw ) {\n\t\t\tdata.width = o.maxWidth;\n\t\t}\n\t\tif ( ismaxh ) {\n\t\t\tdata.height = o.maxHeight;\n\t\t}\n\n\t\tif ( isminw && cw ) {\n\t\t\tdata.left = dw - o.minWidth;\n\t\t}\n\t\tif ( ismaxw && cw ) {\n\t\t\tdata.left = dw - o.maxWidth;\n\t\t}\n\t\tif ( isminh && ch ) {\n\t\t\tdata.top = dh - o.minHeight;\n\t\t}\n\t\tif ( ismaxh && ch ) {\n\t\t\tdata.top = dh - o.maxHeight;\n\t\t}\n\n\t\t// Fixing jump error on top/left - bug #2330\n\t\tif ( !data.width && !data.height && !data.left && data.top ) {\n\t\t\tdata.top = null;\n\t\t} else if ( !data.width && !data.height && !data.top && data.left ) {\n\t\t\tdata.left = null;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_getPaddingPlusBorderDimensions: function( element ) {\n\t\tvar i = 0,\n\t\t\twidths = [],\n\t\t\tborders = [\n\t\t\t\telement.css( \"borderTopWidth\" ),\n\t\t\t\telement.css( \"borderRightWidth\" ),\n\t\t\t\telement.css( \"borderBottomWidth\" ),\n\t\t\t\telement.css( \"borderLeftWidth\" )\n\t\t\t],\n\t\t\tpaddings = [\n\t\t\t\telement.css( \"paddingTop\" ),\n\t\t\t\telement.css( \"paddingRight\" ),\n\t\t\t\telement.css( \"paddingBottom\" ),\n\t\t\t\telement.css( \"paddingLeft\" )\n\t\t\t];\n\n\t\tfor ( ; i < 4; i++ ) {\n\t\t\twidths[ i ] = ( parseFloat( borders[ i ] ) || 0 );\n\t\t\twidths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );\n\t\t}\n\n\t\treturn {\n\t\t\theight: widths[ 0 ] + widths[ 2 ],\n\t\t\twidth: widths[ 1 ] + widths[ 3 ]\n\t\t};\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tif ( !this._proportionallyResizeElements.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar prel,\n\t\t\ti = 0,\n\t\t\telement = this.helper || this.element;\n\n\t\tfor ( ; i < this._proportionallyResizeElements.length; i++ ) {\n\n\t\t\tprel = this._proportionallyResizeElements[ i ];\n\n\t\t\t// TODO: Seems like a bug to cache this.outerDimensions\n\t\t\t// considering that we are in a loop.\n\t\t\tif ( !this.outerDimensions ) {\n\t\t\t\tthis.outerDimensions = this._getPaddingPlusBorderDimensions( prel );\n\t\t\t}\n\n\t\t\tprel.css( {\n\t\t\t\theight: ( element.height() - this.outerDimensions.height ) || 0,\n\t\t\t\twidth: ( element.width() - this.outerDimensions.width ) || 0\n\t\t\t} );\n\n\t\t}\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif ( this._helper ) {\n\n\t\t\tthis.helper = this.helper || $( \"<div style='overflow:hidden;'></div>\" );\n\n\t\t\tthis._addClass( this.helper, this._helper );\n\t\t\tthis.helper.css( {\n\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: this.elementOffset.left + \"px\",\n\t\t\t\ttop: this.elementOffset.top + \"px\",\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t} );\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function( event, dx ) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function( event, dx ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function( event, dx, dy ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function( event, dx, dy ) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tsw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tne: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tnw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t}\n\t},\n\n\t_propagate: function( n, event ) {\n\t\t$.ui.plugin.call( this, n, [ event, this.ui() ] );\n\t\t( n !== \"resize\" && this._trigger( n, event, this.ui() ) );\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n} );\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add( \"resizable\", \"animate\", {\n\n\tstop: function( event ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tpr = that._proportionallyResizeElements,\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),\n\t\t\tsoffseth = ista && that._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height,\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\tstyle = {\n\t\t\t\twidth: ( that.size.width - soffsetw ),\n\t\t\t\theight: ( that.size.height - soffseth )\n\t\t\t},\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null,\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\tthat.element.animate(\n\t\t\t$.extend( style, top && left ? { top: top, left: left } : {} ), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseFloat( that.element.css( \"width\" ) ),\n\t\t\t\t\t\theight: parseFloat( that.element.css( \"height\" ) ),\n\t\t\t\t\t\ttop: parseFloat( that.element.css( \"top\" ) ),\n\t\t\t\t\t\tleft: parseFloat( that.element.css( \"left\" ) )\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( pr && pr.length ) {\n\t\t\t\t\t\t$( pr[ 0 ] ).css( { width: data.width, height: data.height } );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Propagating resize, and updating values for each animation step\n\t\t\t\t\tthat._updateCache( data );\n\t\t\t\t\tthat._propagate( \"resize\", event );\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"containment\", {\n\n\tstart: function() {\n\t\tvar element, p, co, ch, cw, width, height,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tel = that.element,\n\t\t\toc = o.containment,\n\t\t\tce = ( oc instanceof $ ) ?\n\t\t\t\toc.get( 0 ) :\n\t\t\t\t( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthat.containerElement = $( ce );\n\n\t\tif ( /document/.test( oc ) || oc === document ) {\n\t\t\tthat.containerOffset = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\t\t\tthat.containerPosition = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: $( document ),\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\twidth: $( document ).width(),\n\t\t\t\theight: $( document ).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t} else {\n\t\t\telement = $( ce );\n\t\t\tp = [];\n\t\t\t$( [ \"Top\", \"Right\", \"Left\", \"Bottom\" ] ).each( function( i, name ) {\n\t\t\t\tp[ i ] = that._num( element.css( \"padding\" + name ) );\n\t\t\t} );\n\n\t\t\tthat.containerOffset = element.offset();\n\t\t\tthat.containerPosition = element.position();\n\t\t\tthat.containerSize = {\n\t\t\t\theight: ( element.innerHeight() - p[ 3 ] ),\n\t\t\t\twidth: ( element.innerWidth() - p[ 1 ] )\n\t\t\t};\n\n\t\t\tco = that.containerOffset;\n\t\t\tch = that.containerSize.height;\n\t\t\tcw = that.containerSize.width;\n\t\t\twidth = ( that._hasScroll ( ce, \"left\" ) ? ce.scrollWidth : cw );\n\t\t\theight = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: ce,\n\t\t\t\tleft: co.left,\n\t\t\t\ttop: co.top,\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function( event ) {\n\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcp = that.position,\n\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\tcop = {\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0\n\t\t\t},\n\t\t\tce = that.containerElement,\n\t\t\tcontinueResize = true;\n\n\t\tif ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\tcop = co;\n\t\t}\n\n\t\tif ( cp.left < ( that._helper ? co.left : 0 ) ) {\n\t\t\tthat.size.width = that.size.width +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.left - co.left ) :\n\t\t\t\t\t( that.position.left - cop.left ) );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif ( cp.top < ( that._helper ? co.top : 0 ) ) {\n\t\t\tthat.size.height = that.size.height +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.top - co.top ) :\n\t\t\t\t\tthat.position.top );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t}\n\n\t\tisParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );\n\t\tisOffsetRelative = /relative|absolute/.test( that.containerElement.css( \"position\" ) );\n\n\t\tif ( isParent && isOffsetRelative ) {\n\t\t\tthat.offset.left = that.parentData.left + that.position.left;\n\t\t\tthat.offset.top = that.parentData.top + that.position.top;\n\t\t} else {\n\t\t\tthat.offset.left = that.element.offset().left;\n\t\t\tthat.offset.top = that.element.offset().top;\n\t\t}\n\n\t\twoset = Math.abs( that.sizeDiff.width +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.left - cop.left :\n\t\t\t\t( that.offset.left - co.left ) ) );\n\n\t\thoset = Math.abs( that.sizeDiff.height +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.top - cop.top :\n\t\t\t\t( that.offset.top - co.top ) ) );\n\n\t\tif ( woset + that.size.width >= that.parentData.width ) {\n\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( hoset + that.size.height >= that.parentData.height ) {\n\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( !continueResize ) {\n\t\t\tthat.position.left = that.prevPosition.left;\n\t\t\tthat.position.top = that.prevPosition.top;\n\t\t\tthat.size.width = that.prevSize.width;\n\t\t\tthat.size.height = that.prevSize.height;\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcop = that.containerPosition,\n\t\t\tce = that.containerElement,\n\t\t\thelper = $( that.helper ),\n\t\t\tho = helper.offset(),\n\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\n\t\tif ( that._helper && !o.animate && ( /relative/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\n\t\tif ( that._helper && !o.animate && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"alsoResize\", {\n\n\tstart: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options;\n\n\t\t$( o.alsoResize ).each( function() {\n\t\t\tvar el = $( this );\n\t\t\tel.data( \"ui-resizable-alsoresize\", {\n\t\t\t\twidth: parseFloat( el.width() ), height: parseFloat( el.height() ),\n\t\t\t\tleft: parseFloat( el.css( \"left\" ) ), top: parseFloat( el.css( \"top\" ) )\n\t\t\t} );\n\t\t} );\n\t},\n\n\tresize: function( event, ui ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\tdelta = {\n\t\t\t\theight: ( that.size.height - os.height ) || 0,\n\t\t\t\twidth: ( that.size.width - os.width ) || 0,\n\t\t\t\ttop: ( that.position.top - op.top ) || 0,\n\t\t\t\tleft: ( that.position.left - op.left ) || 0\n\t\t\t};\n\n\t\t\t$( o.alsoResize ).each( function() {\n\t\t\t\tvar el = $( this ), start = $( this ).data( \"ui-resizable-alsoresize\" ), style = {},\n\t\t\t\t\tcss = el.parents( ui.originalElement[ 0 ] ).length ?\n\t\t\t\t\t\t\t[ \"width\", \"height\" ] :\n\t\t\t\t\t\t\t[ \"width\", \"height\", \"top\", \"left\" ];\n\n\t\t\t\t$.each( css, function( i, prop ) {\n\t\t\t\t\tvar sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );\n\t\t\t\t\tif ( sum && sum >= 0 ) {\n\t\t\t\t\t\tstyle[ prop ] = sum || null;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tel.css( style );\n\t\t\t} );\n\t},\n\n\tstop: function() {\n\t\t$( this ).removeData( \"ui-resizable-alsoresize\" );\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"ghost\", {\n\n\tstart: function() {\n\n\t\tvar that = $( this ).resizable( \"instance\" ), cs = that.size;\n\n\t\tthat.ghost = that.originalElement.clone();\n\t\tthat.ghost.css( {\n\t\t\topacity: 0.25,\n\t\t\tdisplay: \"block\",\n\t\t\tposition: \"relative\",\n\t\t\theight: cs.height,\n\t\t\twidth: cs.width,\n\t\t\tmargin: 0,\n\t\t\tleft: 0,\n\t\t\ttop: 0\n\t\t} );\n\n\t\tthat._addClass( that.ghost, \"ui-resizable-ghost\" );\n\n\t\t// DEPRECATED\n\t\t// TODO: remove after 1.12\n\t\tif ( $.uiBackCompat !== false && typeof that.options.ghost === \"string\" ) {\n\n\t\t\t// Ghost option\n\t\t\tthat.ghost.addClass( this.options.ghost );\n\t\t}\n\n\t\tthat.ghost.appendTo( that.helper );\n\n\t},\n\n\tresize: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost ) {\n\t\t\tthat.ghost.css( {\n\t\t\t\tposition: \"relative\",\n\t\t\t\theight: that.size.height,\n\t\t\t\twidth: that.size.width\n\t\t\t} );\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost && that.helper ) {\n\t\t\tthat.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );\n\t\t}\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"grid\", {\n\n\tresize: function() {\n\t\tvar outerDimensions,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tcs = that.size,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\ta = that.axis,\n\t\t\tgrid = typeof o.grid === \"number\" ? [ o.grid, o.grid ] : o.grid,\n\t\t\tgridX = ( grid[ 0 ] || 1 ),\n\t\t\tgridY = ( grid[ 1 ] || 1 ),\n\t\t\tox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,\n\t\t\toy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,\n\t\t\tnewWidth = os.width + ox,\n\t\t\tnewHeight = os.height + oy,\n\t\t\tisMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),\n\t\t\tisMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),\n\t\t\tisMinWidth = o.minWidth && ( o.minWidth > newWidth ),\n\t\t\tisMinHeight = o.minHeight && ( o.minHeight > newHeight );\n\n\t\to.grid = grid;\n\n\t\tif ( isMinWidth ) {\n\t\t\tnewWidth += gridX;\n\t\t}\n\t\tif ( isMinHeight ) {\n\t\t\tnewHeight += gridY;\n\t\t}\n\t\tif ( isMaxWidth ) {\n\t\t\tnewWidth -= gridX;\n\t\t}\n\t\tif ( isMaxHeight ) {\n\t\t\tnewHeight -= gridY;\n\t\t}\n\n\t\tif ( /^(se|s|e)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t} else if ( /^(ne)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t} else if ( /^(sw)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.left = op.left - ox;\n\t\t} else {\n\t\t\tif ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {\n\t\t\t\touterDimensions = that._getPaddingPlusBorderDimensions( this );\n\t\t\t}\n\n\t\t\tif ( newHeight - gridY > 0 ) {\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top - oy;\n\t\t\t} else {\n\t\t\t\tnewHeight = gridY - outerDimensions.height;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top + os.height - newHeight;\n\t\t\t}\n\t\t\tif ( newWidth - gridX > 0 ) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left - ox;\n\t\t\t} else {\n\t\t\t\tnewWidth = gridX - outerDimensions.width;\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left + os.width - newWidth;\n\t\t\t}\n\t\t}\n\t}\n\n} );\n\nvar widgetsResizable = $.ui.resizable;\n\n\n/*!\n * jQuery UI Controlgroup 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Controlgroup\n//>>group: Widgets\n//>>description: Visually groups form control widgets\n//>>docs: http://api.jqueryui.com/controlgroup/\n//>>demos: http://jqueryui.com/controlgroup/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/controlgroup.css\n//>>css.theme: ../../themes/base/theme.css\n\n\nvar controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;\n\nvar widgetsControlgroup = $.widget( \"ui.controlgroup\", {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<div>\",\n\toptions: {\n\t\tdirection: \"horizontal\",\n\t\tdisabled: null,\n\t\tonlyVisible: true,\n\t\titems: {\n\t\t\t\"button\": \"input[type=button], input[type=submit], input[type=reset], button, a\",\n\t\t\t\"controlgroupLabel\": \".ui-controlgroup-label\",\n\t\t\t\"checkboxradio\": \"input[type='checkbox'], input[type='radio']\",\n\t\t\t\"selectmenu\": \"select\",\n\t\t\t\"spinner\": \".ui-spinner-input\"\n\t\t}\n\t},\n\n\t_create: function() {\n\t\tthis._enhance();\n\t},\n\n\t// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation\n\t_enhance: function() {\n\t\tthis.element.attr( \"role\", \"toolbar\" );\n\t\tthis.refresh();\n\t},\n\n\t_destroy: function() {\n\t\tthis._callChildMethod( \"destroy\" );\n\t\tthis.childWidgets.removeData( \"ui-controlgroup-data\" );\n\t\tthis.element.removeAttr( \"role\" );\n\t\tif ( this.options.items.controlgroupLabel ) {\n\t\t\tthis.element\n\t\t\t\t.find( this.options.items.controlgroupLabel )\n\t\t\t\t.find( \".ui-controlgroup-label-contents\" )\n\t\t\t\t.contents().unwrap();\n\t\t}\n\t},\n\n\t_initWidgets: function() {\n\t\tvar that = this,\n\t\t\tchildWidgets = [];\n\n\t\t// First we iterate over each of the items options\n\t\t$.each( this.options.items, function( widget, selector ) {\n\t\t\tvar labels;\n\t\t\tvar options = {};\n\n\t\t\t// Make sure the widget has a selector set\n\t\t\tif ( !selector ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( widget === \"controlgroupLabel\" ) {\n\t\t\t\tlabels = that.element.find( selector );\n\t\t\t\tlabels.each( function() {\n\t\t\t\t\tvar element = $( this );\n\n\t\t\t\t\tif ( element.children( \".ui-controlgroup-label-contents\" ).length ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telement.contents()\n\t\t\t\t\t\t.wrapAll( \"<span class='ui-controlgroup-label-contents'></span>\" );\n\t\t\t\t} );\n\t\t\t\tthat._addClass( labels, null, \"ui-widget ui-widget-content ui-state-default\" );\n\t\t\t\tchildWidgets = childWidgets.concat( labels.get() );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure the widget actually exists\n\t\t\tif ( !$.fn[ widget ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We assume everything is in the middle to start because we can't determine\n\t\t\t// first / last elements until all enhancments are done.\n\t\t\tif ( that[ \"_\" + widget + \"Options\" ] ) {\n\t\t\t\toptions = that[ \"_\" + widget + \"Options\" ]( \"middle\" );\n\t\t\t} else {\n\t\t\t\toptions = { classes: {} };\n\t\t\t}\n\n\t\t\t// Find instances of this widget inside controlgroup and init them\n\t\t\tthat.element\n\t\t\t\t.find( selector )\n\t\t\t\t.each( function() {\n\t\t\t\t\tvar element = $( this );\n\t\t\t\t\tvar instance = element[ widget ]( \"instance\" );\n\n\t\t\t\t\t// We need to clone the default options for this type of widget to avoid\n\t\t\t\t\t// polluting the variable options which has a wider scope than a single widget.\n\t\t\t\t\tvar instanceOptions = $.widget.extend( {}, options );\n\n\t\t\t\t\t// If the button is the child of a spinner ignore it\n\t\t\t\t\t// TODO: Find a more generic solution\n\t\t\t\t\tif ( widget === \"button\" && element.parent( \".ui-spinner\" ).length ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create the widget if it doesn't exist\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\tinstance = element[ widget ]()[ widget ]( \"instance\" );\n\t\t\t\t\t}\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstanceOptions.classes =\n\t\t\t\t\t\t\tthat._resolveClassesValues( instanceOptions.classes, instance );\n\t\t\t\t\t}\n\t\t\t\t\telement[ widget ]( instanceOptions );\n\n\t\t\t\t\t// Store an instance of the controlgroup to be able to reference\n\t\t\t\t\t// from the outermost element for changing options and refresh\n\t\t\t\t\tvar widgetElement = element[ widget ]( \"widget\" );\n\t\t\t\t\t$.data( widgetElement[ 0 ], \"ui-controlgroup-data\",\n\t\t\t\t\t\tinstance ? instance : element[ widget ]( \"instance\" ) );\n\n\t\t\t\t\tchildWidgets.push( widgetElement[ 0 ] );\n\t\t\t\t} );\n\t\t} );\n\n\t\tthis.childWidgets = $( $.unique( childWidgets ) );\n\t\tthis._addClass( this.childWidgets, \"ui-controlgroup-item\" );\n\t},\n\n\t_callChildMethod: function( method ) {\n\t\tthis.childWidgets.each( function() {\n\t\t\tvar element = $( this ),\n\t\t\t\tdata = element.data( \"ui-controlgroup-data\" );\n\t\t\tif ( data && data[ method ] ) {\n\t\t\t\tdata[ method ]();\n\t\t\t}\n\t\t} );\n\t},\n\n\t_updateCornerClass: function( element, position ) {\n\t\tvar remove = \"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all\";\n\t\tvar add = this._buildSimpleOptions( position, \"label\" ).classes.label;\n\n\t\tthis._removeClass( element, null, remove );\n\t\tthis._addClass( element, null, add );\n\t},\n\n\t_buildSimpleOptions: function( position, key ) {\n\t\tvar direction = this.options.direction === \"vertical\";\n\t\tvar result = {\n\t\t\tclasses: {}\n\t\t};\n\t\tresult.classes[ key ] = {\n\t\t\t\"middle\": \"\",\n\t\t\t\"first\": \"ui-corner-\" + ( direction ? \"top\" : \"left\" ),\n\t\t\t\"last\": \"ui-corner-\" + ( direction ? \"bottom\" : \"right\" ),\n\t\t\t\"only\": \"ui-corner-all\"\n\t\t}[ position ];\n\n\t\treturn result;\n\t},\n\n\t_spinnerOptions: function( position ) {\n\t\tvar options = this._buildSimpleOptions( position, \"ui-spinner\" );\n\n\t\toptions.classes[ \"ui-spinner-up\" ] = \"\";\n\t\toptions.classes[ \"ui-spinner-down\" ] = \"\";\n\n\t\treturn options;\n\t},\n\n\t_buttonOptions: function( position ) {\n\t\treturn this._buildSimpleOptions( position, \"ui-button\" );\n\t},\n\n\t_checkboxradioOptions: function( position ) {\n\t\treturn this._buildSimpleOptions( position, \"ui-checkboxradio-label\" );\n\t},\n\n\t_selectmenuOptions: function( position ) {\n\t\tvar direction = this.options.direction === \"vertical\";\n\t\treturn {\n\t\t\twidth: direction ? \"auto\" : false,\n\t\t\tclasses: {\n\t\t\t\tmiddle: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"\"\n\t\t\t\t},\n\t\t\t\tfirst: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"ui-corner-\" + ( direction ? \"top\" : \"tl\" ),\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-\" + ( direction ? \"top\" : \"left\" )\n\t\t\t\t},\n\t\t\t\tlast: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": direction ? \"\" : \"ui-corner-tr\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-\" + ( direction ? \"bottom\" : \"right\" )\n\t\t\t\t},\n\t\t\t\tonly: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"ui-corner-top\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-all\"\n\t\t\t\t}\n\n\t\t\t}[ position ]\n\t\t};\n\t},\n\n\t_resolveClassesValues: function( classes, instance ) {\n\t\tvar result = {};\n\t\t$.each( classes, function( key ) {\n\t\t\tvar current = instance.options.classes[ key ] || \"\";\n\t\t\tcurrent = $.trim( current.replace( controlgroupCornerRegex, \"\" ) );\n\t\t\tresult[ key ] = ( current + \" \" + classes[ key ] ).replace( /\\s+/g, \" \" );\n\t\t} );\n\t\treturn result;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"direction\" ) {\n\t\t\tthis._removeClass( \"ui-controlgroup-\" + this.options.direction );\n\t\t}\n\n\t\tthis._super( key, value );\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._callChildMethod( value ? \"disable\" : \"enable\" );\n\t\t\treturn;\n\t\t}\n\n\t\tthis.refresh();\n\t},\n\n\trefresh: function() {\n\t\tvar children,\n\t\t\tthat = this;\n\n\t\tthis._addClass( \"ui-controlgroup ui-controlgroup-\" + this.options.direction );\n\n\t\tif ( this.options.direction === \"horizontal\" ) {\n\t\t\tthis._addClass( null, \"ui-helper-clearfix\" );\n\t\t}\n\t\tthis._initWidgets();\n\n\t\tchildren = this.childWidgets;\n\n\t\t// We filter here because we need to track all childWidgets not just the visible ones\n\t\tif ( this.options.onlyVisible ) {\n\t\t\tchildren = children.filter( \":visible\" );\n\t\t}\n\n\t\tif ( children.length ) {\n\n\t\t\t// We do this last because we need to make sure all enhancment is done\n\t\t\t// before determining first and last\n\t\t\t$.each( [ \"first\", \"last\" ], function( index, value ) {\n\t\t\t\tvar instance = children[ value ]().data( \"ui-controlgroup-data\" );\n\n\t\t\t\tif ( instance && that[ \"_\" + instance.widgetName + \"Options\" ] ) {\n\t\t\t\t\tvar options = that[ \"_\" + instance.widgetName + \"Options\" ](\n\t\t\t\t\t\tchildren.length === 1 ? \"only\" : value\n\t\t\t\t\t);\n\t\t\t\t\toptions.classes = that._resolveClassesValues( options.classes, instance );\n\t\t\t\t\tinstance.element[ instance.widgetName ]( options );\n\t\t\t\t} else {\n\t\t\t\t\tthat._updateCornerClass( children[ value ](), value );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Finally call the refresh method on each of the child widgets.\n\t\t\tthis._callChildMethod( \"refresh\" );\n\t\t}\n\t}\n} );\n\n/*!\n * jQuery UI Checkboxradio 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Checkboxradio\n//>>group: Widgets\n//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.\n//>>docs: http://api.jqueryui.com/checkboxradio/\n//>>demos: http://jqueryui.com/checkboxradio/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/button.css\n//>>css.structure: ../../themes/base/checkboxradio.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.checkboxradio\", [ $.ui.formResetMixin, {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tdisabled: null,\n\t\tlabel: null,\n\t\ticon: true,\n\t\tclasses: {\n\t\t\t\"ui-checkboxradio-label\": \"ui-corner-all\",\n\t\t\t\"ui-checkboxradio-icon\": \"ui-corner-all\"\n\t\t}\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar disabled, labels;\n\t\tvar that = this;\n\t\tvar options = this._super() || {};\n\n\t\t// We read the type here, because it makes more sense to throw a element type error first,\n\t\t// rather then the error for lack of a label. Often if its the wrong type, it\n\t\t// won't have a label (e.g. calling on a div, btn, etc)\n\t\tthis._readType();\n\n\t\tlabels = this.element.labels();\n\n\t\t// If there are multiple labels, use the last one\n\t\tthis.label = $( labels[ labels.length - 1 ] );\n\t\tif ( !this.label.length ) {\n\t\t\t$.error( \"No label found for checkboxradio widget\" );\n\t\t}\n\n\t\tthis.originalLabel = \"\";\n\n\t\t// We need to get the label text but this may also need to make sure it does not contain the\n\t\t// input itself.\n\t\tthis.label.contents().not( this.element[ 0 ] ).each( function() {\n\n\t\t\t// The label contents could be text, html, or a mix. We concat each element to get a\n\t\t\t// string representation of the label, without the input as part of it.\n\t\t\tthat.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML;\n\t\t} );\n\n\t\t// Set the label option if we found label text\n\t\tif ( this.originalLabel ) {\n\t\t\toptions.label = this.originalLabel;\n\t\t}\n\n\t\tdisabled = this.element[ 0 ].disabled;\n\t\tif ( disabled != null ) {\n\t\t\toptions.disabled = disabled;\n\t\t}\n\t\treturn options;\n\t},\n\n\t_create: function() {\n\t\tvar checked = this.element[ 0 ].checked;\n\n\t\tthis._bindFormResetHandler();\n\n\t\tif ( this.options.disabled == null ) {\n\t\t\tthis.options.disabled = this.element[ 0 ].disabled;\n\t\t}\n\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\t\tthis._addClass( \"ui-checkboxradio\", \"ui-helper-hidden-accessible\" );\n\t\tthis._addClass( this.label, \"ui-checkboxradio-label\", \"ui-button ui-widget\" );\n\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tthis._addClass( this.label, \"ui-checkboxradio-radio-label\" );\n\t\t}\n\n\t\tif ( this.options.label && this.options.label !== this.originalLabel ) {\n\t\t\tthis._updateLabel();\n\t\t} else if ( this.originalLabel ) {\n\t\t\tthis.options.label = this.originalLabel;\n\t\t}\n\n\t\tthis._enhance();\n\n\t\tif ( checked ) {\n\t\t\tthis._addClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\" );\n\t\t\tif ( this.icon ) {\n\t\t\t\tthis._addClass( this.icon, null, \"ui-state-hover\" );\n\t\t\t}\n\t\t}\n\n\t\tthis._on( {\n\t\t\tchange: \"_toggleClasses\",\n\t\t\tfocus: function() {\n\t\t\t\tthis._addClass( this.label, null, \"ui-state-focus ui-visual-focus\" );\n\t\t\t},\n\t\t\tblur: function() {\n\t\t\t\tthis._removeClass( this.label, null, \"ui-state-focus ui-visual-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_readType: function() {\n\t\tvar nodeName = this.element[ 0 ].nodeName.toLowerCase();\n\t\tthis.type = this.element[ 0 ].type;\n\t\tif ( nodeName !== \"input\" || !/radio|checkbox/.test( this.type ) ) {\n\t\t\t$.error( \"Can't create checkboxradio on element.nodeName=\" + nodeName +\n\t\t\t\t\" and element.type=\" + this.type );\n\t\t}\n\t},\n\n\t// Support jQuery Mobile enhanced option\n\t_enhance: function() {\n\t\tthis._updateIcon( this.element[ 0 ].checked );\n\t},\n\n\twidget: function() {\n\t\treturn this.label;\n\t},\n\n\t_getRadioGroup: function() {\n\t\tvar group;\n\t\tvar name = this.element[ 0 ].name;\n\t\tvar nameSelector = \"input[name='\" + $.ui.escapeSelector( name ) + \"']\";\n\n\t\tif ( !name ) {\n\t\t\treturn $( [] );\n\t\t}\n\n\t\tif ( this.form.length ) {\n\t\t\tgroup = $( this.form[ 0 ].elements ).filter( nameSelector );\n\t\t} else {\n\n\t\t\t// Not inside a form, check all inputs that also are not inside a form\n\t\t\tgroup = $( nameSelector ).filter( function() {\n\t\t\t\treturn $( this ).form().length === 0;\n\t\t\t} );\n\t\t}\n\n\t\treturn group.not( this.element );\n\t},\n\n\t_toggleClasses: function() {\n\t\tvar checked = this.element[ 0 ].checked;\n\t\tthis._toggleClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\", checked );\n\n\t\tif ( this.options.icon && this.type === \"checkbox\" ) {\n\t\t\tthis._toggleClass( this.icon, null, \"ui-icon-check ui-state-checked\", checked )\n\t\t\t\t._toggleClass( this.icon, null, \"ui-icon-blank\", !checked );\n\t\t}\n\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tthis._getRadioGroup()\n\t\t\t\t.each( function() {\n\t\t\t\t\tvar instance = $( this ).checkboxradio( \"instance\" );\n\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstance._removeClass( instance.label,\n\t\t\t\t\t\t\t\"ui-checkboxradio-checked\", \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tthis._unbindFormResetHandler();\n\n\t\tif ( this.icon ) {\n\t\t\tthis.icon.remove();\n\t\t\tthis.iconSpace.remove();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\n\t\t// We don't allow the value to be set to nothing\n\t\tif ( key === \"label\" && !value ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._toggleClass( this.label, null, \"ui-state-disabled\", value );\n\t\t\tthis.element[ 0 ].disabled = value;\n\n\t\t\t// Don't refresh when setting disabled\n\t\t\treturn;\n\t\t}\n\t\tthis.refresh();\n\t},\n\n\t_updateIcon: function( checked ) {\n\t\tvar toAdd = \"ui-icon ui-icon-background \";\n\n\t\tif ( this.options.icon ) {\n\t\t\tif ( !this.icon ) {\n\t\t\t\tthis.icon = $( \"<span>\" );\n\t\t\t\tthis.iconSpace = $( \"<span> </span>\" );\n\t\t\t\tthis._addClass( this.iconSpace, \"ui-checkboxradio-icon-space\" );\n\t\t\t}\n\n\t\t\tif ( this.type === \"checkbox\" ) {\n\t\t\t\ttoAdd += checked ? \"ui-icon-check ui-state-checked\" : \"ui-icon-blank\";\n\t\t\t\tthis._removeClass( this.icon, null, checked ? \"ui-icon-blank\" : \"ui-icon-check\" );\n\t\t\t} else {\n\t\t\t\ttoAdd += \"ui-icon-blank\";\n\t\t\t}\n\t\t\tthis._addClass( this.icon, \"ui-checkboxradio-icon\", toAdd );\n\t\t\tif ( !checked ) {\n\t\t\t\tthis._removeClass( this.icon, null, \"ui-icon-check ui-state-checked\" );\n\t\t\t}\n\t\t\tthis.icon.prependTo( this.label ).after( this.iconSpace );\n\t\t} else if ( this.icon !== undefined ) {\n\t\t\tthis.icon.remove();\n\t\t\tthis.iconSpace.remove();\n\t\t\tdelete this.icon;\n\t\t}\n\t},\n\n\t_updateLabel: function() {\n\n\t\t// Remove the contents of the label ( minus the icon, icon space, and input )\n\t\tvar contents = this.label.contents().not( this.element[ 0 ] );\n\t\tif ( this.icon ) {\n\t\t\tcontents = contents.not( this.icon[ 0 ] );\n\t\t}\n\t\tif ( this.iconSpace ) {\n\t\t\tcontents = contents.not( this.iconSpace[ 0 ] );\n\t\t}\n\t\tcontents.remove();\n\n\t\tthis.label.append( this.options.label );\n\t},\n\n\trefresh: function() {\n\t\tvar checked = this.element[ 0 ].checked,\n\t\t\tisDisabled = this.element[ 0 ].disabled;\n\n\t\tthis._updateIcon( checked );\n\t\tthis._toggleClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\", checked );\n\t\tif ( this.options.label !== null ) {\n\t\t\tthis._updateLabel();\n\t\t}\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOptions( { \"disabled\": isDisabled } );\n\t\t}\n\t}\n\n} ] );\n\nvar widgetsCheckboxradio = $.ui.checkboxradio;\n\n\n/*!\n * jQuery UI Button 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Button\n//>>group: Widgets\n//>>description: Enhances a form with themeable buttons.\n//>>docs: http://api.jqueryui.com/button/\n//>>demos: http://jqueryui.com/button/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/button.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.button\", {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<button>\",\n\toptions: {\n\t\tclasses: {\n\t\t\t\"ui-button\": \"ui-corner-all\"\n\t\t},\n\t\tdisabled: null,\n\t\ticon: null,\n\t\ticonPosition: \"beginning\",\n\t\tlabel: null,\n\t\tshowLabel: true\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar disabled,\n\n\t\t\t// This is to support cases like in jQuery Mobile where the base widget does have\n\t\t\t// an implementation of _getCreateOptions\n\t\t\toptions = this._super() || {};\n\n\t\tthis.isInput = this.element.is( \"input\" );\n\n\t\tdisabled = this.element[ 0 ].disabled;\n\t\tif ( disabled != null ) {\n\t\t\toptions.disabled = disabled;\n\t\t}\n\n\t\tthis.originalLabel = this.isInput ? this.element.val() : this.element.html();\n\t\tif ( this.originalLabel ) {\n\t\t\toptions.label = this.originalLabel;\n\t\t}\n\n\t\treturn options;\n\t},\n\n\t_create: function() {\n\t\tif ( !this.option.showLabel & !this.options.icon ) {\n\t\t\tthis.options.showLabel = true;\n\t\t}\n\n\t\t// We have to check the option again here even though we did in _getCreateOptions,\n\t\t// because null may have been passed on init which would override what was set in\n\t\t// _getCreateOptions\n\t\tif ( this.options.disabled == null ) {\n\t\t\tthis.options.disabled = this.element[ 0 ].disabled || false;\n\t\t}\n\n\t\tthis.hasTitle = !!this.element.attr( \"title\" );\n\n\t\t// Check to see if the label needs to be set or if its already correct\n\t\tif ( this.options.label && this.options.label !== this.originalLabel ) {\n\t\t\tif ( this.isInput ) {\n\t\t\t\tthis.element.val( this.options.label );\n\t\t\t} else {\n\t\t\t\tthis.element.html( this.options.label );\n\t\t\t}\n\t\t}\n\t\tthis._addClass( \"ui-button\", \"ui-widget\" );\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\t\tthis._enhance();\n\n\t\tif ( this.element.is( \"a\" ) ) {\n\t\t\tthis._on( {\n\t\t\t\t\"keyup\": function( event ) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: PhantomJS <= 1.9, IE 8 Only\n\t\t\t\t\t\t// If a native click is available use it so we actually cause navigation\n\t\t\t\t\t\t// otherwise just trigger a click event\n\t\t\t\t\t\tif ( this.element[ 0 ].click ) {\n\t\t\t\t\t\t\tthis.element[ 0 ].click();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.element.trigger( \"click\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t},\n\n\t_enhance: function() {\n\t\tif ( !this.element.is( \"button\" ) ) {\n\t\t\tthis.element.attr( \"role\", \"button\" );\n\t\t}\n\n\t\tif ( this.options.icon ) {\n\t\t\tthis._updateIcon( \"icon\", this.options.icon );\n\t\t\tthis._updateTooltip();\n\t\t}\n\t},\n\n\t_updateTooltip: function() {\n\t\tthis.title = this.element.attr( \"title\" );\n\n\t\tif ( !this.options.showLabel && !this.title ) {\n\t\t\tthis.element.attr( \"title\", this.options.label );\n\t\t}\n\t},\n\n\t_updateIcon: function( option, value ) {\n\t\tvar icon = option !== \"iconPosition\",\n\t\t\tposition = icon ? this.options.iconPosition : value,\n\t\t\tdisplayBlock = position === \"top\" || position === \"bottom\";\n\n\t\t// Create icon\n\t\tif ( !this.icon ) {\n\t\t\tthis.icon = $( \"<span>\" );\n\n\t\t\tthis._addClass( this.icon, \"ui-button-icon\", \"ui-icon\" );\n\n\t\t\tif ( !this.options.showLabel ) {\n\t\t\t\tthis._addClass( \"ui-button-icon-only\" );\n\t\t\t}\n\t\t} else if ( icon ) {\n\n\t\t\t// If we are updating the icon remove the old icon class\n\t\t\tthis._removeClass( this.icon, null, this.options.icon );\n\t\t}\n\n\t\t// If we are updating the icon add the new icon class\n\t\tif ( icon ) {\n\t\t\tthis._addClass( this.icon, null, value );\n\t\t}\n\n\t\tthis._attachIcon( position );\n\n\t\t// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove\n\t\t// the iconSpace if there is one.\n\t\tif ( displayBlock ) {\n\t\t\tthis._addClass( this.icon, null, \"ui-widget-icon-block\" );\n\t\t\tif ( this.iconSpace ) {\n\t\t\t\tthis.iconSpace.remove();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Position is beginning or end so remove the ui-widget-icon-block class and add the\n\t\t\t// space if it does not exist\n\t\t\tif ( !this.iconSpace ) {\n\t\t\t\tthis.iconSpace = $( \"<span> </span>\" );\n\t\t\t\tthis._addClass( this.iconSpace, \"ui-button-icon-space\" );\n\t\t\t}\n\t\t\tthis._removeClass( this.icon, null, \"ui-wiget-icon-block\" );\n\t\t\tthis._attachIconSpace( position );\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeAttr( \"role\" );\n\n\t\tif ( this.icon ) {\n\t\t\tthis.icon.remove();\n\t\t}\n\t\tif ( this.iconSpace ) {\n\t\t\tthis.iconSpace.remove();\n\t\t}\n\t\tif ( !this.hasTitle ) {\n\t\t\tthis.element.removeAttr( \"title\" );\n\t\t}\n\t},\n\n\t_attachIconSpace: function( iconPosition ) {\n\t\tthis.icon[ /^(?:end|bottom)/.test( iconPosition ) ? \"before\" : \"after\" ]( this.iconSpace );\n\t},\n\n\t_attachIcon: function( iconPosition ) {\n\t\tthis.element[ /^(?:end|bottom)/.test( iconPosition ) ? \"append\" : \"prepend\" ]( this.icon );\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar newShowLabel = options.showLabel === undefined ?\n\t\t\t\tthis.options.showLabel :\n\t\t\t\toptions.showLabel,\n\t\t\tnewIcon = options.icon === undefined ? this.options.icon : options.icon;\n\n\t\tif ( !newShowLabel && !newIcon ) {\n\t\t\toptions.showLabel = true;\n\t\t}\n\t\tthis._super( options );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icon\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis._updateIcon( key, value );\n\t\t\t} else if ( this.icon ) {\n\t\t\t\tthis.icon.remove();\n\t\t\t\tif ( this.iconSpace ) {\n\t\t\t\t\tthis.iconSpace.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"iconPosition\" ) {\n\t\t\tthis._updateIcon( key, value );\n\t\t}\n\n\t\t// Make sure we can't end up with a button that has neither text nor icon\n\t\tif ( key === \"showLabel\" ) {\n\t\t\t\tthis._toggleClass( \"ui-button-icon-only\", null, !value );\n\t\t\t\tthis._updateTooltip();\n\t\t}\n\n\t\tif ( key === \"label\" ) {\n\t\t\tif ( this.isInput ) {\n\t\t\t\tthis.element.val( value );\n\t\t\t} else {\n\n\t\t\t\t// If there is an icon, append it, else nothing then append the value\n\t\t\t\t// this avoids removal of the icon when setting label text\n\t\t\t\tthis.element.html( value );\n\t\t\t\tif ( this.icon ) {\n\t\t\t\t\tthis._attachIcon( this.options.iconPosition );\n\t\t\t\t\tthis._attachIconSpace( this.options.iconPosition );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._toggleClass( null, \"ui-state-disabled\", value );\n\t\t\tthis.element[ 0 ].disabled = value;\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.blur();\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\n\t\t// Make sure to only check disabled if its an element that supports this otherwise\n\t\t// check for the disabled class to determine state\n\t\tvar isDisabled = this.element.is( \"input, button\" ) ?\n\t\t\tthis.element[ 0 ].disabled : this.element.hasClass( \"ui-button-disabled\" );\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOptions( { disabled: isDisabled } );\n\t\t}\n\n\t\tthis._updateTooltip();\n\t}\n} );\n\n// DEPRECATED\nif ( $.uiBackCompat !== false ) {\n\n\t// Text and Icons options\n\t$.widget( \"ui.button\", $.ui.button, {\n\t\toptions: {\n\t\t\ttext: true,\n\t\t\ticons: {\n\t\t\t\tprimary: null,\n\t\t\t\tsecondary: null\n\t\t\t}\n\t\t},\n\n\t\t_create: function() {\n\t\t\tif ( this.options.showLabel && !this.options.text ) {\n\t\t\t\tthis.options.showLabel = this.options.text;\n\t\t\t}\n\t\t\tif ( !this.options.showLabel && this.options.text ) {\n\t\t\t\tthis.options.text = this.options.showLabel;\n\t\t\t}\n\t\t\tif ( !this.options.icon && ( this.options.icons.primary ||\n\t\t\t\t\tthis.options.icons.secondary ) ) {\n\t\t\t\tif ( this.options.icons.primary ) {\n\t\t\t\t\tthis.options.icon = this.options.icons.primary;\n\t\t\t\t} else {\n\t\t\t\t\tthis.options.icon = this.options.icons.secondary;\n\t\t\t\t\tthis.options.iconPosition = \"end\";\n\t\t\t\t}\n\t\t\t} else if ( this.options.icon ) {\n\t\t\t\tthis.options.icons.primary = this.options.icon;\n\t\t\t}\n\t\t\tthis._super();\n\t\t},\n\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"text\" ) {\n\t\t\t\tthis._super( \"showLabel\", value );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( key === \"showLabel\" ) {\n\t\t\t\tthis.options.text = value;\n\t\t\t}\n\t\t\tif ( key === \"icon\" ) {\n\t\t\t\tthis.options.icons.primary = value;\n\t\t\t}\n\t\t\tif ( key === \"icons\" ) {\n\t\t\t\tif ( value.primary ) {\n\t\t\t\t\tthis._super( \"icon\", value.primary );\n\t\t\t\t\tthis._super( \"iconPosition\", \"beginning\" );\n\t\t\t\t} else if ( value.secondary ) {\n\t\t\t\t\tthis._super( \"icon\", value.secondary );\n\t\t\t\t\tthis._super( \"iconPosition\", \"end\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._superApply( arguments );\n\t\t}\n\t} );\n\n\t$.fn.button = ( function( orig ) {\n\t\treturn function() {\n\t\t\tif ( !this.length || ( this.length && this[ 0 ].tagName !== \"INPUT\" ) ||\n\t\t\t\t\t( this.length && this[ 0 ].tagName === \"INPUT\" && (\n\t\t\t\t\t\tthis.attr( \"type\" ) !== \"checkbox\" && this.attr( \"type\" ) !== \"radio\"\n\t\t\t\t\t) ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t}\n\t\t\tif ( !$.ui.checkboxradio ) {\n\t\t\t\t$.error( \"Checkboxradio widget missing\" );\n\t\t\t}\n\t\t\tif ( arguments.length === 0 ) {\n\t\t\t\treturn this.checkboxradio( {\n\t\t\t\t\t\"icon\": false\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn this.checkboxradio.apply( this, arguments );\n\t\t};\n\t} )( $.fn.button );\n\n\t$.fn.buttonset = function() {\n\t\tif ( !$.ui.controlgroup ) {\n\t\t\t$.error( \"Controlgroup widget missing\" );\n\t\t}\n\t\tif ( arguments[ 0 ] === \"option\" && arguments[ 1 ] === \"items\" && arguments[ 2 ] ) {\n\t\t\treturn this.controlgroup.apply( this,\n\t\t\t\t[ arguments[ 0 ], \"items.button\", arguments[ 2 ] ] );\n\t\t}\n\t\tif ( arguments[ 0 ] === \"option\" && arguments[ 1 ] === \"items\" ) {\n\t\t\treturn this.controlgroup.apply( this, [ arguments[ 0 ], \"items.button\" ] );\n\t\t}\n\t\tif ( typeof arguments[ 0 ] === \"object\" && arguments[ 0 ].items ) {\n\t\t\targuments[ 0 ].items = {\n\t\t\t\tbutton: arguments[ 0 ].items\n\t\t\t};\n\t\t}\n\t\treturn this.controlgroup.apply( this, arguments );\n\t};\n}\n\nvar widgetsButton = $.ui.button;\n\n\n/*!\n * jQuery UI Dialog 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Dialog\n//>>group: Widgets\n//>>description: Displays customizable dialog windows.\n//>>docs: http://api.jqueryui.com/dialog/\n//>>demos: http://jqueryui.com/dialog/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/dialog.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.dialog\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoOpen: true,\n\t\tbuttons: [],\n\t\tclasses: {\n\t\t\t\"ui-dialog\": \"ui-corner-all\",\n\t\t\t\"ui-dialog-titlebar\": \"ui-corner-all\"\n\t\t},\n\t\tcloseOnEscape: true,\n\t\tcloseText: \"Close\",\n\t\tdraggable: true,\n\t\thide: null,\n\t\theight: \"auto\",\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 150,\n\t\tminWidth: 150,\n\t\tmodal: false,\n\t\tposition: {\n\t\t\tmy: \"center\",\n\t\t\tat: \"center\",\n\t\t\tof: window,\n\t\t\tcollision: \"fit\",\n\n\t\t\t// Ensure the titlebar is always visible\n\t\t\tusing: function( pos ) {\n\t\t\t\tvar topOffset = $( this ).css( pos ).offset().top;\n\t\t\t\tif ( topOffset < 0 ) {\n\t\t\t\t\t$( this ).css( \"top\", pos.top - topOffset );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresizable: true,\n\t\tshow: null,\n\t\ttitle: null,\n\t\twidth: 300,\n\n\t\t// Callbacks\n\t\tbeforeClose: null,\n\t\tclose: null,\n\t\tdrag: null,\n\t\tdragStart: null,\n\t\tdragStop: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresize: null,\n\t\tresizeStart: null,\n\t\tresizeStop: null\n\t},\n\n\tsizeRelatedOptions: {\n\t\tbuttons: true,\n\t\theight: true,\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true,\n\t\twidth: true\n\t},\n\n\tresizableRelatedOptions: {\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true\n\t},\n\n\t_create: function() {\n\t\tthis.originalCss = {\n\t\t\tdisplay: this.element[ 0 ].style.display,\n\t\t\twidth: this.element[ 0 ].style.width,\n\t\t\tminHeight: this.element[ 0 ].style.minHeight,\n\t\t\tmaxHeight: this.element[ 0 ].style.maxHeight,\n\t\t\theight: this.element[ 0 ].style.height\n\t\t};\n\t\tthis.originalPosition = {\n\t\t\tparent: this.element.parent(),\n\t\t\tindex: this.element.parent().children().index( this.element )\n\t\t};\n\t\tthis.originalTitle = this.element.attr( \"title\" );\n\t\tif ( this.options.title == null && this.originalTitle != null ) {\n\t\t\tthis.options.title = this.originalTitle;\n\t\t}\n\n\t\t// Dialogs can't be disabled\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.options.disabled = false;\n\t\t}\n\n\t\tthis._createWrapper();\n\n\t\tthis.element\n\t\t\t.show()\n\t\t\t.removeAttr( \"title\" )\n\t\t\t.appendTo( this.uiDialog );\n\n\t\tthis._addClass( \"ui-dialog-content\", \"ui-widget-content\" );\n\n\t\tthis._createTitlebar();\n\t\tthis._createButtonPane();\n\n\t\tif ( this.options.draggable && $.fn.draggable ) {\n\t\t\tthis._makeDraggable();\n\t\t}\n\t\tif ( this.options.resizable && $.fn.resizable ) {\n\t\t\tthis._makeResizable();\n\t\t}\n\n\t\tthis._isOpen = false;\n\n\t\tthis._trackFocus();\n\t},\n\n\t_init: function() {\n\t\tif ( this.options.autoOpen ) {\n\t\t\tthis.open();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\t\tif ( element && ( element.jquery || element.nodeType ) ) {\n\t\t\treturn $( element );\n\t\t}\n\t\treturn this.document.find( element || \"body\" ).eq( 0 );\n\t},\n\n\t_destroy: function() {\n\t\tvar next,\n\t\t\toriginalPosition = this.originalPosition;\n\n\t\tthis._untrackInstance();\n\t\tthis._destroyOverlay();\n\n\t\tthis.element\n\t\t\t.removeUniqueId()\n\t\t\t.css( this.originalCss )\n\n\t\t\t// Without detaching first, the following becomes really slow\n\t\t\t.detach();\n\n\t\tthis.uiDialog.remove();\n\n\t\tif ( this.originalTitle ) {\n\t\t\tthis.element.attr( \"title\", this.originalTitle );\n\t\t}\n\n\t\tnext = originalPosition.parent.children().eq( originalPosition.index );\n\n\t\t// Don't try to place the dialog next to itself (#8613)\n\t\tif ( next.length && next[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tnext.before( this.element );\n\t\t} else {\n\t\t\toriginalPosition.parent.append( this.element );\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.uiDialog;\n\t},\n\n\tdisable: $.noop,\n\tenable: $.noop,\n\n\tclose: function( event ) {\n\t\tvar that = this;\n\n\t\tif ( !this._isOpen || this._trigger( \"beforeClose\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = false;\n\t\tthis._focusedElement = null;\n\t\tthis._destroyOverlay();\n\t\tthis._untrackInstance();\n\n\t\tif ( !this.opener.filter( \":focusable\" ).trigger( \"focus\" ).length ) {\n\n\t\t\t// Hiding a focused element doesn't trigger blur in WebKit\n\t\t\t// so in case we have nothing to focus on, explicitly blur the active element\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=47182\n\t\t\t$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\t\t}\n\n\t\tthis._hide( this.uiDialog, this.options.hide, function() {\n\t\t\tthat._trigger( \"close\", event );\n\t\t} );\n\t},\n\n\tisOpen: function() {\n\t\treturn this._isOpen;\n\t},\n\n\tmoveToTop: function() {\n\t\tthis._moveToTop();\n\t},\n\n\t_moveToTop: function( event, silent ) {\n\t\tvar moved = false,\n\t\t\tzIndices = this.uiDialog.siblings( \".ui-front:visible\" ).map( function() {\n\t\t\t\treturn +$( this ).css( \"z-index\" );\n\t\t\t} ).get(),\n\t\t\tzIndexMax = Math.max.apply( null, zIndices );\n\n\t\tif ( zIndexMax >= +this.uiDialog.css( \"z-index\" ) ) {\n\t\t\tthis.uiDialog.css( \"z-index\", zIndexMax + 1 );\n\t\t\tmoved = true;\n\t\t}\n\n\t\tif ( moved && !silent ) {\n\t\t\tthis._trigger( \"focus\", event );\n\t\t}\n\t\treturn moved;\n\t},\n\n\topen: function() {\n\t\tvar that = this;\n\t\tif ( this._isOpen ) {\n\t\t\tif ( this._moveToTop() ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = true;\n\t\tthis.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\n\t\tthis._size();\n\t\tthis._position();\n\t\tthis._createOverlay();\n\t\tthis._moveToTop( null, true );\n\n\t\t// Ensure the overlay is moved to the top with the dialog, but only when\n\t\t// opening. The overlay shouldn't move after the dialog is open so that\n\t\t// modeless dialogs opened after the modal dialog stack properly.\n\t\tif ( this.overlay ) {\n\t\t\tthis.overlay.css( \"z-index\", this.uiDialog.css( \"z-index\" ) - 1 );\n\t\t}\n\n\t\tthis._show( this.uiDialog, this.options.show, function() {\n\t\t\tthat._focusTabbable();\n\t\t\tthat._trigger( \"focus\" );\n\t\t} );\n\n\t\t// Track the dialog immediately upon openening in case a focus event\n\t\t// somehow occurs outside of the dialog before an element inside the\n\t\t// dialog is focused (#10152)\n\t\tthis._makeFocusTarget();\n\n\t\tthis._trigger( \"open\" );\n\t},\n\n\t_focusTabbable: function() {\n\n\t\t// Set focus to the first match:\n\t\t// 1. An element that was focused previously\n\t\t// 2. First element inside the dialog matching [autofocus]\n\t\t// 3. Tabbable element inside the content element\n\t\t// 4. Tabbable element inside the buttonpane\n\t\t// 5. The close button\n\t\t// 6. The dialog itself\n\t\tvar hasFocus = this._focusedElement;\n\t\tif ( !hasFocus ) {\n\t\t\thasFocus = this.element.find( \"[autofocus]\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.element.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogButtonPane.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogTitlebarClose.filter( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialog;\n\t\t}\n\t\thasFocus.eq( 0 ).trigger( \"focus\" );\n\t},\n\n\t_keepFocus: function( event ) {\n\t\tfunction checkFocus() {\n\t\t\tvar activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),\n\t\t\t\tisActive = this.uiDialog[ 0 ] === activeElement ||\n\t\t\t\t\t$.contains( this.uiDialog[ 0 ], activeElement );\n\t\t\tif ( !isActive ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t}\n\t\tevent.preventDefault();\n\t\tcheckFocus.call( this );\n\n\t\t// support: IE\n\t\t// IE <= 8 doesn't prevent moving focus even with event.preventDefault()\n\t\t// so we check again later\n\t\tthis._delay( checkFocus );\n\t},\n\n\t_createWrapper: function() {\n\t\tthis.uiDialog = $( \"<div>\" )\n\t\t\t.hide()\n\t\t\t.attr( {\n\n\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: \"dialog\"\n\t\t\t} )\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._addClass( this.uiDialog, \"ui-dialog\", \"ui-widget ui-widget-content ui-front\" );\n\t\tthis._on( this.uiDialog, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent tabbing out of dialogs\n\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar tabbables = this.uiDialog.find( \":tabbable\" ),\n\t\t\t\t\tfirst = tabbables.filter( \":first\" ),\n\t\t\t\t\tlast = tabbables.filter( \":last\" );\n\n\t\t\t\tif ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&\n\t\t\t\t\t\t!event.shiftKey ) {\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tfirst.trigger( \"focus\" );\n\t\t\t\t\t} );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( ( event.target === first[ 0 ] ||\n\t\t\t\t\t\tevent.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tlast.trigger( \"focus\" );\n\t\t\t\t\t} );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\tmousedown: function( event ) {\n\t\t\t\tif ( this._moveToTop( event ) ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// We assume that any existing aria-describedby attribute means\n\t\t// that the dialog content is marked up properly\n\t\t// otherwise we brute force the content as the description\n\t\tif ( !this.element.find( \"[aria-describedby]\" ).length ) {\n\t\t\tthis.uiDialog.attr( {\n\t\t\t\t\"aria-describedby\": this.element.uniqueId().attr( \"id\" )\n\t\t\t} );\n\t\t}\n\t},\n\n\t_createTitlebar: function() {\n\t\tvar uiDialogTitle;\n\n\t\tthis.uiDialogTitlebar = $( \"<div>\" );\n\t\tthis._addClass( this.uiDialogTitlebar,\n\t\t\t\"ui-dialog-titlebar\", \"ui-widget-header ui-helper-clearfix\" );\n\t\tthis._on( this.uiDialogTitlebar, {\n\t\t\tmousedown: function( event ) {\n\n\t\t\t\t// Don't prevent click on close button (#8838)\n\t\t\t\t// Focusing a dialog that is partially scrolled out of view\n\t\t\t\t// causes the browser to scroll it into view, preventing the click event\n\t\t\t\tif ( !$( event.target ).closest( \".ui-dialog-titlebar-close\" ) ) {\n\n\t\t\t\t\t// Dialog isn't getting focus when dragging (#8063)\n\t\t\t\t\tthis.uiDialog.trigger( \"focus\" );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Support: IE\n\t\t// Use type=\"button\" to prevent enter keypresses in textboxes from closing the\n\t\t// dialog in IE (#9312)\n\t\tthis.uiDialogTitlebarClose = $( \"<button type='button'></button>\" )\n\t\t\t.button( {\n\t\t\t\tlabel: $( \"<a>\" ).text( this.options.closeText ).html(),\n\t\t\t\ticon: \"ui-icon-closethick\",\n\t\t\t\tshowLabel: false\n\t\t\t} )\n\t\t\t.appendTo( this.uiDialogTitlebar );\n\n\t\tthis._addClass( this.uiDialogTitlebarClose, \"ui-dialog-titlebar-close\" );\n\t\tthis._on( this.uiDialogTitlebarClose, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t} );\n\n\t\tuiDialogTitle = $( \"<span>\" ).uniqueId().prependTo( this.uiDialogTitlebar );\n\t\tthis._addClass( uiDialogTitle, \"ui-dialog-title\" );\n\t\tthis._title( uiDialogTitle );\n\n\t\tthis.uiDialogTitlebar.prependTo( this.uiDialog );\n\n\t\tthis.uiDialog.attr( {\n\t\t\t\"aria-labelledby\": uiDialogTitle.attr( \"id\" )\n\t\t} );\n\t},\n\n\t_title: function( title ) {\n\t\tif ( this.options.title ) {\n\t\t\ttitle.text( this.options.title );\n\t\t} else {\n\t\t\ttitle.html( \" \" );\n\t\t}\n\t},\n\n\t_createButtonPane: function() {\n\t\tthis.uiDialogButtonPane = $( \"<div>\" );\n\t\tthis._addClass( this.uiDialogButtonPane, \"ui-dialog-buttonpane\",\n\t\t\t\"ui-widget-content ui-helper-clearfix\" );\n\n\t\tthis.uiButtonSet = $( \"<div>\" )\n\t\t\t.appendTo( this.uiDialogButtonPane );\n\t\tthis._addClass( this.uiButtonSet, \"ui-dialog-buttonset\" );\n\n\t\tthis._createButtons();\n\t},\n\n\t_createButtons: function() {\n\t\tvar that = this,\n\t\t\tbuttons = this.options.buttons;\n\n\t\t// If we already have a button pane, remove it\n\t\tthis.uiDialogButtonPane.remove();\n\t\tthis.uiButtonSet.empty();\n\n\t\tif ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) {\n\t\t\tthis._removeClass( this.uiDialog, \"ui-dialog-buttons\" );\n\t\t\treturn;\n\t\t}\n\n\t\t$.each( buttons, function( name, props ) {\n\t\t\tvar click, buttonOptions;\n\t\t\tprops = $.isFunction( props ) ?\n\t\t\t\t{ click: props, text: name } :\n\t\t\t\tprops;\n\n\t\t\t// Default to a non-submitting button\n\t\t\tprops = $.extend( { type: \"button\" }, props );\n\n\t\t\t// Change the context for the click callback to be the main element\n\t\t\tclick = props.click;\n\t\t\tbuttonOptions = {\n\t\t\t\ticon: props.icon,\n\t\t\t\ticonPosition: props.iconPosition,\n\t\t\t\tshowLabel: props.showLabel,\n\n\t\t\t\t// Deprecated options\n\t\t\t\ticons: props.icons,\n\t\t\t\ttext: props.text\n\t\t\t};\n\n\t\t\tdelete props.click;\n\t\t\tdelete props.icon;\n\t\t\tdelete props.iconPosition;\n\t\t\tdelete props.showLabel;\n\n\t\t\t// Deprecated options\n\t\t\tdelete props.icons;\n\t\t\tif ( typeof props.text === \"boolean\" ) {\n\t\t\t\tdelete props.text;\n\t\t\t}\n\n\t\t\t$( \"<button></button>\", props )\n\t\t\t\t.button( buttonOptions )\n\t\t\t\t.appendTo( that.uiButtonSet )\n\t\t\t\t.on( \"click\", function() {\n\t\t\t\t\tclick.apply( that.element[ 0 ], arguments );\n\t\t\t\t} );\n\t\t} );\n\t\tthis._addClass( this.uiDialog, \"ui-dialog-buttons\" );\n\t\tthis.uiDialogButtonPane.appendTo( this.uiDialog );\n\t},\n\n\t_makeDraggable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\tposition: ui.position,\n\t\t\t\toffset: ui.offset\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.draggable( {\n\t\t\tcancel: \".ui-dialog-content, .ui-dialog-titlebar-close\",\n\t\t\thandle: \".ui-dialog-titlebar\",\n\t\t\tcontainment: \"document\",\n\t\t\tstart: function( event, ui ) {\n\t\t\t\tthat._addClass( $( this ), \"ui-dialog-dragging\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"dragStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tdrag: function( event, ui ) {\n\t\t\t\tthat._trigger( \"drag\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar left = ui.offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = ui.offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + ( left >= 0 ? \"+\" : \"\" ) + left + \" \" +\n\t\t\t\t\t\t\"top\" + ( top >= 0 ? \"+\" : \"\" ) + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\tthat._removeClass( $( this ), \"ui-dialog-dragging\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"dragStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_makeResizable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\thandles = options.resizable,\n\n\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\tposition = this.uiDialog.css( \"position\" ),\n\t\t\tresizeHandles = typeof handles === \"string\" ?\n\t\t\t\thandles :\n\t\t\t\t\"n,e,s,w,se,sw,ne,nw\";\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\tposition: ui.position,\n\t\t\t\tsize: ui.size\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.resizable( {\n\t\t\tcancel: \".ui-dialog-content\",\n\t\t\tcontainment: \"document\",\n\t\t\talsoResize: this.element,\n\t\t\tmaxWidth: options.maxWidth,\n\t\t\tmaxHeight: options.maxHeight,\n\t\t\tminWidth: options.minWidth,\n\t\t\tminHeight: this._minHeight(),\n\t\t\thandles: resizeHandles,\n\t\t\tstart: function( event, ui ) {\n\t\t\t\tthat._addClass( $( this ), \"ui-dialog-resizing\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"resizeStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tresize: function( event, ui ) {\n\t\t\t\tthat._trigger( \"resize\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar offset = that.uiDialog.offset(),\n\t\t\t\t\tleft = offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.height = that.uiDialog.height();\n\t\t\t\toptions.width = that.uiDialog.width();\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + ( left >= 0 ? \"+\" : \"\" ) + left + \" \" +\n\t\t\t\t\t\t\"top\" + ( top >= 0 ? \"+\" : \"\" ) + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\tthat._removeClass( $( this ), \"ui-dialog-resizing\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"resizeStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t} )\n\t\t\t.css( \"position\", position );\n\t},\n\n\t_trackFocus: function() {\n\t\tthis._on( this.widget(), {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._makeFocusTarget();\n\t\t\t\tthis._focusedElement = $( event.target );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_makeFocusTarget: function() {\n\t\tthis._untrackInstance();\n\t\tthis._trackingInstances().unshift( this );\n\t},\n\n\t_untrackInstance: function() {\n\t\tvar instances = this._trackingInstances(),\n\t\t\texists = $.inArray( this, instances );\n\t\tif ( exists !== -1 ) {\n\t\t\tinstances.splice( exists, 1 );\n\t\t}\n\t},\n\n\t_trackingInstances: function() {\n\t\tvar instances = this.document.data( \"ui-dialog-instances\" );\n\t\tif ( !instances ) {\n\t\t\tinstances = [];\n\t\t\tthis.document.data( \"ui-dialog-instances\", instances );\n\t\t}\n\t\treturn instances;\n\t},\n\n\t_minHeight: function() {\n\t\tvar options = this.options;\n\n\t\treturn options.height === \"auto\" ?\n\t\t\toptions.minHeight :\n\t\t\tMath.min( options.minHeight, options.height );\n\t},\n\n\t_position: function() {\n\n\t\t// Need to show the dialog to get the actual offset in the position plugin\n\t\tvar isVisible = this.uiDialog.is( \":visible\" );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.show();\n\t\t}\n\t\tthis.uiDialog.position( this.options.position );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.hide();\n\t\t}\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar that = this,\n\t\t\tresize = false,\n\t\t\tresizableOptions = {};\n\n\t\t$.each( options, function( key, value ) {\n\t\t\tthat._setOption( key, value );\n\n\t\t\tif ( key in that.sizeRelatedOptions ) {\n\t\t\t\tresize = true;\n\t\t\t}\n\t\t\tif ( key in that.resizableRelatedOptions ) {\n\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t}\n\t\t} );\n\n\t\tif ( resize ) {\n\t\t\tthis._size();\n\t\t\tthis._position();\n\t\t}\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar isDraggable, isResizable,\n\t\t\tuiDialog = this.uiDialog;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.uiDialog.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"buttons\" ) {\n\t\t\tthis._createButtons();\n\t\t}\n\n\t\tif ( key === \"closeText\" ) {\n\t\t\tthis.uiDialogTitlebarClose.button( {\n\n\t\t\t\t// Ensure that we always pass a string\n\t\t\t\tlabel: $( \"<a>\" ).text( \"\" + this.options.closeText ).html()\n\t\t\t} );\n\t\t}\n\n\t\tif ( key === \"draggable\" ) {\n\t\t\tisDraggable = uiDialog.is( \":data(ui-draggable)\" );\n\t\t\tif ( isDraggable && !value ) {\n\t\t\t\tuiDialog.draggable( \"destroy\" );\n\t\t\t}\n\n\t\t\tif ( !isDraggable && value ) {\n\t\t\t\tthis._makeDraggable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"position\" ) {\n\t\t\tthis._position();\n\t\t}\n\n\t\tif ( key === \"resizable\" ) {\n\n\t\t\t// currently resizable, becoming non-resizable\n\t\t\tisResizable = uiDialog.is( \":data(ui-resizable)\" );\n\t\t\tif ( isResizable && !value ) {\n\t\t\t\tuiDialog.resizable( \"destroy\" );\n\t\t\t}\n\n\t\t\t// Currently resizable, changing handles\n\t\t\tif ( isResizable && typeof value === \"string\" ) {\n\t\t\t\tuiDialog.resizable( \"option\", \"handles\", value );\n\t\t\t}\n\n\t\t\t// Currently non-resizable, becoming resizable\n\t\t\tif ( !isResizable && value !== false ) {\n\t\t\t\tthis._makeResizable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"title\" ) {\n\t\t\tthis._title( this.uiDialogTitlebar.find( \".ui-dialog-title\" ) );\n\t\t}\n\t},\n\n\t_size: function() {\n\n\t\t// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t// divs will both have width and height set, so we need to reset them\n\t\tvar nonContentHeight, minContentHeight, maxContentHeight,\n\t\t\toptions = this.options;\n\n\t\t// Reset content sizing\n\t\tthis.element.show().css( {\n\t\t\twidth: \"auto\",\n\t\t\tminHeight: 0,\n\t\t\tmaxHeight: \"none\",\n\t\t\theight: 0\n\t\t} );\n\n\t\tif ( options.minWidth > options.width ) {\n\t\t\toptions.width = options.minWidth;\n\t\t}\n\n\t\t// Reset wrapper sizing\n\t\t// determine the height of all the non-content elements\n\t\tnonContentHeight = this.uiDialog.css( {\n\t\t\theight: \"auto\",\n\t\t\twidth: options.width\n\t\t} )\n\t\t\t.outerHeight();\n\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\tmaxContentHeight = typeof options.maxHeight === \"number\" ?\n\t\t\tMath.max( 0, options.maxHeight - nonContentHeight ) :\n\t\t\t\"none\";\n\n\t\tif ( options.height === \"auto\" ) {\n\t\t\tthis.element.css( {\n\t\t\t\tminHeight: minContentHeight,\n\t\t\t\tmaxHeight: maxContentHeight,\n\t\t\t\theight: \"auto\"\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.element.height( Math.max( 0, options.height - nonContentHeight ) );\n\t\t}\n\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", \"minHeight\", this._minHeight() );\n\t\t}\n\t},\n\n\t_blockFrames: function() {\n\t\tthis.iframeBlocks = this.document.find( \"iframe\" ).map( function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( {\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\twidth: iframe.outerWidth(),\n\t\t\t\t\theight: iframe.outerHeight()\n\t\t\t\t} )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t} );\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_allowInteraction: function( event ) {\n\t\tif ( $( event.target ).closest( \".ui-dialog\" ).length ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Remove hack when datepicker implements\n\t\t// the .ui-front logic (#8989)\n\t\treturn !!$( event.target ).closest( \".ui-datepicker\" ).length;\n\t},\n\n\t_createOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use a delay in case the overlay is created from an\n\t\t// event that we're going to be cancelling (#2804)\n\t\tvar isOpening = true;\n\t\tthis._delay( function() {\n\t\t\tisOpening = false;\n\t\t} );\n\n\t\tif ( !this.document.data( \"ui-dialog-overlays\" ) ) {\n\n\t\t\t// Prevent use of anchors and inputs\n\t\t\t// Using _on() for an event handler shared across many instances is\n\t\t\t// safe because the dialogs stack and must be closed in reverse order\n\t\t\tthis._on( this.document, {\n\t\t\t\tfocusin: function( event ) {\n\t\t\t\t\tif ( isOpening ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !this._allowInteraction( event ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis._trackingInstances()[ 0 ]._focusTabbable();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis.overlay = $( \"<div>\" )\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._addClass( this.overlay, null, \"ui-widget-overlay ui-front\" );\n\t\tthis._on( this.overlay, {\n\t\t\tmousedown: \"_keepFocus\"\n\t\t} );\n\t\tthis.document.data( \"ui-dialog-overlays\",\n\t\t\t( this.document.data( \"ui-dialog-overlays\" ) || 0 ) + 1 );\n\t},\n\n\t_destroyOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.overlay ) {\n\t\t\tvar overlays = this.document.data( \"ui-dialog-overlays\" ) - 1;\n\n\t\t\tif ( !overlays ) {\n\t\t\t\tthis._off( this.document, \"focusin\" );\n\t\t\t\tthis.document.removeData( \"ui-dialog-overlays\" );\n\t\t\t} else {\n\t\t\t\tthis.document.data( \"ui-dialog-overlays\", overlays );\n\t\t\t}\n\n\t\t\tthis.overlay.remove();\n\t\t\tthis.overlay = null;\n\t\t}\n\t}\n} );\n\n// DEPRECATED\n// TODO: switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for dialogClass option\n\t$.widget( \"ui.dialog\", $.ui.dialog, {\n\t\toptions: {\n\t\t\tdialogClass: \"\"\n\t\t},\n\t\t_createWrapper: function() {\n\t\t\tthis._super();\n\t\t\tthis.uiDialog.addClass( this.options.dialogClass );\n\t\t},\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"dialogClass\" ) {\n\t\t\t\tthis.uiDialog\n\t\t\t\t\t.removeClass( this.options.dialogClass )\n\t\t\t\t\t.addClass( value );\n\t\t\t}\n\t\t\tthis._superApply( arguments );\n\t\t}\n\t} );\n}\n\nvar widgetsDialog = $.ui.dialog;\n\n\n/*!\n * jQuery UI Slider 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Slider\n//>>group: Widgets\n//>>description: Displays a flexible slider with ranges and accessibility via keyboard.\n//>>docs: http://api.jqueryui.com/slider/\n//>>demos: http://jqueryui.com/slider/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/slider.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\nvar widgetsSlider = $.widget( \"ui.slider\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"slide\",\n\n\toptions: {\n\t\tanimate: false,\n\t\tclasses: {\n\t\t\t\"ui-slider\": \"ui-corner-all\",\n\t\t\t\"ui-slider-handle\": \"ui-corner-all\",\n\n\t\t\t// Note: ui-widget-header isn't the most fittingly semantic framework class for this\n\t\t\t// element, but worked best visually with a variety of themes\n\t\t\t\"ui-slider-range\": \"ui-corner-all ui-widget-header\"\n\t\t},\n\t\tdistance: 0,\n\t\tmax: 100,\n\t\tmin: 0,\n\t\torientation: \"horizontal\",\n\t\trange: false,\n\t\tstep: 1,\n\t\tvalue: 0,\n\t\tvalues: null,\n\n\t\t// Callbacks\n\t\tchange: null,\n\t\tslide: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t// Number of pages in a slider\n\t// (how many times can you page up/down to go through the whole range)\n\tnumPages: 5,\n\n\t_create: function() {\n\t\tthis._keySliding = false;\n\t\tthis._mouseSliding = false;\n\t\tthis._animateOff = true;\n\t\tthis._handleIndex = null;\n\t\tthis._detectOrientation();\n\t\tthis._mouseInit();\n\t\tthis._calculateNewMax();\n\n\t\tthis._addClass( \"ui-slider ui-slider-\" + this.orientation,\n\t\t\t\"ui-widget ui-widget-content\" );\n\n\t\tthis._refresh();\n\n\t\tthis._animateOff = false;\n\t},\n\n\t_refresh: function() {\n\t\tthis._createRange();\n\t\tthis._createHandles();\n\t\tthis._setupEvents();\n\t\tthis._refreshValue();\n\t},\n\n\t_createHandles: function() {\n\t\tvar i, handleCount,\n\t\t\toptions = this.options,\n\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ),\n\t\t\thandle = \"<span tabindex='0'></span>\",\n\t\t\thandles = [];\n\n\t\thandleCount = ( options.values && options.values.length ) || 1;\n\n\t\tif ( existingHandles.length > handleCount ) {\n\t\t\texistingHandles.slice( handleCount ).remove();\n\t\t\texistingHandles = existingHandles.slice( 0, handleCount );\n\t\t}\n\n\t\tfor ( i = existingHandles.length; i < handleCount; i++ ) {\n\t\t\thandles.push( handle );\n\t\t}\n\n\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( this.element ) );\n\n\t\tthis._addClass( this.handles, \"ui-slider-handle\", \"ui-state-default\" );\n\n\t\tthis.handle = this.handles.eq( 0 );\n\n\t\tthis.handles.each( function( i ) {\n\t\t\t$( this )\n\t\t\t\t.data( \"ui-slider-handle-index\", i )\n\t\t\t\t.attr( \"tabIndex\", 0 );\n\t\t} );\n\t},\n\n\t_createRange: function() {\n\t\tvar options = this.options;\n\n\t\tif ( options.range ) {\n\t\t\tif ( options.range === true ) {\n\t\t\t\tif ( !options.values ) {\n\t\t\t\t\toptions.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t} else if ( options.values.length && options.values.length !== 2 ) {\n\t\t\t\t\toptions.values = [ options.values[ 0 ], options.values[ 0 ] ];\n\t\t\t\t} else if ( $.isArray( options.values ) ) {\n\t\t\t\t\toptions.values = options.values.slice( 0 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !this.range || !this.range.length ) {\n\t\t\t\tthis.range = $( \"<div>\" )\n\t\t\t\t\t.appendTo( this.element );\n\n\t\t\t\tthis._addClass( this.range, \"ui-slider-range\" );\n\t\t\t} else {\n\t\t\t\tthis._removeClass( this.range, \"ui-slider-range-min ui-slider-range-max\" );\n\n\t\t\t\t// Handle range switching from true to min/max\n\t\t\t\tthis.range.css( {\n\t\t\t\t\t\"left\": \"\",\n\t\t\t\t\t\"bottom\": \"\"\n\t\t\t\t} );\n\t\t\t}\n\t\t\tif ( options.range === \"min\" || options.range === \"max\" ) {\n\t\t\t\tthis._addClass( this.range, \"ui-slider-range-\" + options.range );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.range ) {\n\t\t\t\tthis.range.remove();\n\t\t\t}\n\t\t\tthis.range = null;\n\t\t}\n\t},\n\n\t_setupEvents: function() {\n\t\tthis._off( this.handles );\n\t\tthis._on( this.handles, this._handleEvents );\n\t\tthis._hoverable( this.handles );\n\t\tthis._focusable( this.handles );\n\t},\n\n\t_destroy: function() {\n\t\tthis.handles.remove();\n\t\tif ( this.range ) {\n\t\t\tthis.range.remove();\n\t\t}\n\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\n\t\tif ( o.disabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.elementSize = {\n\t\t\twidth: this.element.outerWidth(),\n\t\t\theight: this.element.outerHeight()\n\t\t};\n\t\tthis.elementOffset = this.element.offset();\n\n\t\tposition = { x: event.pageX, y: event.pageY };\n\t\tnormValue = this._normValueFromMouse( position );\n\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\tthis.handles.each( function( i ) {\n\t\t\tvar thisDistance = Math.abs( normValue - that.values( i ) );\n\t\t\tif ( ( distance > thisDistance ) ||\n\t\t\t\t( distance === thisDistance &&\n\t\t\t\t\t( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {\n\t\t\t\tdistance = thisDistance;\n\t\t\t\tclosestHandle = $( this );\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t} );\n\n\t\tallowed = this._start( event, index );\n\t\tif ( allowed === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tthis._mouseSliding = true;\n\n\t\tthis._handleIndex = index;\n\n\t\tthis._addClass( closestHandle, null, \"ui-state-active\" );\n\t\tclosestHandle.trigger( \"focus\" );\n\n\t\toffset = closestHandle.offset();\n\t\tmouseOverHandle = !$( event.target ).parents().addBack().is( \".ui-slider-handle\" );\n\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t( parseInt( closestHandle.css( \"borderTopWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( closestHandle.css( \"borderBottomWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( closestHandle.css( \"marginTop\" ), 10 ) || 0 )\n\t\t};\n\n\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\tthis._slide( event, index, normValue );\n\t\t}\n\t\tthis._animateOff = true;\n\t\treturn true;\n\t},\n\n\t_mouseStart: function() {\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\tnormValue = this._normValueFromMouse( position );\n\n\t\tthis._slide( event, this._handleIndex, normValue );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tthis._removeClass( this.handles, null, \"ui-state-active\" );\n\t\tthis._mouseSliding = false;\n\n\t\tthis._stop( event, this._handleIndex );\n\t\tthis._change( event, this._handleIndex );\n\n\t\tthis._handleIndex = null;\n\t\tthis._clickOffset = null;\n\t\tthis._animateOff = false;\n\n\t\treturn false;\n\t},\n\n\t_detectOrientation: function() {\n\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t},\n\n\t_normValueFromMouse: function( position ) {\n\t\tvar pixelTotal,\n\t\t\tpixelMouse,\n\t\t\tpercentMouse,\n\t\t\tvalueTotal,\n\t\t\tvalueMouse;\n\n\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\tpixelTotal = this.elementSize.width;\n\t\t\tpixelMouse = position.x - this.elementOffset.left -\n\t\t\t\t( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t} else {\n\t\t\tpixelTotal = this.elementSize.height;\n\t\t\tpixelMouse = position.y - this.elementOffset.top -\n\t\t\t\t( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t}\n\n\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\tif ( percentMouse > 1 ) {\n\t\t\tpercentMouse = 1;\n\t\t}\n\t\tif ( percentMouse < 0 ) {\n\t\t\tpercentMouse = 0;\n\t\t}\n\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\tpercentMouse = 1 - percentMouse;\n\t\t}\n\n\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\n\t\treturn this._trimAlignValue( valueMouse );\n\t},\n\n\t_uiHash: function( index, value, values ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\thandleIndex: index,\n\t\t\tvalue: value !== undefined ? value : this.value()\n\t\t};\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\tuiHash.value = value !== undefined ? value : this.values( index );\n\t\t\tuiHash.values = values || this.values();\n\t\t}\n\n\t\treturn uiHash;\n\t},\n\n\t_hasMultipleValues: function() {\n\t\treturn this.options.values && this.options.values.length;\n\t},\n\n\t_start: function( event, index ) {\n\t\treturn this._trigger( \"start\", event, this._uiHash( index ) );\n\t},\n\n\t_slide: function( event, index, newVal ) {\n\t\tvar allowed, otherVal,\n\t\t\tcurrentValue = this.value(),\n\t\t\tnewValues = this.values();\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\tcurrentValue = this.values( index );\n\n\t\t\tif ( this.options.values.length === 2 && this.options.range === true ) {\n\t\t\t\tnewVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );\n\t\t\t}\n\n\t\t\tnewValues[ index ] = newVal;\n\t\t}\n\n\t\tif ( newVal === currentValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\tallowed = this._trigger( \"slide\", event, this._uiHash( index, newVal, newValues ) );\n\n\t\t// A slide can be canceled by returning false from the slide callback\n\t\tif ( allowed === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\tthis.values( index, newVal );\n\t\t} else {\n\t\t\tthis.value( newVal );\n\t\t}\n\t},\n\n\t_stop: function( event, index ) {\n\t\tthis._trigger( \"stop\", event, this._uiHash( index ) );\n\t},\n\n\t_change: function( event, index ) {\n\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\n\t\t\t//store the last changed value index for reference when handles overlap\n\t\t\tthis._lastChangedValue = index;\n\t\t\tthis._trigger( \"change\", event, this._uiHash( index ) );\n\t\t}\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( arguments.length ) {\n\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, 0 );\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._value();\n\t},\n\n\tvalues: function( index, newValue ) {\n\t\tvar vals,\n\t\t\tnewValues,\n\t\t\ti;\n\n\t\tif ( arguments.length > 1 ) {\n\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, index );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( arguments.length ) {\n\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\tvals = this.options.values;\n\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._refreshValue();\n\t\t\t} else {\n\t\t\t\tif ( this._hasMultipleValues() ) {\n\t\t\t\t\treturn this._values( index );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.value();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._values();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar i,\n\t\t\tvalsLength = 0;\n\n\t\tif ( key === \"range\" && this.options.range === true ) {\n\t\t\tif ( value === \"min\" ) {\n\t\t\t\tthis.options.value = this._values( 0 );\n\t\t\t\tthis.options.values = null;\n\t\t\t} else if ( value === \"max\" ) {\n\t\t\t\tthis.options.value = this._values( this.options.values.length - 1 );\n\t\t\t\tthis.options.values = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\tvalsLength = this.options.values.length;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tswitch ( key ) {\n\t\t\tcase \"orientation\":\n\t\t\t\tthis._detectOrientation();\n\t\t\t\tthis._removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t._addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tif ( this.options.range ) {\n\t\t\t\t\tthis._refreshRange( value );\n\t\t\t\t}\n\n\t\t\t\t// Reset positioning from previous orientation\n\t\t\t\tthis.handles.css( value === \"horizontal\" ? \"bottom\" : \"left\", \"\" );\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"values\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\n\t\t\t\t// Start from the last handle to prevent unreachable handles (#9046)\n\t\t\t\tfor ( i = valsLength - 1; i >= 0; i-- ) {\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"step\":\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._calculateNewMax();\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"range\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refresh();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis._toggleClass( null, \"ui-state-disabled\", !!value );\n\t},\n\n\t//internal value getter\n\t// _value() returns value trimmed by min and max, aligned by step\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\tval = this._trimAlignValue( val );\n\n\t\treturn val;\n\t},\n\n\t//internal values getter\n\t// _values() returns array of values trimmed by min and max, aligned by step\n\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t_values: function( index ) {\n\t\tvar val,\n\t\t\tvals,\n\t\t\ti;\n\n\t\tif ( arguments.length ) {\n\t\t\tval = this.options.values[ index ];\n\t\t\tval = this._trimAlignValue( val );\n\n\t\t\treturn val;\n\t\t} else if ( this._hasMultipleValues() ) {\n\n\t\t\t// .slice() creates a copy of the array\n\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\tvals = this.options.values.slice();\n\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t}\n\n\t\t\treturn vals;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t},\n\n\t// Returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t_trimAlignValue: function( val ) {\n\t\tif ( val <= this._valueMin() ) {\n\t\t\treturn this._valueMin();\n\t\t}\n\t\tif ( val >= this._valueMax() ) {\n\t\t\treturn this._valueMax();\n\t\t}\n\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\tvalModStep = ( val - this._valueMin() ) % step,\n\t\t\talignValue = val - valModStep;\n\n\t\tif ( Math.abs( valModStep ) * 2 >= step ) {\n\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t}\n\n\t\t// Since JavaScript has problems with large floats, round\n\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\treturn parseFloat( alignValue.toFixed( 5 ) );\n\t},\n\n\t_calculateNewMax: function() {\n\t\tvar max = this.options.max,\n\t\t\tmin = this._valueMin(),\n\t\t\tstep = this.options.step,\n\t\t\taboveMin = Math.round( ( max - min ) / step ) * step;\n\t\tmax = aboveMin + min;\n\t\tif ( max > this.options.max ) {\n\n\t\t\t//If max is not divisible by step, rounding off may increase its value\n\t\t\tmax -= step;\n\t\t}\n\t\tthis.max = parseFloat( max.toFixed( this._precision() ) );\n\t},\n\n\t_precision: function() {\n\t\tvar precision = this._precisionOf( this.options.step );\n\t\tif ( this.options.min !== null ) {\n\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t}\n\t\treturn precision;\n\t},\n\n\t_precisionOf: function( num ) {\n\t\tvar str = num.toString(),\n\t\t\tdecimal = str.indexOf( \".\" );\n\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t},\n\n\t_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.max;\n\t},\n\n\t_refreshRange: function( orientation ) {\n\t\tif ( orientation === \"vertical\" ) {\n\t\t\tthis.range.css( { \"width\": \"\", \"left\": \"\" } );\n\t\t}\n\t\tif ( orientation === \"horizontal\" ) {\n\t\t\tthis.range.css( { \"height\": \"\", \"bottom\": \"\" } );\n\t\t}\n\t},\n\n\t_refreshValue: function() {\n\t\tvar lastValPercent, valPercent, value, valueMin, valueMax,\n\t\t\toRange = this.options.range,\n\t\t\to = this.options,\n\t\t\tthat = this,\n\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\t_set = {};\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\tthis.handles.each( function( i ) {\n\t\t\t\tvalPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -\n\t\t\t\t\tthat._valueMin() ) * 100;\n\t\t\t\t_set[ that.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\tif ( that.options.range === true ) {\n\t\t\t\t\tif ( that.orientation === \"horizontal\" ) {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\tleft: valPercent + \"%\"\n\t\t\t\t\t\t\t}, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\twidth: ( valPercent - lastValPercent ) + \"%\"\n\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\tqueue: false,\n\t\t\t\t\t\t\t\tduration: o.animate\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\tbottom: ( valPercent ) + \"%\"\n\t\t\t\t\t\t\t}, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\theight: ( valPercent - lastValPercent ) + \"%\"\n\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\tqueue: false,\n\t\t\t\t\t\t\t\tduration: o.animate\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastValPercent = valPercent;\n\t\t\t} );\n\t\t} else {\n\t\t\tvalue = this.value();\n\t\t\tvalueMin = this._valueMin();\n\t\t\tvalueMax = this._valueMax();\n\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t0;\n\t\t\t_set[ this.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\n\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\twidth: valPercent + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\twidth: ( 100 - valPercent ) + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\theight: valPercent + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\theight: ( 100 - valPercent ) + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t}\n\t},\n\n\t_handleEvents: {\n\t\tkeydown: function( event ) {\n\t\t\tvar allowed, curVal, newVal, step,\n\t\t\t\tindex = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( !this._keySliding ) {\n\t\t\t\t\t\tthis._keySliding = true;\n\t\t\t\t\t\tthis._addClass( $( event.target ), null, \"ui-state-active\" );\n\t\t\t\t\t\tallowed = this._start( event, index );\n\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstep = this.options.step;\n\t\t\tif ( this._hasMultipleValues() ) {\n\t\t\t\tcurVal = newVal = this.values( index );\n\t\t\t} else {\n\t\t\t\tcurVal = newVal = this.value();\n\t\t\t}\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tnewVal = this._valueMin();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tnewVal = this._valueMax();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tnewVal = this._trimAlignValue(\n\t\t\t\t\t\tcurVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tnewVal = this._trimAlignValue(\n\t\t\t\t\t\tcurVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tif ( curVal === this._valueMax() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + step );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tif ( curVal === this._valueMin() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - step );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthis._slide( event, index, newVal );\n\t\t},\n\t\tkeyup: function( event ) {\n\t\t\tvar index = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tif ( this._keySliding ) {\n\t\t\t\tthis._keySliding = false;\n\t\t\t\tthis._stop( event, index );\n\t\t\t\tthis._change( event, index );\n\t\t\t\tthis._removeClass( $( event.target ), null, \"ui-state-active\" );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n\n/*!\n * jQuery UI Tabs 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Tabs\n//>>group: Widgets\n//>>description: Transforms a set of container elements into a tab structure.\n//>>docs: http://api.jqueryui.com/tabs/\n//>>demos: http://jqueryui.com/tabs/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/tabs.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.tabs\", {\n\tversion: \"1.12.1\",\n\tdelay: 300,\n\toptions: {\n\t\tactive: null,\n\t\tclasses: {\n\t\t\t\"ui-tabs\": \"ui-corner-all\",\n\t\t\t\"ui-tabs-nav\": \"ui-corner-all\",\n\t\t\t\"ui-tabs-panel\": \"ui-corner-bottom\",\n\t\t\t\"ui-tabs-tab\": \"ui-corner-top\"\n\t\t},\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theightStyle: \"content\",\n\t\thide: null,\n\t\tshow: null,\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null,\n\t\tbeforeLoad: null,\n\t\tload: null\n\t},\n\n\t_isLocal: ( function() {\n\t\tvar rhash = /#.*$/;\n\n\t\treturn function( anchor ) {\n\t\t\tvar anchorUrl, locationUrl;\n\n\t\t\tanchorUrl = anchor.href.replace( rhash, \"\" );\n\t\t\tlocationUrl = location.href.replace( rhash, \"\" );\n\n\t\t\t// Decoding may throw an error if the URL isn't UTF-8 (#9518)\n\t\t\ttry {\n\t\t\t\tanchorUrl = decodeURIComponent( anchorUrl );\n\t\t\t} catch ( error ) {}\n\t\t\ttry {\n\t\t\t\tlocationUrl = decodeURIComponent( locationUrl );\n\t\t\t} catch ( error ) {}\n\n\t\t\treturn anchor.hash.length > 1 && anchorUrl === locationUrl;\n\t\t};\n\t} )(),\n\n\t_create: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.running = false;\n\n\t\tthis._addClass( \"ui-tabs\", \"ui-widget ui-widget-content\" );\n\t\tthis._toggleClass( \"ui-tabs-collapsible\", null, options.collapsible );\n\n\t\tthis._processTabs();\n\t\toptions.active = this._initialActive();\n\n\t\t// Take disabling tabs via class attribute from HTML\n\t\t// into account and update option properly.\n\t\tif ( $.isArray( options.disabled ) ) {\n\t\t\toptions.disabled = $.unique( options.disabled.concat(\n\t\t\t\t$.map( this.tabs.filter( \".ui-state-disabled\" ), function( li ) {\n\t\t\t\t\treturn that.tabs.index( li );\n\t\t\t\t} )\n\t\t\t) ).sort();\n\t\t}\n\n\t\t// Check for length avoids error when initializing empty list\n\t\tif ( this.options.active !== false && this.anchors.length ) {\n\t\t\tthis.active = this._findActive( options.active );\n\t\t} else {\n\t\t\tthis.active = $();\n\t\t}\n\n\t\tthis._refresh();\n\n\t\tif ( this.active.length ) {\n\t\t\tthis.load( options.active );\n\t\t}\n\t},\n\n\t_initialActive: function() {\n\t\tvar active = this.options.active,\n\t\t\tcollapsible = this.options.collapsible,\n\t\t\tlocationHash = location.hash.substring( 1 );\n\n\t\tif ( active === null ) {\n\n\t\t\t// check the fragment identifier in the URL\n\t\t\tif ( locationHash ) {\n\t\t\t\tthis.tabs.each( function( i, tab ) {\n\t\t\t\t\tif ( $( tab ).attr( \"aria-controls\" ) === locationHash ) {\n\t\t\t\t\t\tactive = i;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Check for a tab marked active via a class\n\t\t\tif ( active === null ) {\n\t\t\t\tactive = this.tabs.index( this.tabs.filter( \".ui-tabs-active\" ) );\n\t\t\t}\n\n\t\t\t// No active tab, set to false\n\t\t\tif ( active === null || active === -1 ) {\n\t\t\t\tactive = this.tabs.length ? 0 : false;\n\t\t\t}\n\t\t}\n\n\t\t// Handle numbers: negative, out of range\n\t\tif ( active !== false ) {\n\t\t\tactive = this.tabs.index( this.tabs.eq( active ) );\n\t\t\tif ( active === -1 ) {\n\t\t\t\tactive = collapsible ? false : 0;\n\t\t\t}\n\t\t}\n\n\t\t// Don't allow collapsible: false and active: false\n\t\tif ( !collapsible && active === false && this.anchors.length ) {\n\t\t\tactive = 0;\n\t\t}\n\n\t\treturn active;\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\ttab: this.active,\n\t\t\tpanel: !this.active.length ? $() : this._getPanelForTab( this.active )\n\t\t};\n\t},\n\n\t_tabKeydown: function( event ) {\n\t\tvar focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( \"li\" ),\n\t\t\tselectedIndex = this.tabs.index( focusedTab ),\n\t\t\tgoingForward = true;\n\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.RIGHT:\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tselectedIndex++;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tgoingForward = false;\n\t\t\tselectedIndex--;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tselectedIndex = this.anchors.length - 1;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tselectedIndex = 0;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.SPACE:\n\n\t\t\t// Activate only, no collapsing\n\t\t\tevent.preventDefault();\n\t\t\tclearTimeout( this.activating );\n\t\t\tthis._activate( selectedIndex );\n\t\t\treturn;\n\t\tcase $.ui.keyCode.ENTER:\n\n\t\t\t// Toggle (cancel delayed activation, allow collapsing)\n\t\t\tevent.preventDefault();\n\t\t\tclearTimeout( this.activating );\n\n\t\t\t// Determine if we should collapse or activate\n\t\t\tthis._activate( selectedIndex === this.options.active ? false : selectedIndex );\n\t\t\treturn;\n\t\tdefault:\n\t\t\treturn;\n\t\t}\n\n\t\t// Focus the appropriate tab, based on which key was pressed\n\t\tevent.preventDefault();\n\t\tclearTimeout( this.activating );\n\t\tselectedIndex = this._focusNextTab( selectedIndex, goingForward );\n\n\t\t// Navigating with control/command key will prevent automatic activation\n\t\tif ( !event.ctrlKey && !event.metaKey ) {\n\n\t\t\t// Update aria-selected immediately so that AT think the tab is already selected.\n\t\t\t// Otherwise AT may confuse the user by stating that they need to activate the tab,\n\t\t\t// but the tab will already be activated by the time the announcement finishes.\n\t\t\tfocusedTab.attr( \"aria-selected\", \"false\" );\n\t\t\tthis.tabs.eq( selectedIndex ).attr( \"aria-selected\", \"true\" );\n\n\t\t\tthis.activating = this._delay( function() {\n\t\t\t\tthis.option( \"active\", selectedIndex );\n\t\t\t}, this.delay );\n\t\t}\n\t},\n\n\t_panelKeydown: function( event ) {\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ctrl+up moves focus to the current tab\n\t\tif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.active.trigger( \"focus\" );\n\t\t}\n\t},\n\n\t// Alt+page up/down moves focus to the previous/next tab (and activates)\n\t_handlePageNav: function( event ) {\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active - 1, false ) );\n\t\t\treturn true;\n\t\t}\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active + 1, true ) );\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t_findNextTab: function( index, goingForward ) {\n\t\tvar lastTabIndex = this.tabs.length - 1;\n\n\t\tfunction constrain() {\n\t\t\tif ( index > lastTabIndex ) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tif ( index < 0 ) {\n\t\t\t\tindex = lastTabIndex;\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\n\t\twhile ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {\n\t\t\tindex = goingForward ? index + 1 : index - 1;\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_focusNextTab: function( index, goingForward ) {\n\t\tindex = this._findNextTab( index, goingForward );\n\t\tthis.tabs.eq( index ).trigger( \"focus\" );\n\t\treturn index;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"collapsible\" ) {\n\t\t\tthis._toggleClass( \"ui-tabs-collapsible\", null, value );\n\n\t\t\t// Setting collapsible: false while collapsed; open first panel\n\t\t\tif ( !value && this.options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tif ( key === \"heightStyle\" ) {\n\t\t\tthis._setupHeightStyle( value );\n\t\t}\n\t},\n\n\t_sanitizeSelector: function( hash ) {\n\t\treturn hash ? hash.replace( /[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\" ) : \"\";\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options,\n\t\t\tlis = this.tablist.children( \":has(a[href])\" );\n\n\t\t// Get disabled tabs from class attribute from HTML\n\t\t// this will get converted to a boolean if needed in _refresh()\n\t\toptions.disabled = $.map( lis.filter( \".ui-state-disabled\" ), function( tab ) {\n\t\t\treturn lis.index( tab );\n\t\t} );\n\n\t\tthis._processTabs();\n\n\t\t// Was collapsed or no tabs\n\t\tif ( options.active === false || !this.anchors.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\n\t\t// was active, but active tab is gone\n\t\t} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {\n\n\t\t\t// all remaining tabs are disabled\n\t\t\tif ( this.tabs.length === options.disabled.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\n\t\t\t// activate previous tab\n\t\t\t} else {\n\t\t\t\tthis._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );\n\t\t\t}\n\n\t\t// was active, active tab still exists\n\t\t} else {\n\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.tabs.index( this.active );\n\t\t}\n\n\t\tthis._refresh();\n\t},\n\n\t_refresh: function() {\n\t\tthis._setOptionDisabled( this.options.disabled );\n\t\tthis._setupEvents( this.options.event );\n\t\tthis._setupHeightStyle( this.options.heightStyle );\n\n\t\tthis.tabs.not( this.active ).attr( {\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\ttabIndex: -1\n\t\t} );\n\t\tthis.panels.not( this._getPanelForTab( this.active ) )\n\t\t\t.hide()\n\t\t\t.attr( {\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t} );\n\n\t\t// Make sure one tab is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.tabs.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t} );\n\t\t\tthis._addClass( this.active, \"ui-tabs-active\", \"ui-state-active\" );\n\t\t\tthis._getPanelForTab( this.active )\n\t\t\t\t.show()\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_processTabs: function() {\n\t\tvar that = this,\n\t\t\tprevTabs = this.tabs,\n\t\t\tprevAnchors = this.anchors,\n\t\t\tprevPanels = this.panels;\n\n\t\tthis.tablist = this._getList().attr( \"role\", \"tablist\" );\n\t\tthis._addClass( this.tablist, \"ui-tabs-nav\",\n\t\t\t\"ui-helper-reset ui-helper-clearfix ui-widget-header\" );\n\n\t\t// Prevent users from focusing disabled tabs via click\n\t\tthis.tablist\n\t\t\t.on( \"mousedown\" + this.eventNamespace, \"> li\", function( event ) {\n\t\t\t\tif ( $( this ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} )\n\n\t\t\t// Support: IE <9\n\t\t\t// Preventing the default action in mousedown doesn't prevent IE\n\t\t\t// from focusing the element, so if the anchor gets focused, blur.\n\t\t\t// We don't have to worry about focusing the previously focused\n\t\t\t// element since clicking on a non-focusable element should focus\n\t\t\t// the body anyway.\n\t\t\t.on( \"focus\" + this.eventNamespace, \".ui-tabs-anchor\", function() {\n\t\t\t\tif ( $( this ).closest( \"li\" ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.tabs = this.tablist.find( \"> li:has(a[href])\" )\n\t\t\t.attr( {\n\t\t\t\trole: \"tab\",\n\t\t\t\ttabIndex: -1\n\t\t\t} );\n\t\tthis._addClass( this.tabs, \"ui-tabs-tab\", \"ui-state-default\" );\n\n\t\tthis.anchors = this.tabs.map( function() {\n\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t} )\n\t\t\t.attr( {\n\t\t\t\trole: \"presentation\",\n\t\t\t\ttabIndex: -1\n\t\t\t} );\n\t\tthis._addClass( this.anchors, \"ui-tabs-anchor\" );\n\n\t\tthis.panels = $();\n\n\t\tthis.anchors.each( function( i, anchor ) {\n\t\t\tvar selector, panel, panelId,\n\t\t\t\tanchorId = $( anchor ).uniqueId().attr( \"id\" ),\n\t\t\t\ttab = $( anchor ).closest( \"li\" ),\n\t\t\t\toriginalAriaControls = tab.attr( \"aria-controls\" );\n\n\t\t\t// Inline tab\n\t\t\tif ( that._isLocal( anchor ) ) {\n\t\t\t\tselector = anchor.hash;\n\t\t\t\tpanelId = selector.substring( 1 );\n\t\t\t\tpanel = that.element.find( that._sanitizeSelector( selector ) );\n\n\t\t\t// remote tab\n\t\t\t} else {\n\n\t\t\t\t// If the tab doesn't already have aria-controls,\n\t\t\t\t// generate an id by using a throw-away element\n\t\t\t\tpanelId = tab.attr( \"aria-controls\" ) || $( {} ).uniqueId()[ 0 ].id;\n\t\t\t\tselector = \"#\" + panelId;\n\t\t\t\tpanel = that.element.find( selector );\n\t\t\t\tif ( !panel.length ) {\n\t\t\t\t\tpanel = that._createPanel( panelId );\n\t\t\t\t\tpanel.insertAfter( that.panels[ i - 1 ] || that.tablist );\n\t\t\t\t}\n\t\t\t\tpanel.attr( \"aria-live\", \"polite\" );\n\t\t\t}\n\n\t\t\tif ( panel.length ) {\n\t\t\t\tthat.panels = that.panels.add( panel );\n\t\t\t}\n\t\t\tif ( originalAriaControls ) {\n\t\t\t\ttab.data( \"ui-tabs-aria-controls\", originalAriaControls );\n\t\t\t}\n\t\t\ttab.attr( {\n\t\t\t\t\"aria-controls\": panelId,\n\t\t\t\t\"aria-labelledby\": anchorId\n\t\t\t} );\n\t\t\tpanel.attr( \"aria-labelledby\", anchorId );\n\t\t} );\n\n\t\tthis.panels.attr( \"role\", \"tabpanel\" );\n\t\tthis._addClass( this.panels, \"ui-tabs-panel\", \"ui-widget-content\" );\n\n\t\t// Avoid memory leaks (#10056)\n\t\tif ( prevTabs ) {\n\t\t\tthis._off( prevTabs.not( this.tabs ) );\n\t\t\tthis._off( prevAnchors.not( this.anchors ) );\n\t\t\tthis._off( prevPanels.not( this.panels ) );\n\t\t}\n\t},\n\n\t// Allow overriding how to find the list for rare usage scenarios (#7715)\n\t_getList: function() {\n\t\treturn this.tablist || this.element.find( \"ol, ul\" ).eq( 0 );\n\t},\n\n\t_createPanel: function( id ) {\n\t\treturn $( \"<div>\" )\n\t\t\t.attr( \"id\", id )\n\t\t\t.data( \"ui-tabs-destroy\", true );\n\t},\n\n\t_setOptionDisabled: function( disabled ) {\n\t\tvar currentItem, li, i;\n\n\t\tif ( $.isArray( disabled ) ) {\n\t\t\tif ( !disabled.length ) {\n\t\t\t\tdisabled = false;\n\t\t\t} else if ( disabled.length === this.anchors.length ) {\n\t\t\t\tdisabled = true;\n\t\t\t}\n\t\t}\n\n\t\t// Disable tabs\n\t\tfor ( i = 0; ( li = this.tabs[ i ] ); i++ ) {\n\t\t\tcurrentItem = $( li );\n\t\t\tif ( disabled === true || $.inArray( i, disabled ) !== -1 ) {\n\t\t\t\tcurrentItem.attr( \"aria-disabled\", \"true\" );\n\t\t\t\tthis._addClass( currentItem, null, \"ui-state-disabled\" );\n\t\t\t} else {\n\t\t\t\tcurrentItem.removeAttr( \"aria-disabled\" );\n\t\t\t\tthis._removeClass( currentItem, null, \"ui-state-disabled\" );\n\t\t\t}\n\t\t}\n\n\t\tthis.options.disabled = disabled;\n\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null,\n\t\t\tdisabled === true );\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {};\n\t\tif ( event ) {\n\t\t\t$.each( event.split( \" \" ), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t} );\n\t\t}\n\n\t\tthis._off( this.anchors.add( this.tabs ).add( this.panels ) );\n\n\t\t// Always prevent the default action, even when disabled\n\t\tthis._on( true, this.anchors, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\t\tthis._on( this.anchors, events );\n\t\tthis._on( this.tabs, { keydown: \"_tabKeydown\" } );\n\t\tthis._on( this.panels, { keydown: \"_panelKeydown\" } );\n\n\t\tthis._focusable( this.tabs );\n\t\tthis._hoverable( this.tabs );\n\t},\n\n\t_setupHeightStyle: function( heightStyle ) {\n\t\tvar maxHeight,\n\t\t\tparent = this.element.parent();\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tmaxHeight -= this.element.outerHeight() - this.element.height();\n\n\t\t\tthis.element.siblings( \":visible\" ).each( function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.element.children().not( this.panels ).each( function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.panels.each( function() {\n\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t} )\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.panels.each( function() {\n\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t} ).height( maxHeight );\n\t\t}\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tanchor = $( event.currentTarget ),\n\t\t\ttab = anchor.closest( \"li\" ),\n\t\t\tclickedIsActive = tab[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : this._getPanelForTab( tab ),\n\t\t\ttoHide = !active.length ? $() : this._getPanelForTab( active ),\n\t\t\teventData = {\n\t\t\t\toldTab: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewTab: collapsing ? $() : tab,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif ( tab.hasClass( \"ui-state-disabled\" ) ||\n\n\t\t\t\t// tab is already loading\n\t\t\t\ttab.hasClass( \"ui-tabs-loading\" ) ||\n\n\t\t\t\t// can't switch durning an animation\n\t\t\t\tthis.running ||\n\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.tabs.index( tab );\n\n\t\tthis.active = clickedIsActive ? $() : tab;\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tif ( !toHide.length && !toShow.length ) {\n\t\t\t$.error( \"jQuery UI Tabs: Mismatching fragment identifier.\" );\n\t\t}\n\n\t\tif ( toShow.length ) {\n\t\t\tthis.load( this.tabs.index( tab ), event );\n\t\t}\n\t\tthis._toggle( event, eventData );\n\t},\n\n\t// Handles show/hide for selecting tabs\n\t_toggle: function( event, eventData ) {\n\t\tvar that = this,\n\t\t\ttoShow = eventData.newPanel,\n\t\t\ttoHide = eventData.oldPanel;\n\n\t\tthis.running = true;\n\n\t\tfunction complete() {\n\t\t\tthat.running = false;\n\t\t\tthat._trigger( \"activate\", event, eventData );\n\t\t}\n\n\t\tfunction show() {\n\t\t\tthat._addClass( eventData.newTab.closest( \"li\" ), \"ui-tabs-active\", \"ui-state-active\" );\n\n\t\t\tif ( toShow.length && that.options.show ) {\n\t\t\t\tthat._show( toShow, that.options.show, complete );\n\t\t\t} else {\n\t\t\t\ttoShow.show();\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\n\t\t// Start out by hiding, then showing, then completing\n\t\tif ( toHide.length && this.options.hide ) {\n\t\t\tthis._hide( toHide, this.options.hide, function() {\n\t\t\t\tthat._removeClass( eventData.oldTab.closest( \"li\" ),\n\t\t\t\t\t\"ui-tabs-active\", \"ui-state-active\" );\n\t\t\t\tshow();\n\t\t\t} );\n\t\t} else {\n\t\t\tthis._removeClass( eventData.oldTab.closest( \"li\" ),\n\t\t\t\t\"ui-tabs-active\", \"ui-state-active\" );\n\t\t\ttoHide.hide();\n\t\t\tshow();\n\t\t}\n\n\t\ttoHide.attr( \"aria-hidden\", \"true\" );\n\t\teventData.oldTab.attr( {\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\"\n\t\t} );\n\n\t\t// If we're switching tabs, remove the old tab from the tab order.\n\t\t// If we're opening from collapsed state, remove the previous tab from the tab order.\n\t\t// If we're collapsing, then keep the collapsing tab in the tab order.\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\teventData.oldTab.attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.tabs.filter( function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t} )\n\t\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow.attr( \"aria-hidden\", \"false\" );\n\t\teventData.newTab.attr( {\n\t\t\t\"aria-selected\": \"true\",\n\t\t\t\"aria-expanded\": \"true\",\n\t\t\ttabIndex: 0\n\t\t} );\n\t},\n\n\t_activate: function( index ) {\n\t\tvar anchor,\n\t\t\tactive = this._findActive( index );\n\n\t\t// Trying to activate the already active panel\n\t\tif ( active[ 0 ] === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Trying to collapse, simulate a click on the current active header\n\t\tif ( !active.length ) {\n\t\t\tactive = this.active;\n\t\t}\n\n\t\tanchor = active.find( \".ui-tabs-anchor\" )[ 0 ];\n\t\tthis._eventHandler( {\n\t\t\ttarget: anchor,\n\t\t\tcurrentTarget: anchor,\n\t\t\tpreventDefault: $.noop\n\t\t} );\n\t},\n\n\t_findActive: function( index ) {\n\t\treturn index === false ? $() : this.tabs.eq( index );\n\t},\n\n\t_getIndex: function( index ) {\n\n\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\tif ( typeof index === \"string\" ) {\n\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" +\n\t\t\t\t$.ui.escapeSelector( index ) + \"']\" ) );\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_destroy: function() {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tthis.tablist\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.off( this.eventNamespace );\n\n\t\tthis.anchors\n\t\t\t.removeAttr( \"role tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis.tabs.add( this.panels ).each( function() {\n\t\t\tif ( $.data( this, \"ui-tabs-destroy\" ) ) {\n\t\t\t\t$( this ).remove();\n\t\t\t} else {\n\t\t\t\t$( this ).removeAttr( \"role tabIndex \" +\n\t\t\t\t\t\"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded\" );\n\t\t\t}\n\t\t} );\n\n\t\tthis.tabs.each( function() {\n\t\t\tvar li = $( this ),\n\t\t\t\tprev = li.data( \"ui-tabs-aria-controls\" );\n\t\t\tif ( prev ) {\n\t\t\t\tli\n\t\t\t\t\t.attr( \"aria-controls\", prev )\n\t\t\t\t\t.removeData( \"ui-tabs-aria-controls\" );\n\t\t\t} else {\n\t\t\t\tli.removeAttr( \"aria-controls\" );\n\t\t\t}\n\t\t} );\n\n\t\tthis.panels.show();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tthis.panels.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\tenable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = false;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.map( disabled, function( num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tdisabled = $.map( this.tabs, function( li, num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t\tthis._setOptionDisabled( disabled );\n\t},\n\n\tdisable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = true;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.inArray( index, disabled ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.merge( [ index ], disabled ).sort();\n\t\t\t} else {\n\t\t\t\tdisabled = [ index ];\n\t\t\t}\n\t\t}\n\t\tthis._setOptionDisabled( disabled );\n\t},\n\n\tload: function( index, event ) {\n\t\tindex = this._getIndex( index );\n\t\tvar that = this,\n\t\t\ttab = this.tabs.eq( index ),\n\t\t\tanchor = tab.find( \".ui-tabs-anchor\" ),\n\t\t\tpanel = this._getPanelForTab( tab ),\n\t\t\teventData = {\n\t\t\t\ttab: tab,\n\t\t\t\tpanel: panel\n\t\t\t},\n\t\t\tcomplete = function( jqXHR, status ) {\n\t\t\t\tif ( status === \"abort\" ) {\n\t\t\t\t\tthat.panels.stop( false, true );\n\t\t\t\t}\n\n\t\t\t\tthat._removeClass( tab, \"ui-tabs-loading\" );\n\t\t\t\tpanel.removeAttr( \"aria-busy\" );\n\n\t\t\t\tif ( jqXHR === that.xhr ) {\n\t\t\t\t\tdelete that.xhr;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Not remote\n\t\tif ( this._isLocal( anchor[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );\n\n\t\t// Support: jQuery <1.8\n\t\t// jQuery <1.8 returns false if the request is canceled in beforeSend,\n\t\t// but as of 1.8, $.ajax() always returns a jqXHR object.\n\t\tif ( this.xhr && this.xhr.statusText !== \"canceled\" ) {\n\t\t\tthis._addClass( tab, \"ui-tabs-loading\" );\n\t\t\tpanel.attr( \"aria-busy\", \"true\" );\n\n\t\t\tthis.xhr\n\t\t\t\t.done( function( response, status, jqXHR ) {\n\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tpanel.html( response );\n\t\t\t\t\t\tthat._trigger( \"load\", event, eventData );\n\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t} )\n\t\t\t\t.fail( function( jqXHR, status ) {\n\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_ajaxSettings: function( anchor, event, eventData ) {\n\t\tvar that = this;\n\t\treturn {\n\n\t\t\t// Support: IE <11 only\n\t\t\t// Strip any hash that exists to prevent errors with the Ajax request\n\t\t\turl: anchor.attr( \"href\" ).replace( /#.*$/, \"\" ),\n\t\t\tbeforeSend: function( jqXHR, settings ) {\n\t\t\t\treturn that._trigger( \"beforeLoad\", event,\n\t\t\t\t\t$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );\n\t\t\t}\n\t\t};\n\t},\n\n\t_getPanelForTab: function( tab ) {\n\t\tvar id = $( tab ).attr( \"aria-controls\" );\n\t\treturn this.element.find( this._sanitizeSelector( \"#\" + id ) );\n\t}\n} );\n\n// DEPRECATED\n// TODO: Switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for ui-tab class (now ui-tabs-tab)\n\t$.widget( \"ui.tabs\", $.ui.tabs, {\n\t\t_processTabs: function() {\n\t\t\tthis._superApply( arguments );\n\t\t\tthis._addClass( this.tabs, \"ui-tab\" );\n\t\t}\n\t} );\n}\n\nvar widgetsTabs = $.ui.tabs;\n\n\n/*!\n * jQuery UI Tooltip 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Tooltip\n//>>group: Widgets\n//>>description: Shows additional information for any element on hover or focus.\n//>>docs: http://api.jqueryui.com/tooltip/\n//>>demos: http://jqueryui.com/tooltip/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/tooltip.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.tooltip\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tclasses: {\n\t\t\t\"ui-tooltip\": \"ui-corner-all ui-widget-shadow\"\n\t\t},\n\t\tcontent: function() {\n\n\t\t\t// support: IE<9, Opera in jQuery <1.7\n\t\t\t// .text() can't accept undefined, so coerce to a string\n\t\t\tvar title = $( this ).attr( \"title\" ) || \"\";\n\n\t\t\t// Escape title, since we're going from an attribute to raw HTML\n\t\t\treturn $( \"<a>\" ).text( title ).html();\n\t\t},\n\t\thide: true,\n\n\t\t// Disabled elements have inconsistent behavior across browsers (#8661)\n\t\titems: \"[title]:not([disabled])\",\n\t\tposition: {\n\t\t\tmy: \"left top+15\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"flipfit flip\"\n\t\t},\n\t\tshow: true,\n\t\ttrack: false,\n\n\t\t// Callbacks\n\t\tclose: null,\n\t\topen: null\n\t},\n\n\t_addDescribedBy: function( elem, id ) {\n\t\tvar describedby = ( elem.attr( \"aria-describedby\" ) || \"\" ).split( /\\s+/ );\n\t\tdescribedby.push( id );\n\t\telem\n\t\t\t.data( \"ui-tooltip-id\", id )\n\t\t\t.attr( \"aria-describedby\", $.trim( describedby.join( \" \" ) ) );\n\t},\n\n\t_removeDescribedBy: function( elem ) {\n\t\tvar id = elem.data( \"ui-tooltip-id\" ),\n\t\t\tdescribedby = ( elem.attr( \"aria-describedby\" ) || \"\" ).split( /\\s+/ ),\n\t\t\tindex = $.inArray( id, describedby );\n\n\t\tif ( index !== -1 ) {\n\t\t\tdescribedby.splice( index, 1 );\n\t\t}\n\n\t\telem.removeData( \"ui-tooltip-id\" );\n\t\tdescribedby = $.trim( describedby.join( \" \" ) );\n\t\tif ( describedby ) {\n\t\t\telem.attr( \"aria-describedby\", describedby );\n\t\t} else {\n\t\t\telem.removeAttr( \"aria-describedby\" );\n\t\t}\n\t},\n\n\t_create: function() {\n\t\tthis._on( {\n\t\t\tmouseover: \"open\",\n\t\t\tfocusin: \"open\"\n\t\t} );\n\n\t\t// IDs of generated tooltips, needed for destroy\n\t\tthis.tooltips = {};\n\n\t\t// IDs of parent tooltips where we removed the title attribute\n\t\tthis.parents = {};\n\n\t\t// Append the aria-live region so tooltips announce correctly\n\t\tthis.liveRegion = $( \"<div>\" )\n\t\t\t.attr( {\n\t\t\t\trole: \"log\",\n\t\t\t\t\"aria-live\": \"assertive\",\n\t\t\t\t\"aria-relevant\": \"additions\"\n\t\t\t} )\n\t\t\t.appendTo( this.document[ 0 ].body );\n\t\tthis._addClass( this.liveRegion, null, \"ui-helper-hidden-accessible\" );\n\n\t\tthis.disabledTitles = $( [] );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar that = this;\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"content\" ) {\n\t\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\t\t\t\tthat._updateContent( tooltipData.element );\n\t\t\t} );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis[ value ? \"_disable\" : \"_enable\" ]();\n\t},\n\n\t_disable: function() {\n\t\tvar that = this;\n\n\t\t// Close open tooltips\n\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\t\t\tvar event = $.Event( \"blur\" );\n\t\t\tevent.target = event.currentTarget = tooltipData.element[ 0 ];\n\t\t\tthat.close( event, true );\n\t\t} );\n\n\t\t// Remove title attributes to prevent native tooltips\n\t\tthis.disabledTitles = this.disabledTitles.add(\n\t\t\tthis.element.find( this.options.items ).addBack()\n\t\t\t\t.filter( function() {\n\t\t\t\t\tvar element = $( this );\n\t\t\t\t\tif ( element.is( \"[title]\" ) ) {\n\t\t\t\t\t\treturn element\n\t\t\t\t\t\t\t.data( \"ui-tooltip-title\", element.attr( \"title\" ) )\n\t\t\t\t\t\t\t.removeAttr( \"title\" );\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t);\n\t},\n\n\t_enable: function() {\n\n\t\t// restore title attributes\n\t\tthis.disabledTitles.each( function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t}\n\t\t} );\n\t\tthis.disabledTitles = $( [] );\n\t},\n\n\topen: function( event ) {\n\t\tvar that = this,\n\t\t\ttarget = $( event ? event.target : this.element )\n\n\t\t\t\t// we need closest here due to mouseover bubbling,\n\t\t\t\t// but always pointing at the same event target\n\t\t\t\t.closest( this.options.items );\n\n\t\t// No element to show a tooltip for or the tooltip is already open\n\t\tif ( !target.length || target.data( \"ui-tooltip-id\" ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( target.attr( \"title\" ) ) {\n\t\t\ttarget.data( \"ui-tooltip-title\", target.attr( \"title\" ) );\n\t\t}\n\n\t\ttarget.data( \"ui-tooltip-open\", true );\n\n\t\t// Kill parent tooltips, custom or native, for hover\n\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\ttarget.parents().each( function() {\n\t\t\t\tvar parent = $( this ),\n\t\t\t\t\tblurEvent;\n\t\t\t\tif ( parent.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\tblurEvent = $.Event( \"blur\" );\n\t\t\t\t\tblurEvent.target = blurEvent.currentTarget = this;\n\t\t\t\t\tthat.close( blurEvent, true );\n\t\t\t\t}\n\t\t\t\tif ( parent.attr( \"title\" ) ) {\n\t\t\t\t\tparent.uniqueId();\n\t\t\t\t\tthat.parents[ this.id ] = {\n\t\t\t\t\t\telement: this,\n\t\t\t\t\t\ttitle: parent.attr( \"title\" )\n\t\t\t\t\t};\n\t\t\t\t\tparent.attr( \"title\", \"\" );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis._registerCloseHandlers( event, target );\n\t\tthis._updateContent( target, event );\n\t},\n\n\t_updateContent: function( target, event ) {\n\t\tvar content,\n\t\t\tcontentOption = this.options.content,\n\t\t\tthat = this,\n\t\t\teventType = event ? event.type : null;\n\n\t\tif ( typeof contentOption === \"string\" || contentOption.nodeType ||\n\t\t\t\tcontentOption.jquery ) {\n\t\t\treturn this._open( event, target, contentOption );\n\t\t}\n\n\t\tcontent = contentOption.call( target[ 0 ], function( response ) {\n\n\t\t\t// IE may instantly serve a cached response for ajax requests\n\t\t\t// delay this call to _open so the other call to _open runs first\n\t\t\tthat._delay( function() {\n\n\t\t\t\t// Ignore async response if tooltip was closed already\n\t\t\t\tif ( !target.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// JQuery creates a special event for focusin when it doesn't\n\t\t\t\t// exist natively. To improve performance, the native event\n\t\t\t\t// object is reused and the type is changed. Therefore, we can't\n\t\t\t\t// rely on the type being correct after the event finished\n\t\t\t\t// bubbling, so we set it back to the previous value. (#8740)\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.type = eventType;\n\t\t\t\t}\n\t\t\t\tthis._open( event, target, response );\n\t\t\t} );\n\t\t} );\n\t\tif ( content ) {\n\t\t\tthis._open( event, target, content );\n\t\t}\n\t},\n\n\t_open: function( event, target, content ) {\n\t\tvar tooltipData, tooltip, delayedShow, a11yContent,\n\t\t\tpositionOption = $.extend( {}, this.options.position );\n\n\t\tif ( !content ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Content can be updated multiple times. If the tooltip already\n\t\t// exists, then just update the content and bail.\n\t\ttooltipData = this._find( target );\n\t\tif ( tooltipData ) {\n\t\t\ttooltipData.tooltip.find( \".ui-tooltip-content\" ).html( content );\n\t\t\treturn;\n\t\t}\n\n\t\t// If we have a title, clear it to prevent the native tooltip\n\t\t// we have to check first to avoid defining a title if none exists\n\t\t// (we don't want to cause an element to start matching [title])\n\t\t//\n\t\t// We use removeAttr only for key events, to allow IE to export the correct\n\t\t// accessible attributes. For mouse events, set to empty string to avoid\n\t\t// native tooltip showing up (happens only when removing inside mouseover).\n\t\tif ( target.is( \"[title]\" ) ) {\n\t\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\t\ttarget.attr( \"title\", \"\" );\n\t\t\t} else {\n\t\t\t\ttarget.removeAttr( \"title\" );\n\t\t\t}\n\t\t}\n\n\t\ttooltipData = this._tooltip( target );\n\t\ttooltip = tooltipData.tooltip;\n\t\tthis._addDescribedBy( target, tooltip.attr( \"id\" ) );\n\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\n\t\t// Support: Voiceover on OS X, JAWS on IE <= 9\n\t\t// JAWS announces deletions even when aria-relevant=\"additions\"\n\t\t// Voiceover will sometimes re-read the entire log region's contents from the beginning\n\t\tthis.liveRegion.children().hide();\n\t\ta11yContent = $( \"<div>\" ).html( tooltip.find( \".ui-tooltip-content\" ).html() );\n\t\ta11yContent.removeAttr( \"name\" ).find( \"[name]\" ).removeAttr( \"name\" );\n\t\ta11yContent.removeAttr( \"id\" ).find( \"[id]\" ).removeAttr( \"id\" );\n\t\ta11yContent.appendTo( this.liveRegion );\n\n\t\tfunction position( event ) {\n\t\t\tpositionOption.of = event;\n\t\t\tif ( tooltip.is( \":hidden\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttooltip.position( positionOption );\n\t\t}\n\t\tif ( this.options.track && event && /^mouse/.test( event.type ) ) {\n\t\t\tthis._on( this.document, {\n\t\t\t\tmousemove: position\n\t\t\t} );\n\n\t\t\t// trigger once to override element-relative positioning\n\t\t\tposition( event );\n\t\t} else {\n\t\t\ttooltip.position( $.extend( {\n\t\t\t\tof: target\n\t\t\t}, this.options.position ) );\n\t\t}\n\n\t\ttooltip.hide();\n\n\t\tthis._show( tooltip, this.options.show );\n\n\t\t// Handle tracking tooltips that are shown with a delay (#8644). As soon\n\t\t// as the tooltip is visible, position the tooltip using the most recent\n\t\t// event.\n\t\t// Adds the check to add the timers only when both delay and track options are set (#14682)\n\t\tif ( this.options.track && this.options.show && this.options.show.delay ) {\n\t\t\tdelayedShow = this.delayedShow = setInterval( function() {\n\t\t\t\tif ( tooltip.is( \":visible\" ) ) {\n\t\t\t\t\tposition( positionOption.of );\n\t\t\t\t\tclearInterval( delayedShow );\n\t\t\t\t}\n\t\t\t}, $.fx.interval );\n\t\t}\n\n\t\tthis._trigger( \"open\", event, { tooltip: tooltip } );\n\t},\n\n\t_registerCloseHandlers: function( event, target ) {\n\t\tvar events = {\n\t\t\tkeyup: function( event ) {\n\t\t\t\tif ( event.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tvar fakeEvent = $.Event( event );\n\t\t\t\t\tfakeEvent.currentTarget = target[ 0 ];\n\t\t\t\t\tthis.close( fakeEvent, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Only bind remove handler for delegated targets. Non-delegated\n\t\t// tooltips will handle this in destroy.\n\t\tif ( target[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tevents.remove = function() {\n\t\t\t\tthis._removeTooltip( this._find( target ).tooltip );\n\t\t\t};\n\t\t}\n\n\t\tif ( !event || event.type === \"mouseover\" ) {\n\t\t\tevents.mouseleave = \"close\";\n\t\t}\n\t\tif ( !event || event.type === \"focusin\" ) {\n\t\t\tevents.focusout = \"close\";\n\t\t}\n\t\tthis._on( true, target, events );\n\t},\n\n\tclose: function( event ) {\n\t\tvar tooltip,\n\t\t\tthat = this,\n\t\t\ttarget = $( event ? event.currentTarget : this.element ),\n\t\t\ttooltipData = this._find( target );\n\n\t\t// The tooltip may already be closed\n\t\tif ( !tooltipData ) {\n\n\t\t\t// We set ui-tooltip-open immediately upon open (in open()), but only set the\n\t\t\t// additional data once there's actually content to show (in _open()). So even if the\n\t\t\t// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in\n\t\t\t// the period between open() and _open().\n\t\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\t\treturn;\n\t\t}\n\n\t\ttooltip = tooltipData.tooltip;\n\n\t\t// Disabling closes the tooltip, so we need to track when we're closing\n\t\t// to avoid an infinite loop in case the tooltip becomes disabled on close\n\t\tif ( tooltipData.closing ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clear the interval for delayed tracking tooltips\n\t\tclearInterval( this.delayedShow );\n\n\t\t// Only set title if we had one before (see comment in _open())\n\t\t// If the title attribute has changed since open(), don't restore\n\t\tif ( target.data( \"ui-tooltip-title\" ) && !target.attr( \"title\" ) ) {\n\t\t\ttarget.attr( \"title\", target.data( \"ui-tooltip-title\" ) );\n\t\t}\n\n\t\tthis._removeDescribedBy( target );\n\n\t\ttooltipData.hiding = true;\n\t\ttooltip.stop( true );\n\t\tthis._hide( tooltip, this.options.hide, function() {\n\t\t\tthat._removeTooltip( $( this ) );\n\t\t} );\n\n\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\tthis._off( target, \"mouseleave focusout keyup\" );\n\n\t\t// Remove 'remove' binding only on delegated targets\n\t\tif ( target[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tthis._off( target, \"remove\" );\n\t\t}\n\t\tthis._off( this.document, \"mousemove\" );\n\n\t\tif ( event && event.type === \"mouseleave\" ) {\n\t\t\t$.each( this.parents, function( id, parent ) {\n\t\t\t\t$( parent.element ).attr( \"title\", parent.title );\n\t\t\t\tdelete that.parents[ id ];\n\t\t\t} );\n\t\t}\n\n\t\ttooltipData.closing = true;\n\t\tthis._trigger( \"close\", event, { tooltip: tooltip } );\n\t\tif ( !tooltipData.hiding ) {\n\t\t\ttooltipData.closing = false;\n\t\t}\n\t},\n\n\t_tooltip: function( element ) {\n\t\tvar tooltip = $( \"<div>\" ).attr( \"role\", \"tooltip\" ),\n\t\t\tcontent = $( \"<div>\" ).appendTo( tooltip ),\n\t\t\tid = tooltip.uniqueId().attr( \"id\" );\n\n\t\tthis._addClass( content, \"ui-tooltip-content\" );\n\t\tthis._addClass( tooltip, \"ui-tooltip\", \"ui-widget ui-widget-content\" );\n\n\t\ttooltip.appendTo( this._appendTo( element ) );\n\n\t\treturn this.tooltips[ id ] = {\n\t\t\telement: element,\n\t\t\ttooltip: tooltip\n\t\t};\n\t},\n\n\t_find: function( target ) {\n\t\tvar id = target.data( \"ui-tooltip-id\" );\n\t\treturn id ? this.tooltips[ id ] : null;\n\t},\n\n\t_removeTooltip: function( tooltip ) {\n\t\ttooltip.remove();\n\t\tdelete this.tooltips[ tooltip.attr( \"id\" ) ];\n\t},\n\n\t_appendTo: function( target ) {\n\t\tvar element = target.closest( \".ui-front, dialog\" );\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[ 0 ].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_destroy: function() {\n\t\tvar that = this;\n\n\t\t// Close open tooltips\n\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\n\t\t\t// Delegate to close method to handle common cleanup\n\t\t\tvar event = $.Event( \"blur\" ),\n\t\t\t\telement = tooltipData.element;\n\t\t\tevent.target = event.currentTarget = element[ 0 ];\n\t\t\tthat.close( event, true );\n\n\t\t\t// Remove immediately; destroying an open tooltip doesn't use the\n\t\t\t// hide animation\n\t\t\t$( \"#\" + id ).remove();\n\n\t\t\t// Restore the title\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\n\t\t\t\t// If the title attribute has changed since open(), don't restore\n\t\t\t\tif ( !element.attr( \"title\" ) ) {\n\t\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t\t}\n\t\t\t\telement.removeData( \"ui-tooltip-title\" );\n\t\t\t}\n\t\t} );\n\t\tthis.liveRegion.remove();\n\t}\n} );\n\n// DEPRECATED\n// TODO: Switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for tooltipClass option\n\t$.widget( \"ui.tooltip\", $.ui.tooltip, {\n\t\toptions: {\n\t\t\ttooltipClass: null\n\t\t},\n\t\t_tooltip: function() {\n\t\t\tvar tooltipData = this._superApply( arguments );\n\t\t\tif ( this.options.tooltipClass ) {\n\t\t\t\ttooltipData.tooltip.addClass( this.options.tooltipClass );\n\t\t\t}\n\t\t\treturn tooltipData;\n\t\t}\n\t} );\n}\n\nvar widgetsTooltip = $.ui.tooltip;\n\n\n\n\n}));","/*!\n * Fluid Infusion v2.0.0\n *\n * Infusion is distributed under the Educational Community License 2.0 and new BSD licenses:\n * http://wiki.fluidproject.org/display/fluid/Fluid+Licensing\n *\n * For information on copyright, see the individual Infusion source code files:\n * https://github.com/fluid-project/infusion/\n */\n/*\nCopyright 2007-2010 University of Cambridge\nCopyright 2007-2009 University of Toronto\nCopyright 2007-2009 University of California, Berkeley\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2010-2015 OCAD University\nCopyright 2011 Charly Molter\nCopyright 2012-2014 Raising the Floor - US\nCopyright 2014-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\n/* global console */\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\nvar fluid = fluid || fluid_2_0_0;\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.version = \"Infusion 2.0.0\";\n\n // Export this for use in environments like node.js, where it is useful for\n // configuring stack trace behaviour\n fluid.Error = Error;\n\n fluid.environment = {\n fluid: fluid\n };\n\n fluid.global = fluid.global || typeof window !== \"undefined\" ?\n window : typeof self !== \"undefined\" ? self : {};\n\n // A standard utility to schedule the invocation of a function after the current\n // stack returns. On browsers this defaults to setTimeout(func, 1) but in\n // other environments can be customised - e.g. to process.nextTick in node.js\n // In future, this could be optimised in the browser to not dispatch into the event queue\n fluid.invokeLater = function (func) {\n return setTimeout(func, 1);\n };\n\n // The following flag defeats all logging/tracing activities in the most performance-critical parts of the framework.\n // This should really be performed by a build-time step which eliminates calls to pushActivity/popActivity and fluid.log.\n fluid.defeatLogging = true;\n\n // This flag enables the accumulating of all \"activity\" records generated by pushActivity into a running trace, rather\n // than removing them from the stack record permanently when receiving popActivity. This trace will be consumed by\n // visual debugging tools.\n fluid.activityTracing = false;\n fluid.activityTrace = [];\n\n var activityParser = /(%\\w+)/g;\n\n // Renders a single activity element in a form suitable to be sent to a modern browser's console\n // unsupported, non-API function\n fluid.renderOneActivity = function (activity, nowhile) {\n var togo = nowhile === true ? [] : [\" while \"];\n var message = activity.message;\n var index = activityParser.lastIndex = 0;\n while (true) {\n var match = activityParser.exec(message);\n if (match) {\n var key = match[1].substring(1);\n togo.push(message.substring(index, match.index));\n togo.push(activity.args[key]);\n index = activityParser.lastIndex;\n }\n else {\n break;\n }\n }\n if (index < message.length) {\n togo.push(message.substring(index));\n }\n return togo;\n };\n\n // Renders an activity stack in a form suitable to be sent to a modern browser's console\n // unsupported, non-API function\n fluid.renderActivity = function (activityStack, renderer) {\n renderer = renderer || fluid.renderOneActivity;\n return fluid.transform(activityStack, renderer);\n };\n\n // Definitions for ThreadLocals - lifted here from\n // FluidIoC.js so that we can issue calls to fluid.describeActivity for debugging purposes\n // in the core framework\n\n // unsupported, non-API function\n fluid.singleThreadLocal = function (initFunc) {\n var value = initFunc();\n return function (newValue) {\n return newValue === undefined ? value : value = newValue;\n };\n };\n\n // Currently we only support single-threaded environments - ensure that this function\n // is not used on startup so it can be successfully monkey-patched\n // only remaining uses of threadLocals are for activity reporting and in the renderer utilities\n // unsupported, non-API function\n fluid.threadLocal = fluid.singleThreadLocal;\n\n // unsupported, non-API function\n fluid.globalThreadLocal = fluid.threadLocal(function () {\n return {};\n });\n\n // Return an array of objects describing the current activity\n // unsupported, non-API function\n fluid.getActivityStack = function () {\n var root = fluid.globalThreadLocal();\n if (!root.activityStack) {\n root.activityStack = [];\n }\n return root.activityStack;\n };\n\n // Return an array of objects describing the current activity\n // unsupported, non-API function\n fluid.describeActivity = fluid.getActivityStack;\n\n // Renders either the current activity or the supplied activity to the console\n fluid.logActivity = function (activity) {\n activity = activity || fluid.describeActivity();\n var rendered = fluid.renderActivity(activity).reverse();\n fluid.log(\"Current activity: \");\n fluid.each(rendered, function (args) {\n fluid.doLog(args);\n });\n };\n\n // Execute the supplied function with the specified activity description pushed onto the stack\n // unsupported, non-API function\n fluid.pushActivity = function (type, message, args) {\n var record = {type: type, message: message, args: args, time: new Date().getTime()};\n if (fluid.activityTracing) {\n fluid.activityTrace.push(record);\n }\n if (fluid.passLogLevel(fluid.logLevel.TRACE)) {\n fluid.doLog(fluid.renderOneActivity(record, true));\n }\n var activityStack = fluid.getActivityStack();\n activityStack.push(record);\n };\n\n // Undo the effect of the most recent pushActivity, or multiple frames if an argument is supplied\n fluid.popActivity = function (popframes) {\n popframes = popframes || 1;\n if (fluid.activityTracing) {\n fluid.activityTrace.push({pop: popframes});\n }\n var activityStack = fluid.getActivityStack();\n var popped = activityStack.length - popframes;\n activityStack.length = popped < 0 ? 0 : popped;\n };\n // \"this-ist\" style Error so that we can distinguish framework errors whilst still retaining access to platform Error features\n // Solution taken from http://stackoverflow.com/questions/8802845/inheriting-from-the-error-object-where-is-the-message-property#answer-17936621\n fluid.FluidError = function (/*message*/) {\n var togo = Error.apply(this, arguments);\n this.message = togo.message;\n try { // This technique is necessary on IE11 since otherwise the stack entry is not filled in\n throw togo;\n } catch (togo) {\n this.stack = togo.stack;\n }\n return this;\n };\n fluid.FluidError.prototype = Object.create(Error.prototype);\n\n // The framework's built-in \"log\" failure handler - this logs the supplied message as well as any framework activity in progress via fluid.log\n fluid.logFailure = function (args, activity) {\n fluid.log.apply(null, [fluid.logLevel.FAIL, \"ASSERTION FAILED: \"].concat(args));\n fluid.logActivity(activity);\n };\n\n fluid.renderLoggingArg = function (arg) {\n return fluid.isPrimitive(arg) || !fluid.isPlainObject(arg) ? arg : JSON.stringify(arg);\n };\n\n // The framework's built-in \"fail\" failure handler - this throws an exception of type <code>fluid.FluidError</code>\n fluid.builtinFail = function (args /*, activity*/) {\n var message = fluid.transform(args, fluid.renderLoggingArg).join(\"\");\n throw new fluid.FluidError(\"Assertion failure - check console for more details: \" + message);\n };\n\n /**\n * Signals an error to the framework. The default behaviour is to log a structured error message and throw an exception. This strategy may be configured using the legacy\n * API <code>fluid.pushSoftFailure</code> or else by adding and removing suitably namespaced listeners to the special event <code>fluid.failureEvent</code>\n *\n * @param {String} message the error message to log\n * @param ... Additional arguments, suitable for being sent to the native console.log function\n */\n fluid.fail = function (/* message, ... */) {\n var args = fluid.makeArray(arguments);\n var activity = fluid.makeArray(fluid.describeActivity()); // Take copy since we will destructively modify\n fluid.popActivity(activity.length); // clear any current activity - TODO: the framework currently has no exception handlers, although it will in time\n if (fluid.failureEvent) { // notify any framework failure prior to successfully setting up the failure event below\n fluid.failureEvent.fire(args, activity);\n } else {\n fluid.logFailure(args, activity);\n fluid.builtinFail(args, activity);\n }\n };\n\n // TODO: rescued from kettleCouchDB.js - clean up in time\n fluid.expect = function (name, target, members) {\n fluid.transform(fluid.makeArray(members), function (key) {\n if (typeof target[key] === \"undefined\") {\n fluid.fail(name + \" missing required parameter \" + key);\n }\n });\n };\n\n // Logging\n\n /** Returns whether logging is enabled **/\n fluid.isLogging = function () {\n return logLevelStack[0].priority > fluid.logLevel.IMPORTANT.priority;\n };\n\n /** Determines whether the supplied argument is a valid logLevel marker **/\n fluid.isLogLevel = function (arg) {\n return fluid.isMarker(arg) && arg.priority !== undefined;\n };\n\n /** Accepts one of the members of the <code>fluid.logLevel</code> structure. Returns <code>true</code> if\n * a message supplied at that log priority would be accepted at the current logging level. Clients who\n * issue particularly expensive log payload arguments are recommended to guard their logging statements with this\n * function */\n\n fluid.passLogLevel = function (testLogLevel) {\n return testLogLevel.priority <= logLevelStack[0].priority;\n };\n\n /** Method to allow user to control the logging level. Accepts either a boolean, for which <code>true</code>\n * represents <code>fluid.logLevel.INFO</code> and <code>false</code> represents <code>fluid.logLevel.IMPORTANT</code> (the default),\n * or else any other member of the structure <code>fluid.logLevel</code>\n * Messages whose priority is strictly less than the current logging level will not be shown*/\n fluid.setLogging = function (enabled) {\n var logLevel;\n if (typeof enabled === \"boolean\") {\n logLevel = fluid.logLevel[enabled ? \"INFO\" : \"IMPORTANT\"];\n } else if (fluid.isLogLevel(enabled)) {\n logLevel = enabled;\n } else {\n fluid.fail(\"Unrecognised fluid logging level \", enabled);\n }\n logLevelStack.unshift(logLevel);\n fluid.defeatLogging = !fluid.isLogging();\n };\n\n fluid.setLogLevel = fluid.setLogging;\n\n /** Undo the effect of the most recent \"setLogging\", returning the logging system to its previous state **/\n fluid.popLogging = function () {\n var togo = logLevelStack.length === 1 ? logLevelStack[0] : logLevelStack.shift();\n fluid.defeatLogging = !fluid.isLogging();\n return togo;\n };\n\n /** Actually do the work of logging <code>args</code> to the environment's console. If the standard \"console\"\n * stream is available, the message will be sent there.\n */\n fluid.doLog = function (args) {\n if (typeof (console) !== \"undefined\") {\n if (console.debug) {\n console.debug.apply(console, args);\n } else if (typeof (console.log) === \"function\") {\n console.log.apply(console, args);\n }\n }\n };\n\n /** Log a message to a suitable environmental console. If the first argument to fluid.log is\n * one of the members of the <code>fluid.logLevel</code> structure, this will be taken as the priority\n * of the logged message - else if will default to <code>fluid.logLevel.INFO</code>. If the logged message\n * priority does not exceed that set by the most recent call to the <code>fluid.setLogging</code> function,\n * the message will not appear.\n */\n fluid.log = function (/* message /*, ... */) {\n var directArgs = fluid.makeArray(arguments);\n var userLogLevel = fluid.logLevel.INFO;\n if (fluid.isLogLevel(directArgs[0])) {\n userLogLevel = directArgs.shift();\n }\n if (fluid.passLogLevel(userLogLevel)) {\n var arg0 = fluid.renderTimestamp(new Date()) + \": \";\n var args = [arg0].concat(directArgs);\n fluid.doLog(args);\n }\n };\n\n // Functional programming utilities.\n\n // Type checking functions\n\n /** Returns true if the argument is a value other than null or undefined **/\n fluid.isValue = function (value) {\n return value !== undefined && value !== null;\n };\n\n /** Returns true if the argument is a primitive type **/\n fluid.isPrimitive = function (value) {\n var valueType = typeof (value);\n return !value || valueType === \"string\" || valueType === \"boolean\" || valueType === \"number\" || valueType === \"function\";\n };\n\n /** Determines whether the supplied object is an array. The strategy used is an optimised\n * approach taken from an earlier version of jQuery - detecting whether the toString() version\n * of the object agrees with the textual form [object Array], or else whether the object is a\n * jQuery object (the most common source of \"fake arrays\").\n */\n fluid.isArrayable = function (totest) {\n return totest && (totest.jquery || Object.prototype.toString.call(totest) === \"[object Array]\");\n };\n\n /** Determines whether the supplied object is a plain JSON-forming container - that is, it is either a plain Object\n * or a plain Array. Note that this differs from jQuery's isPlainObject which does not pass Arrays.\n * @param totest {Any} The object to be tested\n * @param strict {Boolean} (optional) If `true`, plain Arrays will fail the test rather than passing.\n */\n fluid.isPlainObject = function (totest, strict) {\n var string = Object.prototype.toString.call(totest);\n if (string === \"[object Array]\") {\n return !strict;\n } else if (string !== \"[object Object]\") {\n return false;\n } // FLUID-5226: This inventive strategy taken from jQuery detects whether the object's prototype is directly Object.prototype by virtue of having an \"isPrototypeOf\" direct member\n return !totest.constructor || !totest.constructor.prototype || Object.prototype.hasOwnProperty.call(totest.constructor.prototype, \"isPrototypeOf\");\n };\n\n /** Returns <code>primitive</code>, <code>array</code> or <code>object</code> depending on whether the supplied object has\n * one of those types, by use of the <code>fluid.isPrimitive</code>, <code>fluid.isPlainObject</code> and <code>fluid.isArrayable</code> utilities\n */\n fluid.typeCode = function (totest) {\n return fluid.isPrimitive(totest) || !fluid.isPlainObject(totest) ? \"primitive\" :\n fluid.isArrayable(totest) ? \"array\" : \"object\";\n };\n\n fluid.isIoCReference = function (ref) {\n return typeof(ref) === \"string\" && ref.charAt(0) === \"{\" && ref.indexOf(\"}\") > 0;\n };\n\n fluid.isDOMNode = function (obj) {\n // This could be more sound, but messy:\n // http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n // The real problem is browsers like IE6, 7 and 8 which still do not feature a \"constructor\" property on DOM nodes\n return obj && typeof (obj.nodeType) === \"number\";\n };\n\n fluid.isComponent = function (obj) {\n return obj && obj.constructor === fluid.componentConstructor;\n };\n\n fluid.isUncopyable = function (totest) {\n return fluid.isPrimitive(totest) || !fluid.isPlainObject(totest);\n };\n\n fluid.isApplicable = function (totest) {\n return totest.apply && typeof(totest.apply) === \"function\";\n };\n\n /** A basic utility that returns its argument unchanged */\n\n fluid.identity = function (arg) {\n return arg;\n };\n\n /** A function which raises a failure if executed */\n\n fluid.notImplemented = function () {\n fluid.fail(\"This operation is not implemented\");\n };\n\n /** Returns the first of its arguments if it is not `undefined`, otherwise returns the second.\n * @param a {Any} The first argument to be tested for being `undefined`\n * @param b {Any} The fallback argument, to be returned if `a` is `undefined`\n * @return {Any} `a` if it is not `undefined`, else `b`.\n */\n\n fluid.firstDefined = function (a, b) {\n return a === undefined ? b : a;\n };\n\n /** Return an empty container as the same type as the argument (either an\n * array or hash */\n fluid.freshContainer = function (tocopy) {\n return fluid.isArrayable(tocopy) ? [] : {};\n };\n\n fluid.copyRecurse = function (tocopy, segs) {\n if (segs.length > fluid.strategyRecursionBailout) {\n fluid.fail(\"Runaway recursion encountered in fluid.copy - reached path depth of \" + fluid.strategyRecursionBailout + \" via path of \" + segs.join(\".\") +\n \"this object is probably circularly connected. Either adjust your object structure to remove the circularity or increase fluid.strategyRecursionBailout\");\n }\n if (fluid.isUncopyable(tocopy)) {\n return tocopy;\n } else {\n return fluid.transform(tocopy, function (value, key) {\n segs.push(key);\n var togo = fluid.copyRecurse(value, segs);\n segs.pop();\n return togo;\n });\n }\n };\n\n /** Performs a deep copy (clone) of its argument. This will guard against cloning a circular object by terminating if it reaches a path depth\n * greater than <code>fluid.strategyRecursionBailout</code>\n **/\n\n fluid.copy = function (tocopy) {\n return fluid.copyRecurse(tocopy, []);\n };\n\n // TODO: Coming soon - reimplementation of $.extend using strategyRecursionBailout\n fluid.extend = $.extend;\n\n /** Corrected version of jQuery makeArray that returns an empty array on undefined rather than crashing.\n * We don't deal with as many pathological cases as jQuery **/\n fluid.makeArray = function (arg) {\n var togo = [];\n if (arg !== null && arg !== undefined) {\n if (fluid.isPrimitive(arg) || typeof(arg.length) !== \"number\") {\n togo.push(arg);\n }\n else {\n for (var i = 0; i < arg.length; ++i) {\n togo[i] = arg[i];\n }\n }\n }\n return togo;\n };\n\n /** Pushes an element or elements onto an array, initialising the array as a member of a holding object if it is\n * not already allocated.\n * @param holder {Array or Object} The holding object whose member is to receive the pushed element(s).\n * @param member {String} The member of the <code>holder</code> onto which the element(s) are to be pushed\n * @param topush {Array or Object} If an array, these elements will be added to the end of the array using Array.push.apply. If an object, it will be pushed to the end of the array using Array.push.\n */\n fluid.pushArray = function (holder, member, topush) {\n var array = holder[member] ? holder[member] : (holder[member] = []);\n if (fluid.isArrayable(topush)) {\n array.push.apply(array, topush);\n } else {\n array.push(topush);\n }\n };\n\n function transformInternal(source, togo, key, args) {\n var transit = source[key];\n for (var j = 0; j < args.length - 1; ++j) {\n transit = args[j + 1](transit, key);\n }\n togo[key] = transit;\n }\n\n /** Return an array or hash of objects, transformed by one or more functions. Similar to\n * jQuery.map, only will accept an arbitrary list of transformation functions and also\n * works on non-arrays.\n * @param source {Array or Object} The initial container of objects to be transformed. If the source is\n * neither an array nor an object, it will be returned untransformed\n * @param fn1, fn2, etc. {Function} An arbitrary number of optional further arguments,\n * all of type Function, accepting the signature (object, index), where object is the\n * structure member to be transformed, and index is its key or index. Each function will be\n * applied in turn to each structure member, which will be replaced by the return value\n * from the function.\n * @return The finally transformed list, where each member has been replaced by the\n * original member acted on by the function or functions.\n */\n fluid.transform = function (source) {\n if (fluid.isPrimitive(source)) {\n return source;\n }\n var togo = fluid.freshContainer(source);\n if (fluid.isArrayable(source)) {\n for (var i = 0; i < source.length; ++i) {\n transformInternal(source, togo, i, arguments);\n }\n } else {\n for (var key in source) {\n transformInternal(source, togo, key, arguments);\n }\n }\n return togo;\n };\n\n /** Better jQuery.each which works on hashes as well as having the arguments\n * the right way round.\n * @param source {Arrayable or Object} The container to be iterated over\n * @param func {Function} A function accepting (value, key) for each iterated\n * object.\n */\n fluid.each = function (source, func) {\n if (fluid.isArrayable(source)) {\n for (var i = 0; i < source.length; ++i) {\n func(source[i], i);\n }\n } else {\n for (var key in source) {\n func(source[key], key);\n }\n }\n };\n\n fluid.make_find = function (find_if) {\n var target = find_if ? false : undefined;\n return function (source, func, deffolt) {\n var disp;\n if (fluid.isArrayable(source)) {\n for (var i = 0; i < source.length; ++i) {\n disp = func(source[i], i);\n if (disp !== target) {\n return find_if ? source[i] : disp;\n }\n }\n } else {\n for (var key in source) {\n disp = func(source[key], key);\n if (disp !== target) {\n return find_if ? source[key] : disp;\n }\n }\n }\n return deffolt;\n };\n };\n\n /** Scan through an array or hash of objects, terminating on the first member which\n * matches a predicate function.\n * @param source {Arrayable or Object} The array or hash of objects to be searched.\n * @param func {Function} A predicate function, acting on a member. A predicate which\n * returns any value which is not <code>undefined</code> will terminate\n * the search. The function accepts (object, index).\n * @param deflt {Object} A value to be returned in the case no predicate function matches\n * a structure member. The default will be the natural value of <code>undefined</code>\n * @return The first return value from the predicate function which is not <code>undefined</code>\n */\n fluid.find = fluid.make_find(false);\n /** The same signature as fluid.find, only the return value is the actual element for which the\n * predicate returns a value different from <code>false</code>\n */\n fluid.find_if = fluid.make_find(true);\n\n /** Scan through an array of objects, \"accumulating\" a value over them\n * (may be a straightforward \"sum\" or some other chained computation). \"accumulate\" is the name derived\n * from the C++ STL, other names for this algorithm are \"reduce\" or \"fold\".\n * @param list {Array} The list of objects to be accumulated over.\n * @param fn {Function} An \"accumulation function\" accepting the signature (object, total, index) where\n * object is the list member, total is the \"running total\" object (which is the return value from the previous function),\n * and index is the index number.\n * @param arg {Object} The initial value for the \"running total\" object.\n * @return {Object} the final running total object as returned from the final invocation of the function on the last list member.\n */\n fluid.accumulate = function (list, fn, arg) {\n for (var i = 0; i < list.length; ++i) {\n arg = fn(list[i], arg, i);\n }\n return arg;\n };\n\n /** Returns the sum of its two arguments. A useful utility to combine with fluid.accumulate to compute totals\n * @param a {Number|Boolean} The first operand to be added\n * @param b {Number|Boolean} The second operand to be added\n * @return {Number} The sum of the two operands\n **/\n fluid.add = function (a, b) {\n return a + b;\n };\n\n /** Scan through an array or hash of objects, removing those which match a predicate. Similar to\n * jQuery.grep, only acts on the list in-place by removal, rather than by creating\n * a new list by inclusion.\n * @param source {Array|Object} The array or hash of objects to be scanned over. Note that in the case this is an array,\n * the iteration will proceed from the end of the array towards the front.\n * @param fn {Function} A predicate function determining whether an element should be\n * removed. This accepts the standard signature (object, index) and returns a \"truthy\"\n * result in order to determine that the supplied object should be removed from the structure.\n * @param target {Array|Object} (optional) A target object of the same type as <code>source</code>, which will\n * receive any objects removed from it.\n * @return <code>target</code>, containing the removed elements, if it was supplied, or else <code>source</code>\n * modified by the operation of removing the matched elements.\n */\n fluid.remove_if = function (source, fn, target) {\n if (fluid.isArrayable(source)) {\n for (var i = source.length - 1; i >= 0; --i) {\n if (fn(source[i], i)) {\n if (target) {\n target.unshift(source[i]);\n }\n source.splice(i, 1);\n }\n }\n } else {\n for (var key in source) {\n if (fn(source[key], key)) {\n if (target) {\n target[key] = source[key];\n }\n delete source[key];\n }\n }\n }\n return target || source;\n };\n\n /** Fills an array of given size with copies of a value or result of a function invocation\n * @param n {Number} The size of the array to be filled\n * @param generator {Object|Function} Either a value to be replicated or function to be called\n * @param applyFunc {Boolean} If true, treat the generator value as a function to be invoked with\n * argument equal to the index position\n */\n\n fluid.generate = function (n, generator, applyFunc) {\n var togo = [];\n for (var i = 0; i < n; ++i) {\n togo[i] = applyFunc ? generator(i) : generator;\n }\n return togo;\n };\n\n /** Returns an array of size count, filled with increasing integers, starting at 0 or at the index specified by first.\n * @param count {Number} Size of the filled array to be returned\n * @param first {Number} (optional, defaults to 0) First element to appear in the array\n */\n\n fluid.iota = function (count, first) {\n first = first || 0;\n var togo = [];\n for (var i = 0; i < count; ++i) {\n togo[togo.length] = first++;\n }\n return togo;\n };\n\n /** Extracts a particular member from each top-level member of a container, returning a new container of the same type\n * @param holder {Array|Object} The container to be filtered\n * @param name {String|Array of String} An EL path to be fetched from each top-level member\n */\n\n fluid.getMembers = function (holder, name) {\n return fluid.transform(holder, function (member) {\n return fluid.get(member, name);\n });\n };\n\n /** Accepts an object to be filtered, and an array of keys. Either all keys not present in\n * the array are removed, or only keys present in the array are returned.\n * @param toFilter {Array|Object} The object to be filtered - this will be NOT modified by the operation (current implementation\n * passes through $.extend shallow algorithm)\n * @param keys {Array of String} The array of keys to operate with\n * @param exclude {boolean} If <code>true</code>, the keys listed are removed rather than included\n * @return the filtered object (the same object that was supplied as <code>toFilter</code>\n */\n\n fluid.filterKeys = function (toFilter, keys, exclude) {\n return fluid.remove_if($.extend({}, toFilter), function (value, key) {\n return exclude ^ (keys.indexOf(key) === -1);\n });\n };\n\n /** A convenience wrapper for <code>fluid.filterKeys</code> with the parameter <code>exclude</code> set to <code>true</code>\n * Returns the supplied object with listed keys removed */\n\n fluid.censorKeys = function (toCensor, keys) {\n return fluid.filterKeys(toCensor, keys, true);\n };\n\n // TODO: This is not as clever an idea as we think it is - this typically inner-loop function will optimise badly due to closure\n fluid.makeFlatten = function (index) {\n return function (obj) {\n var togo = [];\n fluid.each(obj, function (/* value, key */) {\n togo.push(arguments[index]);\n });\n return togo;\n };\n };\n\n /** Return the keys in the supplied object as an array. Note that this will return keys found in the prototype chain as well as \"own properties\", unlike Object.keys() **/\n fluid.keys = fluid.makeFlatten(1);\n\n /** Return the values in the supplied object as an array **/\n fluid.values = fluid.makeFlatten(0);\n\n /**\n * Searches through the supplied object, and returns <code>true</code> if the supplied value\n * can be found\n */\n fluid.contains = function (obj, value) {\n return obj ? (fluid.isArrayable(obj) ? obj.indexOf(value) !== -1 : fluid.find(obj, function (thisValue) {\n if (value === thisValue) {\n return true;\n }\n })) : undefined;\n };\n\n /**\n * Searches through the supplied object for the first value which matches the one supplied.\n * @param obj {Object} the Object to be searched through\n * @param value {Object} the value to be found. This will be compared against the object's\n * member using === equality.\n * @return {String} The first key whose value matches the one supplied\n */\n fluid.keyForValue = function (obj, value) {\n return fluid.find(obj, function (thisValue, key) {\n if (value === thisValue) {\n return key;\n }\n });\n };\n\n /** Converts an array into an object whose keys are the elements of the array, each with the value \"true\"\n * @param array {Array of String} The array to be converted to a hash\n * @return hash {Object} An object with value <code>true</code> for each key taken from a member of <code>array</code>\n */\n\n fluid.arrayToHash = function (array) {\n var togo = {};\n fluid.each(array, function (el) {\n togo[el] = true;\n });\n return togo;\n };\n\n /** Applies a stable sorting algorithm to the supplied array and comparator (note that Array.sort in JavaScript is not specified\n * to be stable). The algorithm used will be an insertion sort, which whilst quadratic in time, will perform well\n * on small array sizes.\n * @param array {Array} The array to be sorted. This input array will be modified in place.\n * @param func {Function} A comparator returning >0, 0, or <0 on pairs of elements representing their sort order (same contract as Array.sort comparator)\n */\n\n fluid.stableSort = function (array, func) {\n for (var i = 0; i < array.length; i++) {\n var j, k = array[i];\n for (j = i; j > 0 && func(k, array[j - 1]) < 0; j--) {\n array[j] = array[j - 1];\n }\n array[j] = k;\n }\n };\n\n /** Converts a hash into an object by hoisting out the object's keys into an array element via the supplied String \"key\", and then transforming via an optional further function, which receives the signature\n * (newElement, oldElement, key) where newElement is the freshly cloned element, oldElement is the original hash's element, and key is the key of the element.\n * If the function is not supplied, the old element is simply deep-cloned onto the new element (same effect as transform fluid.transforms.deindexIntoArrayByKey).\n * The supplied hash will not be modified, unless the supplied function explicitly does so by modifying its 2nd argument.\n */\n fluid.hashToArray = function (hash, keyName, func) {\n var togo = [];\n fluid.each(hash, function (el, key) {\n var newEl = {};\n newEl[keyName] = key;\n if (func) {\n newEl = func(newEl, el, key) || newEl;\n } else {\n $.extend(true, newEl, el);\n }\n togo.push(newEl);\n });\n return togo;\n };\n\n /** Converts an array consisting of a mixture of arrays and non-arrays into the concatenation of any inner arrays\n * with the non-array elements\n */\n fluid.flatten = function (array) {\n var togo = [];\n fluid.each(array, function (element) {\n if (fluid.isArrayable(element)) {\n togo = togo.concat(element);\n } else {\n togo.push(element);\n }\n });\n return togo;\n };\n\n /**\n * Clears an object or array of its contents. For objects, each property is deleted.\n *\n * @param {Object|Array} target the target to be cleared\n */\n fluid.clear = function (target) {\n if (fluid.isArrayable(target)) {\n target.length = 0;\n } else {\n for (var i in target) {\n delete target[i];\n }\n }\n };\n\n /**\n * @param boolean ascending <code>true</code> if a comparator is to be returned which\n * sorts strings in descending order of length\n */\n fluid.compareStringLength = function (ascending) {\n return ascending ? function (a, b) {\n return a.length - b.length;\n } : function (a, b) {\n return b.length - a.length;\n };\n };\n\n /**\n * Returns the converted integer if the input string can be converted to an integer. Otherwise, return NaN.\n * @param {String} a string to be returned in integer\n */\n fluid.parseInteger = function (string) {\n return isFinite(string) && ((string % 1) === 0) ? Number(string) : NaN;\n };\n\n /** Calls Object.freeze at each level of containment of the supplied object\n * @return The supplied argument, recursively frozen\n */\n fluid.freezeRecursive = function (tofreeze) {\n if (fluid.isPlainObject(tofreeze)) {\n fluid.each(tofreeze, function (value) {\n fluid.freezeRecursive(value);\n });\n return Object.freeze(tofreeze);\n } else {\n return tofreeze;\n }\n };\n\n /** A set of special \"marker values\" used in signalling in function arguments and return values,\n * to partially compensate for JavaScript's lack of distinguished types. These should never appear\n * in JSON structures or other kinds of static configuration. An API specifically documents if it\n * accepts or returns any of these values, and if so, what its semantic is - most are of private\n * use internal to the framework **/\n\n fluid.marker = function () {};\n\n fluid.makeMarker = function (value, extra) {\n var togo = Object.create(fluid.marker.prototype);\n togo.value = value;\n $.extend(togo, extra);\n return Object.freeze(togo);\n };\n\n /** A special \"marker object\" representing that a distinguished\n * (probably context-dependent) value should be substituted.\n */\n fluid.VALUE = fluid.makeMarker(\"VALUE\");\n\n /** A special \"marker object\" representing that no value is present (where\n * signalling using the value \"undefined\" is not possible - e.g. the return value from a \"strategy\") */\n fluid.NO_VALUE = fluid.makeMarker(\"NO_VALUE\");\n\n /** A marker indicating that a value requires to be expanded after component construction begins **/\n fluid.EXPAND = fluid.makeMarker(\"EXPAND\");\n\n /** Determine whether an object is any marker, or a particular marker - omit the\n * 2nd argument to detect any marker\n */\n fluid.isMarker = function (totest, type) {\n if (!(totest instanceof fluid.marker)) {\n return false;\n }\n if (!type) {\n return true;\n }\n return totest.value === type.value;\n };\n\n fluid.logLevelsSpec = {\n \"FATAL\": 0,\n \"FAIL\": 5,\n \"WARN\": 10,\n \"IMPORTANT\": 12, // The default logging \"off\" level - corresponds to the old \"false\"\n \"INFO\": 15, // The default logging \"on\" level - corresponds to the old \"true\"\n \"TRACE\": 20\n };\n\n /** A structure holding all supported log levels as supplied as a possible first argument to fluid.log\n * Members with a higher value of the \"priority\" field represent lower priority logging levels */\n // Moved down here since it uses fluid.transform and fluid.makeMarker on startup\n fluid.logLevel = fluid.transform(fluid.logLevelsSpec, function (value, key) {\n return fluid.makeMarker(key, {priority: value});\n });\n var logLevelStack = [fluid.logLevel.IMPORTANT]; // The stack of active logging levels, with the current level at index 0\n\n\n // Model functions\n fluid.model = {}; // cannot call registerNamespace yet since it depends on fluid.model\n\n /** Copy a source \"model\" onto a target **/\n fluid.model.copyModel = function (target, source) {\n fluid.clear(target);\n $.extend(true, target, source);\n };\n\n /** Parse an EL expression separated by periods (.) into its component segments.\n * @param {String} EL The EL expression to be split\n * @return {Array of String} the component path expressions.\n * TODO: This needs to be upgraded to handle (the same) escaping rules (as RSF), so that\n * path segments containing periods and backslashes etc. can be processed, and be harmonised\n * with the more complex implementations in fluid.pathUtil(data binding).\n */\n fluid.model.parseEL = function (EL) {\n return EL === \"\" ? [] : String(EL).split(\".\");\n };\n\n /** Compose an EL expression from two separate EL expressions. The returned\n * expression will be the one that will navigate the first expression, and then\n * the second, from the value reached by the first. Either prefix or suffix may be\n * the empty string **/\n\n fluid.model.composePath = function (prefix, suffix) {\n return prefix === \"\" ? suffix : (suffix === \"\" ? prefix : prefix + \".\" + suffix);\n };\n\n /** Compose any number of path segments, none of which may be empty **/\n fluid.model.composeSegments = function () {\n return fluid.makeArray(arguments).join(\".\");\n };\n\n /** Returns the index of the last occurrence of the period character . in the supplied string */\n fluid.lastDotIndex = function (path) {\n return path.lastIndexOf(\".\");\n };\n\n /** Returns all of an EL path minus its final segment - if the path consists of just one segment, returns \"\" -\n * WARNING - this method does not follow escaping rules */\n fluid.model.getToTailPath = function (path) {\n var lastdot = fluid.lastDotIndex(path);\n return lastdot === -1 ? \"\" : path.substring(0, lastdot);\n };\n\n /** Returns the very last path component of an EL path\n * WARNING - this method does not follow escaping rules */\n fluid.model.getTailPath = function (path) {\n var lastdot = fluid.lastDotIndex(path);\n return path.substring(lastdot + 1);\n };\n\n /** Helpful alias for old-style API **/\n fluid.path = fluid.model.composeSegments;\n fluid.composePath = fluid.model.composePath;\n\n\n // unsupported, NON-API function\n fluid.requireDataBinding = function () {\n fluid.fail(\"Please include DataBinding.js in order to operate complex model accessor configuration\");\n };\n\n fluid.model.setWithStrategy = fluid.model.getWithStrategy = fluid.requireDataBinding;\n\n // unsupported, NON-API function\n fluid.model.resolvePathSegment = function (root, segment, create, origEnv) {\n if (!origEnv && root.resolvePathSegment) {\n return root.resolvePathSegment(segment);\n }\n if (create && root[segment] === undefined) {\n // This optimisation in this heavily used function has a fair effect\n return root[segment] = {};\n }\n return root[segment];\n };\n\n // unsupported, NON-API function\n fluid.model.parseToSegments = function (EL, parseEL, copy) {\n return typeof(EL) === \"number\" || typeof(EL) === \"string\" ? parseEL(EL) : (copy ? fluid.makeArray(EL) : EL);\n };\n\n // unsupported, NON-API function\n fluid.model.pathToSegments = function (EL, config) {\n var parser = config && config.parser ? config.parser.parse : fluid.model.parseEL;\n return fluid.model.parseToSegments(EL, parser);\n };\n\n // Overall strategy skeleton for all implementations of fluid.get/set\n fluid.model.accessImpl = function (root, EL, newValue, config, initSegs, returnSegs, traverser) {\n var segs = fluid.model.pathToSegments(EL, config);\n var initPos = 0;\n if (initSegs) {\n initPos = initSegs.length;\n segs = initSegs.concat(segs);\n }\n var uncess = newValue === fluid.NO_VALUE ? 0 : 1;\n root = traverser(root, segs, initPos, config, uncess);\n if (newValue === fluid.NO_VALUE || newValue === fluid.VALUE) { // get or custom\n return returnSegs ? {root: root, segs: segs} : root;\n }\n else { // set\n root[segs[segs.length - 1]] = newValue;\n }\n };\n\n // unsupported, NON-API function\n fluid.model.accessSimple = function (root, EL, newValue, environment, initSegs, returnSegs) {\n return fluid.model.accessImpl(root, EL, newValue, environment, initSegs, returnSegs, fluid.model.traverseSimple);\n };\n\n // unsupported, NON-API function\n fluid.model.traverseSimple = function (root, segs, initPos, environment, uncess) {\n var origEnv = environment;\n var limit = segs.length - uncess;\n for (var i = 0; i < limit; ++i) {\n if (!root) {\n return root;\n }\n var segment = segs[i];\n if (environment && environment[segment]) {\n root = environment[segment];\n } else {\n root = fluid.model.resolvePathSegment(root, segment, uncess === 1, origEnv);\n }\n environment = null;\n }\n return root;\n };\n\n fluid.model.setSimple = function (root, EL, newValue, environment, initSegs) {\n fluid.model.accessSimple(root, EL, newValue, environment, initSegs, false);\n };\n\n /** Optimised version of fluid.get for uncustomised configurations **/\n\n fluid.model.getSimple = function (root, EL, environment, initSegs) {\n if (EL === null || EL === undefined || EL.length === 0) {\n return root;\n }\n return fluid.model.accessSimple(root, EL, fluid.NO_VALUE, environment, initSegs, false);\n };\n\n /** Even more optimised version which assumes segs are parsed and no configuration **/\n fluid.getImmediate = function (root, segs, i) {\n var limit = (i === undefined ? segs.length : i + 1);\n for (var j = 0; j < limit; ++j) {\n root = root ? root[segs[j]] : undefined;\n }\n return root;\n };\n\n // unsupported, NON-API function\n // Returns undefined to signal complex configuration which needs to be farmed out to DataBinding.js\n // any other return represents an environment value AND a simple configuration we can handle here\n fluid.decodeAccessorArg = function (arg3) {\n return (!arg3 || arg3 === fluid.model.defaultGetConfig || arg3 === fluid.model.defaultSetConfig) ?\n null : (arg3.type === \"environment\" ? arg3.value : undefined);\n };\n\n fluid.set = function (root, EL, newValue, config, initSegs) {\n var env = fluid.decodeAccessorArg(config);\n if (env === undefined) {\n fluid.model.setWithStrategy(root, EL, newValue, config, initSegs);\n } else {\n fluid.model.setSimple(root, EL, newValue, env, initSegs);\n }\n };\n\n /** Evaluates an EL expression by fetching a dot-separated list of members\n * recursively from a provided root.\n * @param root The root data structure in which the EL expression is to be evaluated\n * @param {string/array} EL The EL expression to be evaluated, or an array of path segments\n * @param config An optional configuration or environment structure which can customise the fetch operation\n * @return The fetched data value.\n */\n\n fluid.get = function (root, EL, config, initSegs) {\n var env = fluid.decodeAccessorArg(config);\n return env === undefined ?\n fluid.model.getWithStrategy(root, EL, config, initSegs)\n : fluid.model.accessImpl(root, EL, fluid.NO_VALUE, env, null, false, fluid.model.traverseSimple);\n };\n\n fluid.getGlobalValue = function (path, env) {\n if (path) {\n env = env || fluid.environment;\n return fluid.get(fluid.global, path, {type: \"environment\", value: env});\n }\n };\n\n /**\n * Allows for the binding to a \"this-ist\" function\n * @param {Object} obj, \"this-ist\" object to bind to\n * @param {Object} fnName, the name of the function to call\n * @param {Object} args, arguments to call the function with\n */\n fluid.bind = function (obj, fnName, args) {\n return obj[fnName].apply(obj, fluid.makeArray(args));\n };\n\n /**\n * Allows for the calling of a function from an EL expression \"functionPath\", with the arguments \"args\", scoped to an framework version \"environment\".\n * @param {Object} functionPath - An EL expression\n * @param {Object} args - An array of arguments to be applied to the function, specified in functionPath\n * @param {Object} environment - (optional) The object to scope the functionPath to (typically the framework root for version control)\n */\n fluid.invokeGlobalFunction = function (functionPath, args, environment) {\n var func = fluid.getGlobalValue(functionPath, environment);\n if (!func) {\n fluid.fail(\"Error invoking global function: \" + functionPath + \" could not be located\");\n } else {\n return func.apply(null, fluid.isArrayable(args) ? args : fluid.makeArray(args));\n }\n };\n\n /** Registers a new global function at a given path\n */\n\n fluid.registerGlobalFunction = function (functionPath, func, env) {\n env = env || fluid.environment;\n fluid.set(fluid.global, functionPath, func, {type: \"environment\", value: env});\n };\n\n fluid.setGlobalValue = fluid.registerGlobalFunction;\n\n /** Ensures that an entry in the global namespace exists. If it does not, a new entry is created as {} and returned. If an existing\n * value is found, it is returned instead **/\n fluid.registerNamespace = function (naimspace, env) {\n env = env || fluid.environment;\n var existing = fluid.getGlobalValue(naimspace, env);\n if (!existing) {\n existing = {};\n fluid.setGlobalValue(naimspace, existing, env);\n }\n return existing;\n };\n\n // stubs for two functions in FluidDebugging.js\n fluid.dumpEl = fluid.identity;\n fluid.renderTimestamp = fluid.identity;\n\n /*** The Fluid instance id ***/\n\n // unsupported, NON-API function\n fluid.generateUniquePrefix = function () {\n return (Math.floor(Math.random() * 1e12)).toString(36) + \"-\";\n };\n\n var fluid_prefix = fluid.generateUniquePrefix();\n\n fluid.fluidInstance = fluid_prefix;\n\n var fluid_guid = 1;\n\n /** Allocate a string value that will be unique within this Infusion instance (frame or process), and\n * globally unique with high probability (50% chance of collision after a million trials) **/\n\n fluid.allocateGuid = function () {\n return fluid_prefix + (fluid_guid++);\n };\n\n /*** The Fluid Event system. ***/\n\n fluid.registerNamespace(\"fluid.event\");\n\n // Fluid priority system for encoding relative positions of, e.g. listeners, transforms, options, in lists\n\n fluid.extremePriority = 4e9; // around 2^32 - allows headroom of 21 fractional bits for sub-priorities\n fluid.priorityTypes = {\n first: -1,\n last: 1,\n before: 0,\n after: 0\n };\n // TODO: This should be properly done with defaults blocks and a much more performant fluid.indexDefaults\n fluid.extremalPriorities = {\n // a built-in definition to allow test infrastructure \"last\" listeners to sort after all impl listeners, and authoring/debugging listeners to sort after those\n // these are \"priority intensities\", and will be flipped for \"first\" listeners\n none: 0,\n testing: 10,\n authoring: 20\n };\n\n // unsupported, NON-API function\n // TODO: Note - no \"fixedOnly = true\" sites remain in the framework\n fluid.parsePriorityConstraint = function (constraint, fixedOnly, site) {\n var segs = constraint.split(\":\");\n var type = segs[0];\n var lookup = fluid.priorityTypes[type];\n if (lookup === undefined) {\n fluid.fail(\"Invalid constraint type in priority field \" + constraint + \": the only supported values are \" + fluid.keys(fluid.priorityTypes).join(\", \") + \" or numeric\");\n }\n if (fixedOnly && lookup === 0) {\n fluid.fail(\"Constraint type in priority field \" + constraint + \" is not supported in a \" + site + \" record - you must use either a numeric value or first, last\");\n }\n return {\n type: segs[0],\n target: segs[1]\n };\n };\n\n // unsupported, NON-API function\n fluid.parsePriority = function (priority, count, fixedOnly, site) {\n priority = priority || 0;\n var togo = {\n count: count || 0,\n fixed: null,\n constraint: null,\n site: site\n };\n if (typeof(priority) === \"number\") {\n togo.fixed = -priority;\n } else {\n togo.constraint = fluid.parsePriorityConstraint(priority, fixedOnly, site);\n }\n var multiplier = togo.constraint ? fluid.priorityTypes[togo.constraint.type] : 0;\n if (multiplier !== 0) {\n var target = togo.constraint.target || \"none\";\n var extremal = fluid.extremalPriorities[target];\n if (extremal === undefined) {\n fluid.fail(\"Unrecognised extremal priority target \" + target + \": the currently supported values are \" + fluid.keys(fluid.extremalPriorities).join(\", \") + \": register your value in fluid.extremalPriorities\");\n }\n togo.fixed = multiplier * (fluid.extremePriority + extremal);\n }\n if (togo.fixed !== null) {\n togo.fixed += togo.count / 1024; // use some fractional bits to encode count bias\n }\n\n return togo;\n };\n\n fluid.renderPriority = function (parsed) {\n return parsed.constraint ? (parsed.constraint.target ? parsed.constraint.type + \":\" + parsed.constraint.target : parsed.constraint.type ) : Math.floor(parsed.fixed);\n };\n\n // unsupported, NON-API function\n fluid.compareByPriority = function (recA, recB) {\n if (recA.priority.fixed !== null && recB.priority.fixed !== null) {\n return recA.priority.fixed - recB.priority.fixed;\n } else { // sort constraint records to the end\n // relies on JavaScript boolean coercion rules (ECMA 9.3 toNumber)\n return (recA.priority.fixed === null) - (recB.priority.fixed === null);\n }\n };\n\n fluid.honourConstraint = function (array, firstConstraint, c) {\n var constraint = array[c].priority.constraint;\n var matchIndex = fluid.find(array, function (element, index) {\n return element.namespace === constraint.target ? index : undefined;\n }, -1);\n if (matchIndex === -1) { // TODO: We should report an error during firing if this condition persists until then\n return true;\n } else if (matchIndex >= firstConstraint) {\n return false;\n } else {\n var offset = constraint.type === \"after\" ? 1 : 0;\n var target = matchIndex + offset;\n var temp = array[c];\n for (var shift = c; shift >= target; --shift) {\n array[shift] = array[shift - 1];\n }\n array[target] = temp;\n return true;\n }\n };\n\n // unsupported, NON-API function\n // Priorities accepted from users have higher numbers representing high priority (sort first) -\n fluid.sortByPriority = function (array) {\n fluid.stableSort(array, fluid.compareByPriority);\n\n var firstConstraint = fluid.find(array, function (element, index) {\n return element.priority.constraint && fluid.priorityTypes[element.priority.constraint.type] === 0 ? index : undefined;\n }, array.length);\n\n while (true) {\n if (firstConstraint === array.length) {\n return array;\n }\n var oldFirstConstraint = firstConstraint;\n for (var c = firstConstraint; c < array.length; ++c) {\n var applied = fluid.honourConstraint(array, firstConstraint, c);\n if (applied) {\n ++firstConstraint;\n }\n }\n if (firstConstraint === oldFirstConstraint) {\n var holders = array.slice(firstConstraint);\n fluid.fail(\"Could not find targets for any constraints in \" + holders[0].priority.site + \" \", holders, \": none of the targets (\" + fluid.getMembers(holders, \"priority.constraint.target\").join(\", \") +\n \") matched any namespaces of the elements in (\", array.slice(0, firstConstraint), \") - this is caused by either an invalid or circular reference\");\n }\n }\n };\n\n /** Parse a hash containing prioritised records (for example, as found in a ContextAwareness record) and return a sorted array of these records in priority order.\n * @param records {Object} A hash of key names to prioritised records. Each record may contain an member `namespace` - if it does not, the namespace will be taken from the\n * record's key. It may also contain a `String` member `priority` encoding a priority with respect to these namespaces as document at http://docs.fluidproject.org/infusion/development/Priorities.html .\n * @param name {String} A human-readable name describing the supplied records, which will be incorporated into the message of any error encountered when resolving the priorities\n * @return [Array] An array of the same elements supplied to `records`, sorted into priority order. The supplied argument `records` will not be modified.\n */\n fluid.parsePriorityRecords = function (records, name) {\n var array = fluid.hashToArray(records, \"namespace\", function (newElement, oldElement, index) {\n $.extend(newElement, oldElement);\n newElement.priority = fluid.parsePriority(oldElement.priority, index, false, name);\n });\n fluid.sortByPriority(array);\n return array;\n };\n\n fluid.event.identifyListener = function (listener, soft) {\n if (typeof(listener) !== \"string\" && !listener.$$fluid_guid && !soft) {\n listener.$$fluid_guid = fluid.allocateGuid();\n }\n return listener.$$fluid_guid;\n };\n\n // unsupported, NON-API function\n fluid.event.impersonateListener = function (origListener, newListener) {\n fluid.event.identifyListener(origListener);\n newListener.$$fluid_guid = origListener.$$fluid_guid;\n };\n\n\n // unsupported, NON-API function\n fluid.event.sortListeners = function (listeners) {\n var togo = [];\n fluid.each(listeners, function (oneNamespace) {\n var headHard; // notify only the first listener with hard namespace - or else all if all are soft\n for (var i = 0; i < oneNamespace.length; ++i) {\n var thisListener = oneNamespace[i];\n if (!thisListener.softNamespace && !headHard) {\n headHard = thisListener;\n }\n }\n if (headHard) {\n togo.push(headHard);\n } else {\n togo = togo.concat(oneNamespace);\n }\n });\n return fluid.sortByPriority(togo);\n };\n\n // unsupported, NON-API function\n fluid.event.resolveListener = function (listener) {\n var listenerName = listener.globalName || (typeof(listener) === \"string\" ? listener : null);\n if (listenerName) {\n var listenerFunc = fluid.getGlobalValue(listenerName);\n if (!listenerFunc) {\n fluid.fail(\"Unable to look up name \" + listenerName + \" as a global function\");\n } else {\n listener = listenerFunc;\n }\n }\n return listener;\n };\n\n /** Generate a name for a component for debugging purposes */\n fluid.nameComponent = function (that) {\n return that ? \"component with typename \" + that.typeName + \" and id \" + that.id : \"[unknown component]\";\n };\n\n fluid.event.nameEvent = function (that, eventName) {\n return eventName + \" of \" + fluid.nameComponent(that);\n };\n\n /** Construct an \"event firer\" object which can be used to register and deregister\n * listeners, to which \"events\" can be fired. These events consist of an arbitrary\n * function signature. General documentation on the Fluid events system is at\n * http://docs.fluidproject.org/infusion/development/InfusionEventSystem.html .\n * @param {Object} options - A structure to configure this event firer. Supported fields:\n * {String} name - a readable name for this firer to be used in diagnostics and debugging\n * {Boolean} preventable - If <code>true</code> the return value of each handler will\n * be checked for <code>false</code> in which case further listeners will be shortcircuited, and this\n * will be the return value of fire()\n */\n fluid.makeEventFirer = function (options) {\n options = options || {};\n var name = options.name || \"<anonymous>\";\n var that;\n\n var lazyInit = function () { // Lazy init function to economise on object references for events which are never listened to\n that.listeners = {};\n that.byId = {};\n that.sortedListeners = [];\n // arguments after 3rd are not part of public API\n // listener as Object is used only by ChangeApplier to tunnel path, segs, etc as part of its \"spec\"\n /** Adds a listener to this event.\n * @param listener {Function|String} The listener function to be added, or a global name resolving to a function. The signature of the function is arbitrary and matches that sent to event.fire()\n * @param namespace {String} (Optional) A namespace for this listener. At most one listener with a particular namespace can be active on an event at one time. Removing successively added listeners with a particular\n * namespace will expose previously added ones in a stack idiom\n * @param priority {String|Number} A priority for the listener relative to others, perhaps expressed with a constraint relative to the namespace of another - see\n * http://docs.fluidproject.org/infusion/development/Priorities.html\n */\n that.addListener = function (listener, namespace, priority, softNamespace, listenerId) {\n var record;\n if (that.destroyed) {\n fluid.fail(\"Cannot add listener to destroyed event firer \" + that.name);\n }\n if (!listener) {\n return;\n }\n if (fluid.isPlainObject(listener, true) && !fluid.isApplicable(listener)) {\n record = listener;\n listener = record.listener;\n namespace = record.namespace;\n priority = record.priority;\n softNamespace = record.softNamespace;\n listenerId = record.listenerId;\n }\n if (typeof(listener) === \"string\") {\n listener = {globalName: listener};\n }\n var id = listenerId || fluid.event.identifyListener(listener);\n namespace = namespace || id;\n record = $.extend(record || {}, {\n namespace: namespace,\n listener: listener,\n softNamespace: softNamespace,\n listenerId: listenerId,\n priority: fluid.parsePriority(priority, that.sortedListeners.length, false, \"listeners\")\n });\n that.byId[id] = record;\n\n var thisListeners = (that.listeners[namespace] = fluid.makeArray(that.listeners[namespace]));\n thisListeners[softNamespace ? \"push\" : \"unshift\"] (record);\n\n that.sortedListeners = fluid.event.sortListeners(that.listeners);\n };\n that.addListener.apply(null, arguments);\n };\n that = {\n eventId: fluid.allocateGuid(),\n name: name,\n ownerId: options.ownerId,\n typeName: \"fluid.event.firer\",\n destroy: function () {\n that.destroyed = true;\n },\n addListener: function () {\n lazyInit.apply(null, arguments);\n },\n /** Removes a listener previously registered with this event.\n * @param toremove {Function|String} Either the listener function, the namespace of a listener (in which case a previous listener with that namespace may be uncovered) or an id sent to the undocumented\n * `listenerId` argument of `addListener\n */\n // Can be supplied either listener, namespace, or id (which may match either listener function's guid or original listenerId argument)\n removeListener: function (listener) {\n if (!that.listeners) { return; }\n var namespace, id, record;\n if (typeof (listener) === \"string\") {\n namespace = listener;\n record = that.listeners[namespace];\n if (!record) { // it was an id and not a namespace - take the namespace from its record later\n id = namespace;\n namespace = null;\n }\n }\n else if (typeof(listener) === \"function\") {\n id = fluid.event.identifyListener(listener, true);\n if (!id) {\n fluid.fail(\"Cannot remove unregistered listener function \", listener, \" from event \" + that.name);\n }\n }\n var rec = that.byId[id];\n var softNamespace = rec && rec.softNamespace;\n namespace = namespace || (rec && rec.namespace) || id;\n delete that.byId[id];\n record = that.listeners[namespace];\n if (record) {\n if (softNamespace) {\n fluid.remove_if(record, function (thisLis) {\n return thisLis.listener.$$fluid_guid === id || thisLis.listenerId === id;\n });\n } else {\n record.shift();\n }\n if (record.length === 0) {\n delete that.listeners[namespace];\n }\n }\n that.sortedListeners = fluid.event.sortListeners(that.listeners);\n },\n /** Fires this event to all listeners which are active. They will be notified in order of priority. The signature of this method is free **/\n fire: function () {\n var listeners = that.sortedListeners;\n if (!listeners || that.destroyed) { return; }\n fluid.log(fluid.logLevel.TRACE, \"Firing event \" + name + \" to list of \" + listeners.length + \" listeners\");\n for (var i = 0; i < listeners.length; ++i) {\n var lisrec = listeners[i];\n lisrec.listener = fluid.event.resolveListener(lisrec.listener);\n var listener = lisrec.listener;\n var ret = listener.apply(null, arguments);\n var value;\n if (options.preventable && ret === false || that.destroyed) {\n value = false;\n }\n if (value !== undefined) {\n return value;\n }\n }\n }\n };\n return that;\n };\n\n // unsupported, NON-API function\n // Fires to an event which may not be instantiated (in which case no-op) - primary modern usage is to resolve FLUID-5904\n fluid.fireEvent = function (component, eventName, args) {\n var firer = component.events[eventName];\n if (firer) {\n firer.fire.apply(null, fluid.makeArray(args));\n }\n };\n\n // unsupported, NON-API function\n fluid.event.addListenerToFirer = function (firer, value, namespace, wrapper) {\n wrapper = wrapper || fluid.identity;\n if (fluid.isArrayable(value)) {\n for (var i = 0; i < value.length; ++i) {\n fluid.event.addListenerToFirer(firer, value[i], namespace, wrapper);\n }\n } else if (typeof (value) === \"function\" || typeof (value) === \"string\") {\n wrapper(firer).addListener(value, namespace);\n } else if (value && typeof (value) === \"object\") {\n wrapper(firer).addListener(value.listener, namespace || value.namespace, value.priority, value.softNamespace, value.listenerId);\n }\n };\n\n // unsupported, NON-API function - non-IOC passthrough\n fluid.event.resolveListenerRecord = function (records) {\n return { records: records };\n };\n\n fluid.expandImmediate = function (material) {\n fluid.fail(\"fluid.expandImmediate could not be loaded - please include FluidIoC.js in order to operate IoC-driven event with descriptor \" + material);\n };\n\n // unsupported, NON-API function\n fluid.mergeListeners = function (that, events, listeners) {\n fluid.each(listeners, function (value, key) {\n var firer, namespace;\n if (fluid.isIoCReference(key)) {\n firer = fluid.expandImmediate(key, that);\n if (!firer) {\n fluid.fail(\"Error in listener record: key \" + key + \" could not be looked up to an event firer - did you miss out \\\"events.\\\" when referring to an event firer?\");\n }\n } else {\n var keydot = key.indexOf(\".\");\n\n if (keydot !== -1) {\n namespace = key.substring(keydot + 1);\n key = key.substring(0, keydot);\n }\n if (!events[key]) {\n fluid.fail(\"Listener registered for event \" + key + \" which is not defined for this component\");\n }\n firer = events[key];\n }\n var record = fluid.event.resolveListenerRecord(value, that, key, namespace, true);\n fluid.event.addListenerToFirer(firer, record.records, namespace, record.adderWrapper);\n });\n };\n\n // unsupported, NON-API function\n fluid.eventFromRecord = function (eventSpec, eventKey, that) {\n var isIoCEvent = eventSpec && (typeof (eventSpec) !== \"string\" || fluid.isIoCReference(eventSpec));\n var event;\n if (isIoCEvent) {\n if (!fluid.event.resolveEvent) {\n fluid.fail(\"fluid.event.resolveEvent could not be loaded - please include FluidIoC.js in order to operate IoC-driven event with descriptor \",\n eventSpec);\n } else {\n event = fluid.event.resolveEvent(that, eventKey, eventSpec);\n }\n } else {\n event = fluid.makeEventFirer({\n name: fluid.event.nameEvent(that, eventKey),\n preventable: eventSpec === \"preventable\",\n ownerId: that.id\n });\n }\n return event;\n };\n\n // unsupported, NON-API function - this is patched from FluidIoC.js\n fluid.instantiateFirers = function (that, options) {\n fluid.each(options.events, function (eventSpec, eventKey) {\n that.events[eventKey] = fluid.eventFromRecord(eventSpec, eventKey, that);\n });\n };\n\n // unsupported, NON-API function\n fluid.mergeListenerPolicy = function (target, source, key) {\n if (typeof (key) !== \"string\") {\n fluid.fail(\"Error in listeners declaration - the keys in this structure must resolve to event names - got \" + key + \" from \", source);\n }\n // cf. triage in mergeListeners\n var hasNamespace = !fluid.isIoCReference(key) && key.indexOf(\".\") !== -1;\n return hasNamespace ? (source || target) : fluid.arrayConcatPolicy(target, source);\n };\n\n // unsupported, NON-API function\n fluid.makeMergeListenersPolicy = function (merger, modelRelay) {\n return function (target, source) {\n target = target || {};\n if (modelRelay && (fluid.isArrayable(source) || typeof(source.target) === \"string\")) { // This form allowed for modelRelay\n target[\"\"] = merger(target[\"\"], source, \"\");\n } else {\n fluid.each(source, function (listeners, key) {\n target[key] = merger(target[key], listeners, key);\n });\n }\n return target;\n };\n };\n\n fluid.validateListenersImplemented = function (that) {\n var errors = [];\n fluid.each(that.events, function (event, name) {\n fluid.each(event.sortedListeners, function (lisrec) {\n if (lisrec.listener === fluid.notImplemented || lisrec.listener.globalName === \"fluid.notImplemented\") {\n errors.push({name: name, namespace: lisrec.namespace, componentSource: fluid.model.getSimple(that.options.listeners, [name + \".\" + lisrec.namespace, 0, \"componentSource\"])});\n }\n });\n });\n return errors;\n };\n\n /** Removes duplicated and empty elements from an already sorted array **/\n fluid.unique = function (array) {\n return fluid.remove_if(array, function (element, i) {\n return !element || i > 0 && element === array[i - 1];\n });\n };\n\n fluid.arrayConcatPolicy = function (target, source) {\n return fluid.makeArray(target).concat(fluid.makeArray(source));\n };\n\n /*** FLUID ERROR SYSTEM ***/\n\n fluid.failureEvent = fluid.makeEventFirer({name: \"failure event\"});\n\n fluid.failureEvent.addListener(fluid.builtinFail, \"fail\");\n fluid.failureEvent.addListener(fluid.logFailure, \"log\", \"before:fail\");\n\n /**\n * Configure the behaviour of fluid.fail by pushing or popping a disposition record onto a stack.\n * @param {Number|Function} condition\n & Supply either a function, which will be called with two arguments, args (the complete arguments to\n * fluid.fail) and activity, an array of strings describing the current framework invocation state.\n * Or, the argument may be the number <code>-1</code> indicating that the previously supplied disposition should\n * be popped off the stack\n */\n fluid.pushSoftFailure = function (condition) {\n if (typeof (condition) === \"function\") {\n fluid.failureEvent.addListener(condition, \"fail\");\n } else if (condition === -1) {\n fluid.failureEvent.removeListener(\"fail\");\n } else if (typeof(condition) === \"boolean\") {\n fluid.fail(\"pushSoftFailure with boolean value is no longer supported\");\n }\n };\n\n /*** DEFAULTS AND OPTIONS MERGING SYSTEM ***/\n\n // A function to tag the types of all Fluid components\n fluid.componentConstructor = function () {};\n\n /** Create a \"type tag\" component with no state but simply a type name and id. The most\n * minimal form of Fluid component */\n // No longer a publically supported function - we don't abolish this because it is too annoying to prevent\n // circularity during the bootup of the IoC system if we try to construct full components before it is complete\n // unsupported, non-API function\n fluid.typeTag = function (name) {\n var that = Object.create(fluid.componentConstructor.prototype);\n that.typeName = name;\n that.id = fluid.allocateGuid();\n return that;\n };\n\n var gradeTick = 1; // tick counter for managing grade cache invalidation\n var gradeTickStore = {};\n\n fluid.defaultsStore = {};\n\n // unsupported, NON-API function\n // Recursively builds up \"gradeStructure\" in first argument. 2nd arg receives gradeNames to be resolved, with stronger grades at right (defaults order)\n // builds up gradeStructure.gradeChain pushed from strongest to weakest (reverse defaults order)\n fluid.resolveGradesImpl = function (gs, gradeNames) {\n gradeNames = fluid.makeArray(gradeNames);\n for (var i = gradeNames.length - 1; i >= 0; --i) { // from stronger to weaker\n var gradeName = gradeNames[i];\n if (gradeName && !gs.gradeHash[gradeName]) {\n var isDynamic = fluid.isIoCReference(gradeName);\n var options = (isDynamic ? null : fluid.rawDefaults(gradeName)) || {};\n var thisTick = gradeTickStore[gradeName] || (gradeTick - 1); // a nonexistent grade is recorded as just previous to current\n gs.lastTick = Math.max(gs.lastTick, thisTick);\n gs.gradeHash[gradeName] = true;\n gs.gradeChain.push(gradeName);\n var oGradeNames = fluid.makeArray(options.gradeNames);\n for (var j = oGradeNames.length - 1; j >= 0; --j) { // from stronger to weaker grades\n // TODO: in future, perhaps restore mergedDefaultsCache function of storing resolved gradeNames for bare grades\n fluid.resolveGradesImpl(gs, oGradeNames[j]);\n }\n }\n }\n return gs;\n };\n\n // unsupported, NON-API function\n fluid.resolveGradeStructure = function (defaultName, gradeNames) {\n var gradeStruct = {\n lastTick: 0,\n gradeChain: [],\n gradeHash: {}\n };\n // stronger grades appear to the right in defaults - dynamic grades are stronger still - FLUID-5085\n // we supply these to resolveGradesImpl with strong grades at the right\n fluid.resolveGradesImpl(gradeStruct, [defaultName].concat(fluid.makeArray(gradeNames)));\n gradeStruct.gradeChain.reverse(); // reverse into defaults order\n return gradeStruct;\n };\n\n fluid.hasGrade = function (options, gradeName) {\n return !options || !options.gradeNames ? false : fluid.contains(options.gradeNames, gradeName);\n };\n\n // unsupported, NON-API function\n fluid.resolveGrade = function (defaults, defaultName, gradeNames) {\n var gradeStruct = fluid.resolveGradeStructure(defaultName, gradeNames);\n // TODO: Fault in the merging algorithm does not actually treat arguments as immutable - failure in FLUID-5082 tests\n // due to listeners mergePolicy\n var mergeArgs = fluid.transform(gradeStruct.gradeChain, fluid.rawDefaults, fluid.copy);\n fluid.remove_if(mergeArgs, function (options) {\n return !options;\n });\n var mergePolicy = {};\n for (var i = 0; i < mergeArgs.length; ++i) {\n if (mergeArgs[i] && mergeArgs[i].mergePolicy) {\n mergePolicy = $.extend(true, mergePolicy, mergeArgs[i].mergePolicy);\n }\n }\n mergeArgs = [mergePolicy, {}].concat(mergeArgs);\n var mergedDefaults = fluid.merge.apply(null, mergeArgs);\n mergedDefaults.gradeNames = gradeStruct.gradeChain; // replace these since mergePolicy version is inadequate\n fluid.freezeRecursive(mergedDefaults);\n return {defaults: mergedDefaults, lastTick: gradeStruct.lastTick};\n };\n\n fluid.mergedDefaultsCache = {};\n\n // unsupported, NON-API function\n fluid.gradeNamesToKey = function (defaultName, gradeNames) {\n return defaultName + \"|\" + gradeNames.join(\"|\");\n };\n\n // unsupported, NON-API function\n // The main entry point to acquire the fully merged defaults for a combination of defaults plus mixin grades - from FluidIoC.js as well as recursively within itself\n fluid.getMergedDefaults = function (defaultName, gradeNames) {\n gradeNames = fluid.makeArray(gradeNames);\n var key = fluid.gradeNamesToKey(defaultName, gradeNames);\n var mergedDefaults = fluid.mergedDefaultsCache[key];\n if (mergedDefaults) {\n var lastTick = 0; // check if cache should be invalidated through real latest tick being later than the one stored\n var searchGrades = mergedDefaults.defaults.gradeNames || [];\n for (var i = 0; i < searchGrades.length; ++i) {\n lastTick = Math.max(lastTick, gradeTickStore[searchGrades[i]] || 0);\n }\n if (lastTick > mergedDefaults.lastTick) {\n fluid.log(fluid.logLevel.TRACE, \"Clearing cache for component \" + defaultName + \" with gradeNames \", searchGrades);\n mergedDefaults = null;\n }\n }\n if (!mergedDefaults) {\n var defaults = fluid.rawDefaults(defaultName);\n if (!defaults) {\n return defaults;\n }\n mergedDefaults = fluid.mergedDefaultsCache[key] = fluid.resolveGrade(defaults, defaultName, gradeNames);\n }\n return mergedDefaults.defaults;\n };\n\n // unsupported, NON-API function\n /** Upgrades an element of an IoC record which designates a function to prepare for a {func, args} representation.\n * @param rec {Any} If the record is of a primitive type,\n * @param key {String} The key in the returned record to hold the function, this will default to `funcName` if `rec` is a `string` *not*\n * holding an IoC reference, or `func` otherwise\n * @return {Object} The original `rec` if it was not of primitive type, else a record holding { key : rec } if it was of primitive type.\n */\n\n fluid.upgradePrimitiveFunc = function (rec, key) {\n if (rec && fluid.isPrimitive(rec)) {\n var togo = {};\n togo[key || (typeof(rec) === \"string\" && rec.charAt(0) !== \"{\" ? \"funcName\" : \"func\")] = rec;\n togo.args = fluid.NO_VALUE;\n return togo;\n } else {\n return rec;\n }\n };\n\n // unsupported, NON-API function\n // Modify supplied options record to include \"componentSource\" annotation required by FLUID-5082\n // TODO: This function really needs to act recursively in order to catch listeners registered for subcomponents - fix with FLUID-5614\n fluid.annotateListeners = function (componentName, options) {\n options.listeners = fluid.transform(options.listeners, function (record) {\n var togo = fluid.makeArray(record);\n return fluid.transform(togo, function (onerec) {\n onerec = fluid.upgradePrimitiveFunc(onerec, \"listener\");\n onerec.componentSource = componentName;\n return onerec;\n });\n });\n options.invokers = fluid.transform(options.invokers, function (record) {\n record = fluid.upgradePrimitiveFunc(record);\n if (record) {\n record.componentSource = componentName;\n }\n return record;\n });\n };\n\n // unsupported, NON-API function\n fluid.rawDefaults = function (componentName) {\n var entry = fluid.defaultsStore[componentName];\n return entry && entry.options;\n };\n\n // unsupported, NON-API function\n fluid.registerRawDefaults = function (componentName, options) {\n fluid.pushActivity(\"registerRawDefaults\", \"registering defaults for grade %componentName with options %options\",\n {componentName: componentName, options: options});\n var optionsCopy = fluid.expandCompact ? fluid.expandCompact(options) : fluid.copy(options);\n fluid.annotateListeners(componentName, optionsCopy);\n var callerInfo = fluid.getCallerInfo && fluid.getCallerInfo(6);\n fluid.defaultsStore[componentName] = {\n options: optionsCopy,\n callerInfo: callerInfo\n };\n gradeTickStore[componentName] = gradeTick++;\n fluid.popActivity();\n };\n\n // unsupported, NON-API function\n fluid.doIndexDefaults = function (defaultName, defaults, index, indexSpec) {\n var requiredGrades = fluid.makeArray(indexSpec.gradeNames);\n for (var i = 0; i < requiredGrades.length; ++i) {\n if (!fluid.hasGrade(defaults, requiredGrades[i])) { return; }\n }\n var indexFunc = typeof(indexSpec.indexFunc) === \"function\" ? indexSpec.indexFunc : fluid.getGlobalValue(indexSpec.indexFunc);\n var keys = indexFunc(defaults) || [];\n for (var j = 0; j < keys.length; ++j) {\n fluid.pushArray(index, keys[j], defaultName);\n }\n };\n\n /** Evaluates an index specification over all the defaults records registered into the system.\n * @param indexName {String} The name of this index record (currently ignored)\n * @param indexSpec {Object} Specification of the index to be performed - fields:\n * gradeNames: {String/Array of String} List of grades that must be matched by this indexer\n * indexFunc: {String/Function} An index function which accepts a defaults record and returns an array of keys\n * @return A structure indexing keys to arrays of matched gradenames\n */\n // The expectation is that this function is extremely rarely used with respect to registration of defaults\n // in the system, so currently we do not make any attempts to cache the results. The field \"indexName\" is\n // supplied in case a future implementation chooses to implement caching\n fluid.indexDefaults = function (indexName, indexSpec) {\n var index = {};\n for (var defaultName in fluid.defaultsStore) {\n var defaults = fluid.getMergedDefaults(defaultName);\n fluid.doIndexDefaults(defaultName, defaults, index, indexSpec);\n }\n return index;\n };\n\n /**\n * Retrieves and stores a grade's configuration centrally.\n * @param {String} gradeName the name of the grade whose options are to be read or written\n * @param {Object} (optional) an object containing the options to be set\n */\n\n fluid.defaults = function (componentName, options) {\n if (options === undefined) {\n return fluid.getMergedDefaults(componentName);\n }\n else {\n if (options && options.options) {\n fluid.fail(\"Probable error in options structure for \" + componentName +\n \" with option named \\\"options\\\" - perhaps you meant to write these options at top level in fluid.defaults? - \", options);\n }\n fluid.registerRawDefaults(componentName, options);\n var gradedDefaults = fluid.getMergedDefaults(componentName);\n if (!fluid.hasGrade(gradedDefaults, \"fluid.function\")) {\n fluid.makeComponentCreator(componentName);\n }\n }\n };\n\n fluid.makeComponentCreator = function (componentName) {\n var creator = function () {\n var defaults = fluid.getMergedDefaults(componentName);\n if (!defaults.gradeNames || defaults.gradeNames.length === 0) {\n fluid.fail(\"Cannot make component creator for type \" + componentName + \" which does not have any gradeNames defined\");\n } else if (!defaults.initFunction) {\n var blankGrades = [];\n for (var i = 0; i < defaults.gradeNames.length; ++i) {\n var gradeName = defaults.gradeNames[i];\n var rawDefaults = fluid.rawDefaults(gradeName);\n if (!rawDefaults) {\n blankGrades.push(gradeName);\n }\n }\n if (blankGrades.length === 0) {\n fluid.fail(\"Cannot make component creator for type \" + componentName + \" which does not have an initFunction defined\");\n } else {\n fluid.fail(\"The grade hierarchy of component with type \" + componentName + \" is incomplete - it inherits from the following grade(s): \" +\n blankGrades.join(\", \") + \" for which the grade definitions are corrupt or missing. Please check the files which might include these \" +\n \"grades and ensure they are readable and have been loaded by this instance of Infusion\");\n }\n } else {\n return fluid.initComponent(componentName, arguments);\n }\n };\n var existing = fluid.getGlobalValue(componentName);\n if (existing) {\n $.extend(creator, existing);\n }\n fluid.setGlobalValue(componentName, creator);\n };\n\n fluid.emptyPolicy = fluid.freezeRecursive({});\n // unsupported, NON-API function\n fluid.derefMergePolicy = function (policy) {\n return (policy ? policy[\"*\"] : fluid.emptyPolicy) || fluid.emptyPolicy;\n };\n\n // unsupported, NON-API function\n fluid.compileMergePolicy = function (mergePolicy) {\n var builtins = {}, defaultValues = {};\n var togo = {builtins: builtins, defaultValues: defaultValues};\n\n if (!mergePolicy) {\n return togo;\n }\n fluid.each(mergePolicy, function (value, key) {\n var parsed = {}, builtin = true;\n if (typeof(value) === \"function\") {\n parsed.func = value;\n }\n else if (typeof(value) === \"object\") {\n parsed = value;\n }\n else if (!fluid.isDefaultValueMergePolicy(value)) {\n var split = value.split(/\\s*,\\s*/);\n for (var i = 0; i < split.length; ++i) {\n parsed[split[i]] = true;\n }\n }\n else {\n // Convert to ginger self-reference - NB, this can only be parsed by IoC\n fluid.set(defaultValues, key, \"{that}.options.\" + value);\n togo.hasDefaults = true;\n builtin = false;\n }\n if (builtin) {\n fluid.set(builtins, fluid.composePath(key, \"*\"), parsed);\n }\n });\n return togo;\n };\n\n // TODO: deprecate this method of detecting default value merge policies before 1.6 in favour of\n // explicit typed records a la ModelTransformations\n // unsupported, NON-API function\n fluid.isDefaultValueMergePolicy = function (policy) {\n return typeof(policy) === \"string\" &&\n (policy.indexOf(\",\") === -1 && !/replace|nomerge|noexpand/.test(policy));\n };\n\n // unsupported, NON-API function\n fluid.mergeOneImpl = function (thisTarget, thisSource, j, sources, newPolicy, i, segs) {\n var togo = thisTarget;\n\n var primitiveTarget = fluid.isPrimitive(thisTarget);\n\n if (thisSource !== undefined) {\n if (!newPolicy.func && thisSource !== null && fluid.isPlainObject(thisSource) && !newPolicy.nomerge) {\n if (primitiveTarget) {\n togo = thisTarget = fluid.freshContainer(thisSource);\n }\n // recursion is now external? We can't do it from here since sources are not all known\n // options.recurse(thisTarget, i + 1, segs, sources, newPolicyHolder, options);\n } else {\n sources[j] = undefined;\n if (newPolicy.func) {\n togo = newPolicy.func.call(null, thisTarget, thisSource, segs[i - 1], segs, i); // NB - change in this mostly unused argument\n } else {\n togo = thisSource;\n }\n }\n }\n return togo;\n };\n // NB - same quadratic worry about these as in FluidIoC in the case the RHS trundler is live -\n // since at each regeneration step driving the RHS we are discarding the \"cursor arguments\" these\n // would have to be regenerated at each step - although in practice this can only happen once for\n // each object for all time, since after first resolution it will be concrete.\n function regenerateCursor(source, segs, limit, sourceStrategy) {\n for (var i = 0; i < limit; ++i) {\n source = sourceStrategy(source, segs[i], i, fluid.makeArray(segs)); // copy for FLUID-5243\n }\n return source;\n }\n\n function regenerateSources(sources, segs, limit, sourceStrategies) {\n var togo = [];\n for (var i = 0; i < sources.length; ++i) {\n var thisSource = regenerateCursor(sources[i], segs, limit, sourceStrategies[i]);\n if (thisSource !== undefined) {\n togo.push(thisSource);\n }\n }\n return togo;\n }\n\n // unsupported, NON-API function\n fluid.fetchMergeChildren = function (target, i, segs, sources, mergePolicy, options) {\n var thisPolicy = fluid.derefMergePolicy(mergePolicy);\n for (var j = sources.length - 1; j >= 0; --j) { // this direction now irrelevant - control is in the strategy\n var source = sources[j];\n // NB - this detection relies on strategy return being complete objects - which they are\n // although we need to set up the roots separately. We need to START the process of evaluating each\n // object root (sources) COMPLETELY, before we even begin! Even if the effect of this is to cause a\n // dispatch into ourselves almost immediately. We can do this because we can take control over our\n // TARGET objects and construct them early. Even if there is a self-dispatch, it will be fine since it is\n // DIRECTED and so will not trouble our \"slow\" detection of properties. After all self-dispatches end, control\n // will THEN return to \"evaluation of arguments\" (expander blocks) and only then FINALLY to this \"slow\"\n // traversal of concrete properties to do the final merge.\n if (source !== undefined) {\n fluid.each(source, function (newSource, name) {\n var childPolicy = fluid.concreteTrundler(mergePolicy, name);\n // 2nd arm of condition is an Outrageous bodge to fix FLUID-4930 further. See fluid.tests.retrunking in FluidIoCTests.js\n // We make extra use of the old \"evaluateFully\" flag and ensure to flood any trunk objects again during final \"initter\" phase of merging.\n // The problem is that a custom mergePolicy may have replaced the system generated trunk with a differently structured object which we must not\n // corrupt. This work should properly be done with a set of dedicated provenance/progress records in a separate structure\n if (!(name in target) || (options.evaluateFully && childPolicy === undefined && !fluid.isPrimitive(target[name]))) { // only request each new target key once -- all sources will be queried per strategy\n segs[i] = name;\n options.strategy(target, name, i + 1, segs, sources, mergePolicy);\n }\n });\n if (thisPolicy.replace) { // this branch primarily deals with a policy of replace at the root\n break;\n }\n }\n }\n return target;\n };\n\n // A special marker object which will be placed at a current evaluation point in the tree in order\n // to protect against circular evaluation\n fluid.inEvaluationMarker = Object.freeze({\"__CURRENTLY_IN_EVALUATION__\": true});\n\n // A path depth above which the core \"process strategies\" will bail out, assuming that the\n // structure has become circularly linked. Helpful in environments such as Firebug which will\n // kill the browser process if they happen to be open when a stack overflow occurs. Also provides\n // a more helpful diagnostic.\n fluid.strategyRecursionBailout = 50;\n\n // unsupported, NON-API function\n fluid.makeMergeStrategy = function (options) {\n var strategy = function (target, name, i, segs, sources, policy) {\n if (i > fluid.strategyRecursionBailout) {\n fluid.fail(\"Overflow/circularity in options merging, current path is \", segs, \" at depth \" , i, \" - please protect components from merging using the \\\"nomerge\\\" merge policy\");\n }\n if (fluid.isPrimitive(target)) { // For \"use strict\"\n return undefined; // Review this after FLUID-4925 since the only trigger is in slow component lookahead\n }\n if (fluid.isTracing) {\n fluid.tracing.pathCount.push(fluid.path(segs.slice(0, i)));\n }\n\n var oldTarget;\n if (name in target) { // bail out if our work has already been done\n oldTarget = target[name];\n if (!options.evaluateFully) { // see notes on this hack in \"initter\" - early attempt to deal with FLUID-4930\n return oldTarget;\n }\n }\n else {\n if (target !== fluid.inEvaluationMarker) { // TODO: blatant \"coding to the test\" - this enables the simplest \"re-trunking\" in\n // FluidIoCTests to function. In practice, we need to throw away this implementation entirely in favour of the\n // \"iterative deepening\" model coming with FLUID-4925\n target[name] = fluid.inEvaluationMarker;\n }\n }\n if (sources === undefined) { // recover our state in case this is an external entry point\n segs = fluid.makeArray(segs); // avoid trashing caller's segs\n sources = regenerateSources(options.sources, segs, i - 1, options.sourceStrategies);\n policy = regenerateCursor(options.mergePolicy, segs, i - 1, fluid.concreteTrundler);\n }\n var newPolicyHolder = fluid.concreteTrundler(policy, name);\n var newPolicy = fluid.derefMergePolicy(newPolicyHolder);\n\n var start, limit, mul;\n if (newPolicy.replace) {\n start = 1 - sources.length; limit = 0; mul = -1;\n }\n else {\n start = 0; limit = sources.length - 1; mul = +1;\n }\n var newSources = [];\n var thisTarget;\n\n for (var j = start; j <= limit; ++j) { // TODO: try to economise on this array and on gaps\n var k = mul * j;\n var thisSource = options.sourceStrategies[k](sources[k], name, i, segs); // Run the RH algorithm in \"driving\" mode\n if (thisSource !== undefined) {\n if (!fluid.isPrimitive(thisSource)) {\n newSources[k] = thisSource;\n }\n if (oldTarget === undefined) {\n if (mul === -1) { // if we are going backwards, it is \"replace\"\n thisTarget = target[name] = thisSource;\n break;\n }\n else {\n // write this in early, since early expansions may generate a trunk object which is written in to by later ones\n thisTarget = fluid.mergeOneImpl(thisTarget, thisSource, j, newSources, newPolicy, i, segs, options);\n if (target !== fluid.inEvaluationMarker) {\n target[name] = thisTarget;\n }\n }\n }\n }\n }\n if (oldTarget !== undefined) {\n thisTarget = oldTarget;\n }\n if (newSources.length > 0) {\n if (fluid.isPlainObject(thisTarget)) {\n fluid.fetchMergeChildren(thisTarget, i, segs, newSources, newPolicyHolder, options);\n }\n }\n if (oldTarget === undefined && newSources.length === 0) {\n delete target[name]; // remove the evaluation marker - nothing to evaluate\n }\n return thisTarget;\n };\n options.strategy = strategy;\n return strategy;\n };\n\n // A simple stand-in for \"fluid.get\" where the material is covered by a single strategy\n fluid.driveStrategy = function (root, pathSegs, strategy) {\n pathSegs = fluid.makeArray(pathSegs);\n for (var i = 0; i < pathSegs.length; ++i) {\n if (!root) {\n return undefined;\n }\n root = strategy(root, pathSegs[i], i + 1, pathSegs);\n }\n return root;\n };\n\n // A very simple \"new inner trundler\" that just performs concrete property access\n // Note that every \"strategy\" is also a \"trundler\" of this type, considering just the first two arguments\n fluid.concreteTrundler = function (source, seg) {\n return !source ? undefined : source[seg];\n };\n\n /** Merge a collection of options structures onto a target, following an optional policy.\n * This method is now used only for the purpose of merging \"dead\" option documents in order to\n * cache graded component defaults. Component option merging is now performed by the\n * fluid.makeMergeOptions pathway which sets up a deferred merging process. This function\n * will not be removed in the Fluid 2.0 release but it is recommended that users not call it\n * directly.\n * The behaviour of this function is explained more fully on\n * the page http://wiki.fluidproject.org/display/fluid/Options+Merging+for+Fluid+Components .\n * @param policy {Object/String} A \"policy object\" specifiying the type of merge to be performed.\n * If policy is of type {String} it should take on the value \"replace\" representing\n * a static policy. If it is an\n * Object, it should contain a mapping of EL paths onto these String values, representing a\n * fine-grained policy. If it is an Object, the values may also themselves be EL paths\n * representing that a default value is to be taken from that path.\n * @param options1, options2, .... {Object} an arbitrary list of options structure which are to\n * be merged together. These will not be modified.\n */\n\n fluid.merge = function (policy /*, ... sources */) {\n var sources = Array.prototype.slice.call(arguments, 1);\n var compiled = fluid.compileMergePolicy(policy).builtins;\n var options = fluid.makeMergeOptions(compiled, sources, {});\n options.initter();\n return options.target;\n };\n\n // unsupported, NON-API function\n fluid.simpleGingerBlock = function (source, recordType) {\n var block = {\n target: source,\n simple: true,\n strategy: fluid.concreteTrundler,\n initter: fluid.identity,\n recordType: recordType,\n priority: fluid.mergeRecordTypes[recordType]\n };\n return block;\n };\n\n // unsupported, NON-API function\n fluid.makeMergeOptions = function (policy, sources, userOptions) {\n // note - we close over the supplied policy as a shared object reference - it will be updated during discovery\n var options = {\n mergePolicy: policy,\n sources: sources\n };\n options = $.extend(options, userOptions);\n options.target = options.target || fluid.freshContainer(options.sources[0]);\n options.sourceStrategies = options.sourceStrategies || fluid.generate(options.sources.length, fluid.concreteTrundler);\n options.initter = function () {\n // This hack is necessary to ensure that the FINAL evaluation doesn't balk when discovering a trunk path which was already\n // visited during self-driving via the expander. This bi-modality is sort of rubbish, but we currently don't have \"room\"\n // in the strategy API to express when full evaluation is required - and the \"flooding API\" is not standardised. See FLUID-4930\n options.evaluateFully = true;\n fluid.fetchMergeChildren(options.target, 0, [], options.sources, options.mergePolicy, options);\n };\n fluid.makeMergeStrategy(options);\n return options;\n };\n\n // unsupported, NON-API function\n fluid.transformOptions = function (options, transRec) {\n fluid.expect(\"Options transformation record\", transRec, [\"transformer\", \"config\"]);\n var transFunc = fluid.getGlobalValue(transRec.transformer);\n return transFunc.call(null, options, transRec.config);\n };\n\n // unsupported, NON-API function\n fluid.findMergeBlocks = function (mergeBlocks, recordType) {\n return fluid.remove_if(fluid.makeArray(mergeBlocks), function (block) { return block.recordType !== recordType; });\n };\n\n // unsupported, NON-API function\n fluid.transformOptionsBlocks = function (mergeBlocks, transformOptions, recordTypes) {\n fluid.each(recordTypes, function (recordType) {\n var blocks = fluid.findMergeBlocks(mergeBlocks, recordType);\n fluid.each(blocks, function (block) {\n var source = block.source ? \"source\" : \"target\"; // TODO: Problem here with irregular presentation of options which consist of a reference in their entirety\n block[block.simple || source === \"target\" ? \"target\" : \"source\"] = fluid.transformOptions(block[source], transformOptions);\n });\n });\n };\n\n // unsupported, NON-API function\n fluid.dedupeDistributionNamespaces = function (mergeBlocks) { // to implement FLUID-5824\n var byNamespace = {};\n fluid.remove_if(mergeBlocks, function (mergeBlock) {\n var ns = mergeBlock.namespace;\n if (ns) {\n if (byNamespace[ns] && byNamespace[ns] !== mergeBlock.contextThat.id) { // source check for FLUID-5835\n return true;\n } else {\n byNamespace[ns] = mergeBlock.contextThat.id;\n }\n }\n });\n };\n\n // unsupported, NON-API function\n fluid.deliverOptionsStrategy = fluid.identity;\n fluid.computeComponentAccessor = fluid.identity;\n fluid.computeDynamicComponents = fluid.identity;\n\n // The types of merge record the system supports, with the weakest records first\n fluid.mergeRecordTypes = {\n defaults: 1000,\n defaultValueMerge: 900,\n subcomponentRecord: 800,\n user: 700,\n distribution: 100 // and above\n };\n\n // Utility used in the framework (primarily with distribution assembly), unconnected with new ChangeApplier\n // unsupported, NON-API function\n fluid.model.applyChangeRequest = function (model, request) {\n var segs = request.segs;\n if (segs.length === 0) {\n if (request.type === \"ADD\") {\n $.extend(true, model, request.value);\n } else {\n fluid.clear(model);\n }\n } else if (request.type === \"ADD\") {\n fluid.model.setSimple(model, request.segs, request.value);\n } else {\n for (var i = 0; i < segs.length - 1; ++i) {\n model = model[segs[i]];\n if (!model) {\n return;\n }\n }\n var last = segs[segs.length - 1];\n delete model[last];\n }\n };\n\n /** Delete the value in the supplied object held at the specified path\n * @param target {Object} The object holding the value to be deleted (possibly empty)\n * @param segs {Array of String} the path of the value to be deleted\n */\n // unsupported, NON-API function\n fluid.destroyValue = function (target, segs) {\n if (target) {\n fluid.model.applyChangeRequest(target, {type: \"DELETE\", segs: segs});\n }\n };\n\n /**\n * Merges the component's declared defaults, as obtained from fluid.defaults(),\n * with the user's specified overrides.\n *\n * @param {Object} that the instance to attach the options to\n * @param {String} componentName the unique \"name\" of the component, which will be used\n * to fetch the default options from store. By recommendation, this should be the global\n * name of the component's creator function.\n * @param {Object} userOptions the user-specified configuration options for this component\n */\n // unsupported, NON-API function\n fluid.mergeComponentOptions = function (that, componentName, userOptions, localOptions) {\n var rawDefaults = fluid.rawDefaults(componentName);\n var defaults = fluid.getMergedDefaults(componentName, rawDefaults && rawDefaults.gradeNames ? null : localOptions.gradeNames);\n var sharedMergePolicy = {};\n\n var mergeBlocks = [];\n\n if (fluid.expandComponentOptions) {\n mergeBlocks = mergeBlocks.concat(fluid.expandComponentOptions(sharedMergePolicy, defaults, userOptions, that));\n }\n else {\n mergeBlocks = mergeBlocks.concat([fluid.simpleGingerBlock(defaults, \"defaults\"),\n fluid.simpleGingerBlock(userOptions, \"user\")]);\n }\n var options = {}; // ultimate target\n var sourceStrategies = [], sources = [];\n var baseMergeOptions = {\n target: options,\n sourceStrategies: sourceStrategies\n };\n // Called both from here and from IoC whenever there is a change of block content or arguments which\n // requires them to be resorted and rebound\n var updateBlocks = function () {\n fluid.each(mergeBlocks, function (block) {\n if (fluid.isPrimitive(block.priority)) {\n block.priority = fluid.parsePriority(block.priority, 0, false, \"options distribution\");\n }\n });\n fluid.sortByPriority(mergeBlocks);\n fluid.dedupeDistributionNamespaces(mergeBlocks);\n sourceStrategies.length = 0;\n sources.length = 0;\n fluid.each(mergeBlocks, function (block) {\n sourceStrategies.push(block.strategy);\n sources.push(block.target);\n });\n };\n updateBlocks();\n var mergeOptions = fluid.makeMergeOptions(sharedMergePolicy, sources, baseMergeOptions);\n mergeOptions.mergeBlocks = mergeBlocks;\n mergeOptions.updateBlocks = updateBlocks;\n mergeOptions.destroyValue = function (segs) { // This method is a temporary hack to assist FLUID-5091\n for (var i = 0; i < mergeBlocks.length; ++i) {\n fluid.destroyValue(mergeBlocks[i].target, segs);\n }\n fluid.destroyValue(baseMergeOptions.target, segs);\n };\n\n var compiledPolicy;\n var mergePolicy;\n function computeMergePolicy() {\n // Decode the now available mergePolicy\n mergePolicy = fluid.driveStrategy(options, \"mergePolicy\", mergeOptions.strategy);\n mergePolicy = $.extend({}, fluid.rootMergePolicy, mergePolicy);\n compiledPolicy = fluid.compileMergePolicy(mergePolicy);\n // TODO: expandComponentOptions has already put some builtins here - performance implications of the now huge\n // default mergePolicy material need to be investigated as well as this deep merge\n $.extend(true, sharedMergePolicy, compiledPolicy.builtins); // ensure it gets broadcast to all sharers\n }\n computeMergePolicy();\n mergeOptions.computeMergePolicy = computeMergePolicy;\n\n if (compiledPolicy.hasDefaults) {\n if (fluid.generateExpandBlock) {\n mergeBlocks.push(fluid.generateExpandBlock({\n options: compiledPolicy.defaultValues,\n recordType: \"defaultValueMerge\",\n priority: fluid.mergeRecordTypes.defaultValueMerge\n }, that, {}));\n updateBlocks();\n }\n else {\n fluid.fail(\"Cannot operate mergePolicy \", mergePolicy, \" for component \", that, \" without including FluidIoC.js\");\n }\n }\n that.options = options;\n fluid.driveStrategy(options, \"gradeNames\", mergeOptions.strategy);\n\n fluid.deliverOptionsStrategy(that, options, mergeOptions); // do this early to broadcast and receive \"distributeOptions\"\n\n fluid.computeComponentAccessor(that, userOptions && userOptions.localRecord);\n\n var transformOptions = fluid.driveStrategy(options, \"transformOptions\", mergeOptions.strategy);\n if (transformOptions) {\n fluid.transformOptionsBlocks(mergeBlocks, transformOptions, [\"user\", \"subcomponentRecord\"]);\n updateBlocks(); // because the possibly simple blocks may have changed target\n }\n\n if (!baseMergeOptions.target.mergePolicy) {\n computeMergePolicy();\n }\n\n return mergeOptions;\n };\n\n // The Fluid Component System proper\n\n // The base system grade definitions\n\n fluid.defaults(\"fluid.function\", {});\n\n /** Invoke a global function by name and named arguments. A courtesy to allow declaratively encoded function calls\n * to use named arguments rather than bare arrays.\n * @param name {String} A global name which can be resolved to a Function. The defaults for this name must\n * resolve onto a grade including \"fluid.function\". The defaults record should also contain an entry\n * <code>argumentMap</code>, a hash of argument names onto indexes.\n * @param spec {Object} A named hash holding the argument values to be sent to the function. These will be looked\n * up in the <code>argumentMap</code> and resolved into a flat list of arguments.\n * @return {Any} The return value from the function\n */\n\n fluid.invokeGradedFunction = function (name, spec) {\n var defaults = fluid.defaults(name);\n if (!defaults || !defaults.argumentMap || !fluid.hasGrade(defaults, \"fluid.function\")) {\n fluid.fail(\"Cannot look up name \" + name +\n \" to a function with registered argumentMap - got defaults \", defaults);\n }\n var args = [];\n fluid.each(defaults.argumentMap, function (value, key) {\n args[value] = spec[key];\n });\n return fluid.invokeGlobalFunction(name, args);\n };\n\n fluid.noNamespaceDistributionPrefix = \"no-namespace-distribution-\";\n\n fluid.mergeOneDistribution = function (target, source, key) {\n var namespace = source.namespace || key || fluid.noNamespaceDistributionPrefix + fluid.allocateGuid();\n source.namespace = namespace;\n target[namespace] = $.extend(true, {}, target[namespace], source);\n };\n\n fluid.distributeOptionsPolicy = function (target, source) {\n target = target || {};\n if (fluid.isArrayable(source)) {\n for (var i = 0; i < source.length; ++i) {\n fluid.mergeOneDistribution(target, source[i]);\n }\n } else if (typeof(source.target) === \"string\") {\n fluid.mergeOneDistribution(target, source);\n } else {\n fluid.each(source, function (oneSource, key) {\n fluid.mergeOneDistribution(target, oneSource, key);\n });\n }\n return target;\n };\n\n fluid.mergingArray = function () {};\n fluid.mergingArray.prototype = [];\n\n // Defer all evaluation of all nested members to resolve FLUID-5668\n fluid.membersMergePolicy = function (target, source) {\n target = target || {};\n fluid.each(source, function (oneSource, key) {\n if (!target[key]) {\n target[key] = new fluid.mergingArray();\n }\n if (oneSource instanceof fluid.mergingArray) {\n target[key].push.apply(target[key], oneSource);\n } else if (oneSource !== undefined) {\n target[key].push(oneSource);\n }\n });\n return target;\n };\n\n fluid.invokerStrategies = fluid.arrayToHash([\"func\", \"funcName\", \"listener\", \"this\", \"method\"]);\n\n // Resolve FLUID-5741, FLUID-5184 by ensuring that we avoid mixing incompatible invoker strategies\n fluid.invokersMergePolicy = function (target, source) {\n target = target || {};\n fluid.each(source, function (oneInvoker, name) {\n if (!oneInvoker) {\n target[name] = oneInvoker;\n return;\n } else {\n oneInvoker = fluid.upgradePrimitiveFunc(oneInvoker);\n }\n var oneT = target[name];\n if (!oneT) {\n oneT = target[name] = {};\n }\n for (var key in fluid.invokerStrategies) {\n if (key in oneInvoker) {\n for (var key2 in fluid.invokerStrategies) {\n oneT[key2] = undefined; // can't delete since stupid driveStrategy bug from recordStrategy reinstates them\n }\n }\n }\n $.extend(oneT, oneInvoker);\n });\n return target;\n };\n\n fluid.rootMergePolicy = {\n gradeNames: fluid.arrayConcatPolicy,\n distributeOptions: fluid.distributeOptionsPolicy,\n members: {\n noexpand: true,\n func: fluid.membersMergePolicy\n },\n invokers: {\n noexpand: true,\n func: fluid.invokersMergePolicy\n },\n transformOptions: \"replace\",\n listeners: fluid.makeMergeListenersPolicy(fluid.mergeListenerPolicy)\n };\n\n fluid.defaults(\"fluid.component\", {\n initFunction: \"fluid.initLittleComponent\",\n mergePolicy: fluid.rootMergePolicy,\n argumentMap: {\n options: 0\n },\n events: { // Three standard lifecycle points common to all components\n onCreate: null,\n onDestroy: null,\n afterDestroy: null\n }\n });\n\n fluid.defaults(\"fluid.emptySubcomponent\", {\n gradeNames: [\"fluid.component\"]\n });\n\n /** Compute a \"nickname\" given a fully qualified typename, by returning the last path\n * segment.\n */\n\n fluid.computeNickName = function (typeName) {\n var segs = fluid.model.parseEL(typeName);\n return segs[segs.length - 1];\n };\n\n /** A specially recognised grade tag which directs the IoC framework to instantiate this component first amongst\n * its set of siblings, since it is likely to bear a context-forming type name. This will be removed from the framework\n * once we have implemented FLUID-4925 \"wave of explosions\" */\n\n fluid.defaults(\"fluid.typeFount\", {\n gradeNames: [\"fluid.component\"]\n });\n\n /**\n * Creates a new \"little component\": a that-ist object with options merged into it by the framework.\n * This method is a convenience for creating small objects that have options but don't require full\n * View-like features such as the DOM Binder or events\n *\n * @param {Object} name the name of the little component to create\n * @param {Object} options user-supplied options to merge with the defaults\n */\n // NOTE: the 3rd argument localOptions is NOT to be advertised as part of the stable API, it is present\n // just to allow backward compatibility whilst grade specifications are not mandatory - similarly for 4th arg \"receiver\"\n // NOTE historical name to avoid confusion with fluid.initComponent below - this will all be refactored with FLUID-4925\n fluid.initLittleComponent = function (name, userOptions, localOptions, receiver) {\n var that = fluid.typeTag(name);\n that.lifecycleStatus = \"constructing\";\n localOptions = localOptions || {gradeNames: \"fluid.component\"};\n\n that.destroy = fluid.makeRootDestroy(that); // overwritten by FluidIoC for constructed subcomponents\n var mergeOptions = fluid.mergeComponentOptions(that, name, userOptions, localOptions);\n mergeOptions.exceptions = {members: {model: true, modelRelay: true}}; // don't evaluate these in \"early flooding\" - they must be fetched explicitly\n var options = that.options;\n that.events = {};\n // deliver to a non-IoC side early receiver of the component (currently only initView)\n (receiver || fluid.identity)(that, options, mergeOptions.strategy);\n fluid.computeDynamicComponents(that, mergeOptions);\n\n // TODO: ****THIS**** is the point we must deliver and suspend!! Construct the \"component skeleton\" first, and then continue\n // for as long as we can continue to find components.\n for (var i = 0; i < mergeOptions.mergeBlocks.length; ++i) {\n mergeOptions.mergeBlocks[i].initter();\n }\n mergeOptions.initter();\n delete options.mergePolicy;\n\n fluid.instantiateFirers(that, options);\n fluid.mergeListeners(that, that.events, options.listeners);\n\n return that;\n };\n\n fluid.diagnoseFailedView = fluid.identity;\n\n // unsupported, NON-API function\n fluid.makeRootDestroy = function (that) {\n return function () {\n fluid.doDestroy(that);\n fluid.fireEvent(that, \"afterDestroy\", [that, \"\", null]);\n };\n };\n\n /** Returns <code>true</code> if the supplied reference holds a component which has been destroyed **/\n\n fluid.isDestroyed = function (that) {\n return that.lifecycleStatus === \"destroyed\";\n };\n\n // unsupported, NON-API function\n fluid.doDestroy = function (that, name, parent) {\n fluid.fireEvent(that, \"onDestroy\", [that, name || \"\", parent]);\n that.lifecycleStatus = \"destroyed\";\n for (var key in that.events) {\n if (key !== \"afterDestroy\" && typeof(that.events[key].destroy) === \"function\") {\n that.events[key].destroy();\n }\n }\n if (that.applier) { // TODO: Break this out into the grade's destroyer\n that.applier.destroy();\n }\n };\n\n // unsupported, NON-API function\n fluid.initComponent = function (componentName, initArgs) {\n var options = fluid.defaults(componentName);\n if (!options.gradeNames) {\n fluid.fail(\"Cannot initialise component \" + componentName + \" which has no gradeName registered\");\n }\n var args = [componentName].concat(fluid.makeArray(initArgs));\n var that;\n fluid.pushActivity(\"initComponent\", \"constructing component of type %componentName with arguments %initArgs\",\n {componentName: componentName, initArgs: initArgs});\n that = fluid.invokeGlobalFunction(options.initFunction, args);\n fluid.diagnoseFailedView(componentName, that, options, args);\n if (fluid.initDependents) {\n fluid.initDependents(that);\n }\n var errors = fluid.validateListenersImplemented(that);\n if (errors.length > 0) {\n fluid.fail(fluid.transform(errors, function (error) {\n return [\"Error constructing component \", that, \" - the listener for event \" + error.name + \" with namespace \" + error.namespace + (\n (error.componentSource ? \" which was defined in grade \" + error.componentSource : \"\") + \" needs to be overridden with a concrete implementation\")];\n })).join(\"\\n\");\n }\n if (that.lifecycleStatus === \"constructing\") {\n that.lifecycleStatus = \"constructed\";\n }\n that.events.onCreate.fire(that);\n fluid.popActivity();\n return that;\n };\n\n // unsupported, NON-API function\n fluid.initSubcomponentImpl = function (that, entry, args) {\n var togo;\n if (typeof (entry) !== \"function\") {\n var entryType = typeof (entry) === \"string\" ? entry : entry.type;\n togo = entryType === \"fluid.emptySubcomponent\" ?\n null : fluid.invokeGlobalFunction(entryType, args);\n } else {\n togo = entry.apply(null, args);\n }\n return togo;\n };\n\n // ******* SELECTOR ENGINE *********\n\n // selector regexps copied from jQuery - recent versions correct the range to start C0\n // The initial portion of the main character selector: \"just add water\" to add on extra\n // accepted characters, as well as the \"\\\\\\\\.\" -> \"\\.\" portion necessary for matching\n // period characters escaped in selectors\n var charStart = \"(?:[\\\\w\\\\u00c0-\\\\uFFFF*_-\";\n\n fluid.simpleCSSMatcher = {\n regexp: new RegExp(\"([#.]?)(\" + charStart + \"]|\\\\\\\\.)+)\", \"g\"),\n charToTag: {\n \"\": \"tag\",\n \"#\": \"id\",\n \".\": \"clazz\"\n }\n };\n\n fluid.IoCSSMatcher = {\n regexp: new RegExp(\"([&#]?)(\" + charStart + \"]|\\\\.|\\\\/)+)\", \"g\"),\n charToTag: {\n \"\": \"context\",\n \"&\": \"context\",\n \"#\": \"id\"\n }\n };\n\n var childSeg = new RegExp(\"\\\\s*(>)?\\\\s*\", \"g\");\n// var whiteSpace = new RegExp(\"^\\\\w*$\");\n\n // Parses a selector expression into a data structure holding a list of predicates\n // 2nd argument is a \"strategy\" structure, e.g. fluid.simpleCSSMatcher or fluid.IoCSSMatcher\n // unsupported, non-API function\n fluid.parseSelector = function (selstring, strategy) {\n var togo = [];\n selstring = selstring.trim();\n //ws-(ss*)[ws/>]\n var regexp = strategy.regexp;\n regexp.lastIndex = 0;\n var lastIndex = 0;\n while (true) {\n var atNode = []; // a list of predicates at a particular node\n var first = true;\n while (true) {\n var segMatch = regexp.exec(selstring);\n if (!segMatch) {\n break;\n }\n if (segMatch.index !== lastIndex) {\n if (first) {\n fluid.fail(\"Error in selector string - cannot match child selector expression starting at \" + selstring.substring(lastIndex));\n }\n else {\n break;\n }\n }\n var thisNode = {};\n var text = segMatch[2];\n var targetTag = strategy.charToTag[segMatch[1]];\n if (targetTag) {\n thisNode[targetTag] = text;\n }\n atNode[atNode.length] = thisNode;\n lastIndex = regexp.lastIndex;\n first = false;\n }\n childSeg.lastIndex = lastIndex;\n var fullAtNode = {predList: atNode};\n var childMatch = childSeg.exec(selstring);\n if (!childMatch || childMatch.index !== lastIndex) {\n fluid.fail(\"Error in selector string - can not match child selector expression at \" + selstring.substring(lastIndex));\n }\n if (childMatch[1] === \">\") {\n fullAtNode.child = true;\n }\n togo[togo.length] = fullAtNode;\n // >= test here to compensate for IE bug http://blog.stevenlevithan.com/archives/exec-bugs\n if (childSeg.lastIndex >= selstring.length) {\n break;\n }\n lastIndex = childSeg.lastIndex;\n regexp.lastIndex = childSeg.lastIndex;\n }\n return togo;\n };\n\n // Message resolution and templating\n\n /**\n * Converts a string to a regexp with the specified flags given in parameters\n * @param {String} a string that has to be turned into a regular expression\n * @param {String} the flags to provide to the reg exp\n */\n // TODO: this is an abominably inefficient technique for something that could simply be done by means of indexOf and slice\n fluid.stringToRegExp = function (str, flags) {\n return new RegExp(str.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\"), flags);\n };\n\n /**\n * Simple string template system.\n * Takes a template string containing tokens in the form of \"%value\".\n * Returns a new string with the tokens replaced by the specified values.\n * Keys and values can be of any data type that can be coerced into a string.\n *\n * @param {String} template a string (can be HTML) that contains tokens embedded into it\n * @param {object} values a collection of token keys and values\n */\n fluid.stringTemplate = function (template, values) {\n var keys = fluid.keys(values);\n keys = keys.sort(fluid.compareStringLength());\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var re = fluid.stringToRegExp(\"%\" + key, \"g\");\n template = template.replace(re, values[key]);\n }\n return template;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*!\n Copyright 2011 unscriptable.com / John Hann\n Copyright 2014 Lucendo Development Ltd.\n Copyright 2014 Raising the Floor - US\n Copyright 2014-2016 Raising the Floor - International\n\n License MIT\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n// Light fluidification of minimal promises library. See original gist at\n// https://gist.github.com/unscriptable/814052 for limitations and commentary\n\n// This implementation provides what could be described as \"flat promises\" with\n// no support for structured programming idioms involving promise composition.\n// It provides what a proponent of mainstream promises would describe as\n// a \"glorified callback aggregator\"\n\n fluid.promise = function () {\n var that = {\n onResolve: [],\n onReject: []\n // disposition\n // value\n };\n that.then = function (onResolve, onReject) {\n if (onResolve) {\n if (that.disposition === \"resolve\") {\n onResolve(that.value);\n } else {\n that.onResolve.push(onResolve);\n }\n }\n if (onReject) {\n if (that.disposition === \"reject\") {\n onReject(that.value);\n } else {\n that.onReject.push(onReject);\n }\n }\n return that;\n };\n that.resolve = function (value) {\n if (that.disposition) {\n fluid.fail(\"Error: resolving promise \", that,\n \" which has already received \\\"\" + that.disposition + \"\\\"\");\n } else {\n that.complete(\"resolve\", that.onResolve, value);\n }\n return that;\n };\n that.reject = function (reason) {\n if (that.disposition) {\n fluid.fail(\"Error: rejecting promise \", that,\n \"which has already received \\\"\" + that.disposition + \"\\\"\");\n } else {\n that.complete(\"reject\", that.onReject, reason);\n }\n return that;\n };\n // PRIVATE, NON-API METHOD\n that.complete = function (which, queue, arg) {\n that.disposition = which;\n that.value = arg;\n for (var i = 0; i < queue.length; ++i) {\n queue[i](arg);\n }\n };\n return that;\n };\n\n /** Any object with a member <code>then</code> of type <code>function</code> passes this test.\n * This includes essentially every known variety, including jQuery promises.\n */\n fluid.isPromise = function (totest) {\n return totest && typeof(totest.then) === \"function\";\n };\n\n /** Coerces any value to a promise\n * @param promiseOrValue The value to be coerced\n * @return If the supplied value is already a promise, it is returned unchanged. Otherwise a fresh promise is created with the value as resolution and returned\n */\n fluid.toPromise = function (promiseOrValue) {\n if (fluid.isPromise(promiseOrValue)) {\n return promiseOrValue;\n } else {\n var togo = fluid.promise();\n togo.resolve(promiseOrValue);\n return togo;\n }\n };\n\n /** Chains the resolution methods of one promise (target) so that they follow those of another (source).\n * That is, whenever source resolves, target will resolve, or when source rejects, target will reject, with the\n * same payloads in each case.\n */\n fluid.promise.follow = function (source, target) {\n source.then(target.resolve, target.reject);\n };\n\n /** Returns a promise whose resolved value is mapped from the source promise or value by the supplied function.\n * @param source {Object|Promise} An object or promise whose value is to be mapped\n * @param func {Function} A function which will map the resolved promise value\n * @return {Promise} A promise for the resolved mapped value.\n */\n fluid.promise.map = function (source, func) {\n var promise = fluid.toPromise(source);\n var togo = fluid.promise();\n promise.then(function (value) {\n var mapped = func(value);\n if (fluid.isPromise(mapped)) {\n fluid.promise.follow(mapped, togo);\n } else {\n togo.resolve(mapped);\n }\n }, function (error) {\n togo.reject(error);\n });\n return togo;\n };\n\n /* General skeleton for all sequential promise algorithms, e.g. transform, reduce, sequence, etc.\n * These accept a variable \"strategy\" pair to customise the interchange of values and final return\n */\n\n fluid.promise.makeSequencer = function (sources, options, strategy) {\n if (!fluid.isArrayable(sources)) {\n fluid.fail(\"fluid.promise sequence algorithms must be supplied an array as source\");\n }\n return {\n sources: sources,\n resolvedSources: [], // the values of \"sources\" only with functions invoked (an array of promises or values)\n index: 0,\n strategy: strategy,\n options: options, // available to be supplied to each listener\n returns: [],\n promise: fluid.promise() // the final return value\n };\n };\n\n fluid.promise.progressSequence = function (that, retValue) {\n that.returns.push(retValue);\n that.index++;\n // No we dun't have no tail recursion elimination\n fluid.promise.resumeSequence(that);\n };\n\n fluid.promise.processSequenceReject = function (that, error) { // Allow earlier promises in the sequence to wrap the rejection supplied by later ones (FLUID-5584)\n for (var i = that.index - 1; i >= 0; --i) {\n var resolved = that.resolvedSources[i];\n var accumulator = fluid.isPromise(resolved) && typeof(resolved.accumulateRejectionReason) === \"function\" ? resolved.accumulateRejectionReason : fluid.identity;\n error = accumulator(error);\n }\n that.promise.reject(error);\n };\n\n fluid.promise.resumeSequence = function (that) {\n if (that.index === that.sources.length) {\n that.promise.resolve(that.strategy.resolveResult(that));\n } else {\n var value = that.strategy.invokeNext(that);\n that.resolvedSources[that.index] = value;\n if (fluid.isPromise(value)) {\n value.then(function (retValue) {\n fluid.promise.progressSequence(that, retValue);\n }, function (error) {\n fluid.promise.processSequenceReject(that, error);\n });\n } else {\n fluid.promise.progressSequence(that, value);\n }\n }\n };\n\n // SEQUENCE ALGORITHM APPLYING PROMISES\n\n fluid.promise.makeSequenceStrategy = function () {\n return {\n invokeNext: function (that) {\n var source = that.sources[that.index];\n return typeof(source) === \"function\" ? source(that.options) : source;\n },\n resolveResult: function (that) {\n return that.returns;\n }\n };\n };\n\n // accepts an array of values, promises or functions returning promises - in the case of functions returning promises,\n // will assure that at most one of these is \"in flight\" at a time - that is, the succeeding function will not be invoked\n // until the promise at the preceding position has resolved\n fluid.promise.sequence = function (sources, options) {\n var sequencer = fluid.promise.makeSequencer(sources, options, fluid.promise.makeSequenceStrategy());\n fluid.promise.resumeSequence(sequencer);\n return sequencer.promise;\n };\n\n // TRANSFORM ALGORITHM APPLYING PROMISES\n\n fluid.promise.makeTransformerStrategy = function () {\n return {\n invokeNext: function (that) {\n var lisrec = that.sources[that.index];\n lisrec.listener = fluid.event.resolveListener(lisrec.listener);\n var value = lisrec.listener(that.returns[that.index], that.options);\n return value;\n },\n resolveResult: function (that) {\n return that.returns[that.index];\n }\n };\n };\n\n // Construct a \"mini-object\" managing the process of a sequence of transforms,\n // each of which may be synchronous or return a promise\n fluid.promise.makeTransformer = function (listeners, payload, options) {\n listeners.unshift({listener:\n function () {\n return payload;\n }\n });\n var sequencer = fluid.promise.makeSequencer(listeners, options, fluid.promise.makeTransformerStrategy());\n sequencer.returns.push(null); // first dummy return from initial entry\n fluid.promise.resumeSequence(sequencer);\n return sequencer;\n };\n\n fluid.promise.filterNamespaces = function (listeners, namespaces) {\n if (!namespaces) {\n return listeners;\n }\n return fluid.remove_if(fluid.makeArray(listeners), function (element) {\n return element.namespace && !element.softNamespace && !fluid.contains(namespaces, element.namespace);\n });\n };\n\n /** Top-level API to operate a Fluid event which manages a sequence of\n * chained transforms. Rather than being a standard listener accepting the\n * same payload, each listener to the event accepts the payload returned by the\n * previous listener, and returns either a transformed payload or else a promise\n * yielding such a payload.\n * @param event {fluid.eventFirer} A Fluid event to which the listeners are to be interpreted as\n * elements cooperating in a chained transform. Each listener will receive arguments <code>(payload, options)</code> where <code>payload</code>\n * is the (successful, resolved) return value of the previous listener, and <code>options</code> is the final argument to this function\n * @param payload {Object|Promise} The initial payload input to the transform chain\n * @param options {Object} A free object containing options governing the transform. Fields interpreted at this top level are:\n * reverse {Boolean}: <code>true</code> if the listeners are to be called in reverse order of priority (typically the case for an inverse transform)\n * filterTransforms {Array}: An array of listener namespaces. If this field is set, only the transform elements whose listener namespaces listed in this array will be applied.\n * @return {fluid.promise} A promise which will yield either the final transformed value, or the response of the first transform which fails.\n */\n\n fluid.promise.fireTransformEvent = function (event, payload, options) {\n options = options || {};\n var listeners = options.reverse ? fluid.makeArray(event.sortedListeners).reverse() :\n fluid.makeArray(event.sortedListeners);\n listeners = fluid.promise.filterNamespaces(listeners, options.filterNamespaces);\n var transformer = fluid.promise.makeTransformer(listeners, payload, options);\n return transformer.promise;\n };\n\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2007-2010 University of Cambridge\nCopyright 2007-2009 University of Toronto\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2010-2016 OCAD University\nCopyright 2013-2014 Raising the Floor - US\nCopyright 2005-2013 jQuery Foundation, Inc. and other contributors\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\n/** This file contains functions which depend on the presence of a DOM document\n * but which do not depend on the contents of Fluid.js **/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n // polyfill for $.browser which was removed in jQuery 1.9 and later\n // Taken from jquery-migrate-1.2.1.js,\n // jQuery Migrate - v1.2.1 - 2013-05-08\n // https://github.com/jquery/jquery-migrate\n // Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT\n\n fluid.uaMatch = function (ua) {\n ua = ua.toLowerCase();\n\n var match = /(chrome)[ \\/]([\\w.]+)/.exec( ua ) ||\n /(webkit)[ \\/]([\\w.]+)/.exec( ua ) ||\n /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec( ua ) ||\n /(msie) ([\\w.]+)/.exec( ua ) ||\n ua.indexOf(\"compatible\") < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec( ua ) || [];\n\n return {\n browser: match[ 1 ] || \"\",\n version: match[ 2 ] || \"0\"\n };\n };\n\n var matched, browser;\n\n // Don't clobber any existing jQuery.browser in case it's different\n if (!$.browser) {\n if (!!navigator.userAgent.match(/Trident\\/7\\./)) {\n browser = { // From http://stackoverflow.com/questions/18684099/jquery-fail-to-detect-ie-11\n msie: true,\n version: 11\n };\n } else {\n matched = fluid.uaMatch(navigator.userAgent);\n browser = {};\n\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = matched.version;\n }\n // Chrome is Webkit, but Webkit is also Safari.\n if (browser.chrome) {\n browser.webkit = true;\n } else if (browser.webkit) {\n browser.safari = true;\n }\n }\n $.browser = browser;\n }\n\n // Private constants.\n var NAMESPACE_KEY = \"fluid-scoped-data\";\n\n /**\n * Gets stored state from the jQuery instance's data map.\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.getScopedData = function (target, key) {\n var data = $(target).data(NAMESPACE_KEY);\n return data ? data[key] : undefined;\n };\n\n /**\n * Stores state in the jQuery instance's data map. Unlike jQuery's version,\n * accepts multiple-element jQueries.\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.setScopedData = function (target, key, value) {\n $(target).each(function () {\n var data = $.data(this, NAMESPACE_KEY) || {};\n data[key] = value;\n\n $.data(this, NAMESPACE_KEY, data);\n });\n };\n\n /** Global focus manager - makes use of \"focusin\" event supported in jquery 1.4.2 or later.\n */\n\n var lastFocusedElement = null;\n\n $(document).on(\"focusin\", function (event) {\n lastFocusedElement = event.target;\n });\n\n fluid.getLastFocusedElement = function () {\n return lastFocusedElement;\n };\n\n\n var ENABLEMENT_KEY = \"enablement\";\n\n /** Queries or sets the enabled status of a control. An activatable node\n * may be \"disabled\" in which case its keyboard bindings will be inoperable\n * (but still stored) until it is reenabled again.\n * This function is unsupported: It is not really intended for use by implementors.\n */\n\n fluid.enabled = function (target, state) {\n target = $(target);\n if (state === undefined) {\n return fluid.getScopedData(target, ENABLEMENT_KEY) !== false;\n }\n else {\n $(\"*\", target).add(target).each(function () {\n if (fluid.getScopedData(this, ENABLEMENT_KEY) !== undefined) {\n fluid.setScopedData(this, ENABLEMENT_KEY, state);\n }\n else if (/select|textarea|input/i.test(this.nodeName)) {\n $(this).prop(\"disabled\", !state);\n }\n });\n fluid.setScopedData(target, ENABLEMENT_KEY, state);\n }\n };\n\n fluid.initEnablement = function (target) {\n fluid.setScopedData(target, ENABLEMENT_KEY, true);\n };\n\n // This utility is required through the use of newer versions of jQuery which will obscure the original\n // event responsible for interaction with a target. This is currently use in Tooltip.js and FluidView.js\n // \"dead man's blur\" but would be of general utility\n\n fluid.resolveEventTarget = function (event) {\n while (event.originalEvent && event.originalEvent.target) {\n event = event.originalEvent;\n }\n return event.target;\n };\n\n // These function (fluid.focus() and fluid.blur()) serve several functions. They should be used by\n // all implementation both in test cases and component implementation which require to trigger a focus\n // event. Firstly, they restore the old behaviour in jQuery versions prior to 1.10 in which a focus\n // trigger synchronously relays to a focus handler. In newer jQueries this defers to the real browser\n // relay with numerous platform and timing-dependent effects.\n // Secondly, they are necessary since simulation of focus events by jQuery under IE\n // is not sufficiently good to intercept the \"focusin\" binding. Any code which triggers\n // focus or blur synthetically throughout the framework and client code must use this function,\n // especially if correct cross-platform interaction is required with the \"deadMansBlur\" function.\n\n function applyOp(node, func) {\n node = $(node);\n node.trigger(\"fluid-\" + func);\n node.triggerHandler(func);\n node[func]();\n return node;\n }\n\n $.each([\"focus\", \"blur\"], function (i, name) {\n fluid[name] = function (elem) {\n return applyOp(elem, name);\n };\n });\n\n /* Sets the value to the DOM element and triggers the change event on the element.\n * Note: when using jQuery val() function to change the node value, the change event would\n * not be fired automatically, it requires to be initiated by the user.\n *\n * @param node {A jQueryable DOM element} A selector, a DOM node, or a jQuery instance\n * @param value {String|Number|Array} A string of text, a number, or an array of strings\n * corresponding to the value of each matched element to set in the node\n */\n fluid.changeElementValue = function (node, value) {\n node = $(node);\n node.val(value).change();\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2010 University of Cambridge\nCopyright 2008-2009 University of Toronto\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.dom = fluid.dom || {};\n\n // Node walker function for iterateDom.\n var getNextNode = function (iterator) {\n if (iterator.node.firstChild) {\n iterator.node = iterator.node.firstChild;\n iterator.depth += 1;\n return iterator;\n }\n while (iterator.node) {\n if (iterator.node.nextSibling) {\n iterator.node = iterator.node.nextSibling;\n return iterator;\n }\n iterator.node = iterator.node.parentNode;\n iterator.depth -= 1;\n }\n return iterator;\n };\n\n /**\n * Walks the DOM, applying the specified acceptor function to each element.\n * There is a special case for the acceptor, allowing for quick deletion of elements and their children.\n * Return \"delete\" from your acceptor function if you want to delete the element in question.\n * Return \"stop\" to terminate iteration.\n\n * Implementation note - this utility exists mainly for performance reasons. It was last tested\n * carefully some time ago (around jQuery 1.2) but at that time was around 3-4x faster at raw DOM\n * filtration tasks than the jQuery equivalents, which was an important source of performance loss in the\n * Reorderer component. General clients of the framework should use this method with caution if at all, and\n * the performance issues should be reassessed when we have time.\n *\n * @param {Element} node the node to start walking from\n * @param {Function} acceptor the function to invoke with each DOM element\n * @param {Boolean} allnodes Use <code>true</code> to call acceptor on all nodes,\n * rather than just element nodes (type 1)\n */\n fluid.dom.iterateDom = function (node, acceptor, allNodes) {\n var currentNode = {node: node, depth: 0};\n var prevNode = node;\n var condition;\n while (currentNode.node !== null && currentNode.depth >= 0 && currentNode.depth < fluid.dom.iterateDom.DOM_BAIL_DEPTH) {\n condition = null;\n if (currentNode.node.nodeType === 1 || allNodes) {\n condition = acceptor(currentNode.node, currentNode.depth);\n }\n if (condition) {\n if (condition === \"delete\") {\n currentNode.node.parentNode.removeChild(currentNode.node);\n currentNode.node = prevNode;\n }\n else if (condition === \"stop\") {\n return currentNode.node;\n }\n }\n prevNode = currentNode.node;\n currentNode = getNextNode(currentNode);\n }\n };\n\n // Work around IE circular DOM issue. This is the default max DOM depth on IE.\n // http://msdn2.microsoft.com/en-us/library/ms761392(VS.85).aspx\n fluid.dom.iterateDom.DOM_BAIL_DEPTH = 256;\n\n /**\n * Checks if the specified container is actually the parent of containee.\n *\n * @param {Element} container the potential parent\n * @param {Element} containee the child in question\n */\n fluid.dom.isContainer = function (container, containee) {\n for (; containee; containee = containee.parentNode) {\n if (container === containee) {\n return true;\n }\n }\n return false;\n };\n\n /** Return the element text from the supplied DOM node as a single String.\n * Implementation note - this is a special-purpose utility used in the framework in just one\n * position in the Reorderer. It only performs a \"shallow\" traversal of the text and was intended\n * as a quick and dirty means of extracting element labels where the user had not explicitly provided one.\n * It should not be used by general users of the framework and its presence here needs to be\n * reassessed.\n */\n fluid.dom.getElementText = function (element) {\n var nodes = element.childNodes;\n var text = \"\";\n for (var i = 0; i < nodes.length; ++i) {\n var child = nodes[i];\n if (child.nodeType === 3) {\n text = text + child.nodeValue;\n }\n }\n return text;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2010 University of Cambridge\nCopyright 2008-2009 University of Toronto\nCopyright 2010 Lucendo Development Ltd.\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nfluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n var unUnicode = /(\\\\u[\\dabcdef]{4}|\\\\x[\\dabcdef]{2})/g;\n\n fluid.unescapeProperties = function (string) {\n string = string.replace(unUnicode, function (match) {\n var code = match.substring(2);\n var parsed = parseInt(code, 16);\n return String.fromCharCode(parsed);\n });\n var pos = 0;\n while (true) {\n var backpos = string.indexOf(\"\\\\\", pos);\n if (backpos === -1) {\n break;\n }\n if (backpos === string.length - 1) {\n return [string.substring(0, string.length - 1), true];\n }\n var replace = string.charAt(backpos + 1);\n if (replace === \"n\") { replace = \"\\n\"; }\n if (replace === \"r\") { replace = \"\\r\"; }\n if (replace === \"t\") { replace = \"\\t\"; }\n string = string.substring(0, backpos) + replace + string.substring(backpos + 2);\n pos = backpos + 1;\n }\n return [string, false];\n };\n\n var breakPos = /[^\\\\][\\s:=]/;\n\n fluid.parseJavaProperties = function (text) {\n // File format described at http://java.sun.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)\n var togo = {};\n text = text.replace(/\\r\\n/g, \"\\n\");\n text = text.replace(/\\r/g, \"\\n\");\n var lines = text.split(\"\\n\");\n var contin, key, valueComp, valueRaw, valueEsc;\n for (var i = 0; i < lines.length; ++i) {\n var line = $.trim(lines[i]);\n if (!line || line.charAt(0) === \"#\" || line.charAt(0) === \"!\") {\n continue;\n }\n if (!contin) {\n valueComp = \"\";\n var breakpos = line.search(breakPos);\n if (breakpos === -1) {\n key = line;\n valueRaw = \"\";\n }\n else {\n key = $.trim(line.substring(0, breakpos + 1)); // +1 since first char is escape exclusion\n valueRaw = $.trim(line.substring(breakpos + 2));\n if (valueRaw.charAt(0) === \":\" || valueRaw.charAt(0) === \"=\") {\n valueRaw = $.trim(valueRaw.substring(1));\n }\n }\n\n key = fluid.unescapeProperties(key)[0];\n valueEsc = fluid.unescapeProperties(valueRaw);\n }\n else {\n valueEsc = fluid.unescapeProperties(line);\n }\n\n contin = valueEsc[1];\n if (!valueEsc[1]) { // this line was not a continuation line - store the value\n togo[key] = valueComp + valueEsc[0];\n }\n else {\n valueComp += valueEsc[0];\n }\n }\n return togo;\n };\n\n /**\n * Expand a message string with respect to a set of arguments, following a basic\n * subset of the Java MessageFormat rules.\n * http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html\n *\n * The message string is expected to contain replacement specifications such\n * as {0}, {1}, {2}, etc.\n * @param messageString {String} The message key to be expanded\n * @param args {String/Array of String} An array of arguments to be substituted into the message.\n * @return The expanded message string.\n */\n fluid.formatMessage = function (messageString, args) {\n if (!args) {\n return messageString;\n }\n if (typeof(args) === \"string\") {\n args = [args];\n }\n for (var i = 0; i < args.length; ++i) {\n messageString = messageString.replace(\"{\" + i + \"}\", args[i]);\n }\n return messageString;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2007-2010 University of Cambridge\nCopyright 2007-2009 University of Toronto\nCopyright 2007-2009 University of California, Berkeley\nCopyright 2010 OCAD University\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2012 Raising the Floor - US\nCopyright 2014-2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\nvar fluid = fluid || fluid_2_0_0;\n\n(function ($, fluid) {\n \"use strict\";\n\n /** Render a timestamp from a Date object into a helpful fixed format for debug logs to millisecond accuracy\n * @param date {Date} The date to be rendered\n * @return {String} A string format consisting of hours:minutes:seconds.millis for the datestamp padded to fixed with\n */\n\n fluid.renderTimestamp = function (date) {\n var zeropad = function (num, width) {\n if (!width) { width = 2; }\n var numstr = (num === undefined ? \"\" : num.toString());\n return \"00000\".substring(5 - width + numstr.length) + numstr;\n };\n return zeropad(date.getHours()) + \":\" + zeropad(date.getMinutes()) + \":\" + zeropad(date.getSeconds()) + \".\" + zeropad(date.getMilliseconds(), 3);\n };\n\n fluid.isTracing = false;\n\n fluid.registerNamespace(\"fluid.tracing\");\n\n fluid.tracing.pathCount = [];\n\n fluid.tracing.summarisePathCount = function (pathCount) {\n pathCount = pathCount || fluid.tracing.pathCount;\n var togo = {};\n for (var i = 0; i < pathCount.length; ++i) {\n var path = pathCount[i];\n if (!togo[path]) {\n togo[path] = 1;\n }\n else {\n ++togo[path];\n }\n }\n var toReallyGo = [];\n fluid.each(togo, function (el, path) {\n toReallyGo.push({path: path, count: el});\n });\n toReallyGo.sort(function (a, b) {return b.count - a.count;});\n return toReallyGo;\n };\n\n fluid.tracing.condensePathCount = function (prefixes, pathCount) {\n prefixes = fluid.makeArray(prefixes);\n var prefixCount = {};\n fluid.each(prefixes, function (prefix) {\n prefixCount[prefix] = 0;\n });\n var togo = [];\n fluid.each(pathCount, function (el) {\n var path = el.path;\n if (!fluid.find(prefixes, function (prefix) {\n if (path.indexOf(prefix) === 0) {\n prefixCount[prefix] += el.count;\n return true;\n }\n })) {\n togo.push(el);\n }\n });\n fluid.each(prefixCount, function (count, path) {\n togo.unshift({path: path, count: count});\n });\n return togo;\n };\n\n // Exception stripping code taken from https://github.com/emwendelin/javascript-stacktrace/blob/master/stacktrace.js\n // BSD licence, see header\n\n fluid.detectStackStyle = function (e) {\n var style = \"other\";\n var stackStyle = {\n offset: 0\n };\n if (e.arguments) {\n style = \"chrome\";\n } else if (typeof window !== \"undefined\" && window.opera && e.stacktrace) {\n style = \"opera10\";\n } else if (e.stack) {\n style = \"firefox\";\n // Detect FireFox 4-style stacks which are 1 level less deep\n stackStyle.offset = e.stack.indexOf(\"Trace exception\") === -1 ? 1 : 0;\n } else if (typeof window !== \"undefined\" && window.opera && !(\"stacktrace\" in e)) { //Opera 9-\n style = \"opera\";\n }\n stackStyle.style = style;\n return stackStyle;\n };\n\n fluid.obtainException = function () {\n try {\n throw new Error(\"Trace exception\");\n }\n catch (e) {\n return e;\n }\n };\n\n var stackStyle = fluid.detectStackStyle(fluid.obtainException());\n\n fluid.registerNamespace(\"fluid.exceptionDecoders\");\n\n fluid.decodeStack = function () {\n if (stackStyle.style !== \"firefox\") {\n return null;\n }\n var e = fluid.obtainException();\n return fluid.exceptionDecoders[stackStyle.style](e);\n };\n\n fluid.exceptionDecoders.firefox = function (e) {\n var delimiter = \"at \";\n var lines = e.stack.replace(/(?:\\n@:0)?\\s+$/m, \"\").replace(/^\\(/gm, \"{anonymous}(\").split(\"\\n\");\n return fluid.transform(lines, function (line) {\n line = line.replace(/\\)/g, \"\");\n var atind = line.indexOf(delimiter);\n return atind === -1 ? [line] : [line.substring(atind + delimiter.length), line.substring(0, atind)];\n });\n };\n\n // Main entry point for callers.\n fluid.getCallerInfo = function (atDepth) {\n atDepth = (atDepth || 3) - stackStyle.offset;\n var stack = fluid.decodeStack();\n var element = stack && stack[atDepth][0];\n if (element) {\n var lastslash = element.lastIndexOf(\"/\");\n if (lastslash === -1) {\n lastslash = 0;\n }\n var nextColon = element.indexOf(\":\", lastslash);\n return {\n path: element.substring(0, lastslash),\n filename: element.substring(lastslash + 1, nextColon),\n index: element.substring(nextColon + 1)\n };\n } else {\n return null;\n }\n };\n\n /** Generates a string for padding purposes by replicating a character a given number of times\n * @param c {Character} A character to be used for padding\n * @param count {Integer} The number of times to repeat the character\n * @return A string of length <code>count</code> consisting of repetitions of the supplied character\n */\n // UNOPTIMISED\n fluid.generatePadding = function (c, count) {\n var togo = \"\";\n for (var i = 0; i < count; ++i) {\n togo += c;\n }\n return togo;\n };\n\n // Marker so that we can render a custom string for properties which are not direct and concrete\n fluid.SYNTHETIC_PROPERTY = {};\n\n // utility to avoid triggering custom getter code which could throw an exception - e.g. express 3.x's request object\n fluid.getSafeProperty = function (obj, key) {\n var desc = Object.getOwnPropertyDescriptor(obj, key); // supported on all of our environments - is broken on IE8\n return desc && !desc.get ? obj[key] : fluid.SYNTHETIC_PROPERTY;\n };\n\n function printImpl(obj, small, options) {\n function out(str) {\n options.output += str;\n }\n var big = small + options.indentChars, isFunction = typeof(obj) === \"function\";\n if (options.maxRenderChars !== undefined && options.output.length > options.maxRenderChars) {\n return true;\n }\n if (obj === null) {\n out(\"null\");\n } else if (obj === undefined) {\n out(\"undefined\"); // NB - object invalid for JSON interchange\n } else if (obj === fluid.SYNTHETIC_PROPERTY) {\n out(\"[Synthetic property]\");\n } else if (fluid.isPrimitive(obj) && !isFunction) {\n out(JSON.stringify(obj));\n }\n else {\n if (options.stack.indexOf(obj) !== -1) {\n out(\"(CIRCULAR)\"); // NB - object invalid for JSON interchange\n return;\n }\n options.stack.push(obj);\n var i;\n if (fluid.isArrayable(obj)) {\n if (obj.length === 0) {\n out(\"[]\");\n } else {\n out(\"[\\n\" + big);\n for (i = 0; i < obj.length; ++i) {\n if (printImpl(obj[i], big, options)) {\n return true;\n }\n if (i !== obj.length - 1) {\n out(\",\\n\" + big);\n }\n }\n out(\"\\n\" + small + \"]\");\n }\n }\n else {\n out(\"{\" + (isFunction ? \" Function\" : \"\") + \"\\n\" + big); // NB - Function object invalid for JSON interchange\n var keys = fluid.keys(obj);\n for (i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = fluid.getSafeProperty(obj, key);\n out(JSON.stringify(key) + \": \");\n if (printImpl(value, big, options)) {\n return true;\n }\n if (i !== keys.length - 1) {\n out(\",\\n\" + big);\n }\n }\n out(\"\\n\" + small + \"}\");\n }\n options.stack.pop();\n }\n return;\n }\n\n /** Render a complex JSON object into a nicely indented format suitable for human readability.\n * @param obj {Object} The object to be rendered\n * @param options {Object} An options structure governing the rendering process. This supports the following options:\n * <code>indent</code> {Integer} the number of space characters to be used to indent each level of containment (default value: 4)\n * <code>maxRenderChars</code> {Integer} rendering the object will cease once this number of characters has been generated\n */\n fluid.prettyPrintJSON = function (obj, options) {\n options = $.extend({indent: 4, stack: [], output: \"\"}, options);\n options.indentChars = fluid.generatePadding(\" \", options.indent);\n printImpl(obj, \"\", options);\n return options.output;\n };\n\n /**\n * Dumps a DOM element into a readily recognisable form for debugging - produces a\n * \"semi-selector\" summarising its tag name, class and id, whichever are set.\n *\n * @param {jQueryable} element The element to be dumped\n * @return A string representing the element.\n */\n fluid.dumpEl = function (element) {\n var togo;\n\n if (!element) {\n return \"null\";\n }\n if (element.nodeType === 3 || element.nodeType === 8) {\n return \"[data: \" + element.data + \"]\";\n }\n if (element.nodeType === 9) {\n return \"[document: location \" + element.location + \"]\";\n }\n if (!element.nodeType && fluid.isArrayable(element)) {\n togo = \"[\";\n for (var i = 0; i < element.length; ++i) {\n togo += fluid.dumpEl(element[i]);\n if (i < element.length - 1) {\n togo += \", \";\n }\n }\n return togo + \"]\";\n }\n element = $(element);\n togo = element.get(0).tagName;\n if (element.id) {\n togo += \"#\" + element.id;\n }\n if (element.attr(\"class\")) {\n togo += \".\" + element.attr(\"class\");\n }\n return togo;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2011-2016 OCAD University\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2012-2014 Raising the Floor - US\nCopyright 2014-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /** NOTE: The contents of this file are by default NOT PART OF THE PUBLIC FLUID API unless explicitly annotated before the function **/\n\n /** The Fluid \"IoC System proper\" - resolution of references and\n * completely automated instantiation of declaratively defined\n * component trees */\n\n // Currently still uses manual traversal - once we ban manually instantiated components,\n // it will use the instantiator's records instead.\n fluid.visitComponentChildren = function (that, visitor, options, segs) {\n segs = segs || [];\n for (var name in that) {\n var component = that[name];\n // This entire algorithm is primitive and expensive and will be removed once we can abolish manual init components\n if (!fluid.isComponent(component) || (options.visited && options.visited[component.id])) {\n continue;\n }\n segs.push(name);\n if (options.visited) { // recall that this is here because we may run into a component that has been cross-injected which might otherwise cause cyclicity\n options.visited[component.id] = true;\n }\n if (visitor(component, name, segs, segs.length - 1)) {\n return true;\n }\n if (!options.flat) {\n fluid.visitComponentChildren(component, visitor, options, segs);\n }\n segs.pop();\n }\n };\n\n fluid.getContextHash = function (instantiator, that) {\n var shadow = instantiator.idToShadow[that.id];\n return shadow && shadow.contextHash;\n };\n\n fluid.componentHasGrade = function (that, gradeName) {\n var contextHash = fluid.getContextHash(fluid.globalInstantiator, that);\n return !!(contextHash && contextHash[gradeName]);\n };\n\n // A variant of fluid.visitComponentChildren that supplies the signature expected for fluid.matchIoCSelector\n // this is: thatStack, contextHashes, memberNames, i - note, the supplied arrays are NOT writeable and shared through the iteration\n fluid.visitComponentsForMatching = function (that, options, visitor) {\n var instantiator = fluid.getInstantiator(that);\n options = $.extend({\n visited: {},\n instantiator: instantiator\n }, options);\n var thatStack = [that];\n var contextHashes = [fluid.getContextHash(instantiator, that)];\n var visitorWrapper = function (component, name, segs) {\n thatStack.length = 1;\n contextHashes.length = 1;\n for (var i = 0; i < segs.length; ++i) {\n var child = thatStack[i][segs[i]];\n thatStack[i + 1] = child;\n contextHashes[i + 1] = fluid.getContextHash(instantiator, child) || {};\n }\n return visitor(component, thatStack, contextHashes, segs, segs.length);\n };\n fluid.visitComponentChildren(that, visitorWrapper, options, []);\n };\n\n fluid.getMemberNames = function (instantiator, thatStack) {\n var path = instantiator.idToPath(thatStack[thatStack.length - 1].id);\n var segs = instantiator.parseEL(path);\n // TODO: we should now have no longer shortness in the stack\n segs.unshift.apply(segs, fluid.generate(thatStack.length - segs.length, \"\"));\n\n return segs;\n };\n\n // thatStack contains an increasing list of MORE SPECIFIC thats.\n // this visits all components starting from the current location (end of stack)\n // in visibility order UP the tree.\n fluid.visitComponentsForVisibility = function (instantiator, thatStack, visitor, options) {\n options = options || {\n visited: {},\n flat: true,\n instantiator: instantiator\n };\n var memberNames = fluid.getMemberNames(instantiator, thatStack);\n for (var i = thatStack.length - 1; i >= 0; --i) {\n var that = thatStack[i];\n\n // explicitly visit the direct parent first\n options.visited[that.id] = true;\n if (visitor(that, memberNames[i], memberNames, i)) {\n return;\n }\n\n if (fluid.visitComponentChildren(that, visitor, options, memberNames)) {\n return;\n }\n memberNames.pop();\n }\n };\n\n fluid.mountStrategy = function (prefix, root, toMount) {\n var offset = prefix.length;\n return function (target, name, i, segs) {\n if (i <= prefix.length) { // Avoid OOB to not trigger deoptimisation!\n return;\n }\n for (var j = 0; j < prefix.length; ++j) {\n if (segs[j] !== prefix[j]) {\n return;\n }\n }\n return toMount(target, name, i - prefix.length, segs.slice(offset));\n };\n };\n\n fluid.invokerFromRecord = function (invokerec, name, that) {\n fluid.pushActivity(\"makeInvoker\", \"beginning instantiation of invoker with name %name and record %record as child of %that\",\n {name: name, record: invokerec, that: that});\n var invoker = invokerec ? fluid.makeInvoker(that, invokerec, name) : undefined;\n fluid.popActivity();\n return invoker;\n };\n\n fluid.memberFromRecord = function (memberrecs, name, that) {\n var togo;\n for (var i = 0; i < memberrecs.length; ++i) { // memberrecs is the special \"fluid.mergingArray\" type which is not Arrayable\n var expanded = fluid.expandImmediate(memberrecs[i], that);\n if (!fluid.isPlainObject(togo)) { // poor man's \"merge\" algorithm to hack FLUID-5668 for now\n togo = expanded;\n } else {\n togo = $.extend(true, togo, expanded);\n }\n }\n return togo;\n };\n\n fluid.recordStrategy = function (that, options, optionsStrategy, recordPath, recordMaker, prefix, exceptions) {\n prefix = prefix || [];\n return {\n strategy: function (target, name, i) {\n if (i !== 1) {\n return;\n }\n var record = fluid.driveStrategy(options, [recordPath, name], optionsStrategy);\n if (record === undefined) {\n return;\n }\n fluid.set(target, [name], fluid.inEvaluationMarker);\n var member = recordMaker(record, name, that);\n fluid.set(target, [name], member);\n return member;\n },\n initter: function () {\n var records = fluid.driveStrategy(options, recordPath, optionsStrategy) || {};\n for (var name in records) {\n if (!exceptions || !exceptions[name]) {\n fluid.getForComponent(that, prefix.concat([name]));\n }\n }\n }\n };\n };\n\n // patch Fluid.js version for timing\n fluid.instantiateFirers = function (that) {\n var shadow = fluid.shadowForComponent(that);\n var initter = fluid.get(shadow, [\"eventStrategyBlock\", \"initter\"]) || fluid.identity;\n initter();\n };\n\n fluid.makeDistributionRecord = function (contextThat, sourceRecord, sourcePath, targetSegs, exclusions, sourceType) {\n sourceType = sourceType || \"distribution\";\n fluid.pushActivity(\"makeDistributionRecord\", \"Making distribution record from source record %sourceRecord path %sourcePath to target path %targetSegs\", {sourceRecord: sourceRecord, sourcePath: sourcePath, targetSegs: targetSegs});\n\n var source = fluid.copy(fluid.get(sourceRecord, sourcePath));\n fluid.each(exclusions, function (exclusion) {\n fluid.model.applyChangeRequest(source, {segs: exclusion, type: \"DELETE\"});\n });\n\n var record = {options: {}};\n fluid.model.applyChangeRequest(record, {segs: targetSegs, type: \"ADD\", value: source});\n fluid.checkComponentRecord(record);\n fluid.popActivity();\n return $.extend(record, {contextThat: contextThat, recordType: sourceType});\n };\n\n // Part of the early \"distributeOptions\" workflow. Given the description of the blocks to be distributed, assembles \"canned\" records\n // suitable to be either registered into the shadow record for later or directly pushed to an existing component, as well as honouring\n // any \"removeSource\" annotations by removing these options from the source block.\n fluid.filterBlocks = function (contextThat, sourceBlocks, sourceSegs, targetSegs, exclusions, removeSource) {\n var togo = [];\n fluid.each(sourceBlocks, function (block) {\n var source = fluid.get(block.source, sourceSegs);\n if (source) {\n togo.push(fluid.makeDistributionRecord(contextThat, block.source, sourceSegs, targetSegs, exclusions, block.recordType));\n var rescued = $.extend({}, source);\n if (removeSource) {\n fluid.model.applyChangeRequest(block.source, {segs: sourceSegs, type: \"DELETE\"});\n }\n fluid.each(exclusions, function (exclusion) {\n var orig = fluid.get(rescued, exclusion);\n fluid.set(block.source, sourceSegs.concat(exclusion), orig);\n });\n }\n });\n return togo;\n };\n\n // Use this peculiar signature since the actual component and shadow itself may not exist yet. Perhaps clean up with FLUID-4925\n fluid.noteCollectedDistribution = function (parentShadow, memberName, distribution) {\n fluid.model.setSimple(parentShadow, [\"collectedDistributions\", memberName, distribution.id], true);\n };\n\n fluid.isCollectedDistribution = function (parentShadow, memberName, distribution) {\n return fluid.model.getSimple(parentShadow, [\"collectedDistributions\", memberName, distribution.id]);\n };\n\n fluid.clearCollectedDistributions = function (parentShadow, memberName) {\n fluid.model.applyChangeRequest(parentShadow, {segs: [\"collectedDistributions\", memberName], type: \"DELETE\"});\n };\n\n fluid.collectDistributions = function (distributedBlocks, parentShadow, distribution, thatStack, contextHashes, memberNames, i) {\n var lastMember = memberNames[memberNames.length - 1];\n if (!fluid.isCollectedDistribution(parentShadow, lastMember, distribution) &&\n fluid.matchIoCSelector(distribution.selector, thatStack, contextHashes, memberNames, i)) {\n distributedBlocks.push.apply(distributedBlocks, distribution.blocks);\n fluid.noteCollectedDistribution(parentShadow, lastMember, distribution);\n }\n };\n\n // Slightly silly function to clean up the \"appliedDistributions\" records. In general we need to be much more aggressive both\n // about clearing instantiation garbage (e.g. onCreate and most of the shadow)\n // as well as caching frequently-used records such as the \"thatStack\" which\n // would mean this function could be written in a sensible way\n fluid.registerCollectedClearer = function (shadow, parentShadow, memberName) {\n if (!shadow.collectedClearer && parentShadow) {\n shadow.collectedClearer = function () {\n fluid.clearCollectedDistributions(parentShadow, memberName);\n };\n }\n };\n\n fluid.receiveDistributions = function (parentThat, gradeNames, memberName, that) {\n var instantiator = fluid.getInstantiator(parentThat || that);\n var thatStack = instantiator.getThatStack(parentThat || that); // most specific is at end\n thatStack.unshift(fluid.rootComponent);\n var memberNames = fluid.getMemberNames(instantiator, thatStack);\n var shadows = fluid.transform(thatStack, function (thisThat) {\n return instantiator.idToShadow[thisThat.id];\n });\n var parentShadow = shadows[shadows.length - (parentThat ? 1 : 2)];\n var contextHashes = fluid.getMembers(shadows, \"contextHash\");\n if (parentThat) { // if called before construction of component from assembleCreatorArguments - NB this path will be abolished/amalgamated\n memberNames.push(memberName);\n contextHashes.push(fluid.gradeNamesToHash(gradeNames));\n thatStack.push(that);\n } else {\n fluid.registerCollectedClearer(shadows[shadows.length - 1], parentShadow, memberNames[memberNames.length - 1]);\n }\n var distributedBlocks = [];\n for (var i = 0; i < thatStack.length - 1; ++i) {\n fluid.each(shadows[i].distributions, function (distribution) { // eslint-disable-line no-loop-func\n fluid.collectDistributions(distributedBlocks, parentShadow, distribution, thatStack, contextHashes, memberNames, i);\n });\n }\n return distributedBlocks;\n };\n\n fluid.computeTreeDistance = function (path1, path2) {\n var i = 0;\n while (i < path1.length && i < path2.length && path1[i] === path2[i]) {\n ++i;\n }\n return path1.length + path2.length - 2*i; // eslint-disable-line space-infix-ops\n };\n\n // Called from applyDistributions (immediate application route) as well as mergeRecordsToList (pre-instantiation route) AS WELL AS assembleCreatorArguments (pre-pre-instantiation route)\n fluid.computeDistributionPriority = function (targetThat, distributedBlock) {\n if (!distributedBlock.priority) {\n var instantiator = fluid.getInstantiator(targetThat);\n var targetStack = instantiator.getThatStack(targetThat);\n var targetPath = fluid.getMemberNames(instantiator, targetStack);\n var sourceStack = instantiator.getThatStack(distributedBlock.contextThat);\n var sourcePath = fluid.getMemberNames(instantiator, sourceStack);\n var distance = fluid.computeTreeDistance(targetPath, sourcePath);\n distributedBlock.priority = fluid.mergeRecordTypes.distribution - distance;\n }\n return distributedBlock;\n };\n\n // convert \"preBlocks\" as produced from fluid.filterBlocks into \"real blocks\" suitable to be used by the expansion machinery.\n fluid.applyDistributions = function (that, preBlocks, targetShadow) {\n var distributedBlocks = fluid.transform(preBlocks, function (preBlock) {\n return fluid.generateExpandBlock(preBlock, that, targetShadow.mergePolicy);\n }, function (distributedBlock) {\n return fluid.computeDistributionPriority(that, distributedBlock);\n });\n var mergeOptions = targetShadow.mergeOptions;\n mergeOptions.mergeBlocks.push.apply(mergeOptions.mergeBlocks, distributedBlocks);\n mergeOptions.updateBlocks();\n return distributedBlocks;\n };\n\n // TODO: This implementation is obviously poor and has numerous flaws - in particular it does no backtracking as well as matching backwards through the selector\n fluid.matchIoCSelector = function (selector, thatStack, contextHashes, memberNames, i) {\n var thatpos = thatStack.length - 1;\n var selpos = selector.length - 1;\n while (true) {\n var mustMatchHere = thatpos === thatStack.length - 1 || selector[selpos].child;\n\n var that = thatStack[thatpos];\n var selel = selector[selpos];\n var match = true;\n for (var j = 0; j < selel.predList.length; ++j) {\n var pred = selel.predList[j];\n if (pred.context && !(contextHashes[thatpos][pred.context] || memberNames[thatpos] === pred.context)) {\n match = false;\n break;\n }\n if (pred.id && that.id !== pred.id) {\n match = false;\n break;\n }\n }\n if (selpos === 0 && thatpos > i && mustMatchHere) {\n match = false; // child selector must exhaust stack completely - FLUID-5029\n }\n if (match) {\n if (selpos === 0) {\n return true;\n }\n --thatpos;\n --selpos;\n }\n else {\n if (mustMatchHere) {\n return false;\n }\n else {\n --thatpos;\n }\n }\n if (thatpos < i) {\n return false;\n }\n }\n };\n\n /** Query for all components matching a selector in a particular tree\n * @param root {Component} The root component at which to start the search\n * @param selector {String} An IoCSS selector, in form of a string. Note that since selectors supplied to this function implicitly\n * match downwards, they need not contain the \"head context\" followed by whitespace required in the distributeOptions form. E.g.\n * simply <code>\"fluid.viewComponent\"</code> will match all viewComponents below the root.\n * @param flat {Boolean} [Optional] <code>true</code> if the search should just be performed at top level of the component tree\n * Note that with <code>flat=true</code> this search will scan every component in the tree and may well be very slow.\n */\n // supported, PUBLIC API function\n fluid.queryIoCSelector = function (root, selector, flat) {\n var parsed = fluid.parseSelector(selector, fluid.IoCSSMatcher);\n var togo = [];\n\n fluid.visitComponentsForMatching(root, {flat: flat}, function (that, thatStack, contextHashes, memberNames, i) {\n if (fluid.matchIoCSelector(parsed, thatStack, contextHashes, memberNames, i)) {\n togo.push(that);\n }\n });\n return togo;\n };\n\n fluid.isIoCSSSelector = function (context) {\n return context.indexOf(\" \") !== -1; // simple-minded check for an IoCSS reference\n };\n\n fluid.pushDistributions = function (targetHead, selector, target, blocks) {\n var targetShadow = fluid.shadowForComponent(targetHead);\n var id = fluid.allocateGuid();\n var distribution = {\n id: id, // This id is used in clearDistributions\n target: target, // Here for improved debuggability - info is duplicated in \"selector\"\n selector: selector,\n blocks: blocks\n };\n Object.freeze(distribution);\n Object.freeze(distribution.blocks);\n fluid.pushArray(targetShadow, \"distributions\", distribution);\n return id;\n };\n\n fluid.clearDistribution = function (targetHead, id) {\n var targetShadow = fluid.shadowForComponent(targetHead);\n fluid.remove_if(targetShadow.distributions, function (distribution) {\n return distribution.id === id;\n });\n };\n\n fluid.clearDistributions = function (shadow) {\n fluid.each(shadow.outDistributions, function (outDist) {\n fluid.clearDistribution(outDist.targetComponent, outDist.distributionId);\n });\n };\n\n // Modifies a parsed selector to extract and remove its head context which will be matched upwards\n fluid.extractSelectorHead = function (parsedSelector) {\n var predList = parsedSelector[0].predList;\n var context = predList[0].context;\n predList.length = 0;\n return context;\n };\n\n fluid.parseExpectedOptionsPath = function (path, role) {\n var segs = fluid.model.parseEL(path);\n if (segs[0] !== \"options\") {\n fluid.fail(\"Error in options distribution path \", path, \" - only \" + role + \" paths beginning with \\\"options\\\" are supported\");\n }\n return segs.slice(1);\n };\n\n fluid.replicateProperty = function (source, property, targets) {\n if (source[property] !== undefined) {\n fluid.each(targets, function (target) {\n target[property] = source[property];\n });\n }\n };\n\n fluid.undistributableOptions = [\"gradeNames\", \"distributeOptions\", \"argumentMap\", \"initFunction\", \"mergePolicy\", \"progressiveCheckerOptions\"]; // automatically added to \"exclusions\" of every distribution\n\n fluid.distributeOptions = function (that, optionsStrategy) {\n var thatShadow = fluid.shadowForComponent(that);\n var records = fluid.driveStrategy(that.options, \"distributeOptions\", optionsStrategy);\n fluid.each(records, function distributeOptionsOne(record) {\n fluid.pushActivity(\"distributeOptions\", \"parsing distributeOptions block %record %that \", {that: that, record: record});\n if (typeof(record.target) !== \"string\") {\n fluid.fail(\"Error in options distribution record \", record, \" a member named \\\"target\\\" must be supplied holding an IoC reference\");\n }\n if (typeof(record.source) === \"string\" ^ record.record === undefined) {\n fluid.fail(\"Error in options distribution record \", record, \": must supply either a member \\\"source\\\" holding an IoC reference or a member \\\"record\\\" holding a literal record\");\n }\n var targetRef = fluid.parseContextReference(record.target);\n var targetComp, selector, context;\n if (fluid.isIoCSSSelector(targetRef.context)) {\n selector = fluid.parseSelector(targetRef.context, fluid.IoCSSMatcher);\n var headContext = fluid.extractSelectorHead(selector);\n if (headContext === \"/\") {\n targetComp = fluid.rootComponent;\n } else {\n context = headContext;\n }\n }\n else {\n context = targetRef.context;\n }\n targetComp = targetComp || fluid.resolveContext(context, that);\n if (!targetComp) {\n fluid.fail(\"Error in options distribution record \", record, \" - could not resolve context {\" + context + \"} to a root component\");\n }\n var targetSegs = fluid.model.parseEL(targetRef.path);\n var preBlocks;\n if (record.record !== undefined) {\n preBlocks = [(fluid.makeDistributionRecord(that, record.record, [], targetSegs, []))];\n }\n else {\n var source = fluid.parseContextReference(record.source);\n if (source.context !== \"that\") {\n fluid.fail(\"Error in options distribution record \", record, \" only a context of {that} is supported\");\n }\n var sourceSegs = fluid.parseExpectedOptionsPath(source.path, \"source\");\n var fullExclusions = fluid.makeArray(record.exclusions).concat(sourceSegs.length === 0 ? fluid.undistributableOptions : []);\n\n var exclusions = fluid.transform(fullExclusions, function (exclusion) {\n return fluid.model.parseEL(exclusion);\n });\n\n preBlocks = fluid.filterBlocks(that, thatShadow.mergeOptions.mergeBlocks, sourceSegs, targetSegs, exclusions, record.removeSource);\n thatShadow.mergeOptions.updateBlocks(); // perhaps unnecessary\n }\n fluid.replicateProperty(record, \"priority\", preBlocks);\n fluid.replicateProperty(record, \"namespace\", preBlocks);\n // TODO: inline material has to be expanded in its original context!\n\n if (selector) {\n var distributionId = fluid.pushDistributions(targetComp, selector, record.target, preBlocks);\n thatShadow.outDistributions = thatShadow.outDistributions || [];\n thatShadow.outDistributions.push({\n targetComponent: targetComp,\n distributionId: distributionId\n });\n }\n else { // The component exists now, we must rebalance it\n var targetShadow = fluid.shadowForComponent(targetComp);\n fluid.applyDistributions(that, preBlocks, targetShadow);\n }\n fluid.popActivity();\n });\n };\n\n fluid.gradeNamesToHash = function (gradeNames) {\n var contextHash = {};\n fluid.each(gradeNames, function (gradeName) {\n contextHash[gradeName] = true;\n contextHash[fluid.computeNickName(gradeName)] = true;\n });\n return contextHash;\n };\n\n fluid.cacheShadowGrades = function (that, shadow) {\n var contextHash = fluid.gradeNamesToHash(that.options.gradeNames);\n if (!contextHash[shadow.memberName]) {\n contextHash[shadow.memberName] = \"memberName\"; // This is filtered out again in recordComponent - TODO: Ensure that ALL resolution uses the scope chain eventually\n }\n shadow.contextHash = contextHash;\n fluid.each(contextHash, function (troo, context) {\n shadow.ownScope[context] = that;\n if (shadow.parentShadow && shadow.parentShadow.that.type !== \"fluid.rootComponent\") {\n shadow.parentShadow.childrenScope[context] = that;\n }\n });\n };\n\n // First sequence point where the mergeOptions strategy is delivered from Fluid.js - here we take care\n // of both receiving and transmitting options distributions\n fluid.deliverOptionsStrategy = function (that, target, mergeOptions) {\n var shadow = fluid.shadowForComponent(that, shadow);\n fluid.cacheShadowGrades(that, shadow);\n shadow.mergeOptions = mergeOptions;\n };\n\n /** Dynamic grade closure algorithm - the following 4 functions share access to a small record structure \"rec\" which is\n * constructed at the start of fluid.computeDynamicGrades\n */\n\n fluid.collectDistributedGrades = function (rec) {\n // Receive distributions first since these may cause arrival of more contextAwareness blocks.\n var distributedBlocks = fluid.receiveDistributions(null, null, null, rec.that);\n if (distributedBlocks.length > 0) {\n var readyBlocks = fluid.applyDistributions(rec.that, distributedBlocks, rec.shadow);\n var gradeNamesList = fluid.transform(fluid.getMembers(readyBlocks, [\"source\", \"gradeNames\"]), fluid.makeArray);\n fluid.accumulateDynamicGrades(rec, fluid.flatten(gradeNamesList));\n }\n };\n\n // Apply a batch of freshly acquired plain dynamic grades to the target component and recompute its options\n fluid.applyDynamicGrades = function (rec) {\n rec.oldGradeNames = fluid.makeArray(rec.gradeNames);\n // Note that this crude algorithm doesn't allow us to determine which grades are \"new\" and which not // TODO: can no longer interpret comment\n var newDefaults = fluid.copy(fluid.getMergedDefaults(rec.that.typeName, rec.gradeNames));\n rec.gradeNames.length = 0; // acquire derivatives of dynamic grades (FLUID-5054)\n rec.gradeNames.push.apply(rec.gradeNames, newDefaults.gradeNames);\n\n fluid.each(rec.gradeNames, function (gradeName) {\n if (!fluid.isIoCReference(gradeName)) {\n rec.seenGrades[gradeName] = true;\n }\n });\n\n var shadow = rec.shadow;\n fluid.cacheShadowGrades(rec.that, shadow);\n // This cheap strategy patches FLUID-5091 for now - some more sophisticated activity will take place\n // at this site when we have a full fix for FLUID-5028\n shadow.mergeOptions.destroyValue([\"mergePolicy\"]);\n shadow.mergeOptions.destroyValue([\"components\"]);\n shadow.mergeOptions.destroyValue([\"invokers\"]);\n\n rec.defaultsBlock.source = newDefaults;\n shadow.mergeOptions.updateBlocks();\n shadow.mergeOptions.computeMergePolicy(); // TODO: we should really only do this if its content changed - this implies moving all options evaluation over to some (cheap) variety of the ChangeApplier\n\n fluid.accumulateDynamicGrades(rec, newDefaults.gradeNames);\n };\n\n // Filter some newly discovered grades into their plain and dynamic queues\n fluid.accumulateDynamicGrades = function (rec, newGradeNames) {\n fluid.each(newGradeNames, function (gradeName) {\n if (!rec.seenGrades[gradeName]) {\n if (fluid.isIoCReference(gradeName)) {\n rec.rawDynamic.push(gradeName);\n rec.seenGrades[gradeName] = true;\n } else if (!fluid.contains(rec.oldGradeNames, gradeName)) {\n rec.plainDynamic.push(gradeName);\n }\n }\n });\n };\n\n fluid.computeDynamicGrades = function (that, shadow, strategy) {\n delete that.options.gradeNames; // Recompute gradeNames for FLUID-5012 and others\n var gradeNames = fluid.driveStrategy(that.options, \"gradeNames\", strategy); // Just acquire the reference and force eval of mergeBlocks \"target\", contents are wrong\n gradeNames.length = 0;\n // TODO: In complex distribution cases, a component might end up with multiple default blocks\n var defaultsBlock = fluid.findMergeBlocks(shadow.mergeOptions.mergeBlocks, \"defaults\")[0];\n\n var rec = {\n that: that,\n shadow: shadow,\n defaultsBlock: defaultsBlock,\n gradeNames: gradeNames, // remember that this array is globally shared\n seenGrades: {},\n plainDynamic: [],\n rawDynamic: []\n };\n fluid.each(shadow.mergeOptions.mergeBlocks, function (block) { // acquire parents of earlier blocks before applying later ones\n gradeNames.push.apply(gradeNames, fluid.makeArray(block.target && block.target.gradeNames));\n fluid.applyDynamicGrades(rec);\n });\n fluid.collectDistributedGrades(rec);\n while (true) {\n while (rec.plainDynamic.length > 0) {\n gradeNames.push.apply(gradeNames, rec.plainDynamic);\n rec.plainDynamic.length = 0;\n fluid.applyDynamicGrades(rec);\n fluid.collectDistributedGrades(rec);\n }\n if (rec.rawDynamic.length > 0) {\n var expanded = fluid.expandImmediate(rec.rawDynamic.shift(), that, shadow.localDynamic);\n if (typeof(expanded) === \"function\") {\n expanded = expanded();\n }\n if (expanded) {\n rec.plainDynamic = rec.plainDynamic.concat(expanded);\n }\n } else {\n break;\n }\n }\n\n if (shadow.collectedClearer) {\n shadow.collectedClearer();\n delete shadow.collectedClearer;\n }\n };\n\n fluid.computeDynamicComponentKey = function (recordKey, sourceKey) {\n return recordKey + (sourceKey === 0 ? \"\" : \"-\" + sourceKey); // TODO: configurable name strategies\n };\n\n fluid.registerDynamicRecord = function (that, recordKey, sourceKey, record, toCensor) {\n var key = fluid.computeDynamicComponentKey(recordKey, sourceKey);\n var cRecord = fluid.copy(record);\n delete cRecord[toCensor];\n fluid.set(that.options, [\"components\", key], cRecord);\n return key;\n };\n\n fluid.computeDynamicComponents = function (that, mergeOptions) {\n var shadow = fluid.shadowForComponent(that);\n var localSub = shadow.subcomponentLocal = {};\n var records = fluid.driveStrategy(that.options, \"dynamicComponents\", mergeOptions.strategy);\n fluid.each(records, function (record, recordKey) {\n if (!record.sources && !record.createOnEvent) {\n fluid.fail(\"Cannot process dynamicComponents record \", record, \" without a \\\"sources\\\" or \\\"createOnEvent\\\" entry\");\n }\n if (record.sources) {\n var sources = fluid.expandOptions(record.sources, that);\n fluid.each(sources, function (source, sourceKey) {\n var key = fluid.registerDynamicRecord(that, recordKey, sourceKey, record, \"sources\");\n localSub[key] = {\"source\": source, \"sourcePath\": sourceKey};\n });\n }\n else if (record.createOnEvent) {\n var event = fluid.event.expandOneEvent(that, record.createOnEvent);\n fluid.set(shadow, [\"dynamicComponentCount\", recordKey], 0);\n var listener = function () {\n var key = fluid.registerDynamicRecord(that, recordKey, shadow.dynamicComponentCount[recordKey]++, record, \"createOnEvent\");\n var localRecord = {\"arguments\": fluid.makeArray(arguments)};\n fluid.initDependent(that, key, localRecord);\n };\n event.addListener(listener);\n fluid.recordListener(event, listener, shadow);\n }\n });\n };\n\n // Second sequence point for mergeOptions from Fluid.js - here we construct all further\n // strategies required on the IoC side and mount them into the shadow's getConfig for universal use\n fluid.computeComponentAccessor = function (that, localRecord) {\n var instantiator = fluid.globalInstantiator;\n var shadow = fluid.shadowForComponent(that);\n shadow.localDynamic = localRecord; // for signalling to dynamic grades from dynamic components\n var options = that.options;\n var strategy = shadow.mergeOptions.strategy;\n var optionsStrategy = fluid.mountStrategy([\"options\"], options, strategy);\n shadow.invokerStrategy = fluid.recordStrategy(that, options, strategy, \"invokers\", fluid.invokerFromRecord);\n shadow.eventStrategyBlock = fluid.recordStrategy(that, options, strategy, \"events\", fluid.eventFromRecord, [\"events\"]);\n var eventStrategy = fluid.mountStrategy([\"events\"], that, shadow.eventStrategyBlock.strategy, [\"events\"]);\n shadow.memberStrategy = fluid.recordStrategy(that, options, strategy, \"members\", fluid.memberFromRecord, null, {model: true, modelRelay: true});\n // NB - ginger strategy handles concrete, rationalise\n shadow.getConfig = {strategies: [fluid.model.funcResolverStrategy, fluid.makeGingerStrategy(that),\n optionsStrategy, shadow.invokerStrategy.strategy, shadow.memberStrategy.strategy, eventStrategy]};\n\n fluid.computeDynamicGrades(that, shadow, strategy, shadow.mergeOptions.mergeBlocks);\n fluid.distributeOptions(that, strategy);\n if (shadow.contextHash[\"fluid.resolveRoot\"]) {\n var memberName;\n if (shadow.contextHash[\"fluid.resolveRootSingle\"]) {\n var singleRootType = fluid.getForComponent(that, [\"options\", \"singleRootType\"]);\n if (!singleRootType) {\n fluid.fail(\"Cannot register object with grades \" + Object.keys(shadow.contextHash).join(\", \") + \" as fluid.resolveRootSingle since it has not defined option singleRootType\");\n }\n memberName = fluid.typeNameToMemberName(singleRootType);\n } else {\n memberName = fluid.computeGlobalMemberName(that);\n }\n var parent = fluid.resolveRootComponent;\n if (parent[memberName]) {\n instantiator.clearComponent(parent, memberName);\n }\n instantiator.recordKnownComponent(parent, that, memberName, false);\n }\n\n return shadow.getConfig;\n };\n\n // About the SHADOW:\n // Allocated at: instantiator's \"recordComponent\"\n // Contents:\n // path {String} Principal allocated path (point of construction) in tree\n // that {Component} The component itself\n // contextHash {String to Boolean} Map of context names which this component matches\n // mergePolicy, mergeOptions: Machinery for last phase of options merging\n // invokerStrategy, eventStrategyBlock, memberStrategy, getConfig: Junk required to operate the accessor\n // listeners: Listeners registered during this component's construction, to be cleared during clearListeners\n // distributions, collectedClearer: Managing options distributions\n // outDistributions: A list of distributions registered from this component, signalling from distributeOptions to clearDistributions\n // subcomponentLocal: Signalling local record from computeDynamicComponents to assembleCreatorArguments\n // dynamicLocal: Local signalling for dynamic grades\n // ownScope: A hash of names to components which are in scope from this component - populated in cacheShadowGrades\n // childrenScope: A hash of names to components which are in scope because they are children of this component (BELOW own ownScope in resolution order)\n\n fluid.shadowForComponent = function (component) {\n var instantiator = fluid.getInstantiator(component);\n return instantiator && component ? instantiator.idToShadow[component.id] : null;\n };\n\n // Access the member at a particular path in a component, forcing it to be constructed gingerly if necessary\n // supported, PUBLIC API function\n fluid.getForComponent = function (component, path) {\n var shadow = fluid.shadowForComponent(component);\n var getConfig = shadow ? shadow.getConfig : undefined;\n return fluid.get(component, path, getConfig);\n };\n\n // An EL segment resolver strategy that will attempt to trigger creation of\n // components that it discovers along the EL path, if they have been defined but not yet\n // constructed.\n fluid.makeGingerStrategy = function (that) {\n var instantiator = fluid.getInstantiator(that);\n return function (component, thisSeg, index, segs) {\n var atval = component[thisSeg];\n if (atval === fluid.inEvaluationMarker && index === segs.length) {\n fluid.fail(\"Error in component configuration - a circular reference was found during evaluation of path segment \\\"\" + thisSeg +\n \"\\\": for more details, see the activity records following this message in the console, or issue fluid.setLogging(fluid.logLevel.TRACE) when running your application\");\n }\n if (index > 1) {\n return atval;\n }\n if (atval === undefined && component.hasOwnProperty(thisSeg)) { // avoid recomputing properties that have been explicitly evaluated to undefined\n return fluid.NO_VALUE;\n }\n if (atval === undefined) { // pick up components in instantiation here - we can cut this branch by attaching early\n var parentPath = instantiator.idToShadow[component.id].path;\n var childPath = instantiator.composePath(parentPath, thisSeg);\n atval = instantiator.pathToComponent[childPath];\n }\n if (atval === undefined) {\n // TODO: This check is very expensive - once gingerness is stable, we ought to be able to\n // eagerly compute and cache the value of options.components - check is also incorrect and will miss injections\n var subRecord = fluid.getForComponent(component, [\"options\", \"components\", thisSeg]);\n if (subRecord) {\n if (subRecord.createOnEvent) {\n fluid.fail(\"Error resolving path segment \\\"\" + thisSeg + \"\\\" of path \" + segs.join(\".\") + \" since component with record \", subRecord,\n \" has annotation \\\"createOnEvent\\\" - this very likely represents an implementation error. Either alter the reference so it does not \" +\n \" match this component, or alter your workflow to ensure that the component is instantiated by the time this reference resolves\");\n }\n fluid.initDependent(component, thisSeg);\n atval = component[thisSeg];\n }\n }\n return atval;\n };\n };\n\n // Listed in dependence order\n fluid.frameworkGrades = [\"fluid.component\", \"fluid.modelComponent\", \"fluid.viewComponent\", \"fluid.rendererComponent\"];\n\n fluid.filterBuiltinGrades = function (gradeNames) {\n return fluid.remove_if(fluid.makeArray(gradeNames), function (gradeName) {\n return fluid.frameworkGrades.indexOf(gradeName) !== -1;\n });\n };\n\n fluid.dumpGradeNames = function (that) {\n return that.options && that.options.gradeNames ?\n \" gradeNames: \" + JSON.stringify(fluid.filterBuiltinGrades(that.options.gradeNames)) : \"\";\n };\n\n fluid.dumpThat = function (that) {\n return \"{ typeName: \\\"\" + that.typeName + \"\\\"\" + fluid.dumpGradeNames(that) + \" id: \" + that.id + \"}\";\n };\n\n fluid.dumpThatStack = function (thatStack, instantiator) {\n var togo = fluid.transform(thatStack, function (that) {\n var path = instantiator.idToPath(that.id);\n return fluid.dumpThat(that) + (path ? (\" - path: \" + path) : \"\");\n });\n return togo.join(\"\\n\");\n };\n\n fluid.dumpComponentPath = function (that) {\n var path = fluid.pathForComponent(that);\n return path ? fluid.pathUtil.composeSegments(path) : \"** no path registered for component **\";\n };\n\n fluid.resolveContext = function (context, that, fast) {\n if (context === \"that\") {\n return that;\n }\n // TODO: Check performance impact of this type check introduced for FLUID-5903 in a very sensitive corner\n if (typeof(context) === \"object\") {\n var innerContext = fluid.resolveContext(context.context, that, fast);\n if (!fluid.isComponent(innerContext)) {\n fluid.triggerMismatchedPathError(context.context, that);\n }\n var rawValue = fluid.getForComponent(innerContext, context.path);\n // TODO: Terrible, slow dispatch for this route\n var expanded = fluid.expandOptions(rawValue, that);\n if (!fluid.isComponent(expanded)) {\n fluid.fail(\"Unable to resolve recursive context expression \" + fluid.renderContextReference(context) + \": the directly resolved value of \" + rawValue +\n \" did not resolve to a component in the scope of component \", that, \": got \", expanded);\n }\n return expanded;\n } else {\n var foundComponent;\n var instantiator = fluid.globalInstantiator; // fluid.getInstantiator(that); // this hash lookup takes over 1us!\n if (fast) {\n var shadow = instantiator.idToShadow[that.id];\n return shadow.ownScope[context];\n } else {\n var thatStack = instantiator.getFullStack(that);\n fluid.visitComponentsForVisibility(instantiator, thatStack, function (component, name) {\n var shadow = fluid.shadowForComponent(component);\n // TODO: Some components, e.g. the static environment and typeTags do not have a shadow, which slows us down here\n if (context === name || shadow && shadow.contextHash && shadow.contextHash[context] || context === component.typeName) {\n foundComponent = component;\n return true; // YOUR VISIT IS AT AN END!!\n }\n if (fluid.getForComponent(component, [\"options\", \"components\", context]) && !component[context]) {\n // This is an expensive guess since we make it for every component up the stack - must apply the WAVE OF EXPLOSIONS (FLUID-4925) to discover all components first\n // This line attempts a hopeful construction of components that could be guessed by nickname through finding them unconstructed\n // in options. In the near future we should eagerly BEGIN the process of constructing components, discovering their\n // types and then attaching them to the tree VERY EARLY so that we get consistent results from different strategies.\n foundComponent = fluid.getForComponent(component, context);\n return true;\n }\n });\n return foundComponent;\n }\n }\n };\n\n fluid.triggerMismatchedPathError = function (parsed, parentThat) {\n var ref = fluid.renderContextReference(parsed);\n fluid.fail(\"Failed to resolve reference \" + ref + \" - could not match context with name \" +\n parsed.context + \" from component \" + fluid.dumpThat(parentThat) + \" at path \" + fluid.dumpComponentPath(parentThat) + \" component: \" , parentThat);\n };\n\n fluid.makeStackFetcher = function (parentThat, localRecord, fast) {\n var fetcher = function (parsed) {\n if (parentThat && parentThat.lifecycleStatus === \"destroyed\") {\n fluid.fail(\"Cannot resolve reference \" + fluid.renderContextReference(parsed) + \" from component \" + fluid.dumpThat(parentThat) + \" which has been destroyed\");\n }\n var context = parsed.context;\n if (localRecord && context in localRecord) {\n return fluid.get(localRecord[context], parsed.path);\n }\n var foundComponent = fluid.resolveContext(context, parentThat, fast);\n if (!foundComponent && parsed.path !== \"\") {\n fluid.triggerMismatchedPathError(parsed, parentThat);\n }\n return fluid.getForComponent(foundComponent, parsed.path);\n };\n return fetcher;\n };\n\n fluid.makeStackResolverOptions = function (parentThat, localRecord, fast) {\n return $.extend(fluid.copy(fluid.rawDefaults(\"fluid.makeExpandOptions\")), {\n localRecord: localRecord || {},\n fetcher: fluid.makeStackFetcher(parentThat, localRecord, fast),\n contextThat: parentThat,\n exceptions: {members: {model: true, modelRelay: true}}\n });\n };\n\n fluid.clearListeners = function (shadow) {\n // TODO: bug here - \"afterDestroy\" listeners will be unregistered already unless they come from this component\n fluid.each(shadow.listeners, function (rec) {\n rec.event.removeListener(rec.listenerId || rec.listener);\n });\n delete shadow.listeners;\n };\n\n fluid.recordListener = function (event, listener, shadow, listenerId) {\n if (event.ownerId !== shadow.that.id) { // don't bother recording listeners registered from this component itself\n fluid.pushArray(shadow, \"listeners\", {event: event, listener: listener, listenerId: listenerId});\n }\n };\n\n fluid.constructScopeObjects = function (instantiator, parent, child, childShadow) {\n var parentShadow = parent ? instantiator.idToShadow[parent.id] : null;\n childShadow.childrenScope = parentShadow ? Object.create(parentShadow.ownScope) : {};\n childShadow.ownScope = Object.create(childShadow.childrenScope);\n childShadow.parentShadow = parentShadow;\n };\n\n fluid.clearChildrenScope = function (instantiator, parentShadow, child, childShadow) {\n fluid.each(childShadow.contextHash, function (troo, context) {\n if (parentShadow.childrenScope[context] === child) {\n delete parentShadow.childrenScope[context]; // TODO: ambiguous resolution\n }\n });\n };\n\n // unsupported, non-API function - however, this structure is of considerable interest to those debugging\n // into IoC issues. The structures idToShadow and pathToComponent contain a complete map of the component tree\n // forming the surrounding scope\n fluid.instantiator = function () {\n var that = fluid.typeTag(\"instantiator\");\n $.extend(that, {\n lifecycleStatus: \"constructed\",\n pathToComponent: {},\n idToShadow: {},\n modelTransactions: {init: {}}, // a map of transaction id to map of component id to records of components enlisted in a current model initialisation transaction\n composePath: fluid.model.composePath, // For speed, we declare that no component's name may contain a period\n composeSegments: fluid.model.composeSegments,\n parseEL: fluid.model.parseEL,\n events: {\n onComponentAttach: fluid.makeEventFirer({name: \"instantiator's onComponentAttach event\"}),\n onComponentClear: fluid.makeEventFirer({name: \"instantiator's onComponentClear event\"})\n }\n });\n // TODO: this API can shortly be removed\n that.idToPath = function (id) {\n var shadow = that.idToShadow[id];\n return shadow ? shadow.path : \"\";\n };\n // Note - the returned stack is assumed writeable and does not include the root\n that.getThatStack = function (component) {\n var shadow = that.idToShadow[component.id];\n if (shadow) {\n var path = shadow.path;\n var parsed = that.parseEL(path);\n var root = that.pathToComponent[\"\"], togo = [];\n for (var i = 0; i < parsed.length; ++i) {\n root = root[parsed[i]];\n togo.push(root);\n }\n return togo;\n }\n else { return [];}\n };\n that.getFullStack = function (component) {\n var thatStack = component ? that.getThatStack(component) : [];\n thatStack.unshift(fluid.resolveRootComponent);\n return thatStack;\n };\n function recordComponent(parent, component, path, name, created) {\n var shadow;\n if (created) {\n shadow = that.idToShadow[component.id] = {};\n shadow.that = component;\n shadow.path = path;\n shadow.memberName = name;\n fluid.constructScopeObjects(that, parent, component, shadow);\n } else {\n shadow = that.idToShadow[component.id];\n shadow.injectedPaths = shadow.injectedPaths || {}; // a hash since we will modify whilst iterating\n shadow.injectedPaths[path] = true;\n var parentShadow = that.idToShadow[parent.id]; // structural parent shadow - e.g. resolveRootComponent\n var keys = fluid.keys(shadow.contextHash);\n fluid.remove_if(keys, function (key) {\n return shadow.contextHash && shadow.contextHash[key] === \"memberName\";\n });\n keys.push(name); // add local name - FLUID-5696 and FLUID-5820\n fluid.each(keys, function (context) {\n if (!parentShadow.childrenScope[context]) {\n parentShadow.childrenScope[context] = component;\n }\n });\n }\n if (that.pathToComponent[path]) {\n fluid.fail(\"Error during instantiation - path \" + path + \" which has just created component \" + fluid.dumpThat(component) +\n \" has already been used for component \" + fluid.dumpThat(that.pathToComponent[path]) + \" - this is a circular instantiation or other oversight.\" +\n \" Please clear the component using instantiator.clearComponent() before reusing the path.\");\n }\n that.pathToComponent[path] = component;\n }\n that.recordRoot = function (component) {\n recordComponent(null, component, \"\", \"\", true);\n };\n that.recordKnownComponent = function (parent, component, name, created) {\n parent[name] = component;\n if (fluid.isComponent(component) || component.type === \"instantiator\") {\n var parentPath = that.idToShadow[parent.id].path;\n var path = that.composePath(parentPath, name);\n recordComponent(parent, component, path, name, created);\n that.events.onComponentAttach.fire(component, path, that, created);\n } else {\n fluid.fail(\"Cannot record non-component with value \", component, \" at path \\\"\" + name + \"\\\" of parent \", parent);\n }\n };\n that.clearConcreteComponent = function (record) {\n // Clear injected instance of this component from all other paths - historically we didn't bother\n // to do this since injecting into a shorter scope is an error - but now we have resolveRoot area\n fluid.each(record.childShadow.injectedPaths, function (troo, injectedPath) {\n var parentPath = fluid.model.getToTailPath(injectedPath);\n var otherParent = that.pathToComponent[parentPath];\n that.clearComponent(otherParent, fluid.model.getTailPath(injectedPath), record.child);\n });\n fluid.clearDistributions(record.childShadow);\n fluid.clearListeners(record.childShadow);\n fluid.fireEvent(record.child, \"afterDestroy\", [record.child, record.name, record.component]);\n delete that.idToShadow[record.child.id];\n };\n that.clearComponent = function (component, name, child, options, nested, path) {\n // options are visitor options for recursive driving\n var shadow = that.idToShadow[component.id];\n // use flat recursion since we want to use our own recursion rather than rely on \"visited\" records\n options = options || {flat: true, instantiator: that, destroyRecs: []};\n child = child || component[name];\n path = path || shadow.path;\n if (path === undefined) {\n fluid.fail(\"Cannot clear component \" + name + \" from component \", component,\n \" which was not created by this instantiator\");\n }\n\n var childPath = that.composePath(path, name);\n var childShadow = that.idToShadow[child.id];\n if (!childShadow) { // Explicit FLUID-5812 check - this can be eliminated once we move visitComponentChildren to instantiator's records\n return;\n }\n var created = childShadow.path === childPath;\n that.events.onComponentClear.fire(child, childPath, component, created);\n\n // only recurse on components which were created in place - if the id record disagrees with the\n // recurse path, it must have been injected\n if (created) {\n fluid.visitComponentChildren(child, function (gchild, gchildname, segs, i) {\n var parentPath = that.composeSegments.apply(null, segs.slice(0, i));\n that.clearComponent(child, gchildname, null, options, true, parentPath);\n }, options, that.parseEL(childPath));\n fluid.doDestroy(child, name, component); // call \"onDestroy\", null out events and invokers, setting lifecycleStatus to \"destroyed\"\n options.destroyRecs.push({child: child, childShadow: childShadow, name: name, component: component});\n } else {\n fluid.remove_if(childShadow.injectedPaths, function (troo, path) {\n return path === childPath;\n });\n }\n fluid.clearChildrenScope(that, shadow, child, childShadow);\n // Note that \"pathToComponent\" will not be available during afterDestroy. This is so that we can synchronously recreate the component\n // in an afterDestroy listener (FLUID-5931). We don't clear up the shadow itself until after afterDestroy.\n delete that.pathToComponent[childPath];\n if (!nested) {\n delete component[name]; // there may be no entry - if creation is not concluded\n // Do actual destruction for the whole tree here, including \"afterDestroy\" and deleting shadows\n fluid.each(options.destroyRecs, that.clearConcreteComponent);\n }\n };\n return that;\n };\n\n // The global instantiator, holding all components instantiated in this context (instance of Infusion)\n fluid.globalInstantiator = fluid.instantiator();\n\n // Look up the globally registered instantiator for a particular component - we now only really support a\n // single, global instantiator, but this method is left as a notation point in case this ever reverts\n // Returns null if argument is a noncomponent or has no shadow\n fluid.getInstantiator = function (component) {\n var instantiator = fluid.globalInstantiator;\n return component && instantiator.idToShadow[component.id] ? instantiator : null;\n };\n\n // The grade supplied to components which will be resolvable from all parts of the component tree\n fluid.defaults(\"fluid.resolveRoot\");\n // In addition to being resolvable at the root, \"resolveRootSingle\" component will have just a single instance available. Fresh\n // instances will displace older ones.\n fluid.defaults(\"fluid.resolveRootSingle\", {\n gradeNames: \"fluid.resolveRoot\"\n });\n\n fluid.constructRootComponents = function (instantiator) {\n // Instantiate the primordial components at the root of each context tree\n fluid.rootComponent = instantiator.rootComponent = fluid.typeTag(\"fluid.rootComponent\");\n instantiator.recordRoot(fluid.rootComponent);\n\n // The component which for convenience holds injected instances of all components with fluid.resolveRoot grade\n fluid.resolveRootComponent = instantiator.resolveRootComponent = fluid.typeTag(\"fluid.resolveRootComponent\");\n instantiator.recordKnownComponent(fluid.rootComponent, fluid.resolveRootComponent, \"resolveRootComponent\", true);\n\n // obliterate resolveRoot's scope objects and replace by the real root scope - which is unused by its own children\n var rootShadow = instantiator.idToShadow[fluid.rootComponent.id];\n var resolveRootShadow = instantiator.idToShadow[fluid.resolveRootComponent.id];\n resolveRootShadow.ownScope = rootShadow.ownScope;\n resolveRootShadow.childrenScope = rootShadow.childrenScope;\n\n instantiator.recordKnownComponent(fluid.resolveRootComponent, instantiator, \"instantiator\", true); // needs to have a shadow so it can be injected\n resolveRootShadow.childrenScope.instantiator = instantiator; // needs to be mounted since it never passes through cacheShadowGrades\n };\n\n fluid.constructRootComponents(fluid.globalInstantiator); // currently a singleton - in future, alternative instantiators might come back\n\n /** Expand a set of component options either immediately, or with deferred effect.\n * The current policy is to expand immediately function arguments within fluid.assembleCreatorArguments which are not the main options of a\n * component. The component's own options take <code>{defer: true}</code> as part of\n * <code>outerExpandOptions</code> which produces an \"expandOptions\" structure holding the \"strategy\" and \"initter\" pattern\n * common to ginger participants.\n * Probably not to be advertised as part of a public API, but is considerably more stable than most of the rest\n * of the IoC API structure especially with respect to the first arguments.\n */\n\n// TODO: Can we move outerExpandOptions to 2nd place? only user of 3 and 4 is fluid.makeExpandBlock\n// TODO: Actually we want localRecord in 2nd place since outerExpandOptions is now almost disused\n fluid.expandOptions = function (args, that, mergePolicy, localRecord, outerExpandOptions) {\n if (!args) {\n return args;\n }\n fluid.pushActivity(\"expandOptions\", \"expanding options %args for component %that \", {that: that, args: args});\n var expandOptions = fluid.makeStackResolverOptions(that, localRecord);\n expandOptions.mergePolicy = mergePolicy;\n var expanded = outerExpandOptions && outerExpandOptions.defer ?\n fluid.makeExpandOptions(args, expandOptions) : fluid.expand(args, expandOptions);\n fluid.popActivity();\n return expanded;\n };\n\n fluid.localRecordExpected = fluid.arrayToHash([\"type\", \"options\", \"container\", \"createOnEvent\", \"priority\", \"recordType\"]); // last element unavoidably polluting\n\n fluid.checkComponentRecord = function (localRecord) {\n fluid.each(localRecord, function (value, key) {\n if (!fluid.localRecordExpected[key]) {\n fluid.fail(\"Probable error in subcomponent record \", localRecord, \" - key \\\"\" + key +\n \"\\\" found, where the only legal options are \" +\n fluid.keys(fluid.localRecordExpected).join(\", \"));\n }\n });\n };\n\n fluid.mergeRecordsToList = function (that, mergeRecords) {\n var list = [];\n fluid.each(mergeRecords, function (value, key) {\n value.recordType = key;\n if (key === \"distributions\") {\n list.push.apply(list, fluid.transform(value, function (distributedBlock) {\n return fluid.computeDistributionPriority(that, distributedBlock);\n }));\n }\n else {\n if (!value.options) { return; }\n value.priority = fluid.mergeRecordTypes[key];\n if (value.priority === undefined) {\n fluid.fail(\"Merge record with unrecognised type \" + key + \": \", value);\n }\n list.push(value);\n }\n });\n return list;\n };\n\n // TODO: overall efficiency could huge be improved by resorting to the hated PROTOTYPALISM as an optimisation\n // for this mergePolicy which occurs in every component. Although it is a deep structure, the root keys are all we need\n var addPolicyBuiltins = function (policy) {\n fluid.each([\"gradeNames\", \"mergePolicy\", \"argumentMap\", \"components\", \"dynamicComponents\", \"events\", \"listeners\", \"modelListeners\", \"modelRelay\", \"distributeOptions\", \"transformOptions\"], function (key) {\n fluid.set(policy, [key, \"*\", \"noexpand\"], true);\n });\n return policy;\n };\n\n // used from Fluid.js\n fluid.generateExpandBlock = function (record, that, mergePolicy, localRecord) {\n var expanded = fluid.expandOptions(record.options, record.contextThat || that, mergePolicy, localRecord, {defer: true});\n expanded.priority = record.priority;\n expanded.namespace = record.namespace;\n expanded.recordType = record.recordType;\n return expanded;\n };\n\n var expandComponentOptionsImpl = function (mergePolicy, defaults, initRecord, that) {\n var defaultCopy = fluid.copy(defaults);\n addPolicyBuiltins(mergePolicy);\n var shadow = fluid.shadowForComponent(that);\n shadow.mergePolicy = mergePolicy;\n var mergeRecords = {\n defaults: {options: defaultCopy}\n };\n\n $.extend(mergeRecords, initRecord.mergeRecords);\n // Do this here for gradeless components that were corrected by \"localOptions\"\n if (mergeRecords.subcomponentRecord) {\n fluid.checkComponentRecord(mergeRecords.subcomponentRecord);\n }\n\n var expandList = fluid.mergeRecordsToList(that, mergeRecords);\n\n var togo = fluid.transform(expandList, function (value) {\n return fluid.generateExpandBlock(value, that, mergePolicy, initRecord.localRecord);\n });\n return togo;\n };\n\n fluid.fabricateDestroyMethod = function (that, name, instantiator, child) {\n return function () {\n instantiator.clearComponent(that, name, child);\n };\n };\n\n // Computes a name for a component appearing at the global root which is globally unique, from its nickName and id\n fluid.computeGlobalMemberName = function (that) {\n var nickName = fluid.computeNickName(that.typeName);\n return nickName + \"-\" + that.id;\n };\n\n // Maps a type name to the member name to be used for it at a particular path level where it is intended to be unique\n // Note that \".\" is still not supported within a member name\n // supported, PUBLIC API function\n fluid.typeNameToMemberName = function (typeName) {\n return typeName.replace(/\\./g, \"_\");\n };\n\n // This is the initial entry point from the non-IoC side reporting the first presence of a new component - called from fluid.mergeComponentOptions\n fluid.expandComponentOptions = function (mergePolicy, defaults, userOptions, that) {\n var initRecord = userOptions; // might have been tunnelled through \"userOptions\" from \"assembleCreatorArguments\"\n var instantiator = userOptions && userOptions.marker === fluid.EXPAND ? userOptions.instantiator : null;\n fluid.pushActivity(\"expandComponentOptions\", \"expanding component options %options with record %record for component %that\",\n {options: instantiator ? userOptions.mergeRecords.user : userOptions, record: initRecord, that: that});\n if (!instantiator) { // it is a top-level component which needs to be attached to the global root\n instantiator = fluid.globalInstantiator;\n initRecord = { // upgrade \"userOptions\" to the same format produced by fluid.assembleCreatorArguments via the subcomponent route\n mergeRecords: {user: {options: fluid.expandCompact(userOptions, true)}},\n memberName: fluid.computeGlobalMemberName(that),\n instantiator: instantiator,\n parentThat: fluid.rootComponent\n };\n }\n that.destroy = fluid.fabricateDestroyMethod(initRecord.parentThat, initRecord.memberName, instantiator, that);\n\n instantiator.recordKnownComponent(initRecord.parentThat, that, initRecord.memberName, true);\n var togo = expandComponentOptionsImpl(mergePolicy, defaults, initRecord, that);\n\n fluid.popActivity();\n return togo;\n };\n\n /** Given a typeName, determine the final concrete\n * \"invocation specification\" consisting of a concrete global function name\n * and argument list which is suitable to be executed directly by fluid.invokeGlobalFunction.\n */\n // options is just a disposition record containing memberName, componentRecord\n fluid.assembleCreatorArguments = function (parentThat, typeName, options) {\n var upDefaults = fluid.defaults(typeName); // we're not responsive to dynamic changes in argMap, but we don't believe in these anyway\n if (!upDefaults || !upDefaults.argumentMap) {\n fluid.fail(\"Error in assembleCreatorArguments: cannot look up component type name \" + typeName + \" to a component creator grade with an argumentMap\");\n }\n\n var fakeThat = {}; // fake \"that\" for receiveDistributions since we try to match selectors before creation for FLUID-5013\n var distributions = parentThat ? fluid.receiveDistributions(parentThat, upDefaults.gradeNames, options.memberName, fakeThat) : [];\n fluid.each(distributions, function (distribution) { // TODO: The duplicated route for this is in fluid.mergeComponentOptions\n fluid.computeDistributionPriority(parentThat, distribution);\n if (fluid.isPrimitive(distribution.priority)) { // TODO: These should be immutable and parsed just once on registration - but we can't because of crazy target-dependent distance system\n distribution.priority = fluid.parsePriority(distribution.priority, 0, false, \"options distribution\");\n }\n });\n fluid.sortByPriority(distributions);\n\n var localDynamic = options.localDynamic;\n var localRecord = $.extend({}, fluid.censorKeys(options.componentRecord, [\"type\"]), localDynamic);\n\n var argMap = upDefaults.argumentMap;\n var findKeys = Object.keys(argMap).concat([\"type\"]);\n\n fluid.each(findKeys, function (name) {\n for (var i = 0; i < distributions.length; ++i) { // Apply non-options material from distributions (FLUID-5013)\n if (distributions[i][name] !== undefined) {\n localRecord[name] = distributions[i][name];\n }\n }\n });\n typeName = localRecord.type || typeName;\n\n delete localRecord.type;\n delete localRecord.options;\n\n var mergeRecords = {distributions: distributions};\n\n if (options.componentRecord !== undefined) {\n // Deliberately put too many things here so they can be checked in expandComponentOptions (FLUID-4285)\n mergeRecords.subcomponentRecord = $.extend({}, options.componentRecord);\n }\n var args = [];\n fluid.each(argMap, function (index, name) {\n var arg;\n if (name === \"options\") {\n arg = {marker: fluid.EXPAND,\n localRecord: localDynamic,\n mergeRecords: mergeRecords,\n instantiator: fluid.getInstantiator(parentThat),\n parentThat: parentThat,\n memberName: options.memberName};\n } else {\n var value = localRecord[name];\n arg = fluid.expandImmediate(value, parentThat, localRecord);\n }\n args[index] = arg;\n });\n\n var togo = {\n args: args,\n funcName: typeName\n };\n return togo;\n };\n\n /** Instantiate the subcomponent with the supplied name of the supplied top-level component. Although this method\n * is published as part of the Fluid API, it should not be called by general users and may not remain stable. It is\n * currently the only mechanism provided for instantiating components whose definitions are dynamic, and will be\n * replaced in time by dedicated declarative framework described by FLUID-5022.\n * @param that {Component} the parent component for which the subcomponent is to be instantiated\n * @param name {String} the name of the component - the index of the options block which configures it as part of the\n * <code>components</code> section of its parent's options\n */\n fluid.initDependent = function (that, name, localRecord) {\n if (that[name]) { return; } // TODO: move this into strategy\n var component = that.options.components[name];\n var instance;\n var instantiator = fluid.globalInstantiator;\n var shadow = instantiator.idToShadow[that.id];\n var localDynamic = localRecord || shadow.subcomponentLocal && shadow.subcomponentLocal[name];\n fluid.pushActivity(\"initDependent\", \"instantiating dependent component at path \\\"%path\\\" with record %record as child of %parent\",\n {path: shadow.path + \".\" + name, record: component, parent: that});\n\n if (typeof(component) === \"string\" || component.expander) {\n that[name] = fluid.inEvaluationMarker;\n instance = fluid.expandImmediate(component, that);\n if (instance) {\n instantiator.recordKnownComponent(that, instance, name, false);\n } else {\n delete that[name];\n }\n }\n else if (component.type) {\n var type = fluid.expandImmediate(component.type, that, localDynamic);\n if (!type) {\n fluid.fail(\"Error in subcomponent record: \", component.type, \" could not be resolved to a type for component \", name,\n \" of parent \", that);\n }\n var invokeSpec = fluid.assembleCreatorArguments(that, type, {componentRecord: component, memberName: name, localDynamic: localDynamic});\n instance = fluid.initSubcomponentImpl(that, {type: invokeSpec.funcName}, invokeSpec.args);\n }\n else {\n fluid.fail(\"Unrecognised material in place of subcomponent \" + name + \" - no \\\"type\\\" field found\");\n }\n fluid.popActivity();\n return instance;\n };\n\n fluid.bindDeferredComponent = function (that, componentName, component) {\n var events = fluid.makeArray(component.createOnEvent);\n fluid.each(events, function (eventName) {\n var event = fluid.isIoCReference(eventName) ? fluid.expandOptions(eventName, that) : that.events[eventName];\n if (!event || !event.addListener) {\n fluid.fail(\"Error instantiating createOnEvent component with name \" + componentName + \" of parent \", that, \" since event specification \" +\n eventName + \" could not be expanded to an event - got \", event);\n }\n event.addListener(function () {\n fluid.pushActivity(\"initDeferred\", \"instantiating deferred component %componentName of parent %that due to event %eventName\",\n {componentName: componentName, that: that, eventName: eventName});\n if (that[componentName]) {\n fluid.globalInstantiator.clearComponent(that, componentName);\n }\n var localRecord = {\"arguments\": fluid.makeArray(arguments)};\n fluid.initDependent(that, componentName, localRecord);\n fluid.popActivity();\n }, null, component.priority);\n });\n };\n\n fluid.priorityForComponent = function (component) {\n return component.priority ? component.priority :\n (component.type === \"fluid.typeFount\" || fluid.hasGrade(fluid.defaults(component.type), \"fluid.typeFount\")) ?\n \"first\" : undefined;\n };\n\n fluid.initDependents = function (that) {\n fluid.pushActivity(\"initDependents\", \"instantiating dependent components for component %that\", {that: that});\n var shadow = fluid.shadowForComponent(that);\n shadow.memberStrategy.initter();\n shadow.invokerStrategy.initter();\n\n fluid.getForComponent(that, \"modelRelay\");\n fluid.getForComponent(that, \"model\"); // trigger this as late as possible - but must be before components so that child component has model on its onCreate\n if (fluid.isDestroyed(that)) {\n return; // Further fix for FLUID-5869 - if we managed to destroy ourselves through some bizarre model self-reaction, bail out here\n }\n\n var options = that.options;\n var components = options.components || {};\n var componentSort = [];\n\n fluid.each(components, function (component, name) {\n if (!component.createOnEvent) {\n var priority = fluid.priorityForComponent(component);\n componentSort.push({namespace: name, priority: fluid.parsePriority(priority)});\n }\n else {\n fluid.bindDeferredComponent(that, name, component);\n }\n });\n fluid.sortByPriority(componentSort);\n fluid.each(componentSort, function (entry) {\n fluid.initDependent(that, entry.namespace);\n });\n if (shadow.subcomponentLocal) {\n fluid.clear(shadow.subcomponentLocal); // still need repo for event-driven dynamic components - abolish these in time\n }\n that.lifecycleStatus = \"constructed\";\n fluid.assessTreeConstruction(that, shadow);\n\n fluid.popActivity();\n };\n\n fluid.assessTreeConstruction = function (that, shadow) {\n var instantiator = fluid.globalInstantiator;\n var thatStack = instantiator.getThatStack(that);\n var unstableUp = fluid.find_if(thatStack, function (that) {\n return that.lifecycleStatus === \"constructing\";\n });\n if (unstableUp) {\n that.lifecycleStatus = \"constructed\";\n } else {\n fluid.markSubtree(instantiator, that, shadow.path, \"treeConstructed\");\n }\n };\n\n fluid.markSubtree = function (instantiator, that, path, state) {\n that.lifecycleStatus = state;\n fluid.visitComponentChildren(that, function (child, name) {\n var childPath = instantiator.composePath(path, name);\n var childShadow = instantiator.idToShadow[child.id];\n var created = childShadow && childShadow.path === childPath;\n if (created) {\n fluid.markSubtree(instantiator, child, childPath, state);\n }\n }, {flat: true});\n };\n\n\n /** BEGIN NEXUS METHODS **/\n\n /** Given a component reference, returns the path of that component within its component tree\n * @param component {Component} A reference to a component\n * @param instantiator {Instantiator} (optional) An instantiator to use for the lookup\n * @return {Array of String} An array of path segments of the component within its tree, or `null` if the reference does not hold a live component\n */\n fluid.pathForComponent = function (component, instantiator) {\n instantiator = instantiator || fluid.getInstantiator(component) || fluid.globalInstantiator;\n var shadow = instantiator.idToShadow[component.id];\n if (!shadow) {\n return null;\n }\n return instantiator.parseEL(shadow.path);\n };\n\n /** Construct a component with the supplied options at the specified path in the component tree. The parent path of the location must already be a component.\n * @param path {String|Array of String} Path where the new component is to be constructed, represented as a string or array of segments\n * @param options {Object} Top-level options supplied to the component - must at the very least include a field <code>type</code> holding the component's type\n * @param instantiator {Instantiator} [optional] The instantiator holding the component to be created - if blank, the global instantiator will be used\n */\n fluid.construct = function (path, options, instantiator) {\n var record = fluid.destroy(path, instantiator);\n // TODO: We must construct a more principled scheme for designating child components than this - especially once options become immutable\n fluid.set(record.parent, [\"options\", \"components\", record.memberName], {\n type: options.type,\n options: options\n });\n return fluid.initDependent(record.parent, record.memberName);\n };\n\n /** Destroys a component held at the specified path. The parent path must represent a component, although the component itself may be nonexistent\n * @param path {String|Array of String} Path where the new component is to be destroyed, represented as a string or array of segments\n * @param instantiator {Instantiator} [optional] The instantiator holding the component to be destroyed - if blank, the global instantiator will be used\n */\n fluid.destroy = function (path, instantiator) {\n instantiator = instantiator || fluid.globalInstantiator;\n var segs = fluid.model.parseToSegments(path, instantiator.parseEL, true);\n if (segs.length === 0) {\n fluid.fail(\"Cannot destroy the root component\");\n }\n var memberName = segs.pop(), parentPath = instantiator.composeSegments.apply(null, segs);\n var parent = instantiator.pathToComponent[parentPath];\n if (!parent) {\n fluid.fail(\"Cannot modify component with nonexistent parent at path \", path);\n }\n if (parent[memberName]) {\n parent[memberName].destroy();\n }\n return {\n parent: parent,\n memberName: memberName\n };\n };\n\n /** Construct an instance of a component as a child of the specified parent, with a well-known, unique name derived from its typeName\n * @param parentPath {String|Array of String} Parent of path where the new component is to be constructed, represented as a string or array of segments\n * @param options {String|Object} Options encoding the component to be constructed. If this is of type String, it is assumed to represent the component's typeName with no options\n * @param instantiator {Instantiator} [optional] The instantiator holding the component to be created - if blank, the global instantiator will be used\n */\n fluid.constructSingle = function (parentPath, options, instantiator) {\n instantiator = instantiator || fluid.globalInstantiator;\n parentPath = parentPath || \"\";\n var segs = fluid.model.parseToSegments(parentPath, instantiator.parseEL, true);\n if (typeof(options) === \"string\") {\n options = {type: options};\n }\n var type = options.type;\n if (!type) {\n fluid.fail(\"Cannot construct singleton object without a type entry\");\n }\n options = $.extend({}, options);\n var gradeNames = options.gradeNames = fluid.makeArray(options.gradeNames);\n gradeNames.unshift(type); // principal type may be noninstantiable\n options.type = \"fluid.component\";\n var root = segs.length === 0;\n if (root) {\n gradeNames.push(\"fluid.resolveRoot\");\n }\n var memberName = fluid.typeNameToMemberName(options.singleRootType || type);\n segs.push(memberName);\n fluid.construct(segs, options, instantiator);\n };\n\n /** Destroy an instance created by `fluid.constructSingle`\n * @param parentPath {String|Array of String} Parent of path where the new component is to be constructed, represented as a string or array of segments\n * @param typeName {String} The type name used to construct the component (either `type` or `singleRootType` of the `options` argument to `fluid.constructSingle`\n * @param instantiator {Instantiator} [optional] The instantiator holding the component to be created - if blank, the global instantiator will be used\n */\n fluid.destroySingle = function (parentPath, typeName, instantiator) {\n instantiator = instantiator || fluid.globalInstantiator;\n var segs = fluid.model.parseToSegments(parentPath, instantiator.parseEL, true);\n var memberName = fluid.typeNameToMemberName(typeName);\n segs.push(memberName);\n fluid.destroy(segs, instantiator);\n };\n\n /** Registers and constructs a \"linkage distribution\" which will ensure that wherever a set of \"input grades\" co-occur, they will\n * always result in a supplied \"output grades\" in the component where they co-occur.\n * @param linkageName {String} The name of the grade which will broadcast the resulting linkage. If required, this linkage can be destroyed by supplying this name to `fluid.destroySingle`.\n * @param inputNames {Array of String} An array of grade names which will be tested globally for co-occurrence\n * @param outputNames {String|Array of String} A single name or array of grade names which will be output into the co-occuring component\n */\n fluid.makeGradeLinkage = function (linkageName, inputNames, outputNames) {\n fluid.defaults(linkageName, {\n gradeNames: \"fluid.component\",\n distributeOptions: {\n record: outputNames,\n target: \"{/ \" + inputNames.join(\"&\") + \"}.options.gradeNames\"\n }\n });\n fluid.constructSingle([], linkageName);\n };\n\n /** Retrieves a component by global path.\n * @param path {String|Array of String} The global path of the component to look up\n * @return The component at the specified path, or undefined if none is found\n */\n fluid.componentForPath = function (path) {\n return fluid.globalInstantiator.pathToComponent[fluid.isArrayable(path) ? path.join(\".\") : path];\n };\n\n /** END NEXUS METHODS **/\n\n /** BEGIN IOC DEBUGGING METHODS **/\n fluid[\"debugger\"] = function () {\n debugger; // eslint-disable-line no-debugger\n };\n\n fluid.defaults(\"fluid.debuggingProbe\", {\n gradeNames: [\"fluid.component\"]\n });\n\n // probe looks like:\n // target: {preview other}.listeners.eventName\n // priority: first/last\n // func: console.log/fluid.log/fluid.debugger\n fluid.probeToDistribution = function (probe) {\n var instantiator = fluid.globalInstantiator;\n var parsed = fluid.parseContextReference(probe.target);\n var segs = fluid.model.parseToSegments(parsed.path, instantiator.parseEL, true);\n if (segs[0] !== \"options\") {\n segs.unshift(\"options\"); // compensate for this insanity until we have the great options flattening\n }\n var parsedPriority = fluid.parsePriority(probe.priority);\n if (parsedPriority.constraint && !parsedPriority.constraint.target) {\n parsedPriority.constraint.target = \"authoring\";\n }\n return {\n target: \"{/ \" + parsed.context + \"}.\" + instantiator.composeSegments.apply(null, segs),\n record: {\n func: probe.func,\n funcName: probe.funcName,\n args: probe.args,\n priority: fluid.renderPriority(parsedPriority)\n }\n };\n };\n\n fluid.registerProbes = function (probes) {\n var probeDistribution = fluid.transform(probes, fluid.probeToDistribution);\n var memberName = \"fluid_debuggingProbe_\" + fluid.allocateGuid();\n fluid.construct([memberName], {\n type: \"fluid.debuggingProbe\",\n distributeOptions: probeDistribution\n });\n return memberName;\n };\n\n fluid.deregisterProbes = function (probeName) {\n fluid.destroy([probeName]);\n };\n\n /** END IOC DEBUGGING METHODS **/\n\n fluid.thisistToApplicable = function (record, recthis, that) {\n return {\n apply: function (noThis, args) {\n // Resolve this material late, to deal with cases where the target has only just been brought into existence\n // (e.g. a jQuery target for rendered material) - TODO: Possibly implement cached versions of these as we might do for invokers\n var resolvedThis = fluid.expandOptions(recthis, that);\n if (typeof(resolvedThis) === \"string\") {\n resolvedThis = fluid.getGlobalValue(resolvedThis);\n }\n if (!resolvedThis) {\n fluid.fail(\"Could not resolve reference \" + recthis + \" to a value\");\n }\n var resolvedFunc = resolvedThis[record.method];\n if (typeof(resolvedFunc) !== \"function\") {\n fluid.fail(\"Object \", resolvedThis, \" at reference \" + recthis + \" has no member named \" + record.method + \" which is a function \");\n }\n fluid.log(\"Applying arguments \", args, \" to method \" + record.method + \" of instance \", resolvedThis);\n return resolvedFunc.apply(resolvedThis, args);\n }\n };\n };\n\n fluid.changeToApplicable = function (record, that) {\n return {\n apply: function (noThis, args, localRecord, mergeRecord) {\n var parsed = fluid.parseValidModelReference(that, \"changePath listener record\", record.changePath);\n var value = fluid.expandOptions(record.value, that, {}, fluid.extend(localRecord, {\"arguments\": args}));\n var sources = mergeRecord && mergeRecord.source && mergeRecord.source.length ? fluid.makeArray(record.source).concat(mergeRecord.source) : record.source;\n parsed.applier.change(parsed.modelSegs, value, record.type, sources); // FLUID-5586 now resolved\n }\n };\n };\n\n // Convert \"exotic records\" into an applicable form (\"this/method\" for FLUID-4878 or \"changePath\" for FLUID-3674)\n fluid.recordToApplicable = function (record, that, standard) {\n if (record.changePath !== undefined) { // Allow falsy paths for FLUID-5586\n return fluid.changeToApplicable(record, that, standard);\n }\n var recthis = record[\"this\"];\n if (record.method ^ recthis) {\n fluid.fail(\"Record \", that, \" must contain both entries \\\"method\\\" and \\\"this\\\" if it contains either\");\n }\n return record.method ? fluid.thisistToApplicable(record, recthis, that) : null;\n };\n\n fluid.getGlobalValueNonComponent = function (funcName, context) { // TODO: Guard this in listeners as well\n var defaults = fluid.defaults(funcName);\n if (defaults && fluid.hasGrade(defaults, \"fluid.component\")) {\n fluid.fail(\"Error in function specification - cannot invoke function \" + funcName + \" in the context of \" + context + \": component creator functions can only be used as subcomponents\");\n }\n return fluid.getGlobalValue(funcName);\n };\n\n fluid.makeInvoker = function (that, invokerec, name) {\n invokerec = fluid.upgradePrimitiveFunc(invokerec); // shorthand case for direct function invokers (FLUID-4926)\n if (invokerec.args !== undefined && invokerec.args !== fluid.NO_VALUE && !fluid.isArrayable(invokerec.args)) {\n invokerec.args = fluid.makeArray(invokerec.args);\n }\n var func = fluid.recordToApplicable(invokerec, that);\n var invokePre = fluid.preExpand(invokerec.args);\n var localRecord = {};\n var expandOptions = fluid.makeStackResolverOptions(that, localRecord, true);\n func = func || (invokerec.funcName ? fluid.getGlobalValueNonComponent(invokerec.funcName, \"an invoker\") : fluid.expandImmediate(invokerec.func, that));\n if (!func || !func.apply) {\n fluid.fail(\"Error in invoker record: could not resolve members func, funcName or method to a function implementation - got \" + func + \" from \", invokerec);\n } else if (func === fluid.notImplemented) {\n fluid.fail(\"Error constructing component \", that, \" - the invoker named \" + name + \" which was defined in grade \" + invokerec.componentSource + \" needs to be overridden with a concrete implementation\");\n }\n return function invokeInvoker() {\n if (fluid.defeatLogging === false) {\n fluid.pushActivity(\"invokeInvoker\", \"invoking invoker with name %name and record %record from path %path holding component %that\",\n {name: name, record: invokerec, path: fluid.dumpComponentPath(that), that: that});\n }\n var togo, finalArgs;\n if (that.lifecycleStatus === \"destroyed\") {\n fluid.log(fluid.logLevel.WARN, \"Ignoring call to invoker \" + name + \" of component \", that, \" which has been destroyed\");\n } else {\n localRecord.arguments = arguments;\n if (invokerec.args === undefined || invokerec.args === fluid.NO_VALUE) {\n finalArgs = arguments;\n } else {\n fluid.expandImmediateImpl(invokePre, expandOptions);\n finalArgs = invokePre.source;\n }\n togo = func.apply(null, finalArgs);\n }\n if (fluid.defeatLogging === false) {\n fluid.popActivity();\n }\n return togo;\n };\n };\n\n // weird higher-order function so that we can staightforwardly dispatch original args back onto listener\n fluid.event.makeTrackedListenerAdder = function (source) {\n var shadow = fluid.shadowForComponent(source);\n return function (event) {\n return {addListener: function (listener, namespace, priority, softNamespace, listenerId) {\n fluid.recordListener(event, listener, shadow, listenerId);\n event.addListener.apply(null, arguments);\n }};\n };\n };\n\n fluid.event.listenerEngine = function (eventSpec, callback, adder) {\n var argstruc = {};\n function checkFire() {\n var notall = fluid.find(eventSpec, function (value, key) {\n if (argstruc[key] === undefined) {\n return true;\n }\n });\n if (!notall) {\n var oldstruc = argstruc;\n argstruc = {}; // guard against the case the callback perversely fires one of its prerequisites (FLUID-5112)\n callback(oldstruc);\n }\n }\n fluid.each(eventSpec, function (event, eventName) {\n adder(event).addListener(function () {\n argstruc[eventName] = fluid.makeArray(arguments);\n checkFire();\n });\n });\n };\n\n fluid.event.dispatchListener = function (that, listener, eventName, eventSpec, indirectArgs) {\n if (eventSpec.args !== undefined && eventSpec.args !== fluid.NO_VALUE && !fluid.isArrayable(eventSpec.args)) {\n eventSpec.args = fluid.makeArray(eventSpec.args);\n }\n listener = fluid.event.resolveListener(listener); // In theory this optimisation is too aggressive if global name is not defined yet\n var dispatchPre = fluid.preExpand(eventSpec.args);\n var localRecord = {};\n var expandOptions = fluid.makeStackResolverOptions(that, localRecord, true);\n var togo = function () {\n if (fluid.defeatLogging === false) {\n fluid.pushActivity(\"dispatchListener\", \"firing to listener to event named %eventName of component %that\",\n {eventName: eventName, that: that});\n }\n\n var args = indirectArgs ? arguments[0] : arguments, finalArgs;\n localRecord.arguments = args;\n if (eventSpec.args !== undefined && eventSpec.args !== fluid.NO_VALUE) {\n fluid.expandImmediateImpl(dispatchPre, expandOptions);\n finalArgs = dispatchPre.source;\n } else {\n finalArgs = args;\n }\n var togo = listener.apply(null, finalArgs);\n if (fluid.defeatLogging === false) {\n fluid.popActivity();\n }\n return togo;\n };\n fluid.event.impersonateListener(listener, togo); // still necessary for FLUID-5254 even though framework's listeners now get explicit guids\n return togo;\n };\n\n fluid.event.resolveSoftNamespace = function (key) {\n if (typeof(key) !== \"string\") {\n return null;\n } else {\n var lastpos = Math.max(key.lastIndexOf(\".\"), key.lastIndexOf(\"}\"));\n return key.substring(lastpos + 1);\n }\n };\n\n fluid.event.resolveListenerRecord = function (lisrec, that, eventName, namespace, standard) {\n var badRec = function (record, extra) {\n fluid.fail(\"Error in listener record - could not resolve reference \", record, \" to a listener or firer. \" +\n \"Did you miss out \\\"events.\\\" when referring to an event firer?\" + extra);\n };\n fluid.pushActivity(\"resolveListenerRecord\", \"resolving listener record for event named %eventName for component %that\",\n {eventName: eventName, that: that});\n var records = fluid.makeArray(lisrec);\n var transRecs = fluid.transform(records, function (record) {\n // TODO: FLUID-5242 fix - we copy here since distributeOptions does not copy options blocks that it distributes and we can hence corrupt them.\n // need to clarify policy on options sharing - for slightly better efficiency, copy should happen during distribution and not here\n // Note that fluid.mergeModelListeners expects to write to these too\n var expanded = fluid.isPrimitive(record) || record.expander ? {listener: record} : fluid.copy(record);\n var methodist = fluid.recordToApplicable(record, that, standard);\n if (methodist) {\n expanded.listener = methodist;\n }\n else {\n expanded.listener = expanded.listener || expanded.func || expanded.funcName;\n }\n if (!expanded.listener) {\n badRec(record, \" Listener record must contain a member named \\\"listener\\\", \\\"func\\\", \\\"funcName\\\" or \\\"method\\\"\");\n }\n var softNamespace = record.method ?\n fluid.event.resolveSoftNamespace(record[\"this\"]) + \".\" + record.method :\n fluid.event.resolveSoftNamespace(expanded.listener);\n if (!expanded.namespace && !namespace && softNamespace) {\n expanded.softNamespace = true;\n expanded.namespace = (record.componentSource ? record.componentSource : that.typeName) + \".\" + softNamespace;\n }\n var listener = expanded.listener = fluid.expandOptions(expanded.listener, that);\n if (!listener) {\n badRec(record, \"\");\n }\n var firer = false;\n if (listener.typeName === \"fluid.event.firer\") {\n listener = listener.fire;\n firer = true;\n }\n expanded.listener = (standard && (expanded.args && listener !== \"fluid.notImplemented\" || firer)) ? fluid.event.dispatchListener(that, listener, eventName, expanded) : listener;\n expanded.listenerId = fluid.allocateGuid();\n return expanded;\n });\n var togo = {\n records: transRecs,\n adderWrapper: standard ? fluid.event.makeTrackedListenerAdder(that) : null\n };\n fluid.popActivity();\n return togo;\n };\n\n fluid.event.expandOneEvent = function (that, event) {\n var origin;\n if (typeof(event) === \"string\" && event.charAt(0) !== \"{\") {\n // Shorthand for resolving onto our own events, but with GINGER WORLD!\n origin = fluid.getForComponent(that, [\"events\", event]);\n }\n else {\n origin = fluid.expandOptions(event, that);\n }\n if (!origin || origin.typeName !== \"fluid.event.firer\") {\n fluid.fail(\"Error in event specification - could not resolve base event reference \", event, \" to an event firer: got \", origin);\n }\n return origin;\n };\n\n fluid.event.expandEvents = function (that, event) {\n return typeof(event) === \"string\" ?\n fluid.event.expandOneEvent(that, event) :\n fluid.transform(event, function (oneEvent) {\n return fluid.event.expandOneEvent(that, oneEvent);\n });\n };\n\n fluid.event.resolveEvent = function (that, eventName, eventSpec) {\n fluid.pushActivity(\"resolveEvent\", \"resolving event with name %eventName attached to component %that\",\n {eventName: eventName, that: that});\n var adder = fluid.event.makeTrackedListenerAdder(that);\n if (typeof(eventSpec) === \"string\") {\n eventSpec = {event: eventSpec};\n }\n var event = eventSpec.typeName === \"fluid.event.firer\" ? eventSpec : eventSpec.event || eventSpec.events;\n if (!event) {\n fluid.fail(\"Event specification for event with name \" + eventName + \" does not include a base event specification: \", eventSpec);\n }\n\n var origin = event.typeName === \"fluid.event.firer\" ? event : fluid.event.expandEvents(that, event);\n\n var isMultiple = origin.typeName !== \"fluid.event.firer\";\n var isComposite = eventSpec.args || isMultiple;\n // If \"event\" is not composite, we want to share the listener list and FIRE method with the original\n // If \"event\" is composite, we need to create a new firer. \"composite\" includes case where any boiling\n // occurred - this was implemented wrongly in 1.4.\n var firer;\n if (isComposite) {\n firer = fluid.makeEventFirer({name: \" [composite] \" + fluid.event.nameEvent(that, eventName)});\n var dispatcher = fluid.event.dispatchListener(that, firer.fire, eventName, eventSpec, isMultiple);\n if (isMultiple) {\n fluid.event.listenerEngine(origin, dispatcher, adder);\n }\n else {\n adder(origin).addListener(dispatcher);\n }\n }\n else {\n firer = {typeName: \"fluid.event.firer\"};\n firer.fire = function () {\n var outerArgs = fluid.makeArray(arguments);\n fluid.pushActivity(\"fireSynthetic\", \"firing synthetic event %eventName \", {eventName: eventName});\n var togo = origin.fire.apply(null, outerArgs);\n fluid.popActivity();\n return togo;\n };\n firer.addListener = function (listener, namespace, priority, softNamespace, listenerId) {\n var dispatcher = fluid.event.dispatchListener(that, listener, eventName, eventSpec);\n adder(origin).addListener(dispatcher, namespace, priority, softNamespace, listenerId);\n };\n firer.removeListener = function (listener) {\n origin.removeListener(listener);\n };\n }\n fluid.popActivity();\n return firer;\n };\n\n /** BEGIN unofficial IoC material **/\n // The following three functions are unsupported ane only used in the renderer expander.\n // The material they produce is no longer recognised for component resolution.\n\n fluid.withEnvironment = function (envAdd, func, root) {\n var key;\n root = root || fluid.globalThreadLocal();\n try {\n for (key in envAdd) {\n root[key] = envAdd[key];\n }\n $.extend(root, envAdd);\n return func();\n } finally {\n for (key in envAdd) {\n delete root[key]; // TODO: users may want a recursive \"scoping\" model\n }\n }\n };\n\n fluid.fetchContextReference = function (parsed, directModel, env, elResolver, externalFetcher) {\n // The \"elResolver\" is a hack to make certain common idioms in protoTrees work correctly, where a contextualised EL\n // path actually resolves onto a further EL reference rather than directly onto a value target\n if (elResolver) {\n parsed = elResolver(parsed, env);\n }\n var base = parsed.context ? env[parsed.context] : directModel;\n if (!base) {\n var resolveExternal = externalFetcher && externalFetcher(parsed);\n return resolveExternal || base;\n }\n return parsed.noDereference ? parsed.path : fluid.get(base, parsed.path);\n };\n\n fluid.makeEnvironmentFetcher = function (directModel, elResolver, envGetter, externalFetcher) {\n envGetter = envGetter || fluid.globalThreadLocal;\n return function (parsed) {\n var env = envGetter();\n return fluid.fetchContextReference(parsed, directModel, env, elResolver, externalFetcher);\n };\n };\n\n /** END of unofficial IoC material **/\n\n /* Compact expansion machinery - for short form invoker and expander references such as @expand:func(arg) and func(arg) */\n\n fluid.coerceToPrimitive = function (string) {\n return string === \"false\" ? false : (string === \"true\" ? true :\n (isFinite(string) ? Number(string) : string));\n };\n\n fluid.compactStringToRec = function (string, type) {\n var openPos = string.indexOf(\"(\");\n var closePos = string.indexOf(\")\");\n if (openPos === -1 ^ closePos === -1 || openPos > closePos) {\n fluid.fail(\"Badly-formed compact \" + type + \" record without matching parentheses: \" + string);\n }\n if (openPos !== -1 && closePos !== -1) {\n var trail = string.substring(closePos + 1);\n if ($.trim(trail) !== \"\") {\n fluid.fail(\"Badly-formed compact \" + type + \" record \" + string + \" - unexpected material following close parenthesis: \" + trail);\n }\n var prefix = string.substring(0, openPos);\n var body = string.substring(openPos + 1, closePos);\n var args = fluid.transform(body.split(\",\"), $.trim, fluid.coerceToPrimitive);\n var togo = fluid.upgradePrimitiveFunc(prefix, null);\n togo.args = args;\n return togo;\n }\n else if (type === \"expander\") {\n fluid.fail(\"Badly-formed compact expander record without parentheses: \" + string);\n }\n return string;\n };\n\n fluid.expandPrefix = \"@expand:\";\n\n fluid.expandCompactString = function (string, active) {\n var rec = string;\n if (string.indexOf(fluid.expandPrefix) === 0) {\n var rem = string.substring(fluid.expandPrefix.length);\n rec = {\n expander: fluid.compactStringToRec(rem, \"expander\")\n };\n }\n else if (active) {\n rec = fluid.compactStringToRec(string, active);\n }\n return rec;\n };\n\n var singularPenRecord = {\n listeners: \"listener\",\n modelListeners: \"modelListener\"\n };\n\n var singularRecord = $.extend({\n invokers: \"invoker\"\n }, singularPenRecord);\n\n fluid.expandCompactRec = function (segs, target, source) {\n fluid.guardCircularExpansion(segs, segs.length);\n var pen = segs.length > 0 ? segs[segs.length - 1] : \"\";\n var active = singularRecord[pen];\n if (!active && segs.length > 1) {\n active = singularPenRecord[segs[segs.length - 2]]; // support array of listeners and modelListeners\n }\n fluid.each(source, function (value, key) {\n if (fluid.isPlainObject(value)) {\n target[key] = fluid.freshContainer(value);\n segs.push(key);\n fluid.expandCompactRec(segs, target[key], value);\n segs.pop();\n return;\n }\n else if (typeof(value) === \"string\") {\n value = fluid.expandCompactString(value, active);\n }\n target[key] = value;\n });\n };\n\n fluid.expandCompact = function (options) {\n var togo = {};\n fluid.expandCompactRec([], togo, options);\n return togo;\n };\n\n /** End compact record expansion machinery **/\n\n fluid.extractEL = function (string, options) {\n if (options.ELstyle === \"ALL\") {\n return string;\n }\n else if (options.ELstyle.length === 1) {\n if (string.charAt(0) === options.ELstyle) {\n return string.substring(1);\n }\n }\n else if (options.ELstyle === \"${}\") {\n var i1 = string.indexOf(\"${\");\n var i2 = string.lastIndexOf(\"}\");\n if (i1 === 0 && i2 !== -1) {\n return string.substring(2, i2);\n }\n }\n };\n\n fluid.extractELWithContext = function (string, options) {\n var EL = fluid.extractEL(string, options);\n if (fluid.isIoCReference(EL)) {\n return fluid.parseContextReference(EL);\n }\n return EL ? {path: EL} : EL;\n };\n\n /** Parse the string form of a contextualised IoC reference into an object.\n * @param reference {String} The reference to be parsed. The character at position `index` is assumed to be `{`\n * @param index {String} [optional] The index into the string to start parsing at, if omitted, defaults to 0\n * @param delimiter {Character} [optional] A character which will delimit the end of the context expression. If omitted, the expression continues to the end of the string.\n * @return {ParsedContext} A structure holding the parsed structure, with members\n * context {String|ParsedContext} The context portion of the reference. This will be a `string` for a flat reference, or a further `ParsedContext` for a recursive reference\n * path {String} The string portion of the reference\n * endpos {Integer} The position in the string where parsing stopped [this member is not supported and will be removed in a future release]\n */\n fluid.parseContextReference = function (reference, index, delimiter) {\n index = index || 0;\n var isNested = reference.charAt(index + 1) === \"{\", endcpos, context, nested;\n if (isNested) {\n nested = fluid.parseContextReference(reference, index + 1, \"}\");\n endcpos = nested.endpos;\n } else {\n endcpos = reference.indexOf(\"}\", index + 1);\n }\n if (endcpos === -1) {\n fluid.fail(\"Cannot parse context reference \\\"\" + reference + \"\\\": Malformed context reference without }\");\n }\n if (isNested) {\n context = nested;\n } else {\n context = reference.substring(index + 1, endcpos);\n }\n var endpos = delimiter ? reference.indexOf(delimiter, endcpos + 1) : reference.length;\n var path = reference.substring(endcpos + 1, endpos);\n if (path.charAt(0) === \".\") {\n path = path.substring(1);\n }\n return {context: context, path: path, endpos: endpos};\n };\n\n fluid.renderContextReference = function (parsed) {\n var context = parsed.context;\n return \"{\" + (typeof(context) === \"string\" ? context : fluid.renderContextReference(context)) + \"}\" + (parsed.path ? \".\" + parsed.path : \"\");\n };\n\n // TODO: Once we eliminate expandSource (in favour of fluid.expander.fetch), all of this tree of functions can be hived off to RendererUtilities\n fluid.resolveContextValue = function (string, options) {\n function fetch(parsed) {\n fluid.pushActivity(\"resolveContextValue\", \"resolving context value %parsed\", {parsed: parsed});\n var togo = options.fetcher(parsed);\n fluid.pushActivity(\"resolvedContextValue\", \"resolved value %parsed to value %value\", {parsed: parsed, value: togo});\n fluid.popActivity(2);\n return togo;\n }\n var parsed;\n if (options.bareContextRefs && fluid.isIoCReference(string)) {\n parsed = fluid.parseContextReference(string);\n return fetch(parsed);\n }\n else if (options.ELstyle && options.ELstyle !== \"${}\") {\n parsed = fluid.extractELWithContext(string, options);\n if (parsed) {\n return fetch(parsed);\n }\n }\n while (typeof(string) === \"string\") {\n var i1 = string.indexOf(\"${\");\n var i2 = string.indexOf(\"}\", i1 + 2);\n if (i1 !== -1 && i2 !== -1) {\n if (string.charAt(i1 + 2) === \"{\") {\n parsed = fluid.parseContextReference(string, i1 + 2, \"}\");\n i2 = parsed.endpos;\n }\n else {\n parsed = {path: string.substring(i1 + 2, i2)};\n }\n var subs = fetch(parsed);\n var all = (i1 === 0 && i2 === string.length - 1);\n // TODO: test case for all undefined substitution\n if (subs === undefined || subs === null) {\n return subs;\n }\n string = all ? subs : string.substring(0, i1) + subs + string.substring(i2 + 1);\n }\n else {\n break;\n }\n }\n return string;\n };\n\n // This function appears somewhat reusable, but not entirely - it probably needs to be packaged\n // along with the particular \"strategy\". Very similar to the old \"filter\"... the \"outer driver\" needs\n // to execute it to get the first recursion going at top level. This was one of the most odd results\n // of the reorganisation, since the \"old work\" seemed much more naturally expressed in terms of values\n // and what happened to them. The \"new work\" is expressed in terms of paths and how to move amongst them.\n fluid.fetchExpandChildren = function (target, i, segs, source, mergePolicy, options) {\n if (source.expander) { // possible expander at top level\n var expanded = fluid.expandExpander(target, source, options);\n if (fluid.isPrimitive(expanded) || !fluid.isPlainObject(expanded) || (fluid.isArrayable(expanded) ^ fluid.isArrayable(target))) {\n return expanded;\n }\n else { // make an attempt to preserve the root reference if possible\n $.extend(true, target, expanded);\n }\n }\n // NOTE! This expects that RHS is concrete! For material input to \"expansion\" this happens to be the case, but is not\n // true for other algorithms. Inconsistently, this algorithm uses \"sourceStrategy\" below. In fact, this \"fetchChildren\"\n // operation looks like it is a fundamental primitive of the system. We do call \"deliverer\" early which enables correct\n // reference to parent nodes up the tree - however, anyone processing a tree IN THE CHAIN requires that it is produced\n // concretely at the point STRATEGY returns. Which in fact it is...............\n fluid.each(source, function (newSource, key) {\n if (newSource === undefined) {\n target[key] = undefined; // avoid ever dispatching to ourselves with undefined source\n }\n else if (key !== \"expander\") {\n segs[i] = key;\n if (fluid.getImmediate(options.exceptions, segs, i) !== true) {\n options.strategy(target, key, i + 1, segs, source, mergePolicy);\n }\n }\n });\n return target;\n };\n\n // TODO: This method is unnecessary and will quadratic inefficiency if RHS block is not concrete.\n // The driver should detect \"homogeneous uni-strategy trundling\" and agree to preserve the extra\n // \"cursor arguments\" which should be advertised somehow (at least their number)\n function regenerateCursor(source, segs, limit, sourceStrategy) {\n for (var i = 0; i < limit; ++i) {\n // copy segs to avoid aliasing with FLUID-5243\n source = sourceStrategy(source, segs[i], i, fluid.makeArray(segs));\n }\n return source;\n }\n\n fluid.isUnexpandable = function (source) { // slightly more efficient compound of fluid.isCopyable and fluid.isComponent - review performance\n return fluid.isPrimitive(source) || !fluid.isPlainObject(source);\n };\n\n fluid.expandSource = function (options, target, i, segs, deliverer, source, policy, recurse) {\n var expanded, isTrunk;\n var thisPolicy = fluid.derefMergePolicy(policy);\n if (typeof (source) === \"string\" && !thisPolicy.noexpand) {\n if (!options.defaultEL || source.charAt(0) === \"{\") { // hard-code this for performance\n fluid.pushActivity(\"expandContextValue\", \"expanding context value %source held at path %path\", {source: source, path: fluid.path.apply(null, segs.slice(0, i))});\n expanded = fluid.resolveContextValue(source, options);\n fluid.popActivity(1);\n } else {\n expanded = source;\n }\n }\n else if (thisPolicy.noexpand || fluid.isUnexpandable(source)) {\n expanded = source;\n }\n else if (source.expander) {\n expanded = fluid.expandExpander(deliverer, source, options);\n }\n else {\n expanded = fluid.freshContainer(source);\n isTrunk = true;\n }\n if (expanded !== fluid.NO_VALUE) {\n deliverer(expanded);\n }\n if (isTrunk) {\n recurse(expanded, source, i, segs, policy);\n }\n return expanded;\n };\n\n fluid.guardCircularExpansion = function (segs, i) {\n if (i > fluid.strategyRecursionBailout) {\n fluid.fail(\"Overflow/circularity in options expansion, current path is \", segs, \" at depth \" , i, \" - please ensure options are not circularly connected, or protect from expansion using the \\\"noexpand\\\" policy or expander\");\n }\n };\n\n fluid.makeExpandStrategy = function (options) {\n var recurse = function (target, source, i, segs, policy) {\n return fluid.fetchExpandChildren(target, i || 0, segs || [], source, policy, options);\n };\n var strategy = function (target, name, i, segs, source, policy) {\n fluid.guardCircularExpansion(segs, i);\n if (!target) {\n return;\n }\n if (target.hasOwnProperty(name)) { // bail out if our work has already been done\n return target[name];\n }\n if (source === undefined) { // recover our state in case this is an external entry point\n source = regenerateCursor(options.source, segs, i - 1, options.sourceStrategy);\n policy = regenerateCursor(options.mergePolicy, segs, i - 1, fluid.concreteTrundler);\n }\n var thisSource = options.sourceStrategy(source, name, i, segs);\n var thisPolicy = fluid.concreteTrundler(policy, name);\n function deliverer(value) {\n target[name] = value;\n }\n return fluid.expandSource(options, target, i, segs, deliverer, thisSource, thisPolicy, recurse);\n };\n options.recurse = recurse;\n options.strategy = strategy;\n return strategy;\n };\n\n fluid.defaults(\"fluid.makeExpandOptions\", {\n ELstyle: \"${}\",\n bareContextRefs: true,\n target: fluid.inCreationMarker\n });\n\n fluid.makeExpandOptions = function (source, options) {\n options = $.extend({}, fluid.rawDefaults(\"fluid.makeExpandOptions\"), options);\n options.defaultEL = options.ELStyle === \"${}\" && options.bareContextRefs; // optimisation to help expander\n options.expandSource = function (source) {\n return fluid.expandSource(options, null, 0, [], fluid.identity, source, options.mergePolicy, false);\n };\n if (!fluid.isUnexpandable(source)) {\n options.source = source;\n options.target = fluid.freshContainer(source);\n options.sourceStrategy = options.sourceStrategy || fluid.concreteTrundler;\n fluid.makeExpandStrategy(options);\n options.initter = function () {\n options.target = fluid.fetchExpandChildren(options.target, 0, [], options.source, options.mergePolicy, options);\n };\n }\n else { // these init immediately since we must deliver a valid root target\n options.strategy = fluid.concreteTrundler;\n options.initter = fluid.identity;\n if (typeof(source) === \"string\") {\n options.target = options.expandSource(source);\n }\n else {\n options.target = source;\n }\n }\n return options;\n };\n\n // supported, PUBLIC API function\n fluid.expand = function (source, options) {\n var expandOptions = fluid.makeExpandOptions(source, options);\n expandOptions.initter();\n return expandOptions.target;\n };\n\n fluid.preExpandRecurse = function (root, source, holder, member, rootSegs) { // on entry, holder[member] = source\n fluid.guardCircularExpansion(rootSegs, rootSegs.length);\n function pushExpander(expander) {\n root.expanders.push({expander: expander, holder: holder, member: member});\n delete holder[member];\n }\n if (fluid.isIoCReference(source)) {\n var parsed = fluid.parseContextReference(source);\n var segs = fluid.model.parseEL(parsed.path);\n pushExpander({\n typeFunc: fluid.expander.fetch,\n context: parsed.context,\n segs: segs\n });\n } else if (fluid.isPlainObject(source)) {\n if (source.expander) {\n source.expander.typeFunc = fluid.getGlobalValue(source.expander.type || \"fluid.invokeFunc\");\n pushExpander(source.expander);\n } else {\n fluid.each(source, function (value, key) {\n rootSegs.push(key);\n fluid.preExpandRecurse(root, value, source, key, rootSegs);\n rootSegs.pop();\n });\n }\n }\n };\n\n fluid.preExpand = function (source) {\n var root = {\n expanders: [],\n source: fluid.isUnexpandable(source) ? source : fluid.copy(source)\n };\n fluid.preExpandRecurse(root, root.source, root, \"source\", []);\n return root;\n };\n\n // Main pathway for freestanding material that is not part of a component's options\n fluid.expandImmediate = function (source, that, localRecord) {\n var options = fluid.makeStackResolverOptions(that, localRecord, true); // TODO: ELstyle and target are now ignored\n var root = fluid.preExpand(source);\n fluid.expandImmediateImpl(root, options);\n return root.source;\n };\n\n // High performance expander for situations such as invokers, listeners, where raw materials can be cached - consumes \"root\" structure produced by preExpand\n fluid.expandImmediateImpl = function (root, options) {\n var expanders = root.expanders;\n for (var i = 0; i < expanders.length; ++i) {\n var expander = expanders[i];\n expander.holder[expander.member] = expander.expander.typeFunc(null, expander, options);\n }\n };\n\n fluid.expandExpander = function (deliverer, source, options) {\n var expander = fluid.getGlobalValue(source.expander.type || \"fluid.invokeFunc\");\n if (!expander) {\n fluid.fail(\"Unknown expander with type \" + source.expander.type);\n }\n return expander(deliverer, source, options);\n };\n\n fluid.registerNamespace(\"fluid.expander\");\n\n // \"deliverer\" is null in the new (fast) pathway, this is a relic of the old \"source expander\" signature. It appears we can already globally remove this\n fluid.expander.fetch = function (deliverer, source, options) {\n var localRecord = options.localRecord, context = source.expander.context, segs = source.expander.segs;\n // TODO: Either type-check on context as string or else create fetchSlow\n var inLocal = localRecord[context] !== undefined;\n var contextStatus = options.contextThat.lifecycleStatus;\n // somewhat hack to anticipate \"fits\" for FLUID-4925 - we assume that if THIS component is in construction, its reference target might be too\n // if context is destroyed, we are most likely in an afterDestroy listener and so path records have been destroyed\n var fast = contextStatus === \"treeConstructed\" || contextStatus === \"destroyed\";\n var component = inLocal ? localRecord[context] : fluid.resolveContext(context, options.contextThat, fast);\n if (component) {\n var root = component;\n if (inLocal || component.lifecycleStatus !== \"constructing\") {\n for (var i = 0; i < segs.length; ++i) { // fast resolution of paths when no ginger process active\n root = root ? root[segs[i]] : undefined;\n }\n } else {\n root = fluid.getForComponent(component, segs);\n }\n if (root === undefined && !inLocal) { // last-ditch attempt to get exotic EL value from component\n root = fluid.getForComponent(component, segs);\n }\n return root;\n } else if (segs.length > 0) {\n fluid.triggerMismatchedPathError(source.expander, options.contextThat);\n }\n };\n\n /** \"light\" expanders, starting with the default expander invokeFunc,\n which makes an arbitrary function call (after expanding arguments) and are then replaced in\n the configuration with the call results. These will probably be abolished and replaced with\n equivalent model transformation machinery **/\n\n // This one is now positioned as the \"universal expander\" - default if no type supplied\n fluid.invokeFunc = function (deliverer, source, options) {\n var expander = source.expander;\n var args = fluid.makeArray(expander.args);\n expander.args = args; // head off case where args is an EL reference which resolves to an array\n if (options.recurse) { // only available in the path from fluid.expandOptions - this will be abolished in the end\n args = options.recurse([], args);\n } else {\n expander = fluid.expandImmediate(expander, options.contextThat, options.localRecord);\n args = expander.args;\n }\n var funcEntry = expander.func || expander.funcName;\n var func = (options.expandSource ? options.expandSource(funcEntry) : funcEntry) || fluid.recordToApplicable(expander, options.contextThat);\n if (typeof(func) === \"string\") {\n func = fluid.getGlobalValue(func);\n }\n if (!func) {\n fluid.fail(\"Error in expander record \", expander, \": \" + funcEntry + \" could not be resolved to a function for component \", options.contextThat);\n }\n return func.apply(null, args);\n };\n\n // The \"noexpand\" expander which simply unwraps one level of expansion and ceases.\n fluid.noexpand = function (deliverer, source) {\n return source.expander.value ? source.expander.value : source.expander.tree;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2010 University of Cambridge\nCopyright 2008-2009 University of Toronto\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2010-2014 OCAD University\nCopyright 2012-2014 Raising the Floor - US\nCopyright 2014-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /** NOTE: The contents of this file are by default NOT PART OF THE PUBLIC FLUID API unless explicitly annotated before the function **/\n\n /** MODEL ACCESSOR ENGINE **/\n\n /** Standard strategies for resolving path segments **/\n\n fluid.model.makeEnvironmentStrategy = function (environment) {\n return function (root, segment, index) {\n return index === 0 && environment[segment] ?\n environment[segment] : undefined;\n };\n };\n\n fluid.model.defaultCreatorStrategy = function (root, segment) {\n if (root[segment] === undefined) {\n root[segment] = {};\n return root[segment];\n }\n };\n\n fluid.model.defaultFetchStrategy = function (root, segment) {\n return root[segment];\n };\n\n fluid.model.funcResolverStrategy = function (root, segment) {\n if (root.resolvePathSegment) {\n return root.resolvePathSegment(segment);\n }\n };\n\n fluid.model.traverseWithStrategy = function (root, segs, initPos, config, uncess) {\n var strategies = config.strategies;\n var limit = segs.length - uncess;\n for (var i = initPos; i < limit; ++i) {\n if (!root) {\n return root;\n }\n var accepted;\n for (var j = 0; j < strategies.length; ++j) {\n accepted = strategies[j](root, segs[i], i + 1, segs);\n if (accepted !== undefined) {\n break; // May now short-circuit with stateless strategies\n }\n }\n if (accepted === fluid.NO_VALUE) {\n accepted = undefined;\n }\n root = accepted;\n }\n return root;\n };\n\n /** Returns both the value and the path of the value held at the supplied EL path **/\n fluid.model.getValueAndSegments = function (root, EL, config, initSegs) {\n return fluid.model.accessWithStrategy(root, EL, fluid.NO_VALUE, config, initSegs, true);\n };\n\n // Very lightweight remnant of trundler, only used in resolvers\n fluid.model.makeTrundler = function (config) {\n return function (valueSeg, EL) {\n return fluid.model.getValueAndSegments(valueSeg.root, EL, config, valueSeg.segs);\n };\n };\n\n fluid.model.getWithStrategy = function (root, EL, config, initSegs) {\n return fluid.model.accessWithStrategy(root, EL, fluid.NO_VALUE, config, initSegs);\n };\n\n fluid.model.setWithStrategy = function (root, EL, newValue, config, initSegs) {\n fluid.model.accessWithStrategy(root, EL, newValue, config, initSegs);\n };\n\n fluid.model.accessWithStrategy = function (root, EL, newValue, config, initSegs, returnSegs) {\n // This function is written in this unfortunate style largely for efficiency reasons. In many cases\n // it should be capable of running with 0 allocations (EL is preparsed, initSegs is empty)\n if (!fluid.isPrimitive(EL) && !fluid.isArrayable(EL)) {\n var key = EL.type || \"default\";\n var resolver = config.resolvers[key];\n if (!resolver) {\n fluid.fail(\"Unable to find resolver of type \" + key);\n }\n var trundler = fluid.model.makeTrundler(config); // very lightweight trundler for resolvers\n var valueSeg = {root: root, segs: initSegs};\n valueSeg = resolver(valueSeg, EL, trundler);\n if (EL.path && valueSeg) { // every resolver supports this piece of output resolution\n valueSeg = trundler(valueSeg, EL.path);\n }\n return returnSegs ? valueSeg : (valueSeg ? valueSeg.root : undefined);\n }\n else {\n return fluid.model.accessImpl(root, EL, newValue, config, initSegs, returnSegs, fluid.model.traverseWithStrategy);\n }\n };\n\n // Implementation notes: The EL path manipulation utilities here are equivalents of the simpler ones\n // that are provided in Fluid.js and elsewhere - they apply escaping rules to parse characters .\n // as \\. and \\ as \\\\ - allowing us to process member names containing periods. These versions are mostly\n // in use within model machinery, whereas the cheaper versions based on String.split(\".\") are mostly used\n // within the IoC machinery.\n // Performance testing in early 2015 suggests that modern browsers now allow these to execute slightly faster\n // than the equivalent machinery written using complex regexps - therefore they will continue to be maintained\n // here. However, there is still a significant performance gap with respect to the performance of String.split(\".\")\n // especially on Chrome, so we will continue to insist that component member names do not contain a \".\" character\n // for the time being.\n // See http://jsperf.com/parsing-escaped-el for some experiments\n\n fluid.registerNamespace(\"fluid.pathUtil\");\n\n fluid.pathUtil.getPathSegmentImpl = function (accept, path, i) {\n var segment = null;\n if (accept) {\n segment = \"\";\n }\n var escaped = false;\n var limit = path.length;\n for (; i < limit; ++i) {\n var c = path.charAt(i);\n if (!escaped) {\n if (c === \".\") {\n break;\n }\n else if (c === \"\\\\\") {\n escaped = true;\n }\n else if (segment !== null) {\n segment += c;\n }\n }\n else {\n escaped = false;\n if (segment !== null) {\n segment += c;\n }\n }\n }\n if (segment !== null) {\n accept[0] = segment;\n }\n return i;\n };\n\n var globalAccept = []; // TODO: reentrancy risk here. This holder is here to allow parseEL to make two returns without an allocation.\n\n /** A version of fluid.model.parseEL that apples escaping rules - this allows path segments\n * to contain period characters . - characters \"\\\" and \"}\" will also be escaped. WARNING -\n * this current implementation is EXTREMELY slow compared to fluid.model.parseEL and should\n * not be used in performance-sensitive applications */\n // supported, PUBLIC API function\n fluid.pathUtil.parseEL = function (path) {\n var togo = [];\n var index = 0;\n var limit = path.length;\n while (index < limit) {\n var firstdot = fluid.pathUtil.getPathSegmentImpl(globalAccept, path, index);\n togo.push(globalAccept[0]);\n index = firstdot + 1;\n }\n return togo;\n };\n\n // supported, PUBLIC API function\n fluid.pathUtil.composeSegment = function (prefix, toappend) {\n toappend = toappend.toString();\n for (var i = 0; i < toappend.length; ++i) {\n var c = toappend.charAt(i);\n if (c === \".\" || c === \"\\\\\" || c === \"}\") {\n prefix += \"\\\\\";\n }\n prefix += c;\n }\n return prefix;\n };\n\n /** Escapes a single path segment by replacing any character \".\", \"\\\" or \"}\" with\n * itself prepended by \\\n */\n // supported, PUBLIC API function\n fluid.pathUtil.escapeSegment = function (segment) {\n return fluid.pathUtil.composeSegment(\"\", segment);\n };\n\n /**\n * Compose a prefix and suffix EL path, where the prefix is already escaped.\n * Prefix may be empty, but not null. The suffix will become escaped.\n */\n // supported, PUBLIC API function\n fluid.pathUtil.composePath = function (prefix, suffix) {\n if (prefix.length !== 0) {\n prefix += \".\";\n }\n return fluid.pathUtil.composeSegment(prefix, suffix);\n };\n\n /**\n * Compose a set of path segments supplied as arguments into an escaped EL expression. Escaped version\n * of fluid.model.composeSegments\n */\n\n // supported, PUBLIC API function\n fluid.pathUtil.composeSegments = function () {\n var path = \"\";\n for (var i = 0; i < arguments.length; ++i) {\n path = fluid.pathUtil.composePath(path, arguments[i]);\n }\n return path;\n };\n\n /** Helpful utility for use in resolvers - matches a path which has already been\n * parsed into segments **/\n\n fluid.pathUtil.matchSegments = function (toMatch, segs, start, end) {\n if (end - start !== toMatch.length) {\n return false;\n }\n for (var i = start; i < end; ++i) {\n if (segs[i] !== toMatch[i - start]) {\n return false;\n }\n }\n return true;\n };\n\n fluid.model.unescapedParser = {\n parse: fluid.model.parseEL,\n compose: fluid.model.composeSegments\n };\n\n // supported, PUBLIC API record\n fluid.model.defaultGetConfig = {\n parser: fluid.model.unescapedParser,\n strategies: [fluid.model.funcResolverStrategy, fluid.model.defaultFetchStrategy]\n };\n\n // supported, PUBLIC API record\n fluid.model.defaultSetConfig = {\n parser: fluid.model.unescapedParser,\n strategies: [fluid.model.funcResolverStrategy, fluid.model.defaultFetchStrategy, fluid.model.defaultCreatorStrategy]\n };\n\n fluid.model.escapedParser = {\n parse: fluid.pathUtil.parseEL,\n compose: fluid.pathUtil.composeSegments\n };\n\n // supported, PUBLIC API record\n fluid.model.escapedGetConfig = {\n parser: fluid.model.escapedParser,\n strategies: [fluid.model.defaultFetchStrategy]\n };\n\n // supported, PUBLIC API record\n fluid.model.escapedSetConfig = {\n parser: fluid.model.escapedParser,\n strategies: [fluid.model.defaultFetchStrategy, fluid.model.defaultCreatorStrategy]\n };\n\n /** MODEL COMPONENT HIERARCHY AND RELAY SYSTEM **/\n\n fluid.initRelayModel = function (that) {\n fluid.deenlistModelComponent(that);\n return that.model;\n };\n\n // TODO: This utility compensates for our lack of control over \"wave of explosions\" initialisation - we may\n // catch a model when it is apparently \"completely initialised\" and that's the best we can do, since we have\n // missed its own initial transaction\n\n fluid.isModelComplete = function (that) {\n return \"model\" in that && that.model !== fluid.inEvaluationMarker;\n };\n\n // Enlist this model component as part of the \"initial transaction\" wave - note that \"special transaction\" init\n // is indexed by component, not by applier, and has special record type (complete + initModel), not transaction\n fluid.enlistModelComponent = function (that) {\n var instantiator = fluid.getInstantiator(that);\n var enlist = instantiator.modelTransactions.init[that.id];\n if (!enlist) {\n enlist = {\n that: that,\n applier: fluid.getForComponent(that, \"applier\"), // required for FLUID-5504 even though currently unused\n complete: fluid.isModelComplete(that)\n };\n instantiator.modelTransactions.init[that.id] = enlist;\n }\n return enlist;\n };\n\n fluid.clearTransactions = function () {\n var instantiator = fluid.globalInstantiator;\n fluid.clear(instantiator.modelTransactions);\n instantiator.modelTransactions.init = {};\n };\n\n fluid.failureEvent.addListener(fluid.clearTransactions, \"clearTransactions\", \"before:fail\");\n\n // Utility to coordinate with our crude \"oscillation prevention system\" which limits each link to 2 updates (presumably\n // in opposite directions). In the case of the initial transaction, we need to reset the count given that genuine\n // changes are arising in the system with each new enlisted model. TODO: if we ever get users operating their own\n // transactions, think of a way to incorporate this into that workflow\n fluid.clearLinkCounts = function (transRec, relaysAlso) {\n // TODO: Separate this record out into different types of records (relays are already in their own area)\n fluid.each(transRec, function (value, key) {\n if (typeof(value) === \"number\") {\n transRec[key] = 0;\n } else if (relaysAlso && value.options && typeof(value.relayCount) === \"number\") {\n value.relayCount = 0;\n }\n });\n };\n\n fluid.sortCompleteLast = function (reca, recb) {\n return (reca.completeOnInit ? 1 : 0) - (recb.completeOnInit ? 1 : 0);\n };\n\n // Operate all coordinated transactions by bringing models to their respective initial values, and then commit them all\n fluid.operateInitialTransaction = function (that, mrec) {\n var transId = fluid.allocateGuid();\n var transRec = fluid.getModelTransactionRec(that, transId);\n var transac;\n var transacs = fluid.transform(mrec, function (recel) {\n transac = recel.that.applier.initiate(null, \"init\", transId);\n transRec[recel.that.applier.applierId] = {transaction: transac};\n return transac;\n });\n // TODO: This sort has very little effect in any current test (can be replaced by no-op - see FLUID-5339) - but\n // at least can't be performed in reverse order (\"FLUID-3674 event coordination test\" will fail) - need more cases\n var recs = fluid.values(mrec).sort(fluid.sortCompleteLast);\n fluid.each(recs, function (recel) {\n var that = recel.that;\n var transac = transacs[that.id];\n if (recel.completeOnInit) {\n fluid.initModelEvent(that, that.applier, transac, that.applier.listeners.sortedListeners);\n } else {\n fluid.each(recel.initModels, function (initModel) {\n transac.fireChangeRequest({type: \"ADD\", segs: [], value: initModel});\n fluid.clearLinkCounts(transRec, true);\n });\n }\n var shadow = fluid.shadowForComponent(that);\n if (shadow) { // Fix for FLUID-5869 - the component may have been destroyed during its own init transaction\n shadow.modelComplete = true; // technically this is a little early, but this flag is only read in fluid.connectModelRelay\n }\n });\n\n transac.commit(); // committing one representative transaction will commit them all\n };\n\n // This modelComponent has now concluded initialisation - commit its initialisation transaction if it is the last such in the wave\n fluid.deenlistModelComponent = function (that) {\n var instantiator = fluid.getInstantiator(that);\n var mrec = instantiator.modelTransactions.init;\n if (!mrec[that.id]) { // avoid double evaluation through currently hacked \"members\" implementation\n return;\n }\n that.model = undefined; // Abuse of the ginger system - in fact it is \"currently in evaluation\" - we need to return a proper initial model value even if no init occurred yet\n mrec[that.id].complete = true; // flag means - \"complete as in ready to participate in this transaction\"\n var incomplete = fluid.find_if(mrec, function (recel) {\n return recel.complete !== true;\n });\n if (!incomplete) {\n fluid.operateInitialTransaction(that, mrec);\n // NB: Don't call fluid.concludeTransaction since \"init\" is not a standard record - this occurs in commitRelays for the corresponding genuine record as usual\n instantiator.modelTransactions.init = {};\n }\n };\n\n fluid.parseModelReference = function (that, ref) {\n var parsed = fluid.parseContextReference(ref);\n parsed.segs = that.applier.parseEL(parsed.path);\n return parsed;\n };\n\n /** Given a string which may represent a reference into a model, parses it into a structure holding the coordinates for resolving the reference. It specially\n * detects \"references into model material\" by looking for the first path segment in the path reference which holds the value \"model\". Some of its workflow is bypassed\n * in the special case of a reference representing an implicit model relay. In this case, ref will definitely be a String, and if it does not refer to model material, rather than\n * raising an error, the return structure will include a field <code>nonModel: true</code>\n * @param that {Component} The component holding the reference\n * @param name {String} A human-readable string representing the type of block holding the reference - e.g. \"modelListeners\"\n * @param ref {String|ModelReference} The model reference to be parsed. This may have already been partially parsed at the original site - that is, a ModelReference is a\n * structure containing\n * segs: {Array of String} An array of model path segments to be dereferenced in the target component (will become `modelSegs` in the final return)\n * context: {String} An IoC reference to the component holding the model\n * @param implicitRelay {Boolean} <code>true</code> if the reference was being resolved for an implicit model relay - that is,\n * whether it occured within the `model` block itself. In this case, references to non-model material are not a failure and will simply be resolved\n * (by the caller) onto their targets (as constants). Otherwise, this function will issue a failure on discovering a reference to non-model material.\n * @return A structure holding:\n * that {Component} The component whose model is the target of the reference. This may end up being constructed as part of the act of resolving the reference\n * applier {Component} The changeApplier for the component <code>that</code>. This may end up being constructed as part of the act of resolving the reference\n * modelSegs {Array of String} An array of path segments into the model of the component\n * path {String} the value of <code>modelSegs</code> encoded as an EL path (remove client uses of this in time)\n * nonModel {Boolean} Set if <code>implicitRelay</code> was true and the reference was not into a model (modelSegs/path will not be set in this case)\n * segs {Array of String} Holds the full array of path segments found by parsing the original reference - only useful in <code>nonModel</code> case\n */\n fluid.parseValidModelReference = function (that, name, ref, implicitRelay) {\n var reject = function (message) {\n fluid.fail(\"Error in \" + name + \": \", ref, message);\n };\n var parsed; // resolve ref into context and modelSegs\n if (typeof(ref) === \"string\") {\n if (fluid.isIoCReference(ref)) {\n parsed = fluid.parseModelReference(that, ref);\n var modelPoint = parsed.segs.indexOf(\"model\");\n if (modelPoint === -1) {\n if (implicitRelay) {\n parsed.nonModel = true;\n } else {\n reject(\" must be a reference into a component model via a path including the segment \\\"model\\\"\");\n }\n } else {\n parsed.modelSegs = parsed.segs.slice(modelPoint + 1);\n parsed.contextSegs = parsed.segs.slice(0, modelPoint);\n delete parsed.path;\n }\n\n } else {\n parsed = {\n path: ref,\n modelSegs: that.applier.parseEL(ref)\n };\n }\n } else {\n if (!fluid.isArrayable(ref.segs)) {\n reject(\" must contain an entry \\\"segs\\\" holding path segments referring a model path within a component\");\n }\n parsed = {\n context: ref.context,\n modelSegs: fluid.expandOptions(ref.segs, that)\n };\n }\n var target; // resolve target component, which defaults to \"that\"\n if (parsed.context) {\n target = fluid.resolveContext(parsed.context, that);\n if (!target) {\n reject(\" must be a reference to an existing component\");\n }\n if (parsed.contextSegs) {\n target = fluid.getForComponent(target, parsed.contextSegs);\n }\n } else {\n target = that;\n }\n if (!parsed.nonModel) {\n if (!target.applier) {\n fluid.getForComponent(target, [\"applier\"]);\n }\n if (!target.applier) {\n reject(\" must be a reference to a component with a ChangeApplier (descended from fluid.modelComponent)\");\n }\n }\n parsed.that = target;\n parsed.applier = target.applier;\n if (!parsed.path) { // ChangeToApplicable amongst others rely on this\n parsed.path = target.applier.composeSegments.apply(null, parsed.modelSegs);\n }\n return parsed;\n };\n\n // Gets global record for a particular transaction id, allocating if necessary - looks up applier id to transaction,\n // as well as looking up source id (linkId in below) to count/true\n // Through poor implementation quality, not every access passes through this function - some look up instantiator.modelTransactions directly\n fluid.getModelTransactionRec = function (that, transId) {\n var instantiator = fluid.getInstantiator(that);\n if (!transId) {\n fluid.fail(\"Cannot get transaction record without transaction id\");\n }\n if (!instantiator) {\n return null;\n }\n var transRec = instantiator.modelTransactions[transId];\n if (!transRec) {\n transRec = instantiator.modelTransactions[transId] = {\n relays: [], // sorted array of relay elements (also appear at top level index by transaction id)\n sources: {}, // hash of the global transaction sources (includes \"init\" but excludes \"relay\" and \"local\")\n externalChanges: {} // index by applierId to changePath to listener record\n };\n }\n return transRec;\n };\n\n fluid.recordChangeListener = function (component, applier, sourceListener, listenerId) {\n var shadow = fluid.shadowForComponent(component);\n fluid.recordListener(applier.modelChanged, sourceListener, shadow, listenerId);\n };\n\n fluid.registerRelayTransaction = function (transRec, targetApplier, transId, options, npOptions) {\n var newTrans = targetApplier.initiate(\"relay\", null, transId); // non-top-level transaction will defeat postCommit\n var transEl = transRec[targetApplier.applierId] = {transaction: newTrans, relayCount: 0, namespace: npOptions.namespace, priority: npOptions.priority, options: options};\n transEl.priority = fluid.parsePriority(transEl.priority, transRec.relays.length, false, \"model relay\");\n transRec.relays.push(transEl);\n return transEl;\n };\n\n // Configure this parameter to tweak the number of relays the model will attempt per transaction before bailing out with an error\n fluid.relayRecursionBailout = 100;\n\n // Used with various arg combinations from different sources. For standard \"implicit relay\" or fully lensed relay,\n // the first 4 args will be set, and \"options\" will be empty\n\n // For a model-dependent relay, this will be used in two halves - firstly, all of the model\n // sources will bind to the relay transform document itself. In this case the argument \"targetApplier\" within \"options\" will be set.\n // In this case, the component known as \"target\" is really the source - it is a component reference discovered by parsing the\n // relay document.\n\n // Secondly, the relay itself will schedule an invalidation (as if receiving change to \"*\" of its source - which may in most\n // cases actually be empty) and play through its transducer. \"Source\" component itself is never empty, since it is used for listener\n // degistration on destruction (check this is correct for external model relay). However, \"sourceSegs\" may be empty in the case\n // there is no \"source\" component registered for the link. This change is played in a \"half-transactional\" way - that is, we wait\n // for all other changes in the system to settle before playing the relay document, in order to minimise the chances of multiple\n // firing and corruption. This is done via the \"preCommit\" hook registered at top level in establishModelRelay. This listener\n // is transactional but it does not require the transaction to conclude in order to fire - it may be reused as many times as\n // required within the \"overall\" transaction whilst genuine (external) changes continue to arrive.\n\n // TODO: Vast overcomplication and generation of closure garbage. SURELY we should be able to convert this into an externalised, arg-ist form\n fluid.registerDirectChangeRelay = function (target, targetSegs, source, sourceSegs, linkId, transducer, options, npOptions) {\n var targetApplier = options.targetApplier || target.applier; // implies the target is a relay document\n var sourceApplier = options.sourceApplier || source.applier; // implies the source is a relay document - listener will be transactional\n var applierId = targetApplier.applierId;\n targetSegs = fluid.makeArray(targetSegs);\n sourceSegs = sourceSegs ? fluid.makeArray(sourceSegs) : sourceSegs; // take copies since originals will be trashed\n var sourceListener = function (newValue, oldValue, path, changeRequest, trans, applier) {\n var transId = trans.id;\n var transRec = fluid.getModelTransactionRec(target, transId);\n if (applier && trans && !transRec[applier.applierId]) { // don't trash existing record which may contain \"options\" (FLUID-5397)\n transRec[applier.applierId] = {transaction: trans}; // enlist the outer user's original transaction\n }\n var existing = transRec[applierId];\n transRec[linkId] = transRec[linkId] || 0;\n // Crude \"oscillation prevention\" system limits each link to maximum of 2 operations per cycle (presumably in opposite directions)\n var relay = true; // TODO: See FLUID-5303 - we currently disable this check entirely to solve FLUID-5293 - perhaps we might remove link counts entirely\n if (relay) {\n ++transRec[linkId];\n if (transRec[linkId] > fluid.relayRecursionBailout) {\n fluid.fail(\"Error in model relay specification at component \", target, \" - operated more than \" + fluid.relayRecursionBailout + \" relays without model value settling - current model contents are \", trans.newHolder.model);\n }\n if (!existing) {\n existing = fluid.registerRelayTransaction(transRec, targetApplier, transId, options, npOptions);\n }\n if (transducer && !options.targetApplier) {\n // TODO: This is just for safety but is still unusual and now abused. The transducer doesn't need the \"newValue\" since all the transform information\n // has been baked into the transform document itself. However, we now rely on this special signalling value to make sure we regenerate transforms in\n // the \"forwardAdapter\"\n transducer(existing.transaction, options.sourceApplier ? undefined : newValue, sourceSegs, targetSegs);\n } else if (newValue !== undefined) {\n existing.transaction.fireChangeRequest({type: \"ADD\", segs: targetSegs, value: newValue});\n }\n }\n };\n var spec;\n if (sourceSegs) {\n spec = sourceApplier.modelChanged.addListener({\n isRelay: true,\n segs: sourceSegs,\n transactional: options.transactional\n }, sourceListener);\n fluid.log(fluid.logLevel.TRACE, \"Adding relay listener with listenerId \" + spec.listenerId + \" to source applier with id \" +\n sourceApplier.applierId + \" from target applier with id \" + applierId + \" for target component with id \" + target.id);\n }\n if (source) { // TODO - we actually may require to register on THREE sources in the case modelRelay is attached to a\n // component which is neither source nor target. Note there will be problems if source, say, is destroyed and recreated,\n // and holder is not - relay will in that case be lost. Need to integrate relay expressions with IoCSS.\n fluid.recordChangeListener(source, sourceApplier, sourceListener, spec.listenerId);\n if (target !== source) {\n fluid.recordChangeListener(target, sourceApplier, sourceListener, spec.listenerId);\n }\n }\n };\n\n // When called during parsing a contextualised model relay document, these arguments are reversed - \"source\" refers to the\n // current component, and \"target\" refers successively to the various \"source\" components.\n // \"options\" will be transformPackage\n fluid.connectModelRelay = function (source, sourceSegs, target, targetSegs, options) {\n var linkId = fluid.allocateGuid();\n function enlistComponent(component) {\n var enlist = fluid.enlistModelComponent(component);\n\n if (enlist.complete) {\n var shadow = fluid.shadowForComponent(component);\n if (shadow.modelComplete) {\n enlist.completeOnInit = true;\n }\n }\n }\n enlistComponent(target);\n enlistComponent(source); // role of \"source\" and \"target\" may have been swapped in a modelRelay document\n var npOptions = fluid.filterKeys(options, [\"namespace\", \"priority\"]);\n\n if (options.update) { // it is a call via parseImplicitRelay for a relay document\n if (options.targetApplier) {\n // register changes from the model onto changes to the model relay document\n fluid.registerDirectChangeRelay(source, sourceSegs, target, targetSegs, linkId, null, {\n transactional: false,\n targetApplier: options.targetApplier,\n update: options.update\n }, npOptions);\n } else {\n // We are in the middle of parsing a contextualised relay, and this call has arrived via its parseImplicitRelay.\n // Rather than bind source-source, instead register the \"half-transactional\" listener which binds changes\n // from the relay itself onto the target\n fluid.registerDirectChangeRelay(target, targetSegs, source, [], linkId + \"-transform\", options.forwardAdapter, {transactional: true, sourceApplier: options.forwardApplier}, npOptions);\n }\n } else { // more efficient branch where relay is uncontextualised\n fluid.registerDirectChangeRelay(target, targetSegs, source, sourceSegs, linkId, options.forwardAdapter, {transactional: false}, npOptions);\n if (sourceSegs) {\n fluid.registerDirectChangeRelay(source, sourceSegs, target, targetSegs, linkId, options.backwardAdapter, {transactional: false}, npOptions);\n }\n }\n };\n\n fluid.parseSourceExclusionSpec = function (targetSpec, sourceSpec) {\n targetSpec.excludeSource = fluid.arrayToHash(fluid.makeArray(sourceSpec.excludeSource || (sourceSpec.includeSource ? \"*\" : undefined)));\n targetSpec.includeSource = fluid.arrayToHash(fluid.makeArray(sourceSpec.includeSource));\n return targetSpec;\n };\n\n fluid.isExcludedChangeSource = function (transaction, spec) {\n if (!spec || !spec.excludeSource) { // mergeModelListeners initModelEvent fabricates a fake spec that bypasses processing\n return false;\n }\n var excluded = spec.excludeSource[\"*\"];\n for (var source in transaction.fullSources) {\n if (spec.excludeSource[source]) {\n excluded = true;\n }\n if (spec.includeSource[source]) {\n excluded = false;\n }\n }\n return excluded;\n };\n\n fluid.model.guardedAdapter = function (transaction, cond, func, args) {\n if (!fluid.isExcludedChangeSource(transaction, cond)) {\n func.apply(null, args);\n }\n };\n\n // TODO: This rather crummy function is the only site with a hard use of \"path\" as String\n fluid.transformToAdapter = function (transform, targetPath) {\n var basedTransform = {};\n basedTransform[targetPath] = transform;\n return function (trans, newValue /*, sourceSegs, targetSegs */) {\n // TODO: More efficient model that can only run invalidated portion of transform (need to access changeMap of source transaction)\n fluid.model.transformWithRules(newValue, basedTransform, {finalApplier: trans});\n };\n };\n\n // TODO: sourcePath and targetPath should really be converted to segs to avoid excess work in parseValidModelReference\n fluid.makeTransformPackage = function (componentThat, transform, sourcePath, targetPath, forwardCond, backwardCond, namespace, priority) {\n var that = {\n forwardHolder: {model: transform},\n backwardHolder: {model: null}\n };\n that.generateAdapters = function (trans) {\n // can't commit \"half-transaction\" or events will fire - violate encapsulation in this way\n that.forwardAdapterImpl = fluid.transformToAdapter(trans ? trans.newHolder.model : that.forwardHolder.model, targetPath);\n if (sourcePath !== null) {\n that.backwardHolder.model = fluid.model.transform.invertConfiguration(transform);\n that.backwardAdapterImpl = fluid.transformToAdapter(that.backwardHolder.model, sourcePath);\n }\n };\n that.forwardAdapter = function (transaction, newValue) { // create a stable function reference for this possibly changing adapter\n if (newValue === undefined) {\n that.generateAdapters(); // TODO: Quick fix for incorrect scheduling of invalidation/transducing\n // \"it so happens\" that fluid.registerDirectChangeRelay invokes us with empty newValue in the case of invalidation -> transduction\n }\n fluid.model.guardedAdapter(transaction, forwardCond, that.forwardAdapterImpl, arguments);\n };\n // fired from fluid.model.updateRelays via invalidator event\n that.runTransform = function (trans) {\n trans.commit(); // this will reach the special \"half-transactional listener\" registered in fluid.connectModelRelay,\n // branch with options.targetApplier - by committing the transaction, we update the relay document in bulk and then cause\n // it to execute (via \"transducer\")\n trans.reset();\n };\n that.forwardApplier = fluid.makeHolderChangeApplier(that.forwardHolder);\n that.forwardApplier.isRelayApplier = true; // special annotation so these can be discovered in the transaction record\n that.invalidator = fluid.makeEventFirer({name: \"Invalidator for model relay with applier \" + that.forwardApplier.applierId});\n if (sourcePath !== null) {\n that.backwardApplier = fluid.makeHolderChangeApplier(that.backwardHolder);\n that.backwardAdapter = function (transaction) {\n fluid.model.guardedAdapter(transaction, backwardCond, that.backwardAdapterImpl, arguments);\n };\n }\n that.update = that.invalidator.fire; // necessary so that both routes to fluid.connectModelRelay from here hit the first branch\n var implicitOptions = {\n targetApplier: that.forwardApplier, // this special field identifies us to fluid.connectModelRelay\n update: that.update,\n namespace: namespace,\n priority: priority,\n refCount: 0\n };\n that.forwardHolder.model = fluid.parseImplicitRelay(componentThat, transform, [], implicitOptions);\n that.refCount = implicitOptions.refCount;\n that.namespace = namespace;\n that.priority = priority;\n that.generateAdapters();\n that.invalidator.addListener(that.generateAdapters);\n that.invalidator.addListener(that.runTransform);\n return that;\n };\n\n fluid.singleTransformToFull = function (singleTransform) {\n var withPath = $.extend(true, {inputPath: \"\"}, singleTransform);\n return {\n \"\": {\n transform: withPath\n }\n };\n };\n\n // Convert old-style \"relay conditions\" to source includes/excludes as used in model listeners\n fluid.model.relayConditions = {\n initOnly: {includeSource: \"init\"},\n liveOnly: {excludeSource: \"init\"},\n never: {includeSource: []},\n always: {}\n };\n\n fluid.model.parseRelayCondition = function (condition) {\n if (condition === \"initOnly\") {\n fluid.log(fluid.logLevel.WARN, \"The relay condition \\\"initOnly\\\" is deprecated: Please use the form 'includeSource: \\\"init\\\"' instead\");\n } else if (condition === \"liveOnly\") {\n fluid.log(fluid.logLevel.WARN, \"The relay condition \\\"initOnly\\\" is deprecated: Please use the form 'excludeSource: \\\"init\\\"' instead\");\n }\n var exclusionRec;\n if (!condition) {\n exclusionRec = {};\n } else if (typeof(condition) === \"string\") {\n exclusionRec = fluid.model.relayConditions[condition];\n if (!exclusionRec) {\n fluid.fail(\"Unrecognised model relay condition string \\\"\" + condition + \"\\\": the supported values are \\\"never\\\" or a record with members \\\"includeSource\\\" and/or \\\"excludeSource\\\"\");\n }\n } else {\n exclusionRec = condition;\n }\n return fluid.parseSourceExclusionSpec({}, exclusionRec);\n };\n\n fluid.parseModelRelay = function (that, mrrec, key) {\n var parsedSource = mrrec.source ? fluid.parseValidModelReference(that, \"modelRelay record member \\\"source\\\"\", mrrec.source) :\n {path: null, modelSegs: null};\n var parsedTarget = fluid.parseValidModelReference(that, \"modelRelay record member \\\"target\\\"\", mrrec.target);\n var namespace = mrrec.namespace || key;\n\n var transform = mrrec.singleTransform ? fluid.singleTransformToFull(mrrec.singleTransform) : mrrec.transform;\n if (!transform) {\n fluid.fail(\"Cannot parse modelRelay record without element \\\"singleTransform\\\" or \\\"transform\\\":\", mrrec);\n }\n var forwardCond = fluid.model.parseRelayCondition(mrrec.forward), backwardCond = fluid.model.parseRelayCondition(mrrec.backward);\n var transformPackage = fluid.makeTransformPackage(that, transform, parsedSource.path, parsedTarget.path, forwardCond, backwardCond, namespace, mrrec.priority);\n if (transformPackage.refCount === 0) { // There were no implicit relay elements found in the relay document - it can be relayed directly\n // This first call binds changes emitted from the relay ends to each other, synchronously\n fluid.connectModelRelay(parsedSource.that || that, parsedSource.modelSegs, parsedTarget.that, parsedTarget.modelSegs,\n fluid.filterKeys(transformPackage, [\"forwardAdapter\", \"backwardAdapter\", \"namespace\", \"priority\"]));\n // Primarily, here, we want to get rid of \"update\" which is what signals to connectModelRelay that this is a invalidatable relay\n } else {\n if (parsedSource.modelSegs) {\n fluid.fail(\"Error in model relay definition: If a relay transform has a model dependency, you can not specify a \\\"source\\\" entry - please instead enter this as \\\"input\\\" in the transform specification. Definition was \", mrrec, \" for component \", that);\n }\n // This second call binds changes emitted from the relay document itself onto the relay ends (using the \"half-transactional system\")\n fluid.connectModelRelay(parsedSource.that || that, parsedSource.modelSegs, parsedTarget.that, parsedTarget.modelSegs, transformPackage);\n }\n };\n\n fluid.parseImplicitRelay = function (that, modelRec, segs, options) {\n var value;\n if (fluid.isIoCReference(modelRec)) {\n var parsed = fluid.parseValidModelReference(that, \"model reference from model (implicit relay)\", modelRec, true);\n if (parsed.nonModel) {\n value = fluid.getForComponent(parsed.that, parsed.segs);\n } else {\n ++options.refCount; // This count is used from within fluid.makeTransformPackage\n fluid.connectModelRelay(that, segs, parsed.that, parsed.modelSegs, options);\n }\n } else if (fluid.isPrimitive(modelRec) || !fluid.isPlainObject(modelRec)) {\n value = modelRec;\n } else if (modelRec.expander && fluid.isPlainObject(modelRec.expander)) {\n value = fluid.expandOptions(modelRec, that);\n } else {\n value = fluid.freshContainer(modelRec);\n fluid.each(modelRec, function (innerValue, key) {\n segs.push(key);\n var innerTrans = fluid.parseImplicitRelay(that, innerValue, segs, options);\n if (innerTrans !== undefined) {\n value[key] = innerTrans;\n }\n segs.pop();\n });\n }\n return value;\n };\n\n\n // Conclude the transaction by firing to all external listeners in priority order\n fluid.model.notifyExternal = function (transRec) {\n var allChanges = transRec ? fluid.values(transRec.externalChanges) : [];\n fluid.sortByPriority(allChanges);\n for (var i = 0; i < allChanges.length; ++i) {\n var change = allChanges[i];\n var targetApplier = change.args[5]; // NOTE: This argument gets here via fluid.model.storeExternalChange from fluid.notifyModelChanges\n if (!targetApplier.destroyed) { // 3rd point of guarding for FLUID-5592\n change.listener.apply(null, change.args);\n }\n }\n fluid.clearLinkCounts(transRec, true); // \"options\" structures for relayCount are aliased\n };\n\n fluid.model.commitRelays = function (instantiator, transactionId) {\n var transRec = instantiator.modelTransactions[transactionId];\n fluid.each(transRec, function (transEl) {\n // EXPLAIN: This must commit ALL current transactions, not just those for relays - why?\n if (transEl.transaction) { // some entries are links\n transEl.transaction.commit(\"relay\");\n transEl.transaction.reset();\n }\n });\n };\n\n // Listens to all invalidation to relays, and reruns/applies them if they have been invalidated\n fluid.model.updateRelays = function (instantiator, transactionId) {\n var transRec = instantiator.modelTransactions[transactionId];\n var updates = 0;\n fluid.sortByPriority(transRec.relays);\n fluid.each(transRec.relays, function (transEl) {\n // TODO: We have a bit of a problem here in that we only process updatable relays by priority - plain relays get to act non-transactionally\n if (transEl.transaction.changeRecord.changes > 0 && transEl.relayCount < 2 && transEl.options.update) {\n transEl.relayCount++;\n fluid.clearLinkCounts(transRec);\n transEl.options.update(transEl.transaction, transRec);\n ++updates;\n }\n });\n return updates;\n };\n\n fluid.establishModelRelay = function (that, optionsModel, optionsML, optionsMR, applier) {\n var shadow = fluid.shadowForComponent(that);\n if (!shadow.modelRelayEstablished) {\n shadow.modelRelayEstablished = true;\n } else {\n fluid.fail(\"FLUID-5887 failure: Model relay initialised twice on component\", that);\n }\n fluid.mergeModelListeners(that, optionsML);\n\n var enlist = fluid.enlistModelComponent(that);\n fluid.each(optionsMR, function (mrrec, key) {\n for (var i = 0; i < mrrec.length; ++i) {\n fluid.parseModelRelay(that, mrrec[i], key);\n }\n });\n\n // Note: this particular instance of \"refCount\" is disused. We only use the count made within fluid.makeTransformPackge\n var initModels = fluid.transform(optionsModel, function (modelRec) {\n return fluid.parseImplicitRelay(that, modelRec, [], {refCount: 0, priority: \"first\"});\n });\n enlist.initModels = initModels;\n\n var instantiator = fluid.getInstantiator(that);\n\n function updateRelays(transaction) {\n while (fluid.model.updateRelays(instantiator, transaction.id) > 0) {} // eslint-disable-line no-empty\n }\n\n function commitRelays(transaction, applier, code) {\n if (code !== \"relay\") { // don't commit relays if this commit is already a relay commit\n fluid.model.commitRelays(instantiator, transaction.id);\n }\n }\n\n function concludeTransaction(transaction, applier, code) {\n if (code !== \"relay\") {\n fluid.model.notifyExternal(instantiator.modelTransactions[transaction.id]);\n delete instantiator.modelTransactions[transaction.id];\n }\n }\n\n applier.preCommit.addListener(updateRelays);\n applier.preCommit.addListener(commitRelays);\n applier.postCommit.addListener(concludeTransaction);\n\n return null;\n };\n\n // supported, PUBLIC API grade\n fluid.defaults(\"fluid.modelComponent\", {\n gradeNames: [\"fluid.component\"],\n changeApplierOptions: {\n relayStyle: true,\n cullUnchanged: true\n },\n members: {\n model: \"@expand:fluid.initRelayModel({that}, {that}.modelRelay)\",\n applier: \"@expand:fluid.makeHolderChangeApplier({that}, {that}.options.changeApplierOptions)\",\n modelRelay: \"@expand:fluid.establishModelRelay({that}, {that}.options.model, {that}.options.modelListeners, {that}.options.modelRelay, {that}.applier)\"\n },\n mergePolicy: {\n model: {\n noexpand: true,\n func: fluid.arrayConcatPolicy // TODO: bug here in case a model consists of an array\n },\n modelListeners: fluid.makeMergeListenersPolicy(fluid.arrayConcatPolicy),\n modelRelay: fluid.makeMergeListenersPolicy(fluid.arrayConcatPolicy, true)\n }\n });\n\n fluid.modelChangedToChange = function (args) {\n return {\n value: args[0],\n oldValue: args[1],\n path: args[2],\n transaction: args[4]\n };\n };\n\n // Note - has only one call, from resolveModelListener\n fluid.event.invokeListener = function (listener, args, localRecord, mergeRecord) {\n if (typeof(listener) === \"string\") {\n listener = fluid.event.resolveListener(listener); // just resolves globals\n }\n return listener.apply(null, args, localRecord, mergeRecord); // can be \"false apply\" that requires extra context for expansion\n };\n\n fluid.resolveModelListener = function (that, record) {\n var togo = function () {\n if (fluid.isDestroyed(that)) { // first guarding point to resolve FLUID-5592\n return;\n }\n var change = fluid.modelChangedToChange(arguments);\n var args = arguments;\n var localRecord = {change: change, \"arguments\": args};\n var mergeRecord = {source: Object.keys(change.transaction.sources)}; // cascade for FLUID-5490\n if (record.args) {\n args = fluid.expandOptions(record.args, that, {}, localRecord);\n }\n fluid.event.invokeListener(record.listener, fluid.makeArray(args), localRecord, mergeRecord);\n };\n fluid.event.impersonateListener(record.listener, togo);\n return togo;\n };\n\n fluid.registerModelListeners = function (that, record, paths, namespace) {\n var func = fluid.resolveModelListener(that, record);\n fluid.each(record.byTarget, function (parsedArray) {\n var parsed = parsedArray[0]; // that, applier are common across all these elements\n var spec = {\n listener: func, // for initModelEvent\n listenerId: fluid.allocateGuid(), // external declarative listeners may often share listener handle, identify here\n segsArray: fluid.getMembers(parsedArray, \"modelSegs\"),\n pathArray: fluid.getMembers(parsedArray, \"path\"),\n includeSource: record.includeSource,\n excludeSource: record.excludeSource,\n priority: fluid.expandOptions(record.priority, that),\n transactional: true\n };\n // update \"spec\" so that we parse priority information just once\n spec = parsed.applier.modelChanged.addListener(spec, func, namespace, record.softNamespace);\n\n fluid.recordChangeListener(that, parsed.applier, func, spec.listenerId);\n function initModelEvent() {\n if (fluid.isModelComplete(parsed.that)) {\n var trans = parsed.applier.initiate(null, \"init\");\n fluid.initModelEvent(that, parsed.applier, trans, [spec]);\n trans.commit();\n }\n }\n if (that !== parsed.that && !fluid.isModelComplete(that)) { // TODO: Use FLUID-4883 \"latched events\" when available\n // Don't confuse the end user by firing their listener before the component is constructed\n // TODO: Better detection than this is requred - we assume that the target component will not be discovered as part\n // of the initial transaction wave, but if it is, it will get a double notification - we really need \"wave of explosions\"\n // since we are currently too early in initialisation of THIS component in order to tell if other will be found\n // independently.\n var onCreate = fluid.getForComponent(that, [\"events\", \"onCreate\"]);\n onCreate.addListener(initModelEvent);\n }\n });\n };\n\n fluid.mergeModelListeners = function (that, listeners) {\n fluid.each(listeners, function (value, key) {\n if (typeof(value) === \"string\") {\n value = {\n funcName: value\n };\n }\n // Bypass fluid.event.dispatchListener by means of \"standard = false\" and enter our custom workflow including expanding \"change\":\n var records = fluid.event.resolveListenerRecord(value, that, \"modelListeners\", null, false).records;\n fluid.each(records, function (record) {\n // Aggregate model listeners into groups referring to the same component target.\n // We do this so that a single entry will appear in its modelListeners so that they may\n // be notified just once per transaction, and also displaced by namespace\n record.byTarget = {};\n var paths = fluid.makeArray(record.path === undefined ? key : record.path);\n fluid.each(paths, function (path) {\n var parsed = fluid.parseValidModelReference(that, \"modelListeners entry\", path);\n fluid.pushArray(record.byTarget, parsed.that.id, parsed);\n });\n var namespace = (record.namespace && !record.softNamespace ? record.namespace : null) || (record.path !== undefined ? key : null);\n fluid.registerModelListeners(that, record, paths, namespace);\n });\n });\n };\n\n\n /** CHANGE APPLIER **/\n\n /** Add a listener to a ChangeApplier event that only acts in the case the event\n * has not come from the specified source (typically ourself)\n * @param modelEvent An model event held by a changeApplier (typically applier.modelChanged)\n * @param path The path specification to listen to\n * @param source The source value to exclude (direct equality used)\n * @param func The listener to be notified of a change\n * @param [eventName] - optional - the event name to be listened to - defaults to \"modelChanged\"\n * @param [namespace] - optional - the event namespace\n */\n\n /** Dispatches a list of changes to the supplied applier */\n fluid.fireChanges = function (applier, changes) {\n for (var i = 0; i < changes.length; ++i) {\n applier.fireChangeRequest(changes[i]);\n }\n };\n\n fluid.model.isChangedPath = function (changeMap, segs) {\n for (var i = 0; i <= segs.length; ++i) {\n if (typeof(changeMap) === \"string\") {\n return true;\n }\n if (i < segs.length && changeMap) {\n changeMap = changeMap[segs[i]];\n }\n }\n return false;\n };\n\n fluid.model.setChangedPath = function (options, segs, value) {\n var notePath = function (record) {\n segs.unshift(record);\n fluid.model.setSimple(options, segs, value);\n segs.shift();\n };\n if (!fluid.model.isChangedPath(options.changeMap, segs)) {\n ++options.changes;\n notePath(\"changeMap\");\n }\n if (!fluid.model.isChangedPath(options.deltaMap, segs)) {\n ++options.deltas;\n notePath(\"deltaMap\");\n }\n };\n\n fluid.model.fetchChangeChildren = function (target, i, segs, source, options) {\n fluid.each(source, function (value, key) {\n segs[i] = key;\n fluid.model.applyChangeStrategy(target, key, i, segs, value, options);\n segs.length = i;\n });\n };\n\n // Called with two primitives which are compared for equality. This takes account of \"floating point slop\" to avoid\n // continuing to propagate inverted values as changes\n // TODO: replace with a pluggable implementation\n fluid.model.isSameValue = function (a, b) {\n if (typeof(a) !== \"number\" || typeof(b) !== \"number\") {\n return a === b;\n } else {\n // Don't use isNaN because of https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/isNaN#Confusing_special-case_behavior\n if (a === b || a !== a && b !== b) { // Either the same concrete number or both NaN\n return true;\n } else {\n var relError = Math.abs((a - b) / b);\n return relError < 1e-12; // 64-bit floats have approx 16 digits accuracy, this should deal with most reasonable transforms\n }\n }\n };\n\n fluid.model.applyChangeStrategy = function (target, name, i, segs, source, options) {\n var targetSlot = target[name];\n var sourceCode = fluid.typeCode(source);\n var targetCode = fluid.typeCode(targetSlot);\n var changedValue = fluid.NO_VALUE;\n if (sourceCode === \"primitive\") {\n if (!fluid.model.isSameValue(targetSlot, source)) {\n changedValue = source;\n ++options.unchanged;\n }\n } else if (targetCode !== sourceCode || sourceCode === \"array\" && source.length !== targetSlot.length) {\n // RH is not primitive - array or object and mismatching or any array rewrite\n changedValue = fluid.freshContainer(source);\n }\n if (changedValue !== fluid.NO_VALUE) {\n target[name] = changedValue;\n if (options.changeMap) {\n fluid.model.setChangedPath(options, segs, options.inverse ? \"DELETE\" : \"ADD\");\n }\n }\n if (sourceCode !== \"primitive\") {\n fluid.model.fetchChangeChildren(target[name], i + 1, segs, source, options);\n }\n };\n\n fluid.model.stepTargetAccess = function (target, type, segs, startpos, endpos, options) {\n for (var i = startpos; i < endpos; ++i) {\n if (!target) {\n continue;\n }\n var oldTrunk = target[segs[i]];\n target = fluid.model.traverseWithStrategy(target, segs, i, options[type === \"ADD\" ? \"resolverSetConfig\" : \"resolverGetConfig\"],\n segs.length - i - 1);\n if (oldTrunk !== target && options.changeMap) {\n fluid.model.setChangedPath(options, segs.slice(0, i + 1), \"ADD\");\n }\n }\n return {root: target, last: segs[endpos]};\n };\n\n fluid.model.defaultAccessorConfig = function (options) {\n options = options || {};\n options.resolverSetConfig = options.resolverSetConfig || fluid.model.escapedSetConfig;\n options.resolverGetConfig = options.resolverGetConfig || fluid.model.escapedGetConfig;\n return options;\n };\n\n // Changes: \"MERGE\" action abolished\n // ADD/DELETE at root can be destructive\n // changes tracked in optional final argument holding \"changeMap: {}, changes: 0, unchanged: 0\"\n fluid.model.applyHolderChangeRequest = function (holder, request, options) {\n options = fluid.model.defaultAccessorConfig(options);\n options.deltaMap = options.changeMap ? {} : null;\n options.deltas = 0;\n var length = request.segs.length;\n var pen, atRoot = length === 0;\n if (atRoot) {\n pen = {root: holder, last: \"model\"};\n } else {\n if (!holder.model) {\n holder.model = {};\n fluid.model.setChangedPath(options, [], options.inverse ? \"DELETE\" : \"ADD\");\n }\n pen = fluid.model.stepTargetAccess(holder.model, request.type, request.segs, 0, length - 1, options);\n }\n if (request.type === \"ADD\") {\n var value = request.value;\n var segs = fluid.makeArray(request.segs);\n fluid.model.applyChangeStrategy(pen.root, pen.last, length - 1, segs, value, options, atRoot);\n } else if (request.type === \"DELETE\") {\n if (pen.root && pen.root[pen.last] !== undefined) {\n delete pen.root[pen.last];\n if (options.changeMap) {\n fluid.model.setChangedPath(options, request.segs, \"DELETE\");\n }\n }\n } else {\n fluid.fail(\"Unrecognised change type of \" + request.type);\n }\n return options.deltas ? options.deltaMap : null;\n };\n\n /** Compare two models for equality using a deep algorithm. It is assumed that both models are JSON-equivalent and do\n * not contain circular links.\n * @param modela The first model to be compared\n * @param modelb The second model to be compared\n * @param options {Object} If supplied, will receive a map and summary of the change content between the objects. Structure is:\n * changeMap: {Object/String} An isomorphic map of the object structures to values \"ADD\" or \"DELETE\" indicating\n * that values have been added/removed at that location. Note that in the case the object structure differs at the root, <code>changeMap</code> will hold\n * the plain String value \"ADD\" or \"DELETE\"\n * changes: {Integer} Counts the number of changes between the objects - The two objects are identical iff <code>changes === 0</code>.\n * unchanged: {Integer} Counts the number of leaf (primitive) values at which the two objects are identical. Note that the current implementation will\n * double-count, this summary should be considered indicative rather than precise.\n * @return <code>true</code> if the models are identical\n */\n // TODO: This algorithm is quite inefficient in that both models will be copied once each\n // supported, PUBLIC API function\n fluid.model.diff = function (modela, modelb, options) {\n options = options || {changes: 0, unchanged: 0, changeMap: {}}; // current algorithm can't avoid the expense of changeMap\n var typea = fluid.typeCode(modela);\n var typeb = fluid.typeCode(modelb);\n var togo;\n if (typea === \"primitive\" && typeb === \"primitive\") {\n togo = fluid.model.isSameValue(modela, modelb);\n } else if (typea === \"primitive\" ^ typeb === \"primitive\") {\n togo = false;\n } else {\n // Apply both forward and reverse changes - if no changes either way, models are identical\n // \"ADD\" reported in the reverse direction must be accounted as a \"DELETE\"\n var holdera = {\n model: fluid.copy(modela)\n };\n fluid.model.applyHolderChangeRequest(holdera, {value: modelb, segs: [], type: \"ADD\"}, options);\n var holderb = {\n model: fluid.copy(modelb)\n };\n options.inverse = true;\n fluid.model.applyHolderChangeRequest(holderb, {value: modela, segs: [], type: \"ADD\"}, options);\n togo = options.changes === 0;\n }\n if (togo === false && options.changes === 0) { // catch all primitive cases\n options.changes = 1;\n options.changeMap = modelb === undefined ? \"DELETE\" : \"ADD\";\n } else if (togo === true && options.unchanged === 0) {\n options.unchanged = 1;\n }\n return togo;\n };\n\n // Here we only support for now very simple expressions which have at most one\n // wildcard which must appear in the final segment\n fluid.matchChanges = function (changeMap, specSegs, newHolder) {\n var root = newHolder.model;\n var map = changeMap;\n var outSegs = [\"model\"];\n var wildcard = false;\n var togo = [];\n for (var i = 0; i < specSegs.length; ++i) {\n var seg = specSegs[i];\n if (seg === \"*\") {\n if (i === specSegs.length - 1) {\n wildcard = true;\n } else {\n fluid.fail(\"Wildcard specification in modelChanged listener is only supported for the final path segment: \" + specSegs.join(\".\"));\n }\n } else {\n outSegs.push(seg);\n map = fluid.isPrimitive(map) ? map : map[seg];\n root = root ? root[seg] : undefined;\n }\n }\n if (map) {\n if (wildcard) {\n fluid.each(root, function (value, key) {\n togo.push(outSegs.concat(key));\n });\n } else {\n togo.push(outSegs);\n }\n }\n return togo;\n };\n\n fluid.storeExternalChange = function (transRec, applier, invalidPath, spec, args) {\n var pathString = applier.composeSegments.apply(null, invalidPath);\n var keySegs = [applier.holder.id, spec.listenerId, (spec.wildcard ? pathString : \"\")];\n var keyString = keySegs.join(\"|\");\n // TODO: We think we probably have a bug in that notifications destined for end of transaction are actually continuously emitted during the transaction\n // These are unbottled in fluid.concludeTransaction\n transRec.externalChanges[keyString] = {listener: spec.listener, namespace: spec.namespace, priority: spec.priority, args: args};\n };\n\n fluid.notifyModelChanges = function (listeners, changeMap, newHolder, oldHolder, changeRequest, transaction, applier, that) {\n if (!listeners) {\n return;\n }\n var transRec = transaction && fluid.getModelTransactionRec(that, transaction.id);\n for (var i = 0; i < listeners.length; ++i) {\n var spec = listeners[i];\n var multiplePaths = spec.segsArray.length > 1; // does this spec listen on multiple paths? If so, don't rebase arguments and just report once per transaction\n for (var j = 0; j < spec.segsArray.length; ++j) {\n var invalidPaths = fluid.matchChanges(changeMap, spec.segsArray[j], newHolder);\n // We only have multiple invalidPaths here if there is a wildcard\n for (var k = 0; k < invalidPaths.length; ++k) {\n if (applier.destroyed) { // 2nd guarding point for FLUID-5592\n return;\n }\n var invalidPath = invalidPaths[k];\n spec.listener = fluid.event.resolveListener(spec.listener);\n var args = [multiplePaths ? newHolder.model : fluid.model.getSimple(newHolder, invalidPath),\n multiplePaths ? oldHolder.model : fluid.model.getSimple(oldHolder, invalidPath),\n multiplePaths ? [] : invalidPath.slice(1), changeRequest, transaction, applier];\n // FLUID-5489: Do not notify of null changes which were reported as a result of invalidating a higher path\n // TODO: We can improve greatly on efficiency by i) reporting a special code from fluid.matchChanges which signals the difference between invalidating a higher and lower path,\n // ii) improving fluid.model.diff to create fewer intermediate structures and no copies\n // TODO: The relay invalidation system is broken and must always be notified (branch 1) - since our old/new value detection is based on the wrong (global) timepoints in the transaction here,\n // rather than the \"last received model\" by the holder of the transform document\n if (!spec.isRelay) {\n var isNull = fluid.model.diff(args[0], args[1]);\n if (isNull) {\n continue;\n }\n var sourceExcluded = fluid.isExcludedChangeSource(transaction, spec);\n if (sourceExcluded) {\n continue;\n }\n }\n if (transRec && !spec.isRelay && spec.transactional) { // bottle up genuine external changes so we can sort and dedupe them later\n fluid.storeExternalChange(transRec, applier, invalidPath, spec, args);\n } else {\n spec.listener.apply(null, args);\n }\n }\n }\n }\n };\n\n fluid.bindELMethods = function (applier) {\n applier.parseEL = function (EL) {\n return fluid.model.pathToSegments(EL, applier.options.resolverSetConfig);\n };\n applier.composeSegments = function () {\n return applier.options.resolverSetConfig.parser.compose.apply(null, arguments);\n };\n };\n\n fluid.initModelEvent = function (that, applier, trans, listeners) {\n fluid.notifyModelChanges(listeners, \"ADD\", trans.oldHolder, fluid.emptyHolder, null, trans, applier, that);\n };\n\n // A standard \"empty model\" for the purposes of comparing initial state during the primordial transaction\n fluid.emptyHolder = fluid.freezeRecursive({ model: undefined });\n\n fluid.preFireChangeRequest = function (applier, changeRequest) {\n if (!changeRequest.type) {\n changeRequest.type = \"ADD\";\n }\n changeRequest.segs = changeRequest.segs || applier.parseEL(changeRequest.path);\n };\n\n // Automatically adapts change onto fireChangeRequest\n fluid.bindRequestChange = function (that) {\n that.change = function (path, value, type, source) {\n var changeRequest = {\n path: path,\n value: value,\n type: type,\n source: source\n };\n that.fireChangeRequest(changeRequest);\n };\n };\n\n // Quick n dirty test to cheaply detect Object versus other JSON types\n fluid.isObjectSimple = function (totest) {\n return Object.prototype.toString.call(totest) === \"[object Object]\";\n };\n\n fluid.mergeChangeSources = function (target, globalSources) {\n if (fluid.isObjectSimple(globalSources)) { // TODO: No test for this branch!\n fluid.extend(target, globalSources);\n } else {\n fluid.each(fluid.makeArray(globalSources), function (globalSource) {\n target[globalSource] = true;\n });\n }\n };\n\n fluid.ChangeApplier = function () {};\n\n fluid.makeHolderChangeApplier = function (holder, options) {\n options = fluid.model.defaultAccessorConfig(options);\n var applierId = fluid.allocateGuid();\n var that = new fluid.ChangeApplier();\n var name = fluid.isComponent(holder) ? \"ChangeApplier for component \" + fluid.dumpThat(holder) : \"ChangeApplier with id \" + applierId;\n $.extend(that, {\n applierId: applierId,\n holder: holder,\n listeners: fluid.makeEventFirer({name: \"Internal change listeners for \" + name}),\n transListeners: fluid.makeEventFirer({name: \"External change listeners for \" + name}),\n options: options,\n modelChanged: {},\n preCommit: fluid.makeEventFirer({name: \"preCommit event for \" + name}),\n postCommit: fluid.makeEventFirer({name: \"postCommit event for \" + name})\n });\n that.destroy = function () {\n that.preCommit.destroy();\n that.postCommit.destroy();\n that.destroyed = true;\n };\n that.modelChanged.addListener = function (spec, listener, namespace, softNamespace) {\n if (typeof(spec) === \"string\") {\n spec = {\n path: spec\n };\n } else {\n spec = fluid.copy(spec);\n }\n spec.listenerId = spec.listenerId || fluid.allocateGuid(); // FLUID-5151: don't use identifyListener since event.addListener will use this as a namespace\n spec.namespace = namespace;\n spec.softNamespace = softNamespace;\n if (typeof(listener) === \"string\") { // The reason for \"globalName\" is so that listener names can be resolved on first use and not on registration\n listener = {globalName: listener};\n }\n spec.listener = listener;\n if (spec.transactional !== false) {\n spec.transactional = true;\n }\n if (!spec.segsArray) { // It's a manual registration\n if (spec.path !== undefined) {\n spec.segs = spec.segs || that.parseEL(spec.path);\n }\n if (!spec.segsArray) {\n spec.segsArray = [spec.segs];\n }\n }\n fluid.parseSourceExclusionSpec(spec, spec);\n spec.wildcard = fluid.accumulate(fluid.transform(spec.segsArray, function (segs) {\n return fluid.contains(segs, \"*\");\n }), fluid.add, 0);\n if (spec.wildcard && spec.segsArray.length > 1) {\n fluid.fail(\"Error in model listener specification \", spec, \" - you may not supply a wildcard pattern as one of a set of multiple paths to be matched\");\n }\n var firer = that[spec.transactional ? \"transListeners\" : \"listeners\"];\n firer.addListener(spec);\n return spec; // return is used in registerModelListeners\n };\n that.modelChanged.removeListener = function (listener) {\n that.listeners.removeListener(listener);\n that.transListeners.removeListener(listener);\n };\n that.fireChangeRequest = function (changeRequest) {\n var ation = that.initiate(\"local\", changeRequest.source);\n ation.fireChangeRequest(changeRequest);\n ation.commit();\n };\n /**\n * Initiate a fresh transaction on this applier, perhaps coordinated with other transactions sharing the same id across the component tree\n * Arguments all optional\n * localSource {String}: \"local\", \"relay\" or null Local source identifiers only good for transaction's representative on this applier\n * globalSources: {String|Array of String|Object String->true} Global source identifiers common across this transaction\n * transactionId: {String} Global transaction id to enlist with\n */\n that.initiate = function (localSource, globalSources, transactionId) {\n localSource = globalSources === \"init\" ? null : (localSource || \"local\"); // supported values for localSource are \"local\" and \"relay\" - globalSource of \"init\" defeats defaulting of localSource to \"local\"\n var defeatPost = localSource === \"relay\"; // defeatPost is supplied for all non-top-level transactions\n var trans = {\n instanceId: fluid.allocateGuid(), // for debugging only - the representative of this transction on this applier\n id: transactionId || fluid.allocateGuid(), // The global transaction id across all appliers - allocate here if this is the starting point\n changeRecord: {\n resolverSetConfig: options.resolverSetConfig, // here to act as \"options\" in applyHolderChangeRequest\n resolverGetConfig: options.resolverGetConfig\n },\n reset: function () {\n trans.oldHolder = holder;\n trans.newHolder = { model: fluid.copy(holder.model) };\n trans.changeRecord.changes = 0;\n trans.changeRecord.unchanged = 0; // just for type consistency - we don't use these values in the ChangeApplier\n trans.changeRecord.changeMap = {};\n },\n commit: function (code) {\n that.preCommit.fire(trans, that, code);\n if (trans.changeRecord.changes > 0) {\n var oldHolder = {model: holder.model};\n holder.model = trans.newHolder.model;\n fluid.notifyModelChanges(that.transListeners.sortedListeners, trans.changeRecord.changeMap, holder, oldHolder, null, trans, that, holder);\n }\n if (!defeatPost) {\n that.postCommit.fire(trans, that, code);\n }\n },\n fireChangeRequest: function (changeRequest) {\n fluid.preFireChangeRequest(that, changeRequest);\n changeRequest.transactionId = trans.id;\n var deltaMap = fluid.model.applyHolderChangeRequest(trans.newHolder, changeRequest, trans.changeRecord);\n fluid.notifyModelChanges(that.listeners.sortedListeners, deltaMap, trans.newHolder, holder, changeRequest, trans, that, holder);\n },\n hasChangeSource: function (source) {\n return trans.fullSources[source];\n }\n };\n var transRec = fluid.getModelTransactionRec(holder, trans.id);\n if (transRec) {\n fluid.mergeChangeSources(transRec.sources, globalSources);\n trans.sources = transRec.sources;\n trans.fullSources = Object.create(transRec.sources);\n trans.fullSources[localSource] = true;\n }\n trans.reset();\n fluid.bindRequestChange(trans);\n return trans;\n };\n\n fluid.bindRequestChange(that);\n fluid.bindELMethods(that);\n return that;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2010 University of Toronto\nCopyright 2010-2014 OCAD University\nCopyright 2012-2014 Raising the Floor - US\nCopyright 2014-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\nvar fluid = fluid || fluid_2_0_0;\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.model.transform\");\n\n /** Grade definitions for standard transformation function hierarchy **/\n\n fluid.defaults(\"fluid.transformFunction\", {\n gradeNames: \"fluid.function\"\n });\n\n // uses standard layout and workflow involving inputPath - an undefined input value\n // will short-circuit the evaluation\n fluid.defaults(\"fluid.standardInputTransformFunction\", {\n gradeNames: \"fluid.transformFunction\"\n });\n\n fluid.defaults(\"fluid.standardOutputTransformFunction\", {\n gradeNames: \"fluid.transformFunction\"\n });\n\n // defines a set of options \"inputVariables\" referring to its inputs, which are converted\n // to functions that the transform may explicitly use to demand the input value\n fluid.defaults(\"fluid.multiInputTransformFunction\", {\n gradeNames: \"fluid.transformFunction\"\n });\n\n // uses the standard layout and workflow involving inputPath and outputPath\n fluid.defaults(\"fluid.standardTransformFunction\", {\n gradeNames: [\"fluid.standardInputTransformFunction\", \"fluid.standardOutputTransformFunction\"]\n });\n\n fluid.defaults(\"fluid.lens\", {\n gradeNames: \"fluid.transformFunction\",\n invertConfiguration: null\n // this function method returns \"inverted configuration\" rather than actually performing inversion\n // TODO: harmonise with strategy used in VideoPlayer_framework.js\n });\n\n /***********************************\n * Base utilities for transformers *\n ***********************************/\n\n // unsupported, NON-API function\n fluid.model.transform.pathToRule = function (inputPath) {\n return {\n transform: {\n type: \"fluid.transforms.value\",\n inputPath: inputPath\n }\n };\n };\n\n // unsupported, NON-API function\n fluid.model.transform.literalValueToRule = function (input) {\n return {\n transform: {\n type: \"fluid.transforms.literalValue\",\n input: input\n }\n };\n };\n\n /** Accepts two fully escaped paths, either of which may be empty or null **/\n fluid.model.composePaths = function (prefix, suffix) {\n prefix = prefix === 0 ? \"0\" : prefix || \"\";\n suffix = suffix === 0 ? \"0\" : suffix || \"\";\n return !prefix ? suffix : (!suffix ? prefix : prefix + \".\" + suffix);\n };\n\n fluid.model.transform.accumulateInputPath = function (inputPath, transformer, paths) {\n if (inputPath !== undefined) {\n paths.push(fluid.model.composePaths(transformer.inputPrefix, inputPath));\n }\n };\n\n fluid.model.transform.accumulateStandardInputPath = function (input, transformSpec, transformer, paths) {\n fluid.model.transform.getValue(undefined, transformSpec[input], transformer);\n fluid.model.transform.accumulateInputPath(transformSpec[input + \"Path\"], transformer, paths);\n };\n\n fluid.model.transform.accumulateMultiInputPaths = function (inputVariables, transformSpec, transformer, paths) {\n fluid.each(inputVariables, function (v, k) {\n fluid.model.transform.accumulateStandardInputPath(k, transformSpec, transformer, paths);\n });\n };\n\n fluid.model.transform.getValue = function (inputPath, value, transformer) {\n var togo;\n if (inputPath !== undefined) { // NB: We may one day want to reverse the crazy jQuery-like convention that \"no path means root path\"\n togo = fluid.get(transformer.source, fluid.model.composePaths(transformer.inputPrefix, inputPath), transformer.resolverGetConfig);\n }\n if (togo === undefined) {\n // FLUID-5867 - actually helpful behaviour here rather than the insane original default of expecting a short-form value document\n togo = fluid.isPrimitive(value) ? value :\n (\"literalValue\" in value ? value.literalValue :\n (value.transform === undefined ? value : transformer.expand(value)));\n }\n return togo;\n };\n\n // distinguished value which indicates that a transformation rule supplied a\n // non-default output path, and so the user should be prevented from making use of it\n // in a compound transform definition\n fluid.model.transform.NONDEFAULT_OUTPUT_PATH_RETURN = {};\n\n fluid.model.transform.setValue = function (userOutputPath, value, transformer) {\n // avoid crosslinking to input object - this might be controlled by a \"nocopy\" option in future\n var toset = fluid.copy(value);\n var outputPath = fluid.model.composePaths(transformer.outputPrefix, userOutputPath);\n // TODO: custom resolver config here to create non-hash output model structure\n if (toset !== undefined) {\n transformer.applier.change(outputPath, toset);\n }\n return userOutputPath ? fluid.model.transform.NONDEFAULT_OUTPUT_PATH_RETURN : toset;\n };\n\n /* Resolves the <key> given as parameter by looking up the path <key>Path in the object\n * to be transformed. If not present, it resolves the <key> by using the literal value if primitive,\n * or expanding otherwise. <def> defines the default value if unableto resolve the key. If no\n * default value is given undefined is returned\n */\n fluid.model.transform.resolveParam = function (transformSpec, transformer, key, def) {\n var val = fluid.model.transform.getValue(transformSpec[key + \"Path\"], transformSpec[key], transformer);\n return (val !== undefined) ? val : def;\n };\n\n // Compute a \"match score\" between two pieces of model material, with 0 indicating a complete mismatch, and\n // higher values indicating increasingly good matches\n fluid.model.transform.matchValue = function (expected, actual, partialMatches) {\n var stats = {changes: 0, unchanged: 0, changeMap: {}};\n fluid.model.diff(expected, actual, stats);\n // i) a pair with 0 matches counts for 0 in all cases\n // ii) without \"partial match mode\" (the default), we simply count matches, with any mismatch giving 0\n // iii) with \"partial match mode\", a \"perfect score\" in the top 24 bits is\n // penalised for each mismatch, with a positive score of matches store in the bottom 24 bits\n return stats.unchanged === 0 ? 0\n : (partialMatches ? 0xffffff000000 - 0x1000000 * stats.changes + stats.unchanged :\n (stats.changes ? 0 : 0xffffff000000 + stats.unchanged));\n };\n\n fluid.model.transform.invertPaths = function (transformSpec, transformer) {\n // TODO: this will not behave correctly in the face of compound \"input\" which contains\n // further transforms\n var oldOutput = fluid.model.composePaths(transformer.outputPrefix, transformSpec.outputPath);\n transformSpec.outputPath = fluid.model.composePaths(transformer.inputPrefix, transformSpec.inputPath);\n transformSpec.inputPath = oldOutput;\n return transformSpec;\n };\n\n\n // TODO: prefixApplier is a transform which is currently unused and untested\n fluid.model.transform.prefixApplier = function (transformSpec, transformer) {\n if (transformSpec.inputPrefix) {\n transformer.inputPrefixOp.push(transformSpec.inputPrefix);\n }\n if (transformSpec.outputPrefix) {\n transformer.outputPrefixOp.push(transformSpec.outputPrefix);\n }\n transformer.expand(transformSpec.input);\n if (transformSpec.inputPrefix) {\n transformer.inputPrefixOp.pop();\n }\n if (transformSpec.outputPrefix) {\n transformer.outputPrefixOp.pop();\n }\n };\n\n fluid.defaults(\"fluid.model.transform.prefixApplier\", {\n gradeNames: [\"fluid.transformFunction\"]\n });\n\n // unsupported, NON-API function\n fluid.model.makePathStack = function (transform, prefixName) {\n var stack = transform[prefixName + \"Stack\"] = [];\n transform[prefixName] = \"\";\n return {\n push: function (prefix) {\n var newPath = fluid.model.composePaths(transform[prefixName], prefix);\n stack.push(transform[prefixName]);\n transform[prefixName] = newPath;\n },\n pop: function () {\n transform[prefixName] = stack.pop();\n }\n };\n };\n\n // unsupported, NON-API function\n fluid.model.transform.doTransform = function (transformSpec, transformer, transformOpts) {\n var expdef = transformOpts.defaults;\n var transformFn = fluid.getGlobalValue(transformOpts.typeName);\n if (typeof(transformFn) !== \"function\") {\n fluid.fail(\"Transformation record specifies transformation function with name \" +\n transformSpec.type + \" which is not a function - \", transformFn);\n }\n if (!fluid.hasGrade(expdef, \"fluid.transformFunction\")) {\n // If no suitable grade is set up, assume that it is intended to be used as a standardTransformFunction\n expdef = fluid.defaults(\"fluid.standardTransformFunction\");\n }\n var transformArgs = [transformSpec, transformer];\n if (fluid.hasGrade(expdef, \"fluid.multiInputTransformFunction\")) {\n var inputs = {};\n fluid.each(expdef.inputVariables, function (v, k) {\n inputs[k] = function () {\n var input = fluid.model.transform.getValue(transformSpec[k + \"Path\"], transformSpec[k], transformer);\n // TODO: This is a mess, null might perfectly well be a possible default\n // if no match, assign default if one exists (v != null)\n input = (input === undefined && v !== null) ? v : input;\n return input;\n };\n });\n transformArgs.unshift(inputs);\n }\n if (fluid.hasGrade(expdef, \"fluid.standardInputTransformFunction\")) {\n if (!(\"input\" in transformSpec) && !(\"inputPath\" in transformSpec)) {\n fluid.fail(\"Error in transform specification. Either \\\"input\\\" or \\\"inputPath\\\" must be specified for a standardInputTransformFunction: received \", transformSpec);\n }\n var expanded = fluid.model.transform.getValue(transformSpec.inputPath, transformSpec.input, transformer);\n\n transformArgs.unshift(expanded);\n // if the function has no input, the result is considered undefined, and this is returned\n if (expanded === undefined) {\n return undefined;\n }\n }\n var transformed = transformFn.apply(null, transformArgs);\n if (fluid.hasGrade(expdef, \"fluid.standardOutputTransformFunction\")) {\n // \"doOutput\" flag is currently set nowhere, but could be used in future\n var outputPath = transformSpec.outputPath !== undefined ? transformSpec.outputPath : (transformOpts.doOutput ? \"\" : undefined);\n if (outputPath !== undefined && transformed !== undefined) {\n //If outputPath is given in the expander we want to:\n // (1) output to the document\n // (2) return undefined, to ensure that expanders higher up in the hierarchy doesn't attempt to output it again\n fluid.model.transform.setValue(transformSpec.outputPath, transformed, transformer);\n transformed = undefined;\n }\n }\n return transformed;\n };\n\n // OLD PATHUTIL utilities: Rescued from old DataBinding implementation to support obsolete \"schema\" scheme for transforms - all of this needs to be rethought\n var globalAccept = [];\n\n fluid.registerNamespace(\"fluid.pathUtil\");\n\n /** Parses a path segment, following escaping rules, starting from character index i in the supplied path */\n fluid.pathUtil.getPathSegment = function (path, i) {\n fluid.pathUtil.getPathSegmentImpl(globalAccept, path, i);\n return globalAccept[0];\n };\n /** Returns just the head segment of an EL path */\n fluid.pathUtil.getHeadPath = function (path) {\n return fluid.pathUtil.getPathSegment(path, 0);\n };\n\n /** Returns all of an EL path minus its first segment - if the path consists of just one segment, returns \"\" */\n fluid.pathUtil.getFromHeadPath = function (path) {\n var firstdot = fluid.pathUtil.getPathSegmentImpl(null, path, 0);\n return firstdot === path.length ? \"\" : path.substring(firstdot + 1);\n };\n /** Determines whether a particular EL path matches a given path specification.\n * The specification consists of a path with optional wildcard segments represented by \"*\".\n * @param spec (string) The specification to be matched\n * @param path (string) The path to be tested\n * @param exact (boolean) Whether the path must exactly match the length of the specification in\n * terms of path segments in order to count as match. If exact is falsy, short specifications will\n * match all longer paths as if they were padded out with \"*\" segments\n * @return (array of string) The path segments which matched the specification, or <code>null</code> if there was no match\n */\n\n fluid.pathUtil.matchPath = function (spec, path, exact) {\n var togo = [];\n while (true) {\n if (((path === \"\") ^ (spec === \"\")) && exact) {\n return null;\n }\n // FLUID-4625 - symmetry on spec and path is actually undesirable, but this\n // quickly avoids at least missed notifications - improved (but slower)\n // implementation should explode composite changes\n if (!spec || !path) {\n break;\n }\n var spechead = fluid.pathUtil.getHeadPath(spec);\n var pathhead = fluid.pathUtil.getHeadPath(path);\n // if we fail to match on a specific component, fail.\n if (spechead !== \"*\" && spechead !== pathhead) {\n return null;\n }\n togo.push(pathhead);\n spec = fluid.pathUtil.getFromHeadPath(spec);\n path = fluid.pathUtil.getFromHeadPath(path);\n }\n return togo;\n };\n\n // unsupported, NON-API function\n fluid.model.transform.expandWildcards = function (transformer, source) {\n fluid.each(source, function (value, key) {\n var q = transformer.queuedTransforms;\n transformer.pathOp.push(fluid.pathUtil.escapeSegment(key.toString()));\n for (var i = 0; i < q.length; ++i) {\n if (fluid.pathUtil.matchPath(q[i].matchPath, transformer.path, true)) {\n var esCopy = fluid.copy(q[i].transformSpec);\n if (esCopy.inputPath === undefined || fluid.model.transform.hasWildcard(esCopy.inputPath)) {\n esCopy.inputPath = \"\";\n }\n // TODO: allow some kind of interpolation for output path\n // TODO: Also, we now require outputPath to be specified in these cases for output to be produced as well.. Is that something we want to continue with?\n transformer.inputPrefixOp.push(transformer.path);\n transformer.outputPrefixOp.push(transformer.path);\n var transformOpts = fluid.model.transform.lookupType(esCopy.type);\n var result = fluid.model.transform.doTransform(esCopy, transformer, transformOpts);\n if (result !== undefined) {\n fluid.model.transform.setValue(null, result, transformer);\n }\n transformer.outputPrefixOp.pop();\n transformer.inputPrefixOp.pop();\n }\n }\n if (!fluid.isPrimitive(value)) {\n fluid.model.transform.expandWildcards(transformer, value);\n }\n transformer.pathOp.pop();\n });\n };\n\n // unsupported, NON-API function\n fluid.model.transform.hasWildcard = function (path) {\n return typeof(path) === \"string\" && path.indexOf(\"*\") !== -1;\n };\n\n // unsupported, NON-API function\n fluid.model.transform.maybePushWildcard = function (transformSpec, transformer) {\n var hw = fluid.model.transform.hasWildcard;\n var matchPath;\n if (hw(transformSpec.inputPath)) {\n matchPath = fluid.model.composePaths(transformer.inputPrefix, transformSpec.inputPath);\n }\n else if (hw(transformer.outputPrefix) || hw(transformSpec.outputPath)) {\n matchPath = fluid.model.composePaths(transformer.outputPrefix, transformSpec.outputPath);\n }\n\n if (matchPath) {\n transformer.queuedTransforms.push({transformSpec: transformSpec, outputPrefix: transformer.outputPrefix, inputPrefix: transformer.inputPrefix, matchPath: matchPath});\n return true;\n }\n return false;\n };\n\n fluid.model.sortByKeyLength = function (inObject) {\n var keys = fluid.keys(inObject);\n return keys.sort(fluid.compareStringLength(true));\n };\n\n // Three handler functions operating the (currently) three different processing modes\n // unsupported, NON-API function\n fluid.model.transform.handleTransformStrategy = function (transformSpec, transformer, transformOpts) {\n if (fluid.model.transform.maybePushWildcard(transformSpec, transformer)) {\n return;\n }\n else {\n return fluid.model.transform.doTransform(transformSpec, transformer, transformOpts);\n }\n };\n // unsupported, NON-API function\n fluid.model.transform.handleInvertStrategy = function (transformSpec, transformer, transformOpts) {\n transformSpec = fluid.copy(transformSpec);\n // if we have a standardTransformFunction we can switch input and output arguments:\n if (fluid.hasGrade(transformOpts.defaults, \"fluid.standardTransformFunction\")) {\n transformSpec = fluid.model.transform.invertPaths(transformSpec, transformer);\n }\n var invertor = transformOpts.defaults && transformOpts.defaults.invertConfiguration;\n if (invertor) {\n var inverted = fluid.invokeGlobalFunction(invertor, [transformSpec, transformer]);\n transformer.inverted.push(inverted);\n }\n };\n\n // unsupported, NON-API function\n fluid.model.transform.handleCollectStrategy = function (transformSpec, transformer, transformOpts) {\n var defaults = transformOpts.defaults;\n var standardInput = fluid.hasGrade(defaults, \"fluid.standardInputTransformFunction\");\n var multiInput = fluid.hasGrade(defaults, \"fluid.multiInputTransformFunction\");\n\n if (standardInput) {\n fluid.model.transform.accumulateStandardInputPath(\"input\", transformSpec, transformer, transformer.inputPaths);\n }\n if (multiInput) {\n fluid.model.transform.accumulateMultiInputPaths(defaults.inputVariables, transformSpec, transformer, transformer.inputPaths);\n }\n if (!multiInput && !standardInput) {\n var collector = defaults.collectInputPaths;\n if (collector) {\n var collected = fluid.makeArray(fluid.invokeGlobalFunction(collector, [transformSpec, transformer]));\n transformer.inputPaths = transformer.inputPaths.concat(collected);\n }\n }\n };\n\n fluid.model.transform.lookupType = function (typeName, transformSpec) {\n if (!typeName) {\n fluid.fail(\"Transformation record is missing a type name: \", transformSpec);\n }\n if (typeName.indexOf(\".\") === -1) {\n typeName = \"fluid.transforms.\" + typeName;\n }\n var defaults = fluid.defaults(typeName);\n return { defaults: defaults, typeName: typeName};\n };\n\n // unsupported, NON-API function\n fluid.model.transform.processRule = function (rule, transformer) {\n if (typeof(rule) === \"string\") {\n rule = fluid.model.transform.pathToRule(rule);\n }\n // special dispensation to allow \"literalValue\" to escape any value\n else if (rule.literalValue !== undefined) {\n rule = fluid.model.transform.literalValueToRule(rule.literalValue);\n }\n var togo;\n if (rule.transform) {\n var transformSpec, transformOpts;\n if (fluid.isArrayable(rule.transform)) {\n // if the transform holds an array, each transformer within that is responsible for its own output\n var transforms = rule.transform;\n togo = undefined;\n for (var i = 0; i < transforms.length; ++i) {\n transformSpec = transforms[i];\n transformOpts = fluid.model.transform.lookupType(transformSpec.type);\n transformer.transformHandler(transformSpec, transformer, transformOpts);\n }\n } else {\n // else we just have a normal single transform which will return 'undefined' as a flag to defeat cascading output\n transformSpec = rule.transform;\n transformOpts = fluid.model.transform.lookupType(transformSpec.type);\n togo = transformer.transformHandler(transformSpec, transformer, transformOpts);\n }\n }\n // if rule is an array, save path for later use in schema strategy on final applier (so output will be interpreted as array)\n if (fluid.isArrayable(rule)) {\n transformer.collectedFlatSchemaOpts = transformer.collectedFlatSchemaOpts || {};\n transformer.collectedFlatSchemaOpts[transformer.outputPrefix] = \"array\";\n }\n fluid.each(rule, function (value, key) {\n if (key !== \"transform\") {\n transformer.outputPrefixOp.push(key);\n var togo = transformer.expand(value, transformer);\n // Value expanders and arrays as rules implicitly output, unless they have nothing (undefined) to output\n if (togo !== undefined) {\n fluid.model.transform.setValue(null, togo, transformer);\n // ensure that expanders further up does not try to output this value as well.\n togo = undefined;\n }\n transformer.outputPrefixOp.pop();\n }\n });\n return togo;\n };\n\n // unsupported, NON-API function\n // 3rd arg is disused by the framework and always defaults to fluid.model.transform.processRule\n fluid.model.transform.makeStrategy = function (transformer, handleFn, transformFn) {\n transformFn = transformFn || fluid.model.transform.processRule;\n transformer.expand = function (rules) {\n return transformFn(rules, transformer);\n };\n transformer.outputPrefixOp = fluid.model.makePathStack(transformer, \"outputPrefix\");\n transformer.inputPrefixOp = fluid.model.makePathStack(transformer, \"inputPrefix\");\n transformer.transformHandler = handleFn;\n };\n\n fluid.model.transform.invertConfiguration = function (rules) {\n var transformer = {\n inverted: []\n };\n fluid.model.transform.makeStrategy(transformer, fluid.model.transform.handleInvertStrategy);\n transformer.expand(rules);\n return {\n transform: transformer.inverted\n };\n };\n\n fluid.model.transform.collectInputPaths = function (rules) {\n var transformer = {\n inputPaths: []\n };\n fluid.model.transform.makeStrategy(transformer, fluid.model.transform.handleCollectStrategy);\n transformer.expand(rules);\n return transformer.inputPaths;\n };\n\n // unsupported, NON-API function\n fluid.model.transform.flatSchemaStrategy = function (flatSchema, getConfig) {\n var keys = fluid.model.sortByKeyLength(flatSchema);\n return function (root, segment, index, segs) {\n var path = getConfig.parser.compose.apply(null, segs.slice(0, index));\n // TODO: clearly this implementation could be much more efficient\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (fluid.pathUtil.matchPath(key, path, true) !== null) {\n return flatSchema[key];\n }\n }\n };\n };\n\n // unsupported, NON-API function\n fluid.model.transform.defaultSchemaValue = function (schemaValue) {\n var type = fluid.isPrimitive(schemaValue) ? schemaValue : schemaValue.type;\n return type === \"array\" ? [] : {};\n };\n\n // unsupported, NON-API function\n fluid.model.transform.isomorphicSchemaStrategy = function (source, getConfig) {\n return function (root, segment, index, segs) {\n var existing = fluid.get(source, segs.slice(0, index), getConfig);\n return fluid.isArrayable(existing) ? \"array\" : \"object\";\n };\n };\n\n // unsupported, NON-API function\n fluid.model.transform.decodeStrategy = function (source, options, getConfig) {\n if (options.isomorphic) {\n return fluid.model.transform.isomorphicSchemaStrategy(source, getConfig);\n }\n else if (options.flatSchema) {\n return fluid.model.transform.flatSchemaStrategy(options.flatSchema, getConfig);\n }\n };\n\n // unsupported, NON-API function\n fluid.model.transform.schemaToCreatorStrategy = function (strategy) {\n return function (root, segment, index, segs) {\n if (root[segment] === undefined) {\n var schemaValue = strategy(root, segment, index, segs);\n root[segment] = fluid.model.transform.defaultSchemaValue(schemaValue);\n return root[segment];\n }\n };\n };\n\n /** Transforms a model by a sequence of rules. Parameters as for fluid.model.transform,\n * only with an array accepted for \"rules\"\n */\n fluid.model.transform.sequence = function (source, rules, options) {\n for (var i = 0; i < rules.length; ++i) {\n source = fluid.model.transform(source, rules[i], options);\n }\n return source;\n };\n\n fluid.model.compareByPathLength = function (changea, changeb) {\n var pdiff = changea.path.length - changeb.path.length;\n return pdiff === 0 ? changea.sequence - changeb.sequence : pdiff;\n };\n\n /** Fires an accumulated set of change requests in increasing order of target pathlength\n */\n fluid.model.fireSortedChanges = function (changes, applier) {\n changes.sort(fluid.model.compareByPathLength);\n fluid.fireChanges(applier, changes);\n };\n\n /**\n * Transforms a model based on a specified expansion rules objects.\n * Rules objects take the form of:\n * {\n * \"target.path\": \"value.el.path\" || {\n * transform: {\n * type: \"transform.function.path\",\n * ...\n * }\n * }\n * }\n *\n * @param {Object} source the model to transform\n * @param {Object} rules a rules object containing instructions on how to transform the model\n * @param {Object} options a set of rules governing the transformations. At present this may contain\n * the values <code>isomorphic: true</code> indicating that the output model is to be governed by the\n * same schema found in the input model, or <code>flatSchema</code> holding a flat schema object which\n * consists of a hash of EL path specifications with wildcards, to the values \"array\"/\"object\" defining\n * the schema to be used to construct missing trunk values.\n */\n fluid.model.transformWithRules = function (source, rules, options) {\n options = options || {};\n\n var getConfig = fluid.model.escapedGetConfig;\n var setConfig = fluid.model.escapedSetConfig;\n\n var schemaStrategy = fluid.model.transform.decodeStrategy(source, options, getConfig);\n\n var transformer = {\n source: source,\n target: {\n // TODO: This should default to undefined to allow return of primitives, etc.\n model: schemaStrategy ? fluid.model.transform.defaultSchemaValue(schemaStrategy(null, \"\", 0, [\"\"])) : {}\n },\n resolverGetConfig: getConfig,\n resolverSetConfig: setConfig,\n collectedFlatSchemaOpts: undefined, // to hold options for flat schema collected during transforms\n queuedChanges: [],\n queuedTransforms: [] // TODO: This is used only by wildcard applier - explain its operation\n };\n fluid.model.transform.makeStrategy(transformer, fluid.model.transform.handleTransformStrategy);\n transformer.applier = {\n fireChangeRequest: function (changeRequest) {\n changeRequest.sequence = transformer.queuedChanges.length;\n transformer.queuedChanges.push(changeRequest);\n }\n };\n fluid.bindRequestChange(transformer.applier);\n\n transformer.expand(rules);\n\n var rootSetConfig = fluid.copy(setConfig);\n // Modify schemaStrategy if we collected flat schema options for the setConfig of finalApplier\n if (transformer.collectedFlatSchemaOpts !== undefined) {\n $.extend(transformer.collectedFlatSchemaOpts, options.flatSchema);\n schemaStrategy = fluid.model.transform.flatSchemaStrategy(transformer.collectedFlatSchemaOpts, getConfig);\n }\n rootSetConfig.strategies = [fluid.model.defaultFetchStrategy, schemaStrategy ? fluid.model.transform.schemaToCreatorStrategy(schemaStrategy)\n : fluid.model.defaultCreatorStrategy];\n transformer.finalApplier = options.finalApplier || fluid.makeHolderChangeApplier(transformer.target, {resolverSetConfig: rootSetConfig});\n\n if (transformer.queuedTransforms.length > 0) {\n transformer.typeStack = [];\n transformer.pathOp = fluid.model.makePathStack(transformer, \"path\");\n fluid.model.transform.expandWildcards(transformer, source);\n }\n fluid.model.fireSortedChanges(transformer.queuedChanges, transformer.finalApplier);\n return transformer.target.model;\n };\n\n $.extend(fluid.model.transformWithRules, fluid.model.transform);\n fluid.model.transform = fluid.model.transformWithRules;\n\n /** Utility function to produce a standard options transformation record for a single set of rules **/\n fluid.transformOne = function (rules) {\n return {\n transformOptions: {\n transformer: \"fluid.model.transformWithRules\",\n config: rules\n }\n };\n };\n\n /** Utility function to produce a standard options transformation record for multiple rules to be applied in sequence **/\n fluid.transformMany = function (rules) {\n return {\n transformOptions: {\n transformer: \"fluid.model.transform.sequence\",\n config: rules\n }\n };\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2010 University of Toronto\nCopyright 2010-2015 OCAD University\nCopyright 2013-2014 Raising the Floor - US\nCopyright 2013-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\nvar fluid = fluid || fluid_2_0_0;\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.model.transform\");\n fluid.registerNamespace(\"fluid.transforms\");\n\n /**********************************\n * Standard transformer functions *\n **********************************/\n\n fluid.defaults(\"fluid.transforms.value\", {\n gradeNames: \"fluid.standardTransformFunction\",\n invertConfiguration: \"fluid.identity\"\n });\n\n fluid.transforms.value = fluid.identity;\n\n // Export the use of the \"value\" transform under the \"identity\" name for FLUID-5293\n fluid.transforms.identity = fluid.transforms.value;\n fluid.defaults(\"fluid.transforms.identity\", {\n gradeNames: \"fluid.transforms.value\"\n });\n\n // A helpful utility function to be used when a transform's inverse is the identity\n fluid.transforms.invertToIdentity = function (transformSpec) {\n transformSpec.type = \"fluid.transforms.identity\";\n return transformSpec;\n };\n\n fluid.defaults(\"fluid.transforms.literalValue\", {\n gradeNames: \"fluid.standardOutputTransformFunction\"\n });\n\n fluid.transforms.literalValue = function (transformSpec) {\n return transformSpec.input;\n };\n\n fluid.defaults(\"fluid.transforms.stringToNumber\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.stringToNumber.invert\"\n });\n\n fluid.transforms.stringToNumber = function (value) {\n var newValue = Number(value);\n return isNaN(newValue) ? undefined : newValue;\n };\n\n fluid.transforms.stringToNumber.invert = function (transformSpec) {\n transformSpec.type = \"fluid.transforms.numberToString\";\n return transformSpec;\n };\n\n fluid.defaults(\"fluid.transforms.numberToString\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.numberToString.invert\"\n });\n\n fluid.transforms.numberToString = function (value) {\n return (typeof value !== \"number\") ? undefined : \"\" + value;\n };\n\n fluid.transforms.numberToString.invert = function (transformSpec) {\n transformSpec.type = \"fluid.transforms.stringToNumber\";\n return transformSpec;\n };\n\n fluid.defaults(\"fluid.transforms.count\", {\n gradeNames: \"fluid.standardTransformFunction\"\n });\n\n fluid.transforms.count = function (value) {\n return fluid.makeArray(value).length;\n };\n\n\n fluid.defaults(\"fluid.transforms.round\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.invertToIdentity\"\n });\n\n fluid.transforms.round = function (value) {\n return Math.round(value);\n };\n\n\n fluid.defaults(\"fluid.transforms.delete\", {\n gradeNames: \"fluid.transformFunction\"\n });\n\n fluid.transforms[\"delete\"] = function (transformSpec, transformer) {\n var outputPath = fluid.model.composePaths(transformer.outputPrefix, transformSpec.outputPath);\n transformer.applier.change(outputPath, null, \"DELETE\");\n };\n\n\n fluid.defaults(\"fluid.transforms.firstValue\", {\n gradeNames: \"fluid.standardOutputTransformFunction\"\n });\n\n fluid.transforms.firstValue = function (transformSpec, transformer) {\n if (!transformSpec.values || !transformSpec.values.length) {\n fluid.fail(\"firstValue transformer requires an array of values at path named \\\"values\\\", supplied\", transformSpec);\n }\n for (var i = 0; i < transformSpec.values.length; i++) {\n var value = transformSpec.values[i];\n // TODO: problem here - all of these transforms will have their side-effects (setValue) even if only one is chosen\n var expanded = transformer.expand(value);\n if (expanded !== undefined) {\n return expanded;\n }\n }\n };\n\n fluid.defaults(\"fluid.transforms.linearScale\", {\n gradeNames: [\"fluid.multiInputTransformFunction\",\n \"fluid.standardTransformFunction\",\n \"fluid.lens\" ],\n invertConfiguration: \"fluid.transforms.linearScale.invert\",\n inputVariables: {\n factor: 1,\n offset: 0\n }\n });\n\n /* simple linear transformation */\n fluid.transforms.linearScale = function (input, extraInputs) {\n var factor = extraInputs.factor();\n var offset = extraInputs.offset();\n\n if (typeof(input) !== \"number\" || typeof(factor) !== \"number\" || typeof(offset) !== \"number\") {\n return undefined;\n }\n return input * factor + offset;\n };\n\n /* TODO: This inversion doesn't work if the value and factors are given as paths in the source model */\n fluid.transforms.linearScale.invert = function (transformSpec) {\n // delete the factor and offset paths if present\n delete transformSpec.factorPath;\n delete transformSpec.offsetPath;\n\n if (transformSpec.factor !== undefined) {\n transformSpec.factor = (transformSpec.factor === 0) ? 0 : 1 / transformSpec.factor;\n }\n if (transformSpec.offset !== undefined) {\n transformSpec.offset = -transformSpec.offset * (transformSpec.factor !== undefined ? transformSpec.factor : 1);\n }\n return transformSpec;\n };\n\n fluid.defaults(\"fluid.transforms.binaryOp\", {\n gradeNames: [ \"fluid.multiInputTransformFunction\", \"fluid.standardOutputTransformFunction\" ],\n inputVariables: {\n left: null,\n right: null\n }\n });\n\n fluid.transforms.binaryLookup = {\n \"===\": function (a, b) { return fluid.model.isSameValue(a, b); },\n \"!==\": function (a, b) { return !fluid.model.isSameValue(a, b); },\n \"<=\": function (a, b) { return a <= b; },\n \"<\": function (a, b) { return a < b; },\n \">=\": function (a, b) { return a >= b; },\n \">\": function (a, b) { return a > b; },\n \"+\": function (a, b) { return a + b; },\n \"-\": function (a, b) { return a - b; },\n \"*\": function (a, b) { return a * b; },\n \"/\": function (a, b) { return a / b; },\n \"%\": function (a, b) { return a % b; },\n \"&&\": function (a, b) { return a && b; },\n \"||\": function (a, b) { return a || b; }\n };\n\n fluid.transforms.binaryOp = function (inputs, transformSpec, transformer) {\n var left = inputs.left();\n var right = inputs.right();\n\n var operator = fluid.model.transform.getValue(undefined, transformSpec.operator, transformer);\n\n var fun = fluid.transforms.binaryLookup[operator];\n return (fun === undefined || left === undefined || right === undefined) ?\n undefined : fun(left, right);\n };\n\n fluid.defaults(\"fluid.transforms.condition\", {\n gradeNames: [ \"fluid.multiInputTransformFunction\", \"fluid.standardOutputTransformFunction\" ],\n inputVariables: {\n \"true\": null,\n \"false\": null,\n \"condition\": null\n }\n });\n\n fluid.transforms.condition = function (inputs) {\n var condition = inputs.condition();\n if (condition === null) {\n return undefined;\n }\n\n return inputs[condition ? \"true\" : \"false\"]();\n };\n\n fluid.defaults(\"fluid.transforms.valueMapper\", {\n gradeNames: [\"fluid.transformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.valueMapper.invert\",\n collectInputPaths: \"fluid.transforms.valueMapper.collect\"\n });\n\n /* unsupported, NON-API function\n * sorts by the object's 'matchValue' property, where higher is better.\n * Tiebreaking is done via the `index` property, where a lower index takes priority\n */\n fluid.model.transform.compareMatches = function (speca, specb) {\n var matchDiff = specb.matchValue - speca.matchValue;\n return matchDiff === 0 ? speca.index - specb.index : matchDiff; // tiebreak using 'index'\n };\n\n fluid.transforms.valueMapper = function (transformSpec, transformer) {\n if (!transformSpec.match) {\n fluid.fail(\"valueMapper requires an array or hash of matches at path named \\\"match\\\", supplied \", transformSpec);\n }\n var value = fluid.model.transform.getValue(transformSpec.defaultInputPath, undefined, transformer);\n\n var matchedEntry = (fluid.isArrayable(transformSpec.match)) ? // long form with array of records?\n fluid.transforms.valueMapper.longFormMatch(value, transformSpec, transformer) :\n transformSpec.match[value];\n\n if (matchedEntry === undefined) { // if no matches found, default to noMatch\n matchedEntry = transformSpec.noMatch;\n }\n\n if (matchedEntry === undefined) { // if there was no noMatch directive, return undefined\n return;\n }\n\n var outputPath = matchedEntry.outputPath === undefined ? transformSpec.defaultOutputPath : matchedEntry.outputPath;\n transformer.outputPrefixOp.push(outputPath);\n\n var outputValue;\n if (fluid.isPrimitive(matchedEntry)) {\n outputValue = matchedEntry;\n } else if (matchedEntry.outputUndefinedValue) { // if outputUndefinedValue is set, outputValue `undefined`\n outputValue = undefined;\n } else {\n // get value from outputValue. If none is found set the outputValue to be that of defaultOutputValue (or undefined)\n outputValue = fluid.model.transform.resolveParam(matchedEntry, transformer, \"outputValue\", undefined);\n outputValue = (outputValue === undefined) ? transformSpec.defaultOutputValue : outputValue;\n }\n // output if we have a path and something to output\n if (typeof(outputPath) === \"string\" && outputValue !== undefined) {\n fluid.model.transform.setValue(undefined, outputValue, transformer, transformSpec.merge);\n outputValue = undefined; // make sure we don't also return value\n }\n transformer.outputPrefixOp.pop();\n return outputValue;\n };\n\n // unsupported, NON-API function\n fluid.transforms.valueMapper.longFormMatch = function (valueFromDefaultPath, transformSpec, transformer) {\n var o = transformSpec.match;\n if (o.length === 0) {\n fluid.fail(\"valueMapper supplied empty list of matches: \", transformSpec);\n }\n var matchPower = [];\n for (var i = 0; i < o.length; ++i) {\n var option = o[i];\n var value = option.inputPath ?\n fluid.model.transform.getValue(option.inputPath, undefined, transformer) : valueFromDefaultPath;\n\n var matchValue = fluid.model.transform.matchValue(option.inputValue, value, option.partialMatches);\n matchPower[i] = {index: i, matchValue: matchValue};\n }\n matchPower.sort(fluid.model.transform.compareMatches);\n return matchPower[0].matchValue <= 0 ? undefined : o[matchPower[0].index];\n };\n\n fluid.transforms.valueMapper.invert = function (transformSpec, transformer) {\n var match = [];\n var togo = {\n type: \"fluid.transforms.valueMapper\",\n match: match\n };\n var isArray = fluid.isArrayable(transformSpec.match);\n\n togo.defaultInputPath = fluid.model.composePaths(transformer.outputPrefix, transformSpec.defaultOutputPath);\n togo.defaultOutputPath = fluid.model.composePaths(transformer.inputPrefix, transformSpec.defaultInputPath);\n\n var def = fluid.firstDefined;\n fluid.each(transformSpec.match, function (option, key) {\n if (option.outputUndefinedValue === true) {\n return; // don't attempt to invert undefined output value entries\n }\n var outOption = {};\n var origInputValue = def(isArray ? option.inputValue : key, transformSpec.defaultInputValue);\n if (origInputValue === undefined) {\n fluid.fail(\"Failure inverting configuration for valueMapper - inputValue could not be resolved for record \" + key + \": \", transformSpec);\n }\n outOption.outputValue = origInputValue;\n outOption.inputValue = !isArray && fluid.isPrimitive(option) ?\n option : def(option.outputValue, transformSpec.defaultOutputValue);\n\n if (option.outputPath) {\n outOption.inputPath = fluid.model.composePaths(transformer.outputPrefix, def(option.outputPath, transformSpec.outputPath));\n }\n if (option.inputPath) {\n outOption.outputPath = fluid.model.composePaths(transformer.inputPrefix, def(option.inputPath, transformSpec.inputPath));\n }\n match.push(outOption);\n });\n return togo;\n };\n\n fluid.transforms.valueMapper.collect = function (transformSpec, transformer) {\n var togo = [];\n fluid.model.transform.accumulateInputPath(transformSpec.defaultInputPath, transformer, togo);\n fluid.each(transformSpec.match, function (option) {\n fluid.model.transform.accumulateInputPath(option.inputPath, transformer, togo);\n });\n return togo;\n };\n\n /* -------- arrayToSetMembership and setMembershipToArray ---------------- */\n\n fluid.defaults(\"fluid.transforms.arrayToSetMembership\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.arrayToSetMembership.invert\"\n });\n\n\n fluid.transforms.arrayToSetMembership = function (value, transformSpec, transformer) {\n var output = {};\n var options = transformSpec.options;\n\n if (!value || !fluid.isArrayable(value)) {\n fluid.fail(\"arrayToSetMembership didn't find array at inputPath nor passed as value.\", transformSpec);\n }\n if (!options) {\n fluid.fail(\"arrayToSetMembership requires an options block set\");\n }\n\n if (transformSpec.presentValue === undefined) {\n transformSpec.presentValue = true;\n }\n\n if (transformSpec.missingValue === undefined) {\n transformSpec.missingValue = false;\n }\n\n fluid.each(options, function (outPath, key) {\n // write to output object the value <presentValue> or <missingValue> depending on whether key is found in user input\n var outVal = (value.indexOf(key) !== -1) ? transformSpec.presentValue : transformSpec.missingValue;\n fluid.set(output, outPath, outVal, transformer.resolverSetConfig);\n });\n return output;\n };\n\n /**\n * NON-API function; Copies the entire transformSpec with the following modifications:\n * * A new type is set (from argument)\n * * each [key]=value entry in the options is swapped to be: [value]=key\n */\n fluid.transforms.arrayToSetMembership.invertWithType = function (transformSpec, transformer, newType) {\n transformSpec.type = newType;\n var newOptions = {};\n fluid.each(transformSpec.options, function (path, oldKey) {\n newOptions[path] = oldKey;\n });\n transformSpec.options = newOptions;\n return transformSpec;\n };\n\n fluid.transforms.arrayToSetMembership.invert = function (transformSpec, transformer) {\n return fluid.transforms.arrayToSetMembership.invertWithType(transformSpec, transformer,\n \"fluid.transforms.setMembershipToArray\");\n };\n\n fluid.defaults(\"fluid.transforms.setMembershipToArray\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.setMembershipToArray.invert\"\n });\n\n fluid.transforms.setMembershipToArray = function (input, transformSpec, transformer) {\n var options = transformSpec.options;\n\n if (!options) {\n fluid.fail(\"setMembershipToArray requires an options block specified\");\n }\n\n if (transformSpec.presentValue === undefined) {\n transformSpec.presentValue = true;\n }\n\n if (transformSpec.missingValue === undefined) {\n transformSpec.missingValue = false;\n }\n\n var outputArr = [];\n fluid.each(options, function (outputVal, key) {\n var value = fluid.get(input, key, transformer.resolverGetConfig);\n if (value === transformSpec.presentValue) {\n outputArr.push(outputVal);\n }\n });\n return outputArr;\n };\n\n fluid.transforms.setMembershipToArray.invert = function (transformSpec, transformer) {\n return fluid.transforms.arrayToSetMembership.invertWithType(transformSpec, transformer,\n \"fluid.transforms.arrayToSetMembership\");\n };\n\n /* -------- deindexIntoArrayByKey and indexArrayByKey -------------------- */\n\n /**\n * Transforms the given array to an object.\n * Uses the transformSpec.options.key values from each object within the array as new keys.\n *\n * For example, with transformSpec.key = \"name\" and an input object like this:\n *\n * {\n * b: [\n * { name: b1, v: v1 },\n * { name: b2, v: v2 }\n * ]\n * }\n *\n * The output will be:\n * {\n * b: {\n * b1: {\n * v: v1\n * }\n * },\n * {\n * b2: {\n * v: v2\n * }\n * }\n * }\n */\n fluid.model.transform.applyPaths = function (operation, pathOp, paths) {\n for (var i = 0; i < paths.length; ++i) {\n if (operation === \"push\") {\n pathOp.push(paths[i]);\n } else {\n pathOp.pop();\n }\n }\n };\n\n fluid.model.transform.expandInnerValues = function (inputPath, outputPath, transformer, innerValues) {\n var inputPrefixOp = transformer.inputPrefixOp;\n var outputPrefixOp = transformer.outputPrefixOp;\n var apply = fluid.model.transform.applyPaths;\n\n apply(\"push\", inputPrefixOp, inputPath);\n apply(\"push\", outputPrefixOp, outputPath);\n var expanded = {};\n fluid.each(innerValues, function (innerValue) {\n var expandedInner = transformer.expand(innerValue);\n if (!fluid.isPrimitive(expandedInner)) {\n $.extend(true, expanded, expandedInner);\n } else {\n expanded = expandedInner;\n }\n });\n apply(\"pop\", outputPrefixOp, outputPath);\n apply(\"pop\", inputPrefixOp, inputPath);\n\n return expanded;\n };\n\n\n fluid.defaults(\"fluid.transforms.indexArrayByKey\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\" ],\n invertConfiguration: \"fluid.transforms.indexArrayByKey.invert\"\n });\n\n /** Transforms an array of objects into an object of objects, by indexing using the option \"key\" which must be supplied within the transform specification.\n * The key of each element will be taken from the value held in each each original object's member derived from the option value in \"key\" - this member should\n * exist in each array element. The member with name agreeing with \"key\" and its value will be removed from each original object before inserting into the returned\n * object.\n * For example,\n * <code>fluid.transforms.indexArrayByKey([{k: \"e1\", b: 1, c: 2}, {k: \"e2\", b: 2: c: 3}], {key: \"k\"})</code> will output the object\n * <code>{e1: {b: 1, c: 2}, e2: {b: 2: c, 3}</code>\n * Note: This transform frequently arises in the context of data which arose in XML form, which often represents \"morally indexed\" data in repeating array-like\n * constructs where the indexing key is held, for example, in an attribute.\n */\n fluid.transforms.indexArrayByKey = function (arr, transformSpec, transformer) {\n if (transformSpec.key === undefined) {\n fluid.fail(\"indexArrayByKey requires a 'key' option.\", transformSpec);\n }\n if (!fluid.isArrayable(arr)) {\n fluid.fail(\"indexArrayByKey didn't find array at inputPath.\", transformSpec);\n }\n var newHash = {};\n var pivot = transformSpec.key;\n\n fluid.each(arr, function (v, k) {\n // check that we have a pivot entry in the object and it's a valid type:\n var newKey = v[pivot];\n var keyType = typeof(newKey);\n if (keyType !== \"string\" && keyType !== \"boolean\" && keyType !== \"number\") {\n fluid.fail(\"indexArrayByKey encountered untransformable array due to missing or invalid key\", v);\n }\n // use the value of the key element as key and use the remaining content as value\n var content = fluid.copy(v);\n delete content[pivot];\n // fix sub Arrays if needed:\n if (transformSpec.innerValue) {\n content = fluid.model.transform.expandInnerValues([transformer.inputPrefix, transformSpec.inputPath, k.toString()],\n [transformSpec.outputPath, newKey], transformer, transformSpec.innerValue);\n }\n newHash[newKey] = content;\n });\n return newHash;\n };\n\n fluid.transforms.indexArrayByKey.invert = function (transformSpec) {\n transformSpec.type = \"fluid.transforms.deindexIntoArrayByKey\";\n // invert transforms from innerValue as well:\n // TODO: The Model Transformations framework should be capable of this, but right now the\n // issue is that we use a \"private contract\" to operate the \"innerValue\" slot. We need to\n // spend time thinking of how this should be formalised\n if (transformSpec.innerValue) {\n var innerValue = transformSpec.innerValue;\n for (var i = 0; i < innerValue.length; ++i) {\n innerValue[i] = fluid.model.transform.invertConfiguration(innerValue[i]);\n }\n }\n return transformSpec;\n };\n\n\n fluid.defaults(\"fluid.transforms.deindexIntoArrayByKey\", {\n gradeNames: [ \"fluid.standardTransformFunction\", \"fluid.lens\" ],\n invertConfiguration: \"fluid.transforms.deindexIntoArrayByKey.invert\"\n });\n\n /**\n * Transforms an object of objects into an array of objects, by deindexing by the option \"key\" which must be supplied within the transform specification.\n * The key of each object will become split out into a fresh value in each array element which will be given the key held in the transformSpec option \"key\".\n * For example:\n * <code>fluid.transforms.deindexIntoArrayByKey({e1: {b: 1, c: 2}, e2: {b: 2: c, 3}, {key: \"k\"})</code> will output the array\n * <code>[{k: \"e1\", b: 1, c: 2}, {k: \"e2\", b: 2: c: 3}]</code>\n *\n * This performs the inverse transform of fluid.transforms.indexArrayByKey.\n */\n fluid.transforms.deindexIntoArrayByKey = function (hash, transformSpec, transformer) {\n if (transformSpec.key === undefined) {\n fluid.fail(\"deindexIntoArrayByKey requires a \\\"key\\\" option.\", transformSpec);\n }\n\n var newArray = [];\n var pivot = transformSpec.key;\n\n fluid.each(hash, function (v, k) {\n var content = {};\n content[pivot] = k;\n if (transformSpec.innerValue) {\n v = fluid.model.transform.expandInnerValues([transformSpec.inputPath, k], [transformSpec.outputPath, newArray.length.toString()],\n transformer, transformSpec.innerValue);\n }\n $.extend(true, content, v);\n newArray.push(content);\n });\n return newArray;\n };\n\n fluid.transforms.deindexIntoArrayByKey.invert = function (transformSpec) {\n transformSpec.type = \"fluid.transforms.indexArrayByKey\";\n // invert transforms from innerValue as well:\n // TODO: The Model Transformations framework should be capable of this, but right now the\n // issue is that we use a \"private contract\" to operate the \"innerValue\" slot. We need to\n // spend time thinking of how this should be formalised\n if (transformSpec.innerValue) {\n var innerValue = transformSpec.innerValue;\n for (var i = 0; i < innerValue.length; ++i) {\n innerValue[i] = fluid.model.transform.invertConfiguration(innerValue[i]);\n }\n }\n return transformSpec;\n };\n\n fluid.defaults(\"fluid.transforms.limitRange\", {\n gradeNames: \"fluid.standardTransformFunction\"\n });\n\n fluid.transforms.limitRange = function (value, transformSpec) {\n var min = transformSpec.min;\n if (min !== undefined) {\n var excludeMin = transformSpec.excludeMin || 0;\n min += excludeMin;\n if (value < min) {\n value = min;\n }\n }\n var max = transformSpec.max;\n if (max !== undefined) {\n var excludeMax = transformSpec.excludeMax || 0;\n max -= excludeMax;\n if (value > max) {\n value = max;\n }\n }\n return value;\n };\n\n fluid.defaults(\"fluid.transforms.indexOf\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.indexOf.invert\"\n });\n\n fluid.transforms.indexOf = function (value, transformSpec) {\n // We do not allow a positive number as 'notFound' value, as it threatens invertibility\n if (typeof (transformSpec.notFound) === \"number\" && transformSpec.notFound >= 0) {\n fluid.fail(\"A positive number is not allowed as 'notFound' value for indexOf\");\n }\n var offset = fluid.transforms.parseIndexationOffset(transformSpec.offset, \"indexOf\");\n var array = fluid.makeArray(transformSpec.array);\n var originalIndex = array.indexOf(value);\n return originalIndex === -1 && transformSpec.notFound ? transformSpec.notFound : originalIndex + offset;\n };\n\n fluid.transforms.indexOf.invert = function (transformSpec, transformer) {\n var togo = fluid.transforms.invertArrayIndexation(transformSpec, transformer);\n togo.type = \"fluid.transforms.dereference\";\n return togo;\n };\n\n fluid.defaults(\"fluid.transforms.dereference\", {\n gradeNames: [\"fluid.standardTransformFunction\", \"fluid.lens\"],\n invertConfiguration: \"fluid.transforms.dereference.invert\"\n });\n\n fluid.transforms.dereference = function (value, transformSpec) {\n if (typeof (value) !== \"number\") {\n return undefined;\n }\n var offset = fluid.transforms.parseIndexationOffset(transformSpec.offset, \"dereference\");\n var array = fluid.makeArray(transformSpec.array);\n var index = value + offset;\n return array[index];\n };\n\n fluid.transforms.dereference.invert = function (transformSpec, transformer) {\n var togo = fluid.transforms.invertArrayIndexation(transformSpec, transformer);\n togo.type = \"fluid.transforms.indexOf\";\n return togo;\n };\n\n fluid.transforms.parseIndexationOffset = function (offset, transformName) {\n var parsedOffset = 0;\n if (offset !== undefined) {\n parsedOffset = fluid.parseInteger(offset);\n if (isNaN(parsedOffset)) {\n fluid.fail(transformName + \" requires the value of \\\"offset\\\" to be an integer or a string that can be converted to an integer. \" + offset + \" is invalid.\");\n }\n }\n return parsedOffset;\n };\n\n fluid.transforms.invertArrayIndexation = function (transformSpec) {\n if (!isNaN(Number(transformSpec.offset))) {\n transformSpec.offset = Number(transformSpec.offset) * (-1);\n }\n return transformSpec;\n };\n\n fluid.defaults(\"fluid.transforms.stringTemplate\", {\n gradeNames: \"fluid.standardOutputTransformFunction\"\n });\n\n fluid.transforms.stringTemplate = function (transformSpec) {\n return fluid.stringTemplate(transformSpec.template, transformSpec.terms);\n };\n\n fluid.defaults(\"fluid.transforms.free\", {\n gradeNames: \"fluid.transformFunction\"\n });\n\n fluid.transforms.free = function (transformSpec) {\n var args = fluid.makeArray(transformSpec.args);\n return fluid.invokeGlobalFunction(transformSpec.func, args);\n };\n\n fluid.defaults(\"fluid.transforms.quantize\", {\n gradeNames: \"fluid.standardTransformFunction\"\n });\n\n /**\n * Quantize function maps a continuous range into discrete values. Given an input, it will\n * be matched into a discrete bucket and the corresponding output will be done.\n */\n fluid.transforms.quantize = function (value, transformSpec, transform) {\n if (!transformSpec.ranges || !transformSpec.ranges.length) {\n fluid.fail(\"fluid.transforms.quantize should have a key called ranges containing an array defining ranges to quantize\");\n }\n // TODO: error checking that upper bounds are all numbers and increasing\n for (var i = 0; i < transformSpec.ranges.length; i++) {\n var rangeSpec = transformSpec.ranges[i];\n if (value <= rangeSpec.upperBound || rangeSpec.upperBound === undefined && value >= Number.NEGATIVE_INFINITY) {\n return fluid.isPrimitive(rangeSpec.output) ? rangeSpec.output : transform.expand(rangeSpec.output);\n }\n }\n };\n\n /**\n * inRange transformer checks whether a value is within a given range and returns true if it is,\n * and false if it's not.\n *\n * The range is defined by the two inputs: \"min\" and \"max\" (both inclusive). If one of these inputs\n * is not present it is considered -infinite and +infinite, respectively - In other words, if no\n * `min` value is defined, any value below or equal to the given \"max\" value will result in true.\n */\n fluid.defaults(\"fluid.transforms.inRange\", {\n gradeNames: \"fluid.standardTransformFunction\"\n });\n\n fluid.transforms.inRange = function (value, transformSpec) {\n return (transformSpec.min === undefined || transformSpec.min <= value) &&\n (transformSpec.max === undefined || transformSpec.max >= value) ? true : false;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2010 University of Cambridge\nCopyright 2008-2010 University of Toronto\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2010-2016 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\nvar fluid = fluid || fluid_2_0_0;\n\n(function ($, fluid) {\n \"use strict\";\n\n // $().fluid(\"selectable\", args)\n // $().fluid(\"selectable\".that()\n // $().fluid(\"pager.pagerBar\", args)\n // $().fluid(\"reorderer\", options)\n\n /** Create a \"bridge\" from code written in the Fluid standard \"that-ist\" style,\n * to the standard JQuery UI plugin architecture specified at http://docs.jquery.com/UI/Guidelines .\n * Every Fluid component corresponding to the top-level standard signature (JQueryable, options)\n * will automatically convert idiomatically to the JQuery UI standard via this adapter.\n * Any return value which is a primitive or array type will become the return value\n * of the \"bridged\" function - however, where this function returns a general hash\n * (object) this is interpreted as forming part of the Fluid \"return that\" pattern,\n * and the function will instead be bridged to \"return this\" as per JQuery standard,\n * permitting chaining to occur. However, as a courtesy, the particular \"this\" returned\n * will be augmented with a function that() which will allow the original return\n * value to be retrieved if desired.\n * @param {String} name The name under which the \"plugin space\" is to be injected into\n * JQuery\n * @param {Object} peer The root of the namespace corresponding to the peer object.\n */\n\n fluid.thatistBridge = function (name, peer) {\n\n var togo = function (funcname) {\n var segs = funcname.split(\".\");\n var move = peer;\n for (var i = 0; i < segs.length; ++i) {\n move = move[segs[i]];\n }\n var args = [this];\n if (arguments.length === 2) {\n args = args.concat($.makeArray(arguments[1]));\n }\n var ret = move.apply(null, args);\n this.that = function () {\n return ret;\n };\n var type = typeof(ret);\n return !ret || type === \"string\" || type === \"number\" || type === \"boolean\" ||\n (ret && ret.length !== undefined) ? ret : this;\n };\n $.fn[name] = togo;\n return togo;\n };\n\n fluid.thatistBridge(\"fluid\", fluid);\n fluid.thatistBridge(\"fluid_2_0_0\", fluid_2_0_0);\n\n/*************************************************************************\n * Tabindex normalization - compensate for browser differences in naming\n * and function of \"tabindex\" attribute and tabbing order.\n */\n\n // -- Private functions --\n\n\n var normalizeTabindexName = function () {\n return $.browser.msie ? \"tabIndex\" : \"tabindex\";\n };\n\n var canHaveDefaultTabindex = function (elements) {\n if (elements.length <= 0) {\n return false;\n }\n\n return $(elements[0]).is(\"a, input, button, select, area, textarea, object\");\n };\n\n var getValue = function (elements) {\n if (elements.length <= 0) {\n return undefined;\n }\n\n if (!fluid.tabindex.hasAttr(elements)) {\n return canHaveDefaultTabindex(elements) ? Number(0) : undefined;\n }\n\n // Get the attribute and return it as a number value.\n var value = elements.attr(normalizeTabindexName());\n return Number(value);\n };\n\n var setValue = function (elements, toIndex) {\n return elements.each(function (i, item) {\n $(item).attr(normalizeTabindexName(), toIndex);\n });\n };\n\n // -- Public API --\n\n /**\n * Gets the value of the tabindex attribute for the first item, or sets the tabindex value of all elements\n * if toIndex is specified.\n *\n * @param {String|Number} toIndex\n */\n fluid.tabindex = function (target, toIndex) {\n target = $(target);\n if (toIndex !== null && toIndex !== undefined) {\n return setValue(target, toIndex);\n } else {\n return getValue(target);\n }\n };\n\n /**\n * Removes the tabindex attribute altogether from each element.\n */\n fluid.tabindex.remove = function (target) {\n target = $(target);\n return target.each(function (i, item) {\n $(item).removeAttr(normalizeTabindexName());\n });\n };\n\n /**\n * Determines if an element actually has a tabindex attribute present.\n */\n fluid.tabindex.hasAttr = function (target) {\n target = $(target);\n if (target.length <= 0) {\n return false;\n }\n var togo = target.map(\n function () {\n var attributeNode = this.getAttributeNode(normalizeTabindexName());\n return attributeNode ? attributeNode.specified : false;\n }\n );\n return togo.length === 1 ? togo[0] : togo;\n };\n\n /**\n * Determines if an element either has a tabindex attribute or is naturally tab-focussable.\n */\n fluid.tabindex.has = function (target) {\n target = $(target);\n return fluid.tabindex.hasAttr(target) || canHaveDefaultTabindex(target);\n };\n\n // Keyboard navigation\n // Public, static constants needed by the rest of the library.\n fluid.a11y = $.a11y || {};\n\n fluid.a11y.orientation = {\n HORIZONTAL: 0,\n VERTICAL: 1,\n BOTH: 2\n };\n\n var UP_DOWN_KEYMAP = {\n next: $.ui.keyCode.DOWN,\n previous: $.ui.keyCode.UP\n };\n\n var LEFT_RIGHT_KEYMAP = {\n next: $.ui.keyCode.RIGHT,\n previous: $.ui.keyCode.LEFT\n };\n\n // Private functions.\n var unwrap = function (element) {\n return element.jquery ? element[0] : element; // Unwrap the element if it's a jQuery.\n };\n\n\n var makeElementsTabFocussable = function (elements) {\n // If each element doesn't have a tabindex, or has one set to a negative value, set it to 0.\n elements.each(function (idx, item) {\n item = $(item);\n if (!item.fluid(\"tabindex.has\") || item.fluid(\"tabindex\") < 0) {\n item.fluid(\"tabindex\", 0);\n }\n });\n };\n\n // Public API.\n /**\n * Makes all matched elements available in the tab order by setting their tabindices to \"0\".\n */\n fluid.tabbable = function (target) {\n target = $(target);\n makeElementsTabFocussable(target);\n };\n\n /***********************************************************************\n * Selectable functionality - geometrising a set of nodes such that they\n * can be navigated (by setting focus) using a set of directional keys\n */\n\n var CONTEXT_KEY = \"selectionContext\";\n var NO_SELECTION = -32768;\n\n var cleanUpWhenLeavingContainer = function (selectionContext) {\n if (selectionContext.activeItemIndex !== NO_SELECTION) {\n if (selectionContext.options.onLeaveContainer) {\n selectionContext.options.onLeaveContainer(\n selectionContext.selectables[selectionContext.activeItemIndex]\n );\n } else if (selectionContext.options.onUnselect) {\n selectionContext.options.onUnselect(\n selectionContext.selectables[selectionContext.activeItemIndex]\n );\n }\n }\n\n if (!selectionContext.options.rememberSelectionState) {\n selectionContext.activeItemIndex = NO_SELECTION;\n }\n };\n\n /**\n * Does the work of selecting an element and delegating to the client handler.\n */\n var drawSelection = function (elementToSelect, handler) {\n if (handler) {\n handler(elementToSelect);\n }\n };\n\n /**\n * Does does the work of unselecting an element and delegating to the client handler.\n */\n var eraseSelection = function (selectedElement, handler) {\n if (handler && selectedElement) {\n handler(selectedElement);\n }\n };\n\n var unselectElement = function (selectedElement, selectionContext) {\n eraseSelection(selectedElement, selectionContext.options.onUnselect);\n };\n\n var selectElement = function (elementToSelect, selectionContext) {\n // It's possible that we're being called programmatically, in which case we should clear any previous selection.\n unselectElement(selectionContext.selectedElement(), selectionContext);\n\n elementToSelect = unwrap(elementToSelect);\n var newIndex = selectionContext.selectables.index(elementToSelect);\n\n // Next check if the element is a known selectable. If not, do nothing.\n if (newIndex === -1) {\n return;\n }\n\n // Select the new element.\n selectionContext.activeItemIndex = newIndex;\n drawSelection(elementToSelect, selectionContext.options.onSelect);\n };\n\n var selectableFocusHandler = function (selectionContext) {\n return function (evt) {\n // FLUID-3590: newer browsers (FF 3.6, Webkit 4) have a form of \"bug\" in that they will go bananas\n // on attempting to move focus off an element which has tabindex dynamically set to -1.\n $(evt.target).fluid(\"tabindex\", 0);\n selectElement(evt.target, selectionContext);\n\n // Force focus not to bubble on some browsers.\n return evt.stopPropagation();\n };\n };\n\n var selectableBlurHandler = function (selectionContext) {\n return function (evt) {\n $(evt.target).fluid(\"tabindex\", selectionContext.options.selectablesTabindex);\n unselectElement(evt.target, selectionContext);\n\n // Force blur not to bubble on some browsers.\n return evt.stopPropagation();\n };\n };\n\n var reifyIndex = function (sc_that) {\n var elements = sc_that.selectables;\n if (sc_that.activeItemIndex >= elements.length) {\n sc_that.activeItemIndex = (sc_that.options.noWrap ? elements.length - 1 : 0);\n }\n if (sc_that.activeItemIndex < 0 && sc_that.activeItemIndex !== NO_SELECTION) {\n sc_that.activeItemIndex = (sc_that.options.noWrap ? 0 : elements.length - 1);\n }\n if (sc_that.activeItemIndex >= 0) {\n fluid.focus(elements[sc_that.activeItemIndex]);\n }\n };\n\n var prepareShift = function (selectionContext) {\n // FLUID-3590: FF 3.6 and Safari 4.x won't fire blur() when programmatically moving focus.\n var selElm = selectionContext.selectedElement();\n if (selElm) {\n fluid.blur(selElm);\n }\n\n unselectElement(selectionContext.selectedElement(), selectionContext);\n if (selectionContext.activeItemIndex === NO_SELECTION) {\n selectionContext.activeItemIndex = -1;\n }\n };\n\n var focusNextElement = function (selectionContext) {\n prepareShift(selectionContext);\n ++selectionContext.activeItemIndex;\n reifyIndex(selectionContext);\n };\n\n var focusPreviousElement = function (selectionContext) {\n prepareShift(selectionContext);\n --selectionContext.activeItemIndex;\n reifyIndex(selectionContext);\n };\n\n var arrowKeyHandler = function (selectionContext, keyMap) {\n return function (evt) {\n if (evt.which === keyMap.next) {\n focusNextElement(selectionContext);\n evt.preventDefault();\n } else if (evt.which === keyMap.previous) {\n focusPreviousElement(selectionContext);\n evt.preventDefault();\n }\n };\n };\n\n var getKeyMapForDirection = function (direction) {\n // Determine the appropriate mapping for next and previous based on the specified direction.\n var keyMap;\n if (direction === fluid.a11y.orientation.HORIZONTAL) {\n keyMap = LEFT_RIGHT_KEYMAP;\n }\n else if (direction === fluid.a11y.orientation.VERTICAL) {\n // Assume vertical in any other case.\n keyMap = UP_DOWN_KEYMAP;\n }\n\n return keyMap;\n };\n\n var tabKeyHandler = function (selectionContext) {\n return function (evt) {\n if (evt.which !== $.ui.keyCode.TAB) {\n return;\n }\n cleanUpWhenLeavingContainer(selectionContext);\n\n // Catch Shift-Tab and note that focus is on its way out of the container.\n if (evt.shiftKey) {\n selectionContext.focusIsLeavingContainer = true;\n }\n };\n };\n\n var containerFocusHandler = function (selectionContext) {\n return function (evt) {\n var shouldOrig = selectionContext.options.autoSelectFirstItem;\n var shouldSelect = typeof(shouldOrig) === \"function\" ? shouldOrig() : shouldOrig;\n\n // Override the autoselection if we're on the way out of the container.\n if (selectionContext.focusIsLeavingContainer) {\n shouldSelect = false;\n }\n\n // This target check works around the fact that sometimes focus bubbles, even though it shouldn't.\n if (shouldSelect && evt.target === selectionContext.container.get(0)) {\n if (selectionContext.activeItemIndex === NO_SELECTION) {\n selectionContext.activeItemIndex = 0;\n }\n fluid.focus(selectionContext.selectables[selectionContext.activeItemIndex]);\n }\n\n // Force focus not to bubble on some browsers.\n return evt.stopPropagation();\n };\n };\n\n var containerBlurHandler = function (selectionContext) {\n return function (evt) {\n selectionContext.focusIsLeavingContainer = false;\n\n // Force blur not to bubble on some browsers.\n return evt.stopPropagation();\n };\n };\n\n var makeElementsSelectable = function (container, defaults, userOptions) {\n\n var options = $.extend(true, {}, defaults, userOptions);\n\n var keyMap = getKeyMapForDirection(options.direction);\n\n var selectableElements = options.selectableElements ? options.selectableElements :\n container.find(options.selectableSelector);\n\n // Context stores the currently active item(undefined to start) and list of selectables.\n var that = {\n container: container,\n activeItemIndex: NO_SELECTION,\n selectables: selectableElements,\n focusIsLeavingContainer: false,\n options: options\n };\n\n that.selectablesUpdated = function (focusedItem) {\n // Remove selectables from the tab order and add focus/blur handlers\n if (typeof(that.options.selectablesTabindex) === \"number\") {\n that.selectables.fluid(\"tabindex\", that.options.selectablesTabindex);\n }\n that.selectables.off(\"focus.\" + CONTEXT_KEY);\n that.selectables.off(\"blur.\" + CONTEXT_KEY);\n that.selectables.on(\"focus.\" + CONTEXT_KEY, selectableFocusHandler(that));\n that.selectables.on(\"blur.\" + CONTEXT_KEY, selectableBlurHandler(that));\n if (keyMap && that.options.noBubbleListeners) {\n that.selectables.off(\"keydown.\" + CONTEXT_KEY);\n that.selectables.on(\"keydown.\" + CONTEXT_KEY, arrowKeyHandler(that, keyMap));\n }\n if (focusedItem) {\n selectElement(focusedItem, that);\n }\n else {\n reifyIndex(that);\n }\n };\n\n that.refresh = function () {\n if (!that.options.selectableSelector) {\n fluid.fail(\"Cannot refresh selectable context which was not initialised by a selector\");\n }\n that.selectables = container.find(options.selectableSelector);\n that.selectablesUpdated();\n };\n\n that.selectedElement = function () {\n return that.activeItemIndex < 0 ? null : that.selectables[that.activeItemIndex];\n };\n\n // Add various handlers to the container.\n if (keyMap && !that.options.noBubbleListeners) {\n container.keydown(arrowKeyHandler(that, keyMap));\n }\n container.keydown(tabKeyHandler(that));\n container.focus(containerFocusHandler(that));\n container.blur(containerBlurHandler(that));\n\n that.selectablesUpdated();\n\n return that;\n };\n\n /**\n * Makes all matched elements selectable with the arrow keys.\n * Supply your own handlers object with onSelect: and onUnselect: properties for custom behaviour.\n * Options provide configurability, including direction: and autoSelectFirstItem:\n * Currently supported directions are jQuery.a11y.directions.HORIZONTAL and VERTICAL.\n */\n fluid.selectable = function (target, options) {\n target = $(target);\n var that = makeElementsSelectable(target, fluid.selectable.defaults, options);\n fluid.setScopedData(target, CONTEXT_KEY, that);\n return that;\n };\n\n /**\n * Selects the specified element.\n */\n fluid.selectable.select = function (target, toSelect) {\n fluid.focus(toSelect);\n };\n\n /**\n * Selects the next matched element.\n */\n fluid.selectable.selectNext = function (target) {\n target = $(target);\n focusNextElement(fluid.getScopedData(target, CONTEXT_KEY));\n };\n\n /**\n * Selects the previous matched element.\n */\n fluid.selectable.selectPrevious = function (target) {\n target = $(target);\n focusPreviousElement(fluid.getScopedData(target, CONTEXT_KEY));\n };\n\n /**\n * Returns the currently selected item wrapped as a jQuery object.\n */\n fluid.selectable.currentSelection = function (target) {\n target = $(target);\n var that = fluid.getScopedData(target, CONTEXT_KEY);\n return $(that.selectedElement());\n };\n\n fluid.selectable.defaults = {\n direction: fluid.a11y.orientation.VERTICAL,\n selectablesTabindex: -1,\n autoSelectFirstItem: true,\n rememberSelectionState: true,\n selectableSelector: \".selectable\",\n selectableElements: null,\n onSelect: null,\n onUnselect: null,\n onLeaveContainer: null,\n noWrap: false\n };\n\n /********************************************************************\n * Activation functionality - declaratively associating actions with\n * a set of keyboard bindings.\n */\n\n var checkForModifier = function (binding, evt) {\n // If no modifier was specified, just return true.\n if (!binding.modifier) {\n return true;\n }\n\n var modifierKey = binding.modifier;\n var isCtrlKeyPresent = modifierKey && evt.ctrlKey;\n var isAltKeyPresent = modifierKey && evt.altKey;\n var isShiftKeyPresent = modifierKey && evt.shiftKey;\n\n return isCtrlKeyPresent || isAltKeyPresent || isShiftKeyPresent;\n };\n\n /** Constructs a raw \"keydown\"-facing handler, given a binding entry. This\n * checks whether the key event genuinely triggers the event and forwards it\n * to any \"activateHandler\" registered in the binding.\n */\n var makeActivationHandler = function (binding) {\n return function (evt) {\n var target = evt.target;\n if (!fluid.enabled(target)) {\n return;\n }\n// The following 'if' clause works in the real world, but there's a bug in the jQuery simulation\n// that causes keyboard simulation to fail in Safari, causing our tests to fail:\n// http://ui.jquery.com/bugs/ticket/3229\n// The replacement 'if' clause works around this bug.\n// When this issue is resolved, we should revert to the original clause.\n// if (evt.which === binding.key && binding.activateHandler && checkForModifier(binding, evt)) {\n var code = evt.which ? evt.which : evt.keyCode;\n if (code === binding.key && binding.activateHandler && checkForModifier(binding, evt)) {\n var event = $.Event(\"fluid-activate\");\n $(target).trigger(event, [binding.activateHandler]);\n if (event.isDefaultPrevented()) {\n evt.preventDefault();\n }\n }\n };\n };\n\n var makeElementsActivatable = function (elements, onActivateHandler, defaultKeys, options) {\n // Create bindings for each default key.\n var bindings = [];\n $(defaultKeys).each(function (index, key) {\n bindings.push({\n modifier: null,\n key: key,\n activateHandler: onActivateHandler\n });\n });\n\n // Merge with any additional key bindings.\n if (options && options.additionalBindings) {\n bindings = bindings.concat(options.additionalBindings);\n }\n\n fluid.initEnablement(elements);\n\n // Add listeners for each key binding.\n for (var i = 0; i < bindings.length; ++i) {\n var binding = bindings[i];\n elements.keydown(makeActivationHandler(binding));\n }\n elements.on(\"fluid-activate\", function (evt, handler) {\n handler = handler || onActivateHandler;\n return handler ? handler(evt) : null;\n });\n };\n\n /**\n * Makes all matched elements activatable with the Space and Enter keys.\n * Provide your own handler function for custom behaviour.\n * Options allow you to provide a list of additionalActivationKeys.\n */\n fluid.activatable = function (target, fn, options) {\n target = $(target);\n makeElementsActivatable(target, fn, fluid.activatable.defaults.keys, options);\n };\n\n /**\n * Activates the specified element.\n */\n fluid.activate = function (target) {\n $(target).trigger(\"fluid-activate\");\n };\n\n // Public Defaults.\n fluid.activatable.defaults = {\n keys: [$.ui.keyCode.ENTER, $.ui.keyCode.SPACE]\n };\n\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2010-2016 OCAD University\nCopyright 2012-2014 Raising the Floor - US\nCopyright 2014-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\n/** This file contains functions which depend on the presence of a DOM document\n * and which depend on the contents of Fluid.js **/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.defaults(\"fluid.viewComponent\", {\n gradeNames: [\"fluid.modelComponent\"],\n initFunction: \"fluid.initView\",\n argumentMap: {\n container: 0,\n options: 1\n },\n members: { // Used to allow early access to DOM binder via IoC, but to also avoid triggering evaluation of selectors\n dom: \"@expand:fluid.initDomBinder({that}, {that}.options.selectors)\"\n }\n });\n\n // unsupported, NON-API function\n fluid.dumpSelector = function (selectable) {\n return typeof (selectable) === \"string\" ? selectable :\n selectable.selector ? selectable.selector : \"\";\n };\n\n // unsupported, NON-API function\n // NOTE: this function represents a temporary strategy until we have more integrated IoC debugging.\n // It preserves the 1.3 and previous framework behaviour for the 1.x releases, but provides a more informative\n // diagnostic - in fact, it is perfectly acceptable for a component's creator to return no value and\n // the failure is really in assumptions in fluid.initLittleComponent. Revisit this issue for 2.0\n fluid.diagnoseFailedView = function (componentName, that, options, args) {\n if (!that && fluid.hasGrade(options, \"fluid.viewComponent\")) {\n var container = fluid.wrap(args[1]);\n var message1 = \"Instantiation of view component with type \" + componentName + \" failed, since \";\n if (!container) {\n fluid.fail(message1 + \" container argument is empty\");\n }\n else if (container.length === 0) {\n fluid.fail(message1 + \"selector \\\"\", fluid.dumpSelector(args[1]), \"\\\" did not match any markup in the document\");\n } else {\n fluid.fail(message1 + \" component creator function did not return a value\");\n }\n }\n };\n\n fluid.checkTryCatchParameter = function () {\n var location = window.location || { search: \"\", protocol: \"file:\" };\n var GETparams = location.search.slice(1).split(\"&\");\n return fluid.find(GETparams, function (param) {\n if (param.indexOf(\"notrycatch\") === 0) {\n return true;\n }\n }) === true;\n };\n\n fluid.notrycatch = fluid.checkTryCatchParameter();\n\n\n /**\n * Wraps an object in a jQuery if it isn't already one. This function is useful since\n * it ensures to wrap a null or otherwise falsy argument to itself, rather than the\n * often unhelpful jQuery default of returning the overall document node.\n *\n * @param {Object} obj the object to wrap in a jQuery\n * @param {jQuery} userJQuery the jQuery object to use for the wrapping, optional - use the current jQuery if absent\n */\n fluid.wrap = function (obj, userJQuery) {\n userJQuery = userJQuery || $;\n return ((!obj || obj.jquery) ? obj : userJQuery(obj));\n };\n\n /**\n * If obj is a jQuery, this function will return the first DOM element within it. Otherwise, the object will be returned unchanged.\n *\n * @param {jQuery} obj the jQuery instance to unwrap into a pure DOM element\n */\n fluid.unwrap = function (obj) {\n return obj && obj.jquery ? obj[0] : obj;\n };\n\n /**\n * Fetches a single container element and returns it as a jQuery.\n *\n * @param {String||jQuery||element} containerSpec an id string, a single-element jQuery, or a DOM element specifying a unique container\n * @param {Boolean} fallible <code>true</code> if an empty container is to be reported as a valid condition\n * @return a single-element jQuery of container\n */\n fluid.container = function (containerSpec, fallible, userJQuery) {\n var selector = containerSpec.selector || containerSpec;\n if (userJQuery) {\n containerSpec = fluid.unwrap(containerSpec);\n }\n var container = fluid.wrap(containerSpec, userJQuery);\n if (fallible && (!container || container.length === 0)) {\n return null;\n }\n\n if (!container || !container.jquery || container.length !== 1) {\n if (typeof (containerSpec) !== \"string\") {\n containerSpec = container.selector;\n }\n var count = container.length !== undefined ? container.length : 0;\n fluid.fail((count > 1 ? \"More than one (\" + count + \") container elements were\"\n : \"No container element was\") + \" found for selector \" + containerSpec);\n }\n if (!fluid.isDOMNode(container[0])) {\n fluid.fail(\"fluid.container was supplied a non-jQueryable element\");\n }\n\n // To address FLUID-5966, manually adding back the selector and context properties that were removed from jQuery v3.0.\n // ( see: https://jquery.com/upgrade-guide/3.0/#breaking-change-deprecated-context-and-selector-properties-removed )\n // In most cases the \"selector\" property will already be restored through the DOM binder;\n // however, when a selector or pure jQuery element is supplied directly as a component's container, we need to add them\n // if it is possible to infer them. This feature is rarely used but is crucial for the prefs framework infrastructure\n // in Panels.js fluid.prefs.subPanel.resetDomBinder\n container.selector = selector;\n container.context = container.context || containerSpec.ownerDocument || document;\n\n return container;\n };\n\n /**\n * Creates a new DOM Binder instance, used to locate elements in the DOM by name.\n *\n * @param {Object} container the root element in which to locate named elements\n * @param {Object} selectors a collection of named jQuery selectors\n */\n fluid.createDomBinder = function (container, selectors) {\n // don't put on a typename to avoid confusing primitive visitComponentChildren\n var that = {\n id: fluid.allocateGuid(),\n cache: {}\n };\n var userJQuery = container.constructor;\n\n function cacheKey(name, thisContainer) {\n return fluid.allocateSimpleId(thisContainer) + \"-\" + name;\n }\n\n function record(name, thisContainer, result) {\n that.cache[cacheKey(name, thisContainer)] = result;\n }\n\n that.locate = function (name, localContainer) {\n var selector, thisContainer, togo;\n\n selector = selectors[name];\n thisContainer = localContainer ? $(localContainer) : container;\n if (!thisContainer) {\n fluid.fail(\"DOM binder invoked for selector \" + name + \" without container\");\n }\n if (selector === \"\") {\n togo = thisContainer;\n }\n else if (!selector) {\n togo = userJQuery();\n }\n else {\n if (typeof (selector) === \"function\") {\n togo = userJQuery(selector.call(null, fluid.unwrap(thisContainer)));\n } else {\n togo = userJQuery(selector, thisContainer);\n }\n }\n\n if (!togo.selector) {\n togo.selector = selector;\n togo.context = thisContainer;\n }\n togo.selectorName = name;\n record(name, thisContainer, togo);\n return togo;\n };\n that.fastLocate = function (name, localContainer) {\n var thisContainer = localContainer ? localContainer : container;\n var key = cacheKey(name, thisContainer);\n var togo = that.cache[key];\n return togo ? togo : that.locate(name, localContainer);\n };\n that.clear = function () {\n that.cache = {};\n };\n that.refresh = function (names, localContainer) {\n var thisContainer = localContainer ? localContainer : container;\n if (typeof names === \"string\") {\n names = [names];\n }\n if (thisContainer.length === undefined) {\n thisContainer = [thisContainer];\n }\n for (var i = 0; i < names.length; ++i) {\n for (var j = 0; j < thisContainer.length; ++j) {\n that.locate(names[i], thisContainer[j]);\n }\n }\n };\n that.resolvePathSegment = that.locate;\n\n return that;\n };\n\n /** Expect that jQuery selector query has resulted in a non-empty set of\n * results. If none are found, this function will fail with a diagnostic message,\n * with the supplied message prepended.\n */\n fluid.expectFilledSelector = function (result, message) {\n if (result && result.length === 0 && result.jquery) {\n fluid.fail(message + \": selector \\\"\" + result.selector + \"\\\" with name \" + result.selectorName +\n \" returned no results in context \" + fluid.dumpEl(result.context));\n }\n };\n\n /**\n * The central initialiation method called as the first act of every Fluid\n * component. This function automatically merges user options with defaults,\n * attaches a DOM Binder to the instance, and configures events.\n *\n * @param {String} componentName The unique \"name\" of the component, which will be used\n * to fetch the default options from store. By recommendation, this should be the global\n * name of the component's creator function.\n * @param {jQueryable} container A specifier for the single root \"container node\" in the\n * DOM which will house all the markup for this component.\n * @param {Object} userOptions The configuration options for this component.\n */\n // 4th argument is NOT SUPPORTED, see comments for initLittleComponent\n fluid.initView = function (componentName, containerSpec, userOptions, localOptions) {\n var container = fluid.container(containerSpec, true);\n fluid.expectFilledSelector(container, \"Error instantiating component with name \\\"\" + componentName);\n if (!container) {\n return null;\n }\n // Need to ensure container is set early, without relying on an IoC mechanism - rethink this with asynchrony\n var receiver = function (that) {\n that.container = container;\n };\n var that = fluid.initLittleComponent(componentName, userOptions, localOptions || {gradeNames: [\"fluid.viewComponent\"]}, receiver);\n\n if (!that.dom) {\n fluid.initDomBinder(that);\n }\n // TODO: cannot afford a mutable container - put this into proper workflow\n var userJQuery = that.options.jQuery; // Do it a second time to correct for jQuery injection\n // if (userJQuery) {\n // container = fluid.container(containerSpec, true, userJQuery);\n // }\n fluid.log(\"Constructing view component \" + componentName + \" with container \" + container.constructor.expando +\n (userJQuery ? \" user jQuery \" + userJQuery.expando : \"\") + \" env: \" + $.expando);\n\n return that;\n };\n\n /**\n * Creates a new DOM Binder instance for the specified component and mixes it in.\n *\n * @param {Object} that the component instance to attach the new DOM Binder to\n */\n fluid.initDomBinder = function (that, selectors) {\n if (!that.container) {\n fluid.fail(\"fluid.initDomBinder called for component with typeName \" + that.typeName +\n \" without an initialised container - this has probably resulted from placing \\\"fluid.viewComponent\\\" in incorrect position in grade merging order. \" +\n \" Make sure to place it to the right of any non-view grades in the gradeNames list to ensure that it overrides properly: resolved gradeNames is \", that.options.gradeNames, \" for component \", that);\n }\n that.dom = fluid.createDomBinder(that.container, selectors || that.options.selectors || {});\n that.locate = that.dom.locate;\n return that.dom;\n };\n\n // DOM Utilities.\n\n /**\n * Finds the nearest ancestor of the element that matches a predicate\n * @param {Element} element DOM element\n * @param {Function} test A function (predicate) accepting a DOM element, returning a truthy value representing a match\n * @return The first element parent for which the predicate returns truthy - or undefined if no parent matches\n */\n fluid.findAncestor = function (element, test) {\n element = fluid.unwrap(element);\n while (element) {\n if (test(element)) {\n return element;\n }\n element = element.parentNode;\n }\n };\n\n fluid.findForm = function (node) {\n return fluid.findAncestor(node, function (element) {\n return element.nodeName.toLowerCase() === \"form\";\n });\n };\n\n /** A utility with the same signature as jQuery.text and jQuery.html, but without the API irregularity\n * that treats a single argument of undefined as different to no arguments */\n // in jQuery 1.7.1, jQuery pulled the same dumb trick with $.text() that they did with $.val() previously,\n // see comment in fluid.value below\n fluid.each([\"text\", \"html\"], function (method) {\n fluid[method] = function (node, newValue) {\n node = $(node);\n return newValue === undefined ? node[method]() : node[method](newValue);\n };\n });\n\n /** A generalisation of jQuery.val to correctly handle the case of acquiring and\n * setting the value of clustered radio button/checkbox sets, potentially, given\n * a node corresponding to just one element.\n */\n fluid.value = function (nodeIn, newValue) {\n var node = fluid.unwrap(nodeIn);\n var multiple = false;\n if (node.nodeType === undefined && node.length > 1) {\n node = node[0];\n multiple = true;\n }\n if (\"input\" !== node.nodeName.toLowerCase() || !/radio|checkbox/.test(node.type)) {\n // resist changes to contract of jQuery.val() in jQuery 1.5.1 (see FLUID-4113)\n return newValue === undefined ? $(node).val() : $(node).val(newValue);\n }\n var name = node.name;\n if (name === undefined) {\n fluid.fail(\"Cannot acquire value from node \" + fluid.dumpEl(node) + \" which does not have name attribute set\");\n }\n var elements;\n if (multiple) {\n elements = nodeIn;\n } else {\n elements = node.ownerDocument.getElementsByName(name);\n var scope = fluid.findForm(node);\n elements = $.grep(elements, function (element) {\n if (element.name !== name) {\n return false;\n }\n return !scope || fluid.dom.isContainer(scope, element);\n });\n }\n if (newValue !== undefined) {\n if (typeof(newValue) === \"boolean\") {\n newValue = (newValue ? \"true\" : \"false\");\n }\n // jQuery gets this partially right, but when dealing with radio button array will\n // set all of their values to \"newValue\" rather than setting the checked property\n // of the corresponding control.\n $.each(elements, function () {\n this.checked = (newValue instanceof Array ?\n newValue.indexOf(this.value) !== -1 : newValue === this.value);\n });\n } else { // this part jQuery will not do - extracting value from <input> array\n var checked = $.map(elements, function (element) {\n return element.checked ? element.value : null;\n });\n return node.type === \"radio\" ? checked[0] : checked;\n }\n };\n\n\n fluid.BINDING_ROOT_KEY = \"fluid-binding-root\";\n\n /** Recursively find any data stored under a given name from a node upwards\n * in its DOM hierarchy **/\n\n fluid.findData = function (elem, name) {\n while (elem) {\n var data = $.data(elem, name);\n if (data) {\n return data;\n }\n elem = elem.parentNode;\n }\n };\n\n fluid.bindFossils = function (node, data, fossils) {\n $.data(node, fluid.BINDING_ROOT_KEY, {data: data, fossils: fossils});\n };\n\n fluid.boundPathForNode = function (node, fossils) {\n node = fluid.unwrap(node);\n var key = node.name || node.id;\n var record = fossils[key];\n return record ? record.EL : null;\n };\n\n /** \"Automatically\" apply to whatever part of the data model is\n * relevant, the changed value received at the given DOM node*/\n fluid.applyBoundChange = function (node, newValue, applier) {\n node = fluid.unwrap(node);\n if (newValue === undefined) {\n newValue = fluid.value(node);\n }\n if (node.nodeType === undefined && node.length > 0) {\n node = node[0];\n } // assume here that they share name and parent\n var root = fluid.findData(node, fluid.BINDING_ROOT_KEY);\n if (!root) {\n fluid.fail(\"Bound data could not be discovered in any node above \" + fluid.dumpEl(node));\n }\n var name = node.name;\n var fossil = root.fossils[name];\n if (!fossil) {\n fluid.fail(\"No fossil discovered for name \" + name + \" in fossil record above \" + fluid.dumpEl(node));\n }\n if (typeof(fossil.oldvalue) === \"boolean\") { // deal with the case of an \"isolated checkbox\"\n newValue = newValue[0] ? true : false;\n }\n var EL = root.fossils[name].EL;\n if (applier) {\n applier.fireChangeRequest({path: EL, value: newValue, source: \"DOM:\" + node.id});\n } else {\n fluid.set(root.data, EL, newValue);\n }\n };\n\n\n /**\n * Returns a jQuery object given the id of a DOM node. In the case the element\n * is not found, will return an empty list.\n */\n fluid.jById = function (id, dokkument) {\n dokkument = dokkument && dokkument.nodeType === 9 ? dokkument : document;\n var element = fluid.byId(id, dokkument);\n var togo = element ? $(element) : [];\n togo.selector = \"#\" + id;\n togo.context = dokkument;\n return togo;\n };\n\n /**\n * Returns an DOM element quickly, given an id\n *\n * @param {Object} id the id of the DOM node to find\n * @param {Document} dokkument the document in which it is to be found (if left empty, use the current document)\n * @return The DOM element with this id, or null, if none exists in the document.\n */\n fluid.byId = function (id, dokkument) {\n dokkument = dokkument && dokkument.nodeType === 9 ? dokkument : document;\n var el = dokkument.getElementById(id);\n if (el) {\n // Use element id property here rather than attribute, to work around FLUID-3953\n if (el.id !== id) {\n fluid.fail(\"Problem in document structure - picked up element \" +\n fluid.dumpEl(el) + \" for id \" + id +\n \" without this id - most likely the element has a name which conflicts with this id\");\n }\n return el;\n } else {\n return null;\n }\n };\n\n /**\n * Returns the id attribute from a jQuery or pure DOM element.\n *\n * @param {jQuery||Element} element the element to return the id attribute for\n */\n fluid.getId = function (element) {\n return fluid.unwrap(element).id;\n };\n\n /**\n * Allocate an id to the supplied element if it has none already, by a simple\n * scheme resulting in ids \"fluid-id-nnnn\" where nnnn is an increasing integer.\n */\n\n fluid.allocateSimpleId = function (element) {\n element = fluid.unwrap(element);\n if (!element || fluid.isPrimitive(element)) {\n return null;\n }\n\n if (!element.id) {\n var simpleId = \"fluid-id-\" + fluid.allocateGuid();\n element.id = simpleId;\n }\n return element.id;\n };\n\n /**\n * Returns the document to which an element belongs, or the element itself if it is already a document\n *\n * @param {jQuery||Element} element The element to return the document for\n * @return {Document} dokkument The document in which it is to be found\n */\n fluid.getDocument = function (element) {\n var node = fluid.unwrap(element);\n // DOCUMENT_NODE - guide to node types at https://developer.mozilla.org/en/docs/Web/API/Node/nodeType\n return node.nodeType === 9 ? node : node.ownerDocument;\n };\n\n fluid.defaults(\"fluid.ariaLabeller\", {\n gradeNames: [\"fluid.viewComponent\"],\n labelAttribute: \"aria-label\",\n liveRegionMarkup: \"<div class=\\\"liveRegion fl-hidden-accessible\\\" aria-live=\\\"polite\\\"></div>\",\n liveRegionId: \"fluid-ariaLabeller-liveRegion\",\n invokers: {\n generateLiveElement: {\n funcName: \"fluid.ariaLabeller.generateLiveElement\",\n args: \"{that}\"\n },\n update: {\n funcName: \"fluid.ariaLabeller.update\",\n args: [\"{that}\", \"{arguments}.0\"]\n }\n },\n listeners: {\n onCreate: {\n func: \"{that}.update\",\n args: [null]\n }\n }\n });\n\n fluid.ariaLabeller.update = function (that, newOptions) {\n newOptions = newOptions || that.options;\n that.container.attr(that.options.labelAttribute, newOptions.text);\n if (newOptions.dynamicLabel) {\n var live = fluid.jById(that.options.liveRegionId);\n if (live.length === 0) {\n live = that.generateLiveElement();\n }\n live.text(newOptions.text);\n }\n };\n\n fluid.ariaLabeller.generateLiveElement = function (that) {\n var liveEl = $(that.options.liveRegionMarkup);\n liveEl.prop(\"id\", that.options.liveRegionId);\n $(\"body\").append(liveEl);\n return liveEl;\n };\n\n var LABEL_KEY = \"aria-labelling\";\n\n fluid.getAriaLabeller = function (element) {\n element = $(element);\n var that = fluid.getScopedData(element, LABEL_KEY);\n return that;\n };\n\n /** Manages an ARIA-mediated label attached to a given DOM element. An\n * aria-labelledby attribute and target node is fabricated in the document\n * if they do not exist already, and a \"little component\" is returned exposing a method\n * \"update\" that allows the text to be updated. */\n\n fluid.updateAriaLabel = function (element, text, options) {\n options = $.extend({}, options || {}, {text: text});\n var that = fluid.getAriaLabeller(element);\n if (!that) {\n that = fluid.ariaLabeller(element, options);\n fluid.setScopedData(element, LABEL_KEY, that);\n } else {\n that.update(options);\n }\n return that;\n };\n\n /** \"Global Dismissal Handler\" for the entire page. Attaches a click handler to the\n * document root that will cause dismissal of any elements (typically dialogs) which\n * have registered themselves. Dismissal through this route will automatically clean up\n * the record - however, the dismisser themselves must take care to deregister in the case\n * dismissal is triggered through the dialog interface itself. This component can also be\n * automatically configured by fluid.deadMansBlur by means of the \"cancelByDefault\" option */\n\n var dismissList = {};\n\n $(document).click(function (event) {\n var target = fluid.resolveEventTarget(event);\n while (target) {\n if (dismissList[target.id]) {\n return;\n }\n target = target.parentNode;\n }\n fluid.each(dismissList, function (dismissFunc, key) {\n dismissFunc(event);\n delete dismissList[key];\n });\n });\n // TODO: extend a configurable equivalent of the above dealing with \"focusin\" events\n\n /** Accepts a free hash of nodes and an optional \"dismissal function\".\n * If dismissFunc is set, this \"arms\" the dismissal system, such that when a click\n * is received OUTSIDE any of the hierarchy covered by \"nodes\", the dismissal function\n * will be executed.\n */\n fluid.globalDismissal = function (nodes, dismissFunc) {\n fluid.each(nodes, function (node) {\n // Don't bother to use the real id if it is from a foreign document - we will never receive events\n // from it directly in any case - and foreign documents may be under the control of malign fiends\n // such as tinyMCE who allocate the same id to everything\n var id = fluid.unwrap(node).ownerDocument === document ? fluid.allocateSimpleId(node) : fluid.allocateGuid();\n if (dismissFunc) {\n dismissList[id] = dismissFunc;\n }\n else {\n delete dismissList[id];\n }\n });\n };\n\n /** Provides an abstraction for determing the current time.\n * This is to provide a fix for FLUID-4762, where IE6 - IE8\n * do not support Date.now().\n */\n fluid.now = function () {\n return Date.now ? Date.now() : (new Date()).getTime();\n };\n\n\n /** Sets an interation on a target control, which morally manages a \"blur\" for\n * a possibly composite region.\n * A timed blur listener is set on the control, which waits for a short period of\n * time (options.delay, defaults to 150ms) to discover whether the reason for the\n * blur interaction is that either a focus or click is being serviced on a nominated\n * set of \"exclusions\" (options.exclusions, a free hash of elements or jQueries).\n * If no such event is received within the window, options.handler will be called\n * with the argument \"control\", to service whatever interaction is required of the\n * blur.\n */\n\n fluid.deadMansBlur = function (control, options) {\n // TODO: This should be rewritten as a proper component\n var that = {options: $.extend(true, {}, fluid.defaults(\"fluid.deadMansBlur\"), options)};\n that.blurPending = false;\n that.lastCancel = 0;\n that.canceller = function (event) {\n fluid.log(\"Cancellation through \" + event.type + \" on \" + fluid.dumpEl(event.target));\n that.lastCancel = fluid.now();\n that.blurPending = false;\n };\n that.noteProceeded = function () {\n fluid.globalDismissal(that.options.exclusions);\n };\n that.reArm = function () {\n fluid.globalDismissal(that.options.exclusions, that.proceed);\n };\n that.addExclusion = function (exclusions) {\n fluid.globalDismissal(exclusions, that.proceed);\n };\n that.proceed = function (event) {\n fluid.log(\"Direct proceed through \" + event.type + \" on \" + fluid.dumpEl(event.target));\n that.blurPending = false;\n that.options.handler(control);\n };\n fluid.each(that.options.exclusions, function (exclusion) {\n exclusion = $(exclusion);\n fluid.each(exclusion, function (excludeEl) {\n $(excludeEl).on(\"focusin\", that.canceller).\n on(\"fluid-focus\", that.canceller).\n click(that.canceller).mousedown(that.canceller);\n // Mousedown is added for FLUID-4212, as a result of Chrome bug 6759, 14204\n });\n });\n if (!that.options.cancelByDefault) {\n $(control).on(\"focusout\", function (event) {\n fluid.log(\"Starting blur timer for element \" + fluid.dumpEl(event.target));\n var now = fluid.now();\n fluid.log(\"back delay: \" + (now - that.lastCancel));\n if (now - that.lastCancel > that.options.backDelay) {\n that.blurPending = true;\n }\n setTimeout(function () {\n if (that.blurPending) {\n that.options.handler(control);\n }\n }, that.options.delay);\n });\n }\n else {\n that.reArm();\n }\n return that;\n };\n\n fluid.defaults(\"fluid.deadMansBlur\", {\n gradeNames: \"fluid.function\",\n delay: 150,\n backDelay: 100\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2010-2011 OCAD University\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2013 Raising the Floor - US\nCopyright 2014-2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /** NOTE: All contents of this file are DEPRECATED and no entry point should be considered a supported API **/\n\n fluid.explodeLocalisedName = function (fileName, locale, defaultLocale) {\n var lastDot = fileName.lastIndexOf(\".\");\n if (lastDot === -1 || lastDot === 0) {\n lastDot = fileName.length;\n }\n var baseName = fileName.substring(0, lastDot);\n var extension = fileName.substring(lastDot);\n\n var segs = locale.split(\"_\");\n\n var exploded = fluid.transform(segs, function (seg, index) {\n var shortSegs = segs.slice(0, index + 1);\n return baseName + \"_\" + shortSegs.join(\"_\") + extension;\n });\n if (defaultLocale) {\n exploded.unshift(baseName + \"_\" + defaultLocale + extension);\n }\n return exploded;\n };\n\n /** Framework-global caching state for fluid.fetchResources **/\n\n var resourceCache = {};\n\n var pendingClass = {};\n\n /** Accepts a hash of structures with free keys, where each entry has either\n * href/url or nodeId set - on completion, callback will be called with the populated\n * structure with fetched resource text in the field \"resourceText\" for each\n * entry. Each structure may contain \"options\" holding raw options to be forwarded\n * to jQuery.ajax().\n */\n\n fluid.fetchResources = function (resourceSpecs, callback, options) {\n var that = {\n options: fluid.copy(options || {})\n };\n that.resourceSpecs = resourceSpecs;\n that.callback = callback;\n that.operate = function () {\n fluid.fetchResources.fetchResourcesImpl(that);\n };\n fluid.each(resourceSpecs, function (resourceSpec, key) {\n resourceSpec.recurseFirer = fluid.makeEventFirer({name: \"I/O completion for resource \\\"\" + key + \"\\\"\"});\n resourceSpec.recurseFirer.addListener(that.operate);\n if (resourceSpec.url && !resourceSpec.href) {\n resourceSpec.href = resourceSpec.url;\n }\n if (that.options.defaultLocale) {\n resourceSpec.defaultLocale = that.options.defaultLocale;\n if (resourceSpec.locale === undefined) {\n resourceSpec.locale = that.options.defaultLocale;\n }\n }\n });\n if (that.options.amalgamateClasses) {\n fluid.fetchResources.amalgamateClasses(resourceSpecs, that.options.amalgamateClasses, that.operate);\n }\n fluid.fetchResources.explodeForLocales(resourceSpecs);\n that.operate();\n return that;\n };\n\n fluid.fetchResources.explodeForLocales = function (resourceSpecs) {\n fluid.each(resourceSpecs, function (resourceSpec, key) {\n if (resourceSpec.locale) {\n var exploded = fluid.explodeLocalisedName(resourceSpec.href, resourceSpec.locale, resourceSpec.defaultLocale);\n for (var i = 0; i < exploded.length; ++i) {\n var newKey = key + \"$localised-\" + i;\n var newRecord = $.extend(true, {}, resourceSpec, {\n href: exploded[i],\n localeExploded: true\n });\n resourceSpecs[newKey] = newRecord;\n }\n resourceSpec.localeExploded = exploded.length;\n }\n });\n return resourceSpecs;\n };\n\n fluid.fetchResources.condenseOneResource = function (resourceSpecs, resourceSpec, key, localeCount) {\n var localeSpecs = [resourceSpec];\n for (var i = 0; i < localeCount; ++i) {\n var localKey = key + \"$localised-\" + i;\n localeSpecs.unshift(resourceSpecs[localKey]);\n delete resourceSpecs[localKey];\n }\n var lastNonError = fluid.find_if(localeSpecs, function (spec) {\n return !spec.fetchError;\n });\n if (lastNonError) {\n resourceSpecs[key] = lastNonError;\n }\n };\n\n fluid.fetchResources.condenseForLocales = function (resourceSpecs) {\n fluid.each(resourceSpecs, function (resourceSpec, key) {\n if (typeof(resourceSpec.localeExploded) === \"number\") {\n fluid.fetchResources.condenseOneResource(resourceSpecs, resourceSpec, key, resourceSpec.localeExploded);\n }\n });\n };\n\n fluid.fetchResources.notifyResources = function (that, resourceSpecs, callback) {\n fluid.fetchResources.condenseForLocales(resourceSpecs);\n callback(resourceSpecs);\n };\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n // Add \"synthetic\" elements of *this* resourceSpec list corresponding to any\n // still pending elements matching the PROLEPTICK CLASS SPECIFICATION supplied\n fluid.fetchResources.amalgamateClasses = function (specs, classes, operator) {\n fluid.each(classes, function (clazz) {\n var pending = pendingClass[clazz];\n fluid.each(pending, function (pendingrec, canon) {\n specs[clazz + \"!\" + canon] = pendingrec;\n pendingrec.recurseFirer.addListener(operator);\n });\n });\n };\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.fetchResources.timeSuccessCallback = function (resourceSpec) {\n if (resourceSpec.timeSuccess && resourceSpec.options && resourceSpec.options.success) {\n var success = resourceSpec.options.success;\n resourceSpec.options.success = function () {\n var startTime = new Date();\n var ret = success.apply(null, arguments);\n fluid.log(\"External callback for URL \" + resourceSpec.href + \" completed - callback time: \" +\n (new Date().getTime() - startTime.getTime()) + \"ms\");\n return ret;\n };\n }\n };\n\n // TODO: Integrate punch-through from old Engage implementation\n function canonUrl(url) {\n return url;\n }\n\n fluid.fetchResources.clearResourceCache = function (url) {\n if (url) {\n delete resourceCache[canonUrl(url)];\n }\n else {\n fluid.clear(resourceCache);\n }\n };\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.fetchResources.handleCachedRequest = function (resourceSpec, response, fetchError) {\n var canon = canonUrl(resourceSpec.href);\n var cached = resourceCache[canon];\n if (cached.$$firer$$) {\n fluid.log(\"Handling request for \" + canon + \" from cache\");\n var fetchClass = resourceSpec.fetchClass;\n if (fetchClass && pendingClass[fetchClass]) {\n fluid.log(\"Clearing pendingClass entry for class \" + fetchClass);\n delete pendingClass[fetchClass][canon];\n }\n var result = {response: response, fetchError: fetchError};\n resourceCache[canon] = result;\n cached.fire(response, fetchError);\n }\n };\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.fetchResources.completeRequest = function (thisSpec) {\n thisSpec.queued = false;\n thisSpec.completeTime = new Date();\n fluid.log(\"Request to URL \" + thisSpec.href + \" completed - total elapsed time: \" +\n (thisSpec.completeTime.getTime() - thisSpec.initTime.getTime()) + \"ms\");\n thisSpec.recurseFirer.fire();\n };\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.fetchResources.makeResourceCallback = function (thisSpec) {\n return {\n success: function (response) {\n thisSpec.resourceText = response;\n thisSpec.resourceKey = thisSpec.href;\n if (thisSpec.forceCache) {\n fluid.fetchResources.handleCachedRequest(thisSpec, response);\n }\n fluid.fetchResources.completeRequest(thisSpec);\n },\n error: function (response, textStatus, errorThrown) {\n thisSpec.fetchError = {\n status: response.status,\n textStatus: response.textStatus,\n errorThrown: errorThrown\n };\n if (thisSpec.forceCache) {\n fluid.fetchResources.handleCachedRequest(thisSpec, null, thisSpec.fetchError);\n }\n fluid.fetchResources.completeRequest(thisSpec);\n }\n\n };\n };\n\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.fetchResources.issueCachedRequest = function (resourceSpec, options) {\n var canon = canonUrl(resourceSpec.href);\n var cached = resourceCache[canon];\n if (!cached) {\n fluid.log(\"First request for cached resource with url \" + canon);\n cached = fluid.makeEventFirer({name: \"cache notifier for resource URL \" + canon});\n cached.$$firer$$ = true;\n resourceCache[canon] = cached;\n var fetchClass = resourceSpec.fetchClass;\n if (fetchClass) {\n if (!pendingClass[fetchClass]) {\n pendingClass[fetchClass] = {};\n }\n pendingClass[fetchClass][canon] = resourceSpec;\n }\n options.cache = false; // TODO: Getting weird \"not modified\" issues on Firefox\n $.ajax(options);\n }\n else {\n if (!cached.$$firer$$) {\n if (cached.response) {\n options.success(cached.response);\n } else {\n options.error(cached.fetchError);\n }\n }\n else {\n fluid.log(\"Request for cached resource which is in flight: url \" + canon);\n cached.addListener(function (response, fetchError) {\n if (response) {\n options.success(response);\n } else {\n options.error(fetchError);\n }\n });\n }\n }\n };\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n // Compose callbacks in such a way that the 2nd, marked \"external\" will be applied\n // first if it exists, but in all cases, the first, marked internal, will be\n // CALLED WITHOUT FAIL\n fluid.fetchResources.composeCallbacks = function (internal, external) {\n return external ? (internal ?\n function () {\n try {\n external.apply(null, arguments);\n }\n catch (e) {\n fluid.log(\"Exception applying external fetchResources callback: \" + e);\n }\n internal.apply(null, arguments); // call the internal callback without fail\n } : external ) : internal;\n };\n\n // unsupported, NON-API function\n fluid.fetchResources.composePolicy = function (target, source) {\n return fluid.fetchResources.composeCallbacks(target, source);\n };\n\n fluid.defaults(\"fluid.fetchResources.issueRequest\", {\n mergePolicy: {\n success: fluid.fetchResources.composePolicy,\n error: fluid.fetchResources.composePolicy,\n url: \"reverse\"\n }\n });\n\n // unsupported, NON-API function\n fluid.fetchResources.issueRequest = function (resourceSpec, key) {\n var thisCallback = fluid.fetchResources.makeResourceCallback(resourceSpec);\n var options = {\n url: resourceSpec.href,\n success: thisCallback.success,\n error: thisCallback.error,\n dataType: resourceSpec.dataType || \"text\"\n };\n fluid.fetchResources.timeSuccessCallback(resourceSpec);\n options = fluid.merge(fluid.defaults(\"fluid.fetchResources.issueRequest\").mergePolicy,\n options, resourceSpec.options);\n resourceSpec.queued = true;\n resourceSpec.initTime = new Date();\n fluid.log(\"Request with key \" + key + \" queued for \" + resourceSpec.href);\n\n if (resourceSpec.forceCache) {\n fluid.fetchResources.issueCachedRequest(resourceSpec, options);\n }\n else {\n $.ajax(options);\n }\n };\n\n\n fluid.fetchResources.fetchResourcesImpl = function (that) {\n var complete = true;\n var allSync = true;\n var resourceSpecs = that.resourceSpecs;\n for (var key in resourceSpecs) {\n var resourceSpec = resourceSpecs[key];\n if (!resourceSpec.options || resourceSpec.options.async) {\n allSync = false;\n }\n if (resourceSpec.href && !resourceSpec.completeTime) {\n if (!resourceSpec.queued) {\n fluid.fetchResources.issueRequest(resourceSpec, key);\n }\n if (resourceSpec.queued) {\n complete = false;\n }\n }\n else if (resourceSpec.nodeId && !resourceSpec.resourceText) {\n var node = document.getElementById(resourceSpec.nodeId);\n // upgrade this to somehow detect whether node is \"armoured\" somehow\n // with comment or CDATA wrapping\n resourceSpec.resourceText = fluid.dom.getElementText(node);\n resourceSpec.resourceKey = resourceSpec.nodeId;\n }\n }\n if (complete && that.callback && !that.callbackCalled) {\n that.callbackCalled = true;\n if ($.browser.mozilla && !allSync) {\n // Defer this callback to avoid debugging problems on Firefox\n setTimeout(function () {\n fluid.fetchResources.notifyResources(that, resourceSpecs, that.callback);\n }, 1);\n }\n else {\n fluid.fetchResources.notifyResources(that, resourceSpecs, that.callback);\n }\n }\n };\n\n // TODO: This framework function is a stop-gap before the \"ginger world\" is capable of\n // asynchronous instantiation. It currently performs very poor fidelity expansion of a\n // component's options to discover \"resources\" only held in the static environment\n fluid.fetchResources.primeCacheFromResources = function (componentName) {\n var resources = fluid.defaults(componentName).resources;\n var expanded = (fluid.expandOptions ? fluid.expandOptions : fluid.identity)(fluid.copy(resources));\n fluid.fetchResources(expanded);\n };\n\n /** Utilities invoking requests for expansion **/\n fluid.registerNamespace(\"fluid.expander\");\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.expander.makeDefaultFetchOptions = function (successdisposer, failid, options) {\n return $.extend(true, {dataType: \"text\"}, options, {\n success: function (response, environmentdisposer) {\n var json = JSON.parse(response);\n environmentdisposer(successdisposer(json));\n },\n error: function (response, textStatus) {\n fluid.log(\"Error fetching \" + failid + \": \" + textStatus);\n }\n });\n };\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.expander.makeFetchExpander = function (options) {\n return { expander: {\n type: \"fluid.expander.deferredFetcher\",\n href: options.url,\n options: fluid.expander.makeDefaultFetchOptions(options.disposer, options.url, options.options),\n resourceSpecCollector: \"{resourceSpecCollector}\",\n fetchKey: options.fetchKey\n }};\n };\n\n fluid.expander.deferredFetcher = function (deliverer, source, expandOptions) {\n var expander = source.expander;\n var spec = fluid.copy(expander);\n // fetch the \"global\" collector specified in the external environment to receive\n // this resourceSpec\n var collector = fluid.expand(expander.resourceSpecCollector, expandOptions);\n delete spec.type;\n delete spec.resourceSpecCollector;\n delete spec.fetchKey;\n var environmentdisposer = function (disposed) {\n deliverer(disposed);\n };\n // replace the callback which is there (taking 2 arguments) with one which\n // directly responds to the request, passing in the result and OUR \"disposer\" -\n // which once the user has processed the response (say, parsing JSON and repackaging)\n // finally deposits it in the place of the expander in the tree to which this reference\n // has been stored at the point this expander was evaluated.\n spec.options.success = function (response) {\n expander.options.success(response, environmentdisposer);\n };\n var key = expander.fetchKey || fluid.allocateGuid();\n collector[key] = spec;\n return fluid.NO_VALUE;\n };\n\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2011-2016 OCAD University\nCopyright 2011 Lucendo Development Ltd.\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n\n \"use strict\";\n\n /**\n * A configurable component to allow users to load multiple resources via AJAX requests.\n * The resources can be localised by means of options `locale`, `defaultLocale`. Once all\n * resources are loaded, the event `onResourceLoaded` will be fired, which can be used\n * to time the creation of components dependent on the resources.\n *\n * @param {Object} options\n */\n\n fluid.defaults(\"fluid.resourceLoader\", {\n gradeNames: [\"fluid.component\"],\n listeners: {\n \"onCreate.loadResources\": {\n listener: \"fluid.resourceLoader.loadResources\",\n args: [\"{that}\", {expander: {func: \"{that}.resolveResources\"}}]\n }\n },\n defaultLocale: null,\n locale: null,\n terms: {}, // Must be supplied by integrators\n resources: {}, // Must be supplied by integrators\n resourceOptions: {},\n // Unsupported, non-API option\n invokers: {\n transformURL: {\n funcName: \"fluid.stringTemplate\",\n args: [\"{arguments}.0\", \"{that}.options.terms\"]\n },\n resolveResources: {\n funcName: \"fluid.resourceLoader.resolveResources\",\n args: \"{that}\"\n }\n },\n events: {\n onResourcesLoaded: null\n }\n });\n\n fluid.resourceLoader.resolveResources = function (that) {\n var mapped = fluid.transform(that.options.resources, that.transformURL);\n\n return fluid.transform(mapped, function (url) {\n var resourceSpec = {url: url, forceCache: true, options: that.options.resourceOptions};\n return $.extend(resourceSpec, fluid.filterKeys(that.options, [\"defaultLocale\", \"locale\"]));\n });\n };\n\n fluid.resourceLoader.loadResources = function (that, resources) {\n fluid.fetchResources(resources, function () {\n that.resources = resources;\n that.events.onResourcesLoaded.fire(resources);\n });\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2009 University of Toronto\nCopyright 2010-2016 OCAD University\nCopyright 2015-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.contextAware\");\n\n fluid.defaults(\"fluid.contextAware.marker\", {\n gradeNames: [\"fluid.component\"]\n });\n\n\n // unsupported, NON-API function\n fluid.contextAware.makeCheckMarkers = function (checks, path, instantiator) {\n fluid.each(checks, function (value, markerTypeName) {\n fluid.constructSingle(path, {\n type: markerTypeName,\n gradeNames: \"fluid.contextAware.marker\",\n value: value\n }, instantiator);\n });\n\n };\n /** Peforms the computation for `fluid.contextAware.makeChecks` and returns a structure suitable for being sent to `fluid.contextAware.makeCheckMarkers` -\n *\n * @return A hash of marker type names to grade names - this can be sent to fluid.contextAware.makeCheckMarkers\n */\n // unsupported, NON-API function\n fluid.contextAware.performChecks = function (checkHash) {\n return fluid.transform(checkHash, function (checkRecord) {\n if (typeof(checkRecord) === \"function\") {\n checkRecord = {func: checkRecord};\n } else if (typeof(checkRecord) === \"string\") {\n checkRecord = {funcName: checkRecord};\n }\n if (fluid.isPrimitive(checkRecord)) {\n return checkRecord;\n } else if (\"value\" in checkRecord) {\n return checkRecord.value;\n } else if (\"func\" in checkRecord) {\n return checkRecord.func();\n } else if (\"funcName\" in checkRecord) {\n return fluid.invokeGlobalFunction(checkRecord.funcName);\n } else {\n fluid.fail(\"Error in contextAwareness check record \", checkRecord, \" - must contain an entry with name value, func, or funcName\");\n }\n });\n };\n\n /**\n * Takes an object whose keys are check context names and whose values are check records, designating a collection of context markers which might be registered at a location\n * in the component tree.\n\n * @param checkHash {Object} The keys in this structure are the context names to be supplied if the check passes, and the values are check records.\n * A check record contains:\n * ONE OF:\n * value {Any} [optional] A literal value name to be attached to the context\n * func {Function} [optional] A zero-arg function to be called to compute the value\n * funcName {String} [optional] The name of a zero-arg global function which will compute the value\n * If the check record consists of a Number or Boolean, it is assumed to be the value given to \"value\".\n * @param path {String|Array} [optional] The path in the component tree at which the check markers are to be registered. If omitted, \"\" is assumed\n * @param instantiator {Instantiator} [optional] The instantiator holding the component tree which will receive the markers. If omitted, use `fluid.globalInstantiator`.\n */\n fluid.contextAware.makeChecks = function (checkHash, path, instantiator) {\n var checkOptions = fluid.contextAware.performChecks(checkHash);\n fluid.contextAware.makeCheckMarkers(checkOptions, path, instantiator);\n };\n\n /**\n * Forgets a check made at a particular level of the component tree.\n * @param markerNames {Array of String} The marker typeNames whose check values are to be forgotten\n * @param path {String|Array} [optional] The path in the component tree at which the check markers are to be removed. If omitted, \"\" is assumed\n * @param instantiator {Instantiator} [optional] The instantiator holding the component tree the markers are to be removed from. If omitted, use `fluid.globalInstantiator`.\n */\n fluid.contextAware.forgetChecks = function (markerNames, path, instantiator) {\n instantiator = instantiator || fluid.globalInstantiator;\n path = path || [];\n var markerArray = fluid.makeArray(markerNames);\n fluid.each(markerArray, function (markerName) {\n var memberName = fluid.typeNameToMemberName(markerName);\n var segs = fluid.model.parseToSegments(path, instantiator.parseEL, true);\n segs.push(memberName);\n fluid.destroy(segs, instantiator);\n });\n };\n\n /** A grade to be given to a component which requires context-aware adaptation.\n * This grade consumes configuration held in the block named \"contextAwareness\", which is an object whose keys are check namespaces and whose values hold\n * sequences of \"checks\" to be made in the component tree above the component. The value searched by\n * each check is encoded as the element named `contextValue` - this either represents an IoC reference to a component\n * or a particular value held at the component. If this reference has no path component, the path \".options.value\" will be assumed.\n * These checks seek contexts which\n * have been previously registered using fluid.contextAware.makeChecks. The first context which matches\n * with a value of `true` terminates the search, and returns by applying the grade names held in `gradeNames` to the current component.\n * If no check matches, the grades held in `defaultGradeNames` will be applied.\n */\n fluid.defaults(\"fluid.contextAware\", {\n gradeNames: [\"{that}.check\"],\n mergePolicy: {\n contextAwareness: \"noexpand\"\n },\n contextAwareness: {\n // Hash of names (check namespaces) to records: {\n // checks: {}, // Hash of check namespace to: {\n // contextValue: IoCExpression testing value in environment,\n // gradeNames: gradeNames which will be output,\n // priority: String/Number for priority of check [optional]\n // equals: Value to be compared to contextValue [optional - default is `true`]\n // defaultGradeNames: // String or Array of String holding default gradeNames which will be output if no check matches [optional]\n // priority: // Number or String encoding priority relative to other records (same format as with event listeners) [optional]\n // }\n },\n invokers: {\n check: {\n funcName: \"fluid.contextAware.check\",\n args: [\"{that}\", \"{that}.options.contextAwareness\"]\n }\n }\n });\n\n fluid.contextAware.getCheckValue = function (that, reference) {\n // cf. core of distributeOptions!\n var targetRef = fluid.parseContextReference(reference);\n var targetComponent = fluid.resolveContext(targetRef.context, that);\n var path = targetRef.path || [\"options\", \"value\"];\n var value = fluid.getForComponent(targetComponent, path);\n return value;\n };\n\n // unsupported, NON-API function\n fluid.contextAware.checkOne = function (that, contextAwareRecord) {\n if (contextAwareRecord.checks && contextAwareRecord.checks.contextValue) {\n fluid.fail(\"Nesting error in contextAwareness record \", contextAwareRecord, \" - the \\\"checks\\\" entry must contain a hash and not a contextValue/gradeNames record at top level\");\n }\n var checkList = fluid.parsePriorityRecords(contextAwareRecord.checks, \"contextAwareness checkRecord\");\n return fluid.find(checkList, function (check) {\n if (!check.contextValue) {\n fluid.fail(\"Cannot perform check for contextAwareness record \", check, \" without a valid field named \\\"contextValue\\\"\");\n }\n var value = fluid.contextAware.getCheckValue(that, check.contextValue);\n if (check.equals === undefined ? value : value === check.equals) {\n return check.gradeNames;\n }\n }, contextAwareRecord.defaultGradeNames);\n };\n\n // unsupported, NON-API function\n fluid.contextAware.check = function (that, contextAwarenessOptions) {\n var gradeNames = [];\n var contextAwareList = fluid.parsePriorityRecords(contextAwarenessOptions, \"contextAwareness adaptationRecord\");\n fluid.each(contextAwareList, function (record) {\n var matched = fluid.contextAware.checkOne(that, record);\n gradeNames = gradeNames.concat(fluid.makeArray(matched));\n });\n return gradeNames;\n };\n\n /** Given a set of options, broadcast an adaptation to all instances of a particular component in a particular context. (\"new demands blocks\").\n * This has the effect of fabricating a grade with a particular name with an options distribution to `{/ typeName}` for the required component,\n * and then constructing a single well-known instance of it.\n * Options layout:\n * distributionName {String} A grade name - the name to be given to the fabricated grade\n * targetName {String} A grade name - the name of the grade to receive the adaptation\n * adaptationName {String} the name of the contextAwareness record to receive the record - this will be a simple string\n * checkName {String} the name of the check within the contextAwareness record to receive the record - this will be a simple string\n * record {Object} the record to be broadcast into contextAwareness - should contain entries\n * contextValue {IoC expression} the context value to be checked to activate the adaptation\n * gradeNames {String/Array of String} the grade names to be supplied to the adapting target (matching advisedName)\n */\n fluid.contextAware.makeAdaptation = function (options) {\n fluid.expect(\"fluid.contextAware.makeAdaptation\", options, [\"distributionName\", \"targetName\", \"adaptationName\", \"checkName\", \"record\"]);\n fluid.defaults(options.distributionName, {\n gradeNames: [\"fluid.component\"],\n distributeOptions: {\n target: \"{/ \" + options.targetName + \"}.options.contextAwareness.\" + options.adaptationName + \".checks.\" + options.checkName,\n record: options.record\n }\n });\n fluid.constructSingle([], options.distributionName);\n };\n\n // Context awareness for the browser environment\n\n fluid.contextAware.isBrowser = function () {\n return typeof(window) !== \"undefined\" && window.document;\n };\n\n fluid.contextAware.makeChecks({\n \"fluid.browser\": {\n funcName: \"fluid.contextAware.isBrowser\"\n }\n });\n\n // Context awareness for the reported browser platform name (operating system)\n\n fluid.registerNamespace(\"fluid.contextAware.browser\");\n\n fluid.contextAware.browser.getPlatformName = function () {\n return typeof(navigator) !== \"undefined\" && navigator.platform ? navigator.platform : undefined;\n };\n\n fluid.contextAware.makeChecks({\n \"fluid.browser.platformName\": {\n funcName: \"fluid.contextAware.browser.getPlatformName\"\n }\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2009 University of Toronto\nCopyright 2010-2011 OCAD University\nCopyright 2013 Raising the Floor - US\nCopyright 2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.enhance\");\n\n /**********************************************************\n * This code runs immediately upon inclusion of this file *\n **********************************************************/\n\n // Use JavaScript to hide any markup that is specifically in place for cases when JavaScript is off.\n // Note: the use of fl-ProgEnhance-basic is deprecated, and replaced by fl-progEnhance-basic.\n // It is included here for backward compatibility only.\n // Distinguish the standalone jQuery from the real one so that this can be included in IoC standalone tests\n if (fluid.contextAware.isBrowser() && $.fn) {\n $(\"head\").append(\"<style type='text/css'>.fl-progEnhance-basic, .fl-ProgEnhance-basic { display: none; } .fl-progEnhance-enhanced, .fl-ProgEnhance-enhanced { display: block; }</style>\");\n }\n\n})(jQuery, fluid_2_0_0);\n","// =========================================================================\n//\n// tinyxmlsax.js - an XML SAX parser in JavaScript compressed for downloading\n//\n// version 3.1\n//\n// =========================================================================\n//\n// Copyright (C) 2000 - 2002, 2003 Michael Houghton (mike@idle.org), Raymond Irving and David Joham (djoham@yahoo.com)\n//\n// This library is free software; you can redistribute it and/or\n// modify it under the terms of the GNU Lesser General Public\n// License as published by the Free Software Foundation; either\n// version 2.1 of the License, or (at your option) any later version.\n\n// This library is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n// Lesser General Public License for more details.\n\n// You should have received a copy of the GNU Lesser General Public\n// License along with this library; if not, write to the Free Software\n// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n//\n// Visit the XML for <SCRIPT> home page at http://xmljs.sourceforge.net\n//\n\n/*\nThe zlib/libpng License\n\nCopyright (c) 2000 - 2002, 2003 Michael Houghton (mike@idle.org), Raymond Irving and David Joham (djoham@yahoo.com)\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n 1. The origin of this software must not be misrepresented; you must not\n claim that you wrote the original software. If you use this software\n in a product, an acknowledgment in the product documentation would be\n appreciated but is not required.\n\n 2. Altered source versions must be plainly marked as such, and must not be\n misrepresented as being the original software.\n\n 3. This notice may not be removed or altered from any source\n distribution.\n */\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.XMLP = function(strXML) {\n return fluid.XMLP.XMLPImpl(strXML);\n };\n\n\n // List of closed HTML tags, taken from JQuery 1.2.3\n fluid.XMLP.closedTags = {\n abbr: true,\n br: true,\n col: true,\n img: true,\n input: true,\n link: true,\n meta: true,\n param: true,\n hr: true,\n area: true,\n embed:true\n };\n\n fluid.XMLP._NONE = 0;\n fluid.XMLP._ELM_B = 1;\n fluid.XMLP._ELM_E = 2;\n fluid.XMLP._ELM_EMP = 3;\n fluid.XMLP._ATT = 4;\n fluid.XMLP._TEXT = 5;\n fluid.XMLP._ENTITY = 6;\n fluid.XMLP._PI = 7;\n fluid.XMLP._CDATA = 8;\n fluid.XMLP._COMMENT = 9;\n fluid.XMLP._DTD = 10;\n fluid.XMLP._ERROR = 11;\n\n fluid.XMLP._CONT_XML = 0;\n fluid.XMLP._CONT_ALT = 1;\n fluid.XMLP._ATT_NAME = 0;\n fluid.XMLP._ATT_VAL = 1;\n\n fluid.XMLP._STATE_PROLOG = 1;\n fluid.XMLP._STATE_DOCUMENT = 2;\n fluid.XMLP._STATE_MISC = 3;\n\n fluid.XMLP._errs = [];\n fluid.XMLP._errs[fluid.XMLP.ERR_CLOSE_PI = 0 ] = \"PI: missing closing sequence\";\n fluid.XMLP._errs[fluid.XMLP.ERR_CLOSE_DTD = 1 ] = \"DTD: missing closing sequence\";\n fluid.XMLP._errs[fluid.XMLP.ERR_CLOSE_COMMENT = 2 ] = \"Comment: missing closing sequence\";\n fluid.XMLP._errs[fluid.XMLP.ERR_CLOSE_CDATA = 3 ] = \"CDATA: missing closing sequence\";\n fluid.XMLP._errs[fluid.XMLP.ERR_CLOSE_ELM = 4 ] = \"Element: missing closing sequence\";\n fluid.XMLP._errs[fluid.XMLP.ERR_CLOSE_ENTITY = 5 ] = \"Entity: missing closing sequence\";\n fluid.XMLP._errs[fluid.XMLP.ERR_PI_TARGET = 6 ] = \"PI: target is required\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ELM_EMPTY = 7 ] = \"Element: cannot be both empty and closing\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ELM_NAME = 8 ] = \"Element: name must immediately follow \\\"<\\\"\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ELM_LT_NAME = 9 ] = \"Element: \\\"<\\\" not allowed in element names\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ATT_VALUES = 10] = \"Attribute: values are required and must be in quotes\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ATT_LT_NAME = 11] = \"Element: \\\"<\\\" not allowed in attribute names\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ATT_LT_VALUE = 12] = \"Attribute: \\\"<\\\" not allowed in attribute values\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ATT_DUP = 13] = \"Attribute: duplicate attributes not allowed\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ENTITY_UNKNOWN = 14] = \"Entity: unknown entity\";\n fluid.XMLP._errs[fluid.XMLP.ERR_INFINITELOOP = 15] = \"Infinite loop\";\n fluid.XMLP._errs[fluid.XMLP.ERR_DOC_STRUCTURE = 16] = \"Document: only comments, processing instructions, or whitespace allowed outside of document element\";\n fluid.XMLP._errs[fluid.XMLP.ERR_ELM_NESTING = 17] = \"Element: must be nested correctly\";\n\n\n fluid.XMLP._checkStructure = function(that, iEvent) {\n var stack = that.m_stack;\n if (fluid.XMLP._STATE_PROLOG == that.m_iState) {\n // disabled original check for text node in prologue\n that.m_iState = fluid.XMLP._STATE_DOCUMENT;\n }\n\n if (fluid.XMLP._STATE_DOCUMENT === that.m_iState) {\n if ((fluid.XMLP._ELM_B == iEvent) || (fluid.XMLP._ELM_EMP == iEvent)) {\n that.m_stack[stack.length] = that.getName();\n }\n if ((fluid.XMLP._ELM_E == iEvent) || (fluid.XMLP._ELM_EMP == iEvent)) {\n if (stack.length === 0) {\n //return fluid.XMLP._setErr(XMLP.ERR_DOC_STRUCTURE);\n return fluid.XMLP._NONE;\n }\n var strTop = stack[stack.length - 1];\n that.m_stack.length--;\n if (strTop === null || strTop !== that.getName()) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_ELM_NESTING);\n }\n }\n\n // disabled original check for text node in epilogue - \"MISC\" state is disused\n }\n return iEvent;\n };\n\n\n fluid.XMLP._parseCDATA = function(that, iB) {\n var iE = that.m_xml.indexOf(\"]]>\", iB);\n if (iE == -1) { return fluid.XMLP._setErr(that, fluid.XMLP.ERR_CLOSE_CDATA);}\n fluid.XMLP._setContent(that, fluid.XMLP._CONT_XML, iB, iE);\n that.m_iP = iE + 3;\n return fluid.XMLP._CDATA;\n };\n\n\n fluid.XMLP._parseComment = function(that, iB) {\n var iE = that.m_xml.indexOf(\"-\" + \"->\", iB);\n if (iE == -1) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_CLOSE_COMMENT);\n }\n fluid.XMLP._setContent(that, fluid.XMLP._CONT_XML, iB - 4, iE + 3);\n that.m_iP = iE + 3;\n return fluid.XMLP._COMMENT;\n };\n\n fluid.XMLP._parseDTD = function(that, iB) {\n var iE, strClose, iInt, iLast;\n iE = that.m_xml.indexOf(\">\", iB);\n if (iE == -1) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_CLOSE_DTD);\n }\n iInt = that.m_xml.indexOf(\"[\", iB);\n strClose = ((iInt != -1) && (iInt < iE)) ? \"]>\" : \">\";\n while (true) {\n if (iE == iLast) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_INFINITELOOP);\n }\n iLast = iE;\n iE = that.m_xml.indexOf(strClose, iB);\n if(iE == -1) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_CLOSE_DTD);\n }\n if (that.m_xml.substring(iE - 1, iE + 2) != \"]]>\") { break;}\n }\n that.m_iP = iE + strClose.length;\n return fluid.XMLP._DTD;\n };\n\n fluid.XMLP._parsePI = function(that, iB) {\n var iE, iTB, iTE, iCB, iCE;\n iE = that.m_xml.indexOf(\"?>\", iB);\n if (iE == -1) { return fluid.XMLP._setErr(that, fluid.XMLP.ERR_CLOSE_PI);}\n iTB = fluid.SAXStrings.indexOfNonWhitespace(that.m_xml, iB, iE);\n if (iTB == -1) { return fluid.XMLP._setErr(that, fluid.XMLP.ERR_PI_TARGET);}\n iTE = fluid.SAXStrings.indexOfWhitespace(that.m_xml, iTB, iE);\n if (iTE == -1) { iTE = iE;}\n iCB = fluid.SAXStrings.indexOfNonWhitespace(that.m_xml, iTE, iE);\n if (iCB == -1) { iCB = iE;}\n iCE = fluid.SAXStrings.lastIndexOfNonWhitespace(that.m_xml, iCB, iE);\n if (iCE == -1) { iCE = iE - 1;}\n that.m_name = that.m_xml.substring(iTB, iTE);\n fluid.XMLP._setContent(that, fluid.XMLP._CONT_XML, iCB, iCE + 1);\n that.m_iP = iE + 2;\n return fluid.XMLP._PI;\n };\n\n fluid.XMLP._parseText = function(that, iB) {\n var iE = that.m_xml.indexOf(\"<\", iB);\n if (iE == -1) { iE = that.m_xml.length;}\n fluid.XMLP._setContent(that, fluid.XMLP._CONT_XML, iB, iE);\n that.m_iP = iE;\n return fluid.XMLP._TEXT;\n };\n\n fluid.XMLP._setContent = function(that, iSrc) {\n var args = arguments;\n if (fluid.XMLP._CONT_XML == iSrc) {\n that.m_cAlt = null;\n that.m_cB = args[2];\n that.m_cE = args[3];\n }\n else {\n that.m_cAlt = args[2];\n that.m_cB = 0;\n that.m_cE = args[2].length;\n }\n\n that.m_cSrc = iSrc;\n };\n\n fluid.XMLP._setErr = function(that, iErr) {\n var strErr = fluid.XMLP._errs[iErr];\n that.m_cAlt = strErr;\n that.m_cB = 0;\n that.m_cE = strErr.length;\n that.m_cSrc = fluid.XMLP._CONT_ALT;\n return fluid.XMLP._ERROR;\n };\n\n\n fluid.XMLP._parseElement = function(that, iB) {\n var iE, iDE, iRet;\n var iType, strN, iLast;\n iDE = iE = that.m_xml.indexOf(\">\", iB);\n if (iE == -1) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_CLOSE_ELM);\n }\n if (that.m_xml.charAt(iB) == \"/\") {\n iType = fluid.XMLP._ELM_E;\n iB++;\n }\n else {\n iType = fluid.XMLP._ELM_B;\n }\n if (that.m_xml.charAt(iE - 1) == \"/\") {\n if (iType == fluid.XMLP._ELM_E) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_ELM_EMPTY);\n }\n iType = fluid.XMLP._ELM_EMP; iDE--;\n }\n\n that.nameRegex.lastIndex = iB;\n var nameMatch = that.nameRegex.exec(that.m_xml);\n if (!nameMatch) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_ELM_NAME);\n }\n strN = nameMatch[1].toLowerCase();\n // This branch is specially necessary for broken markup in IE. If we see an li\n // tag apparently directly nested in another, first emit a synthetic close tag\n // for the earlier one without advancing the pointer, and set a flag to ensure\n // doing this just once.\n if (\"li\" === strN && iType !== fluid.XMLP._ELM_E && that.m_stack.length > 0 &&\n that.m_stack[that.m_stack.length - 1] === \"li\" && !that.m_emitSynthetic) {\n that.m_name = \"li\";\n that.m_emitSynthetic = true;\n return fluid.XMLP._ELM_E;\n }\n // We have acquired the tag name, now set about parsing any attribute list\n that.m_attributes = {};\n that.m_cAlt = \"\";\n\n if (that.nameRegex.lastIndex < iDE) {\n that.m_iP = that.nameRegex.lastIndex;\n while (that.m_iP < iDE) {\n that.attrStartRegex.lastIndex = that.m_iP;\n var attrMatch = that.attrStartRegex.exec(that.m_xml);\n if (!attrMatch) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_ATT_VALUES);\n }\n var attrname = attrMatch[1].toLowerCase();\n var attrval;\n if (that.m_xml.charCodeAt(that.attrStartRegex.lastIndex) === 61) { // =\n var valRegex = that.m_xml.charCodeAt(that.attrStartRegex.lastIndex + 1) === 34? that.attrValRegex : that.attrValIERegex; // \"\n valRegex.lastIndex = that.attrStartRegex.lastIndex + 1;\n attrMatch = valRegex.exec(that.m_xml);\n if (!attrMatch) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_ATT_VALUES);\n }\n attrval = attrMatch[1];\n }\n else { // accommodate insanity on unvalued IE attributes\n attrval = attrname;\n valRegex = that.attrStartRegex;\n }\n if (!that.m_attributes[attrname] || that.m_attributes[attrname] === attrval) {\n // last branch required because of fresh duplicate attribute bug introduced in IE10 and above - FLUID-5204\n that.m_attributes[attrname] = attrval;\n }\n else {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_ATT_DUP);\n }\n that.m_iP = valRegex.lastIndex;\n\n }\n }\n if (strN.indexOf(\"<\") != -1) {\n return fluid.XMLP._setErr(that, fluid.XMLP.ERR_ELM_LT_NAME);\n }\n\n that.m_name = strN;\n that.m_iP = iE + 1;\n // Check for corrupted \"closed tags\" from innerHTML\n if (fluid.XMLP.closedTags[strN]) {\n that.closeRegex.lastIndex = iE + 1;\n var closeMatch = that.closeRegex.exec;\n if (closeMatch) {\n var matchclose = that.m_xml.indexOf(strN, closeMatch.lastIndex);\n if (matchclose === closeMatch.lastIndex) {\n return iType; // bail out, a valid close tag is separated only by whitespace\n }\n else {\n return fluid.XMLP._ELM_EMP;\n }\n }\n }\n that.m_emitSynthetic = false;\n return iType;\n };\n\n fluid.XMLP._parse = function(that) {\n var iP = that.m_iP;\n var xml = that.m_xml;\n if (iP === xml.length) { return fluid.XMLP._NONE;}\n var c = xml.charAt(iP);\n if (c === '<') {\n var c2 = xml.charAt(iP + 1);\n if (c2 === '?') {\n return fluid.XMLP._parsePI(that, iP + 2);\n }\n else if (c2 === '!') {\n if (iP === xml.indexOf(\"<!DOCTYPE\", iP)) {\n return fluid.XMLP._parseDTD(that, iP + 9);\n }\n else if (iP === xml.indexOf(\"<!--\", iP)) {\n return fluid.XMLP._parseComment(that, iP + 4);\n }\n else if (iP === xml.indexOf(\"<![CDATA[\", iP)) {\n return fluid.XMLP._parseCDATA(that, iP + 9);\n }\n }\n else {\n return fluid.XMLP._parseElement(that, iP + 1);\n }\n }\n else {\n return fluid.XMLP._parseText(that, iP);\n }\n };\n\n\n fluid.XMLP.XMLPImpl = function(strXML) {\n var that = {};\n that.m_xml = strXML;\n that.m_iP = 0;\n that.m_iState = fluid.XMLP._STATE_PROLOG;\n that.m_stack = [];\n that.m_attributes = {};\n that.m_emitSynthetic = false; // state used for emitting synthetic tags used to correct broken markup (IE)\n\n that.getColumnNumber = function() {\n return fluid.SAXStrings.getColumnNumber(that.m_xml, that.m_iP);\n };\n\n that.getContent = function() {\n return (that.m_cSrc == fluid.XMLP._CONT_XML) ? that.m_xml : that.m_cAlt;\n };\n\n that.getContentBegin = function() { return that.m_cB;};\n that.getContentEnd = function() { return that.m_cE;};\n\n that.getLineNumber = function() {\n return fluid.SAXStrings.getLineNumber(that.m_xml, that.m_iP);\n };\n\n that.getName = function() {\n return that.m_name;\n };\n\n that.next = function() {\n return fluid.XMLP._checkStructure(that, fluid.XMLP._parse(that));\n };\n\n that.nameRegex = /([^\\s\\/>]+)/g;\n that.attrStartRegex = /\\s*([\\w:_][\\w:_\\-\\.]*)/gm;\n that.attrValRegex = /\\\"([^\\\"]*)\\\"\\s*/gm; // \"normal\" XHTML attribute values\n that.attrValIERegex = /([^\\>\\s]+)\\s*/gm; // \"stupid\" unquoted IE attribute values (sometimes)\n that.closeRegex = /\\s*<\\//g;\n\n return that;\n };\n\n\n fluid.SAXStrings = {};\n\n fluid.SAXStrings.WHITESPACE = \" \\t\\n\\r\";\n fluid.SAXStrings.QUOTES = \"\\\"'\";\n fluid.SAXStrings.getColumnNumber = function (strD, iP) {\n if (!strD) { return -1;}\n iP = iP || strD.length;\n var arrD = strD.substring(0, iP).split(\"\\n\");\n arrD.length--;\n var iLinePos = arrD.join(\"\\n\").length;\n return iP - iLinePos;\n };\n\n fluid.SAXStrings.getLineNumber = function (strD, iP) {\n if (!strD) { return -1;}\n iP = iP || strD.length;\n return strD.substring(0, iP).split(\"\\n\").length;\n };\n\n fluid.SAXStrings.indexOfNonWhitespace = function (strD, iB, iE) {\n if (!strD) return -1;\n iB = iB || 0;\n iE = iE || strD.length;\n\n for (var i = iB; i < iE; ++ i) {\n var c = strD.charAt(i);\n if (c !== ' ' && c !== '\\t' && c !== '\\n' && c !== '\\r') return i;\n }\n return -1;\n };\n\n\n fluid.SAXStrings.indexOfWhitespace = function (strD, iB, iE) {\n if (!strD) { return -1;}\n iB = iB || 0;\n iE = iE || strD.length;\n for (var i = iB; i < iE; i++) {\n if (fluid.SAXStrings.WHITESPACE.indexOf(strD.charAt(i)) != -1) { return i;}\n }\n return -1;\n };\n\n\n fluid.SAXStrings.lastIndexOfNonWhitespace = function (strD, iB, iE) {\n if (!strD) { return -1;}\n iB = iB || 0; iE = iE || strD.length;\n for (var i = iE - 1; i >= iB; i--) {\n if (fluid.SAXStrings.WHITESPACE.indexOf(strD.charAt(i)) == -1) {\n return i;\n }\n }\n return -1;\n };\n\n fluid.SAXStrings.replace = function(strD, iB, iE, strF, strR) {\n if (!strD) { return \"\";}\n iB = iB || 0;\n iE = iE || strD.length;\n return strD.substring(iB, iE).split(strF).join(strR);\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2010 University of Cambridge\nCopyright 2008-2009 University of Toronto\nCopyright 2010-2011 Lucendo Development Ltd.\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nfluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n // unsupported, non-API function\n fluid.parseTemplate = function (template, baseURL, scanStart, cutpoints_in, opts) {\n opts = opts || {};\n\n if (!template) {\n fluid.fail(\"empty template supplied to fluid.parseTemplate\");\n }\n\n var t;\n var parser;\n var tagstack;\n var lumpindex = 0;\n var nestingdepth = 0;\n var justended = false;\n\n var defstart = -1;\n var defend = -1;\n\n var debugMode = false;\n\n var cutpoints = []; // list of selector, tree, id\n var simpleClassCutpoints = {};\n\n var cutstatus = [];\n\n var XMLLump = function (lumpindex, nestingdepth) {\n return {\n //rsfID: \"\",\n //text: \"\",\n //downmap: {},\n //attributemap: {},\n //finallump: {},\n nestingdepth: nestingdepth,\n lumpindex: lumpindex,\n parent: t\n };\n };\n\n function isSimpleClassCutpoint(tree) {\n return tree.length === 1 && tree[0].predList.length === 1 && tree[0].predList[0].clazz;\n }\n\n function init(baseURLin, debugModeIn, cutpointsIn) {\n t.rootlump = XMLLump(0, -1); // eslint-disable-line new-cap\n tagstack = [t.rootlump];\n lumpindex = 0;\n nestingdepth = 0;\n justended = false;\n defstart = -1;\n defend = -1;\n baseURL = baseURLin;\n debugMode = debugModeIn;\n if (cutpointsIn) {\n for (var i = 0; i < cutpointsIn.length; ++i) {\n var tree = fluid.parseSelector(cutpointsIn[i].selector, fluid.simpleCSSMatcher);\n var clazz = isSimpleClassCutpoint(tree);\n if (clazz) {\n simpleClassCutpoints[clazz] = cutpointsIn[i].id;\n }\n else {\n cutstatus.push([]);\n cutpoints.push($.extend({}, cutpointsIn[i], {tree: tree}));\n }\n }\n }\n }\n\n function findTopContainer() {\n for (var i = tagstack.length - 1; i >= 0; --i) {\n var lump = tagstack[i];\n if (lump.rsfID !== undefined) {\n return lump;\n }\n }\n return t.rootlump;\n }\n\n function newLump() {\n var togo = XMLLump(lumpindex, nestingdepth); // eslint-disable-line new-cap\n if (debugMode) {\n togo.line = parser.getLineNumber();\n togo.column = parser.getColumnNumber();\n }\n //togo.parent = t;\n t.lumps[lumpindex] = togo;\n ++lumpindex;\n return togo;\n }\n\n function addLump(mmap, ID, lump) {\n var list = mmap[ID];\n if (!list) {\n list = [];\n mmap[ID] = list;\n }\n list[list.length] = lump;\n }\n\n function checkContribute(ID, lump) {\n if (ID.indexOf(\"scr=contribute-\") !== -1) {\n var scr = ID.substring(\"scr=contribute-\".length);\n addLump(t.collectmap, scr, lump);\n }\n }\n\n function debugLump(lump) {\n // TODO expand this to agree with the Firebug \"self-selector\" idiom\n return \"<\" + lump.tagname + \">\";\n }\n\n function hasCssClass(clazz, totest) {\n if (!totest) {\n return false;\n }\n // algorithm from jQuery\n return (\" \" + totest + \" \").indexOf(\" \" + clazz + \" \") !== -1;\n }\n\n function matchNode(term, headlump, headclazz) {\n if (term.predList) {\n for (var i = 0; i < term.predList.length; ++i) {\n var pred = term.predList[i];\n if (pred.id && headlump.attributemap.id !== pred.id) {return false;}\n if (pred.clazz && !hasCssClass(pred.clazz, headclazz)) {return false;}\n if (pred.tag && headlump.tagname !== pred.tag) {return false;}\n }\n return true;\n }\n }\n\n function tagStartCut(headlump) {\n var togo;\n var headclazz = headlump.attributemap[\"class\"];\n var i;\n if (headclazz) {\n var split = headclazz.split(\" \");\n for (i = 0; i < split.length; ++i) {\n var simpleCut = simpleClassCutpoints[$.trim(split[i])];\n if (simpleCut) {\n return simpleCut;\n }\n }\n }\n for (i = 0; i < cutpoints.length; ++i) {\n var cut = cutpoints[i];\n var cutstat = cutstatus[i];\n var nextterm = cutstat.length; // the next term for this node\n if (nextterm < cut.tree.length) {\n var term = cut.tree[nextterm];\n if (nextterm > 0) {\n if (cut.tree[nextterm - 1].child &&\n cutstat[nextterm - 1] !== headlump.nestingdepth - 1) {\n continue; // it is a failure to match if not at correct nesting depth\n }\n }\n var isMatch = matchNode(term, headlump, headclazz);\n if (isMatch) {\n cutstat[cutstat.length] = headlump.nestingdepth;\n if (cutstat.length === cut.tree.length) {\n if (togo !== undefined) {\n fluid.fail(\"Cutpoint specification error - node \" +\n debugLump(headlump) +\n \" has already matched with rsf:id of \" + togo);\n }\n if (cut.id === undefined || cut.id === null) {\n fluid.fail(\"Error in cutpoints list - entry at position \" + i + \" does not have an id set\");\n }\n togo = cut.id;\n }\n }\n }\n }\n return togo;\n }\n\n function tagEndCut() {\n if (cutpoints) {\n for (var i = 0; i < cutpoints.length; ++i) {\n var cutstat = cutstatus[i];\n if (cutstat.length > 0 && cutstat[cutstat.length - 1] === nestingdepth) {\n cutstat.length--;\n }\n }\n }\n }\n\n function processTagEnd() {\n tagEndCut();\n var endlump = newLump();\n --nestingdepth;\n endlump.text = \"</\" + parser.getName() + \">\";\n var oldtop = tagstack[tagstack.length - 1];\n oldtop.close_tag = t.lumps[lumpindex - 1];\n tagstack.length--;\n justended = true;\n }\n\n function processTagStart(isempty) {\n ++nestingdepth;\n if (justended) {\n justended = false;\n var backlump = newLump();\n backlump.nestingdepth--;\n }\n if (t.firstdocumentindex === -1) {\n t.firstdocumentindex = lumpindex;\n }\n var headlump = newLump();\n var stacktop = tagstack[tagstack.length - 1];\n headlump.uplump = stacktop;\n var tagname = parser.getName();\n headlump.tagname = tagname;\n // NB - attribute names and values are now NOT DECODED!!\n var attrs = headlump.attributemap = parser.m_attributes;\n var ID = attrs[fluid.ID_ATTRIBUTE];\n if (ID === undefined) {\n ID = tagStartCut(headlump);\n }\n for (var attrname in attrs) {\n if (ID === undefined) {\n if (/href|src|codebase|action/.test(attrname)) {\n ID = \"scr=rewrite-url\";\n }\n // port of TPI effect of IDRelationRewriter\n else if (ID === undefined && /for|headers/.test(attrname)) {\n ID = \"scr=null\";\n }\n }\n }\n\n if (ID) {\n // TODO: ensure this logic is correct on RSF Server\n if (ID.charCodeAt(0) === 126) { // \"~\"\n ID = ID.substring(1);\n headlump.elide = true;\n }\n checkContribute(ID, headlump);\n headlump.rsfID = ID;\n var downreg = findTopContainer();\n if (!downreg.downmap) {\n downreg.downmap = {};\n }\n while (downreg) { // TODO: unusual fix for locating branches in parent contexts (applies to repetitive leaves)\n if (downreg.downmap) {\n addLump(downreg.downmap, ID, headlump);\n }\n downreg = downreg.uplump;\n }\n addLump(t.globalmap, ID, headlump);\n var colpos = ID.indexOf(\":\");\n if (colpos !== -1) {\n var prefix = ID.substring(0, colpos);\n if (!stacktop.finallump) {\n stacktop.finallump = {};\n }\n stacktop.finallump[prefix] = headlump;\n }\n }\n\n // TODO: accelerate this by grabbing original template text (requires parser\n // adjustment) as well as dealing with empty tags\n headlump.text = \"<\" + tagname + fluid.dumpAttributes(attrs) + (isempty && !ID ? \"/>\" : \">\");\n tagstack[tagstack.length] = headlump;\n if (isempty) {\n if (ID) {\n processTagEnd();\n }\n else {\n --nestingdepth;\n tagstack.length--;\n }\n }\n }\n\n\n\n function processDefaultTag() {\n if (defstart !== -1) {\n if (t.firstdocumentindex === -1) {\n t.firstdocumentindex = lumpindex;\n }\n var text = parser.getContent().substr(defstart, defend - defstart);\n justended = false;\n var newlump = newLump();\n newlump.text = text;\n defstart = -1;\n }\n }\n\n /** ACTUAL BODY of fluid.parseTemplate begins here **/\n\n t = fluid.XMLViewTemplate();\n\n init(baseURL, opts.debugMode, cutpoints_in);\n\n var idpos = template.indexOf(fluid.ID_ATTRIBUTE);\n if (scanStart) {\n var brackpos = template.indexOf(\">\", idpos);\n parser = fluid.XMLP(template.substring(brackpos + 1));\n }\n else {\n parser = fluid.XMLP(template);\n }\n\nparseloop: // eslint-disable-line indent\n while (true) {\n var iEvent = parser.next();\n switch (iEvent) {\n case fluid.XMLP._ELM_B:\n processDefaultTag();\n //var text = parser.getContent().substr(parser.getContentBegin(), parser.getContentEnd() - parser.getContentBegin());\n processTagStart(false, \"\");\n break;\n case fluid.XMLP._ELM_E:\n processDefaultTag();\n processTagEnd();\n break;\n case fluid.XMLP._ELM_EMP:\n processDefaultTag();\n //var text = parser.getContent().substr(parser.getContentBegin(), parser.getContentEnd() - parser.getContentBegin());\n processTagStart(true, \"\");\n break;\n case fluid.XMLP._PI:\n case fluid.XMLP._DTD:\n defstart = -1;\n continue; // not interested in reproducing these\n case fluid.XMLP._TEXT:\n case fluid.XMLP._ENTITY:\n case fluid.XMLP._CDATA:\n case fluid.XMLP._COMMENT:\n if (defstart === -1) {\n defstart = parser.m_cB;\n }\n defend = parser.m_cE;\n break;\n case fluid.XMLP._ERROR:\n fluid.setLogging(true);\n var message = \"Error parsing template: \" + parser.m_cAlt + \" at line \" + parser.getLineNumber();\n fluid.log(message);\n fluid.log(\"Just read: \" + parser.m_xml.substring(parser.m_iP - 30, parser.m_iP));\n fluid.log(\"Still to read: \" + parser.m_xml.substring(parser.m_iP, parser.m_iP + 30));\n fluid.fail(message);\n break parseloop;\n case fluid.XMLP._NONE:\n break parseloop;\n }\n }\n processDefaultTag();\n var excess = tagstack.length - 1;\n if (excess) {\n fluid.fail(\"Error parsing template - unclosed tag(s) of depth \" + (excess) +\n \": \" + fluid.transform(tagstack.splice(1, excess), function (lump) {return debugLump(lump);}).join(\", \"));\n }\n return t;\n };\n\n // unsupported, non-API function\n fluid.debugLump = function (lump) {\n var togo = lump.text;\n togo += \" at \";\n togo += \"lump line \" + lump.line + \" column \" + lump.column + \" index \" + lump.lumpindex;\n togo += lump.parent.href === null ? \"\" : \" in file \" + lump.parent.href;\n return togo;\n };\n\n // Public definitions begin here\n\n fluid.ID_ATTRIBUTE = \"rsf:id\";\n\n // unsupported, non-API function\n fluid.getPrefix = function (id) {\n var colpos = id.indexOf(\":\");\n return colpos === -1 ? id : id.substring(0, colpos);\n };\n\n // unsupported, non-API function\n fluid.SplitID = function (id) {\n var that = {};\n var colpos = id.indexOf(\":\");\n if (colpos === -1) {\n that.prefix = id;\n }\n else {\n that.prefix = id.substring(0, colpos);\n that.suffix = id.substring(colpos + 1);\n }\n return that;\n };\n\n // unsupported, non-API function\n fluid.XMLViewTemplate = function () {\n return {\n globalmap: {},\n collectmap: {},\n lumps: [],\n firstdocumentindex: -1\n };\n };\n\n // TODO: find faster encoder\n fluid.XMLEncode = function (text) {\n return text.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\\\"/g, \""\");\n };\n\n // unsupported, non-API function\n fluid.dumpAttributes = function (attrcopy) {\n var togo = \"\";\n for (var attrname in attrcopy) {\n var attrvalue = attrcopy[attrname];\n if (attrvalue !== null && attrvalue !== undefined) {\n togo += \" \" + attrname + \"=\\\"\" + attrvalue + \"\\\"\";\n }\n }\n return togo;\n };\n\n // unsupported, non-API function\n fluid.aggregateMMap = function (target, source) {\n for (var key in source) {\n var targhas = target[key];\n if (!targhas) {\n target[key] = [];\n }\n target[key] = target[key].concat(source[key]);\n }\n };\n\n /** Returns a \"template structure\", with globalmap in the root, and a list\n * of entries {href, template, cutpoints} for each parsed template.\n */\n fluid.parseTemplates = function (resourceSpec, templateList, opts) {\n var togo = [];\n opts = opts || {};\n togo.globalmap = {};\n for (var i = 0; i < templateList.length; ++i) {\n var resource = resourceSpec[templateList[i]];\n var lastslash = resource.href.lastIndexOf(\"/\");\n var baseURL = lastslash === -1 ? \"\" : resource.href.substring(0, lastslash + 1);\n\n var template = fluid.parseTemplate(resource.resourceText, baseURL,\n opts.scanStart && i === 0, resource.cutpoints, opts);\n if (i === 0) {\n fluid.aggregateMMap(togo.globalmap, template.globalmap);\n }\n template.href = resource.href;\n template.baseURL = baseURL;\n template.resourceKey = resource.resourceKey;\n\n togo[i] = template;\n fluid.aggregateMMap(togo.globalmap, template.rootlump.downmap);\n }\n return togo;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2010 University of Cambridge\nCopyright 2008-2009 University of Toronto\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2013 OCAD University\nCopyright 2013 Raising the Floor - US\nCopyright 2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nfluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n\n fluid.defaults(\"fluid.messageResolver\", {\n gradeNames: [\"fluid.component\"],\n mergePolicy: {\n messageBase: \"nomerge\",\n parents: \"nomerge\"\n },\n resolveFunc: fluid.stringTemplate,\n parseFunc: fluid.identity,\n messageBase: {},\n members: {\n messageBase: \"@expand:{that}.options.parseFunc({that}.options.messageBase)\"\n },\n invokers: {\n lookup: \"fluid.messageResolver.lookup({that}, {arguments}.0)\", // messagecodes\n resolve: \"fluid.messageResolver.resolve({that}, {arguments}.0, {arguments}.1)\" // messagecodes, args\n },\n parents: []\n });\n\n fluid.messageResolver.lookup = function (that, messagecodes) {\n var resolved = fluid.messageResolver.resolveOne(that.messageBase, messagecodes);\n if (resolved === undefined) {\n return fluid.find(that.options.parents, function (parent) {\n return parent ? parent.lookup(messagecodes) : undefined;\n });\n } else {\n return {template: resolved, resolveFunc: that.options.resolveFunc};\n }\n };\n\n fluid.messageResolver.resolve = function (that, messagecodes, args) {\n if (!messagecodes) {\n return \"[No messagecodes provided]\";\n }\n messagecodes = fluid.makeArray(messagecodes);\n var looked = that.lookup(messagecodes);\n return looked ? looked.resolveFunc(looked.template, args) :\n \"[Message string for key \" + messagecodes[0] + \" not found]\";\n };\n\n\n // unsupported, NON-API function\n fluid.messageResolver.resolveOne = function (messageBase, messagecodes) {\n for (var i = 0; i < messagecodes.length; ++i) {\n var code = messagecodes[i];\n var message = messageBase[code];\n if (message !== undefined) {\n return message;\n }\n }\n };\n\n /** Converts a data structure consisting of a mapping of keys to message strings,\n * into a \"messageLocator\" function which maps an array of message codes, to be\n * tried in sequence until a key is found, and an array of substitution arguments,\n * into a substituted message string.\n */\n fluid.messageLocator = function (messageBase, resolveFunc) {\n var resolver = fluid.messageResolver({messageBase: messageBase, resolveFunc: resolveFunc});\n return function (messagecodes, args) {\n return resolver.resolve(messagecodes, args);\n };\n };\n\n function debugPosition(component) {\n return \"as child of \" + (component.parent.fullID ? \"component with full ID \" + component.parent.fullID : \"root\");\n }\n\n function computeFullID(component) {\n var togo = \"\";\n var move = component;\n if (component.children === undefined) { // not a container\n // unusual case on the client-side, since a repetitive leaf may have localID blasted onto it.\n togo = component.ID + (component.localID !== undefined ? component.localID : \"\");\n move = component.parent;\n }\n\n while (move.parent) {\n var parent = move.parent;\n if (move.fullID !== undefined) {\n togo = move.fullID + togo;\n return togo;\n }\n if (move.noID === undefined) {\n var ID = move.ID;\n if (ID === undefined) {\n fluid.fail(\"Error in component tree - component found with no ID \" +\n debugPosition(parent) + \": please check structure\");\n }\n var colpos = ID.indexOf(\":\");\n var prefix = colpos === -1 ? ID : ID.substring(0, colpos);\n togo = prefix + \":\" + (move.localID === undefined ? \"\" : move.localID) + \":\" + togo;\n }\n move = parent;\n }\n\n return togo;\n }\n\n var renderer = {};\n\n renderer.isBoundPrimitive = function (value) {\n return fluid.isPrimitive(value) || fluid.isArrayable(value) &&\n (value.length === 0 || typeof (value[0]) === \"string\");\n };\n\n var unzipComponent;\n\n function processChild(value, key) {\n if (renderer.isBoundPrimitive(value)) {\n return {componentType: \"UIBound\", value: value, ID: key};\n }\n else {\n var unzip = unzipComponent(value);\n if (unzip.ID) {\n return {ID: key, componentType: \"UIContainer\", children: [unzip]};\n } else {\n unzip.ID = key;\n return unzip;\n }\n }\n }\n\n function fixChildren(children) {\n if (!fluid.isArrayable(children)) {\n var togo = [];\n for (var key in children) {\n var value = children[key];\n if (fluid.isArrayable(value)) {\n for (var i = 0; i < value.length; ++i) {\n var processed = processChild(value[i], key);\n // if (processed.componentType === \"UIContainer\" &&\n // processed.localID === undefined) {\n // processed.localID = i;\n // }\n togo[togo.length] = processed;\n }\n } else {\n togo[togo.length] = processChild(value, key);\n }\n }\n return togo;\n } else {return children; }\n }\n\n function fixupValue(uibound, model, resolverGetConfig) {\n if (uibound.value === undefined && uibound.valuebinding !== undefined) {\n uibound.value = fluid.get(model, uibound.valuebinding, resolverGetConfig);\n }\n }\n\n function upgradeBound(holder, property, model, resolverGetConfig) {\n if (holder[property] !== undefined) {\n if (renderer.isBoundPrimitive(holder[property])) {\n holder[property] = {value: holder[property]};\n }\n else if (holder[property].messagekey) {\n holder[property].componentType = \"UIMessage\";\n }\n }\n else {\n holder[property] = {value: null};\n }\n fixupValue(holder[property], model, resolverGetConfig);\n }\n\n renderer.duckMap = {children: \"UIContainer\",\n value: \"UIBound\", valuebinding: \"UIBound\", messagekey: \"UIMessage\",\n markup: \"UIVerbatim\", selection: \"UISelect\", target: \"UILink\",\n choiceindex: \"UISelectChoice\", functionname: \"UIInitBlock\"};\n\n var boundMap = {\n UISelect: [\"selection\", \"optionlist\", \"optionnames\"],\n UILink: [\"target\", \"linktext\"],\n UIVerbatim: [\"markup\"],\n UIMessage: [\"messagekey\"]\n };\n\n renderer.boundMap = fluid.transform(boundMap, fluid.arrayToHash);\n\n renderer.inferComponentType = function (component) {\n for (var key in renderer.duckMap) {\n if (component[key] !== undefined) {\n return renderer.duckMap[key];\n }\n }\n };\n\n renderer.applyComponentType = function (component) {\n component.componentType = renderer.inferComponentType(component);\n if (component.componentType === undefined && component.ID !== undefined) {\n component.componentType = \"UIBound\";\n }\n };\n\n unzipComponent = function (component, model, resolverGetConfig) {\n if (component) {\n renderer.applyComponentType(component);\n }\n if (!component || component.componentType === undefined) {\n var decorators = component.decorators;\n if (decorators) {delete component.decorators;}\n component = {componentType: \"UIContainer\", children: component};\n component.decorators = decorators;\n }\n var cType = component.componentType;\n if (cType === \"UIContainer\") {\n component.children = fixChildren(component.children);\n }\n else {\n var map = renderer.boundMap[cType];\n if (map) {\n fluid.each(map, function (value, key) {\n upgradeBound(component, key, model, resolverGetConfig);\n });\n }\n }\n\n return component;\n };\n\n function fixupTree(tree, model, resolverGetConfig) {\n if (tree.componentType === undefined) {\n tree = unzipComponent(tree, model, resolverGetConfig);\n }\n if (tree.componentType !== \"UIContainer\" && !tree.parent) {\n tree = {children: [tree]};\n }\n\n if (tree.children) {\n tree.childmap = {};\n for (var i = 0; i < tree.children.length; ++i) {\n var child = tree.children[i];\n if (child.componentType === undefined) {\n child = unzipComponent(child, model, resolverGetConfig);\n tree.children[i] = child;\n }\n child.parent = tree;\n if (child.ID === undefined) {\n fluid.fail(\"Error in component tree: component found with no ID \" + debugPosition(child));\n }\n tree.childmap[child.ID] = child;\n var colpos = child.ID.indexOf(\":\");\n if (colpos === -1) {\n // tree.childmap[child.ID] = child; // moved out of branch to allow\n // \"relative id expressions\" to be easily parsed\n }\n else {\n var prefix = child.ID.substring(0, colpos);\n var childlist = tree.childmap[prefix];\n if (!childlist) {\n childlist = [];\n tree.childmap[prefix] = childlist;\n }\n if (child.localID === undefined && childlist.length !== 0) {\n child.localID = childlist.length;\n }\n childlist[childlist.length] = child;\n }\n child.fullID = computeFullID(child);\n\n var componentType = child.componentType;\n if (componentType === \"UISelect\") {\n child.selection.fullID = child.fullID;\n }\n else if (componentType === \"UIInitBlock\") {\n var call = child.functionname + \"(\";\n var childArgs = child.arguments;\n for (var j = 0; j < childArgs.length; ++j) {\n if (childArgs[j] instanceof fluid.ComponentReference) {\n // TODO: support more forms of id reference\n childArgs[j] = child.parent.fullID + childArgs[j].reference;\n }\n call += JSON.stringify(childArgs[j]);\n if (j < childArgs.length - 1) {\n call += \", \";\n }\n }\n child.markup = {value: call + \")\\n\"};\n child.componentType = \"UIVerbatim\";\n }\n else if (componentType === \"UIBound\") {\n fixupValue(child, model, resolverGetConfig);\n }\n fixupTree(child, model, resolverGetConfig);\n }\n }\n return tree;\n }\n\n fluid.NULL_STRING = \"\\u25a9null\\u25a9\";\n\n var LINK_ATTRIBUTES = {\n a: \"href\",\n link: \"href\",\n img: \"src\",\n frame: \"src\",\n script: \"src\",\n style: \"src\",\n input: \"src\",\n embed: \"src\",\n form: \"action\",\n applet: \"codebase\",\n object: \"codebase\"\n };\n\n renderer.decoratorComponentPrefix = \"**-renderer-\";\n\n renderer.IDtoComponentName = function (ID, num) {\n return renderer.decoratorComponentPrefix + ID.replace(/\\./g, \"\") + \"-\" + num;\n };\n\n renderer.invokeFluidDecorator = function (func, args, ID, num, options) {\n var that;\n if (options.parentComponent) {\n var parent = options.parentComponent;\n var name = renderer.IDtoComponentName(ID, num);\n fluid.set(parent, [\"options\", \"components\", name], {\n type: func,\n container: args[0],\n options: args[1]\n });\n that = fluid.initDependent(options.parentComponent, name);\n }\n else {\n that = fluid.invokeGlobalFunction(func, args);\n }\n return that;\n };\n\n fluid.renderer = function (templates, tree, options, fossilsIn) {\n\n options = options || {};\n tree = tree || {};\n var debugMode = options.debugMode;\n if (!options.messageLocator && options.messageSource) {\n options.messageLocator = fluid.resolveMessageSource(options.messageSource);\n }\n options.document = options.document || document;\n options.jQuery = options.jQuery || $;\n options.fossils = options.fossils || fossilsIn || {}; // map of submittingname to {EL, submittingname, oldvalue}\n\n var globalmap = {};\n var branchmap = {};\n var rewritemap = {}; // map of rewritekey (for original id in template) to full ID\n var seenset = {};\n var collected = {};\n var out = \"\";\n var renderOptions = options;\n var decoratorQueue = [];\n\n var renderedbindings = {}; // map of fullID to true for UISelects which have already had bindings written\n var usedIDs = {};\n\n var that = {options: options};\n\n function getRewriteKey(template, parent, id) {\n return template.resourceKey + parent.fullID + id;\n }\n // returns: lump\n function resolveInScope(searchID, defprefix, scope) {\n var deflump;\n var scopelook = scope ? scope[searchID] : null;\n if (scopelook) {\n for (var i = 0; i < scopelook.length; ++i) {\n var scopelump = scopelook[i];\n if (!deflump && scopelump.rsfID === defprefix) {\n deflump = scopelump;\n }\n if (scopelump.rsfID === searchID) {\n return scopelump;\n }\n }\n }\n return deflump;\n }\n // returns: lump\n function resolveCall(sourcescope, child) {\n var searchID = child.jointID ? child.jointID : child.ID;\n var split = fluid.SplitID(searchID);\n var defprefix = split.prefix + \":\";\n var match = resolveInScope(searchID, defprefix, sourcescope.downmap, child);\n if (match) {return match;}\n if (child.children) {\n match = resolveInScope(searchID, defprefix, globalmap, child);\n if (match) {return match;}\n }\n return null;\n }\n\n function noteCollected(template) {\n if (!seenset[template.href]) {\n fluid.aggregateMMap(collected, template.collectmap);\n seenset[template.href] = true;\n }\n }\n\n var fetchComponent;\n\n function resolveRecurse(basecontainer, parentlump) {\n var i;\n var id;\n var resolved;\n for (i = 0; i < basecontainer.children.length; ++i) {\n var branch = basecontainer.children[i];\n if (branch.children) { // it is a branch\n resolved = resolveCall(parentlump, branch);\n if (resolved) {\n branchmap[branch.fullID] = resolved;\n id = resolved.attributemap.id;\n if (id !== undefined) {\n rewritemap[getRewriteKey(parentlump.parent, basecontainer, id)] = branch.fullID;\n }\n // on server-side this is done separately\n noteCollected(resolved.parent);\n resolveRecurse(branch, resolved);\n }\n }\n }\n // collect any rewritten ids for the purpose of later rewriting\n if (parentlump.downmap) {\n for (id in parentlump.downmap) {\n //if (id.indexOf(\":\") === -1) {\n var lumps = parentlump.downmap[id];\n for (i = 0; i < lumps.length; ++i) {\n var lump = lumps[i];\n var lumpid = lump.attributemap.id;\n if (lumpid !== undefined && lump.rsfID !== undefined) {\n resolved = fetchComponent(basecontainer, lump.rsfID);\n if (resolved !== null) {\n var resolveID = resolved.fullID;\n rewritemap[getRewriteKey(parentlump.parent, basecontainer,\n lumpid)] = resolveID;\n }\n }\n }\n // }\n }\n }\n\n }\n\n function resolveBranches(globalmapp, basecontainer, parentlump) {\n branchmap = {};\n rewritemap = {};\n seenset = {};\n collected = {};\n globalmap = globalmapp;\n branchmap[basecontainer.fullID] = parentlump;\n resolveRecurse(basecontainer, parentlump);\n }\n\n function dumpTillLump(lumps, start, limit) {\n for (; start < limit; ++start) {\n var text = lumps[start].text;\n if (text) { // guard against \"undefined\" lumps from \"justended\"\n out += lumps[start].text;\n }\n }\n }\n\n function dumpScan(lumps, renderindex, basedepth, closeparent, insideleaf) {\n var start = renderindex;\n while (true) {\n if (renderindex === lumps.length) {\n break;\n }\n var lump = lumps[renderindex];\n if (lump.nestingdepth < basedepth) {\n break;\n }\n if (lump.rsfID !== undefined) {\n if (!insideleaf) {break;}\n if (insideleaf && lump.nestingdepth > basedepth + (closeparent ? 0 : 1)) {\n fluid.log(\"Error in component tree - leaf component found to contain further components - at \" +\n lump.toString());\n }\n else {break;}\n }\n // target.print(lump.text);\n ++renderindex;\n }\n // ASSUMPTIONS: close tags are ONE LUMP\n if (!closeparent && (renderindex === lumps.length || !lumps[renderindex].rsfID)) {\n --renderindex;\n }\n\n dumpTillLump(lumps, start, renderindex);\n //target.write(buffer, start, limit - start);\n return renderindex;\n }\n\n\n function isPlaceholder() {\n // TODO: equivalent of server-side \"placeholder\" system\n return false;\n }\n\n function isValue(value) {\n return value !== null && value !== undefined && !isPlaceholder(value);\n }\n\n // In RSF Client, this is a \"flyweight\" \"global\" object that is reused for every tag,\n // to avoid generating garbage. In RSF Server, it is an argument to the following rendering\n // methods of type \"TagRenderContext\".\n\n var trc = {};\n\n /*** TRC METHODS ***/\n\n function openTag() {\n if (!trc.iselide) {\n out += \"<\" + trc.uselump.tagname;\n }\n }\n\n function closeTag() {\n if (!trc.iselide) {\n out += \"</\" + trc.uselump.tagname + \">\";\n }\n }\n\n function renderUnchanged() {\n // TODO needs work since we don't keep attributes in text\n dumpTillLump(trc.uselump.parent.lumps, trc.uselump.lumpindex + 1,\n trc.close.lumpindex + (trc.iselide ? 0 : 1));\n }\n\n function isSelfClose() {\n return trc.endopen.lumpindex === trc.close.lumpindex && fluid.XMLP.closedTags[trc.uselump.tagname];\n }\n\n function dumpTemplateBody() {\n if (isSelfClose()) {\n if (!trc.iselide) {\n out += \"/>\";\n }\n }\n else {\n if (!trc.iselide) {\n out += \">\";\n }\n dumpTillLump(trc.uselump.parent.lumps, trc.endopen.lumpindex,\n trc.close.lumpindex + (trc.iselide ? 0 : 1));\n }\n }\n\n function replaceAttributes() {\n if (!trc.iselide) {\n out += fluid.dumpAttributes(trc.attrcopy);\n }\n dumpTemplateBody();\n }\n\n function replaceAttributesOpen() {\n if (trc.iselide) {\n replaceAttributes();\n }\n else {\n out += fluid.dumpAttributes(trc.attrcopy);\n var selfClose = isSelfClose();\n // TODO: the parser does not ever produce empty tags\n out += selfClose ? \"/>\" : \">\";\n\n trc.nextpos = selfClose ? trc.close.lumpindex + 1 : trc.endopen.lumpindex;\n }\n }\n\n function replaceBody(value) {\n out += fluid.dumpAttributes(trc.attrcopy);\n if (!trc.iselide) {\n out += \">\";\n }\n out += fluid.XMLEncode(value.toString());\n closeTag();\n }\n\n function rewriteLeaf(value) {\n if (isValue(value)) {\n replaceBody(value);\n }\n else {\n replaceAttributes();\n }\n }\n\n function rewriteLeafOpen(value) {\n if (trc.iselide) {\n rewriteLeaf(trc.value);\n }\n else {\n if (isValue(value)) {\n replaceBody(value);\n }\n else {\n replaceAttributesOpen();\n }\n }\n }\n\n\n /*** END TRC METHODS**/\n\n function rewriteUrl(template, url) {\n if (renderOptions.urlRewriter) {\n var rewritten = renderOptions.urlRewriter(url);\n if (rewritten) {\n return rewritten;\n }\n }\n if (!renderOptions.rebaseURLs) {\n return url;\n }\n var protpos = url.indexOf(\":/\");\n if (url.charAt(0) === \"/\" || protpos !== -1 && protpos < 7) {\n return url;\n }\n else {\n return renderOptions.baseURL + url;\n }\n }\n\n function dumpHiddenField(/** UIParameter **/ todump) {\n out += \"<input type=\\\"hidden\\\" \";\n var isvirtual = todump.virtual;\n var outattrs = {};\n outattrs[isvirtual ? \"id\" : \"name\"] = todump.name;\n outattrs.value = todump.value;\n out += fluid.dumpAttributes(outattrs);\n out += \" />\\n\";\n }\n\n var outDecoratorsImpl;\n\n function applyAutoBind(torender, finalID) {\n if (!finalID) {\n // if no id is assigned so far, this is a signal that this is a \"virtual\" component such as\n // a non-HTML UISelect which will not have physical markup.\n return;\n }\n var tagname = trc.uselump.tagname;\n var applier = renderOptions.applier;\n function applyFunc() {\n fluid.applyBoundChange(fluid.byId(finalID, renderOptions.document), undefined, applier);\n }\n if (renderOptions.autoBind && /input|select|textarea/.test(tagname) && !renderedbindings[finalID]) {\n var decorators = [{jQuery: [\"change\", applyFunc]}];\n // Work around bug 193: http://webbugtrack.blogspot.com/2007/11/bug-193-onchange-does-not-fire-properly.html\n if ($.browser.msie && tagname === \"input\" && /radio|checkbox/.test(trc.attrcopy.type)) {\n decorators.push({jQuery: [\"click\", applyFunc]});\n }\n if ($.browser.safari && tagname === \"input\" && trc.attrcopy.type === \"radio\") {\n decorators.push({jQuery: [\"keyup\", applyFunc]});\n }\n outDecoratorsImpl(torender, decorators, trc.attrcopy, finalID);\n }\n }\n\n function dumpBoundFields(/** UIBound**/ torender, parent) {\n if (torender) {\n var holder = parent ? parent : torender;\n if (renderOptions.fossils && holder.valuebinding !== undefined) {\n var fossilKey = holder.submittingname || torender.finalID;\n // TODO: this will store multiple times for each member of a UISelect\n renderOptions.fossils[fossilKey] = {\n name: fossilKey,\n EL: holder.valuebinding,\n oldvalue: holder.value\n };\n // But this has to happen multiple times\n applyAutoBind(torender, torender.finalID);\n }\n if (torender.fossilizedbinding) {\n dumpHiddenField(torender.fossilizedbinding);\n }\n if (torender.fossilizedshaper) {\n dumpHiddenField(torender.fossilizedshaper);\n }\n }\n }\n\n function dumpSelectionBindings(uiselect) {\n if (!renderedbindings[uiselect.selection.fullID]) {\n renderedbindings[uiselect.selection.fullID] = true; // set this true early so that selection does not autobind twice\n dumpBoundFields(uiselect.selection);\n dumpBoundFields(uiselect.optionlist);\n dumpBoundFields(uiselect.optionnames);\n }\n }\n\n function isSelectedValue(torender, value) {\n var selection = torender.selection;\n return fluid.isArrayable(selection.value) ? selection.value.indexOf(value) !== -1 : selection.value === value;\n }\n\n function getRelativeComponent(component, relativeID) {\n component = component.parent;\n while (relativeID.indexOf(\"..::\") === 0) {\n relativeID = relativeID.substring(4);\n component = component.parent;\n }\n return component.childmap[relativeID];\n }\n\n // TODO: This mechanism inefficiently handles the rare case of a target document\n // id collision requiring a rewrite for FLUID-5048. In case it needs improving, we\n // could hold an inverted index - however, these cases will become even rarer with FLUID-5047\n function rewriteRewriteMap(from, to) {\n fluid.each(rewritemap, function (value, key) {\n if (value === from) {\n rewritemap[key] = to;\n }\n });\n }\n\n function adjustForID(attrcopy, component, late, forceID) {\n if (!late) {\n delete attrcopy[\"rsf:id\"];\n }\n if (component.finalID !== undefined) {\n attrcopy.id = component.finalID;\n }\n else if (forceID !== undefined) {\n attrcopy.id = forceID;\n }\n else {\n if (attrcopy.id || late) {\n attrcopy.id = component.fullID;\n }\n }\n\n var count = 1;\n var baseid = attrcopy.id;\n while (renderOptions.document.getElementById(attrcopy.id) || usedIDs[attrcopy.id]) {\n attrcopy.id = baseid + \"-\" + (count++);\n }\n if (count !== 1) {\n rewriteRewriteMap(baseid, attrcopy.id);\n }\n component.finalID = attrcopy.id;\n return attrcopy.id;\n }\n\n function assignSubmittingName(attrcopy, component, parent) {\n var submitting = parent || component;\n // if a submittingName is required, we must already go out to the document to\n // uniquify the id that it will be derived from\n adjustForID(attrcopy, component, true, component.fullID);\n if (submitting.submittingname === undefined && submitting.willinput !== false) {\n submitting.submittingname = submitting.finalID || submitting.fullID;\n }\n return submitting.submittingname;\n }\n\n function explodeDecorators(decorators) {\n var togo = [];\n if (decorators.type) {\n togo[0] = decorators;\n }\n else {\n for (var key in decorators) {\n if (key === \"$\") {key = \"jQuery\";}\n var value = decorators[key];\n var decorator = {\n type: key\n };\n if (key === \"jQuery\") {\n decorator.func = value[0];\n decorator.args = value.slice(1);\n }\n else if (key === \"addClass\" || key === \"removeClass\") {\n decorator.classes = value;\n }\n else if (key === \"attrs\") {\n decorator.attributes = value;\n }\n else if (key === \"identify\") {\n decorator.key = value;\n }\n togo[togo.length] = decorator;\n }\n }\n return togo;\n }\n\n outDecoratorsImpl = function (torender, decorators, attrcopy, finalID) {\n var id;\n var sanitizeAttrs = function (value, key) {\n if (value === null || value === undefined) {\n delete attrcopy[key];\n }\n else {\n attrcopy[key] = fluid.XMLEncode(value);\n }\n };\n renderOptions.idMap = renderOptions.idMap || {};\n for (var i = 0; i < decorators.length; ++i) {\n var decorator = decorators[i];\n var type = decorator.type;\n if (!type) {\n var explodedDecorators = explodeDecorators(decorator);\n outDecoratorsImpl(torender, explodedDecorators, attrcopy, finalID);\n continue;\n }\n if (type === \"$\") {type = decorator.type = \"jQuery\";}\n if (type === \"jQuery\" || type === \"event\" || type === \"fluid\") {\n id = adjustForID(attrcopy, torender, true, finalID);\n if (decorator.ids === undefined) {\n decorator.ids = [];\n decoratorQueue[decoratorQueue.length] = decorator;\n }\n decorator.ids.push(id);\n }\n // honour these remaining types immediately\n else if (type === \"attrs\") {\n fluid.each(decorator.attributes, sanitizeAttrs);\n }\n else if (type === \"addClass\" || type === \"removeClass\") {\n // Using an unattached DOM node because jQuery will use the\n // node's setAttribute method to add the class.\n var fakeNode = $(\"<div>\", {class: attrcopy[\"class\"]})[0];\n renderOptions.jQuery(fakeNode)[type](decorator.classes);\n attrcopy[\"class\"] = fakeNode.className;\n }\n else if (type === \"identify\") {\n id = adjustForID(attrcopy, torender, true, finalID);\n renderOptions.idMap[decorator.key] = id;\n }\n else if (type !== \"null\") {\n fluid.log(\"Unrecognised decorator of type \" + type + \" found at component of ID \" + finalID);\n }\n }\n };\n\n function outDecorators(torender, attrcopy) {\n if (!torender.decorators) {return;}\n if (torender.decorators.length === undefined) {\n torender.decorators = explodeDecorators(torender.decorators);\n }\n outDecoratorsImpl(torender, torender.decorators, attrcopy);\n }\n\n function dumpBranchHead(branch, targetlump) {\n if (targetlump.elide) {\n return;\n }\n var attrcopy = {};\n $.extend(true, attrcopy, targetlump.attributemap);\n adjustForID(attrcopy, branch);\n outDecorators(branch, attrcopy);\n out += \"<\" + targetlump.tagname + \" \";\n out += fluid.dumpAttributes(attrcopy);\n out += \">\";\n }\n\n function resolveArgs(args) {\n if (!args) {return args;}\n args = fluid.copy(args); // FLUID-4737: Avoid corrupting material which may have been fetched from the model\n return fluid.transform(args, function (arg, index) {\n upgradeBound(args, index, renderOptions.model, renderOptions.resolverGetConfig);\n return args[index].value;\n });\n }\n\n function degradeMessage(torender) {\n if (torender.componentType === \"UIMessage\") {\n // degrade UIMessage to UIBound by resolving the message\n torender.componentType = \"UIBound\";\n if (!renderOptions.messageLocator) {\n torender.value = \"[No messageLocator is configured in options - please consult documentation on options.messageSource]\";\n }\n else {\n upgradeBound(torender, \"messagekey\", renderOptions.model, renderOptions.resolverGetConfig);\n var resArgs = resolveArgs(torender.args);\n torender.value = renderOptions.messageLocator(torender.messagekey.value, resArgs);\n }\n }\n }\n\n\n function renderComponent(torender) {\n var value;\n var attrcopy = trc.attrcopy;\n\n degradeMessage(torender);\n var componentType = torender.componentType;\n var tagname = trc.uselump.tagname;\n\n outDecorators(torender, attrcopy);\n\n function makeFail(torender, end) {\n fluid.fail(\"Error in component tree - UISelectChoice with id \" + torender.fullID + end);\n }\n\n if (componentType === \"UIBound\" || componentType === \"UISelectChoice\") {\n var parent;\n if (torender.choiceindex !== undefined) {\n if (torender.parentRelativeID !== undefined) {\n parent = getRelativeComponent(torender, torender.parentRelativeID);\n if (!parent) {\n makeFail(torender, \" has parentRelativeID of \" + torender.parentRelativeID + \" which cannot be resolved\");\n }\n }\n else {\n makeFail(torender, \" does not have parentRelativeID set\");\n }\n assignSubmittingName(attrcopy, torender, parent.selection);\n dumpSelectionBindings(parent);\n }\n\n var submittingname = parent ? parent.selection.submittingname : torender.submittingname;\n if (!parent && torender.valuebinding) {\n // Do this for all bound fields even if non submitting so that finalID is set in order to track fossils (FLUID-3387)\n submittingname = assignSubmittingName(attrcopy, torender);\n }\n if (tagname === \"input\" || tagname === \"textarea\") {\n if (submittingname !== undefined) {\n attrcopy.name = submittingname;\n }\n }\n // this needs to happen early on the client, since it may cause the allocation of the\n // id in the case of a \"deferred decorator\". However, for server-side bindings, this\n // will be an inappropriate time, unless we shift the timing of emitting the opening tag.\n dumpBoundFields(torender, parent ? parent.selection : null);\n\n if (typeof(torender.value) === \"boolean\" || attrcopy.type === \"radio\" || attrcopy.type === \"checkbox\") {\n var underlyingValue;\n var directValue = torender.value;\n\n if (torender.choiceindex !== undefined) {\n if (!parent.optionlist.value) {\n fluid.fail(\"Error in component tree - selection control with full ID \" + parent.fullID + \" has no values\");\n }\n underlyingValue = parent.optionlist.value[torender.choiceindex];\n directValue = isSelectedValue(parent, underlyingValue);\n }\n if (isValue(directValue)) {\n if (directValue) {\n attrcopy.checked = \"checked\";\n }\n else {\n delete attrcopy.checked;\n }\n }\n attrcopy.value = fluid.XMLEncode(underlyingValue ? underlyingValue : \"true\");\n rewriteLeaf(null);\n }\n else if (fluid.isArrayable(torender.value)) {\n // Cannot be rendered directly, must be fake\n renderUnchanged();\n }\n else { // String value\n value = parent ?\n parent[tagname === \"textarea\" || tagname === \"input\" ? \"optionlist\" : \"optionnames\"].value[torender.choiceindex] :\n torender.value;\n if (tagname === \"textarea\") {\n if (isPlaceholder(value) && torender.willinput) {\n // FORCE a blank value for input components if nothing from\n // model, if input was intended.\n value = \"\";\n }\n rewriteLeaf(value);\n }\n else if (tagname === \"input\") {\n if (torender.willinput || isValue(value)) {\n attrcopy.value = fluid.XMLEncode(String(value));\n }\n rewriteLeaf(null);\n }\n else {\n delete attrcopy.name;\n rewriteLeafOpen(value);\n }\n }\n }\n else if (componentType === \"UISelect\") {\n\n var ishtmlselect = tagname === \"select\";\n var ismultiple = false; // eslint-disable-line no-unused-vars\n\n if (fluid.isArrayable(torender.selection.value)) {\n ismultiple = true;\n if (ishtmlselect) {\n attrcopy.multiple = \"multiple\";\n }\n }\n // assignSubmittingName is now the definitive trigger point for uniquifying output IDs\n // However, if id is already assigned it is probably through attempt to decorate root select.\n // in this case restore it.\n assignSubmittingName(attrcopy, torender.selection);\n\n if (ishtmlselect) {\n // The HTML submitted value from a <select> actually corresponds\n // with the selection member, not the top-level component.\n if (torender.selection.willinput !== false) {\n attrcopy.name = torender.selection.submittingname;\n }\n applyAutoBind(torender, attrcopy.id);\n }\n\n out += fluid.dumpAttributes(attrcopy);\n if (ishtmlselect) {\n out += \">\";\n var values = torender.optionlist.value;\n var names = torender.optionnames === null || torender.optionnames === undefined || !torender.optionnames.value ? values : torender.optionnames.value;\n if (!names || !names.length) {\n fluid.fail(\"Error in component tree - UISelect component with fullID \" +\n torender.fullID + \" does not have optionnames set\");\n }\n for (var i = 0; i < names.length; ++i) {\n out += \"<option value=\\\"\";\n value = values[i];\n if (value === null) {\n value = fluid.NULL_STRING;\n }\n out += fluid.XMLEncode(value);\n if (isSelectedValue(torender, value)) {\n out += \"\\\" selected=\\\"selected\";\n }\n out += \"\\\">\";\n out += fluid.XMLEncode(names[i]);\n out += \"</option>\\n\";\n }\n closeTag();\n }\n else {\n dumpTemplateBody();\n }\n dumpSelectionBindings(torender);\n }\n else if (componentType === \"UILink\") {\n var attrname = LINK_ATTRIBUTES[tagname];\n if (attrname) {\n degradeMessage(torender.target);\n var target = torender.target.value;\n if (!isValue(target)) {\n target = attrcopy[attrname];\n }\n target = rewriteUrl(trc.uselump.parent, target);\n // Note that all real browsers succeed in recovering the URL here even if it is presented in violation of XML\n // seemingly due to the purest accident, the text & cannot occur in a properly encoded URL :P\n attrcopy[attrname] = fluid.XMLEncode(target);\n }\n value = undefined;\n if (torender.linktext) {\n degradeMessage(torender.linktext);\n value = torender.linktext.value;\n }\n if (!isValue(value)) {\n replaceAttributesOpen();\n }\n else {\n rewriteLeaf(value);\n }\n }\n\n else if (torender.markup !== undefined) { // detect UIVerbatim\n degradeMessage(torender.markup);\n var rendered = torender.markup.value;\n if (rendered === null) {\n // TODO, doesn't quite work due to attr folding cf Java code\n out += fluid.dumpAttributes(attrcopy);\n out += \">\";\n renderUnchanged();\n }\n else {\n if (!trc.iselide) {\n out += fluid.dumpAttributes(attrcopy);\n out += \">\";\n }\n out += rendered;\n closeTag();\n }\n }\n if (attrcopy.id !== undefined) {\n usedIDs[attrcopy.id] = true;\n }\n }\n\n function rewriteIDRelation(context) {\n var attrname;\n var attrval = trc.attrcopy[\"for\"];\n if (attrval !== undefined) {\n attrname = \"for\";\n }\n else {\n attrval = trc.attrcopy.headers;\n if (attrval !== undefined) {\n attrname = \"headers\";\n }\n }\n if (!attrname) {return;}\n var tagname = trc.uselump.tagname;\n if (attrname === \"for\" && tagname !== \"label\") {return;}\n if (attrname === \"headers\" && tagname !== \"td\" && tagname !== \"th\") {return;}\n var rewritten = rewritemap[getRewriteKey(trc.uselump.parent, context, attrval)];\n if (rewritten !== undefined) {\n trc.attrcopy[attrname] = rewritten;\n }\n }\n\n function renderComment(message) {\n out += (\"<!-- \" + fluid.XMLEncode(message) + \"-->\");\n }\n\n function renderDebugMessage(message) {\n out += \"<span style=\\\"background-color:#FF466B;color:white;padding:1px;\\\">\";\n out += message;\n out += \"</span><br/>\";\n }\n\n function reportPath(/*UIComponent*/ branch) {\n var path = branch.fullID;\n return !path ? \"component tree root\" : \"full path \" + path;\n }\n\n function renderComponentSystem(context, torendero, lump) {\n var lumpindex = lump.lumpindex;\n var lumps = lump.parent.lumps;\n var nextpos = -1;\n var outerendopen = lumps[lumpindex + 1];\n var outerclose = lump.close_tag;\n\n nextpos = outerclose.lumpindex + 1;\n\n var payloadlist = lump.downmap ? lump.downmap[\"payload-component\"] : null;\n var payload = payloadlist ? payloadlist[0] : null;\n\n var iselide = lump.rsfID.charCodeAt(0) === 126; // \"~\"\n\n var endopen = outerendopen;\n var close = outerclose;\n var uselump = lump;\n var attrcopy = {};\n $.extend(true, attrcopy, (payload === null ? lump : payload).attributemap);\n\n trc.attrcopy = attrcopy;\n trc.uselump = uselump;\n trc.endopen = endopen;\n trc.close = close;\n trc.nextpos = nextpos;\n trc.iselide = iselide;\n\n rewriteIDRelation(context);\n\n if (torendero === null) {\n if (lump.rsfID.indexOf(\"scr=\") === (iselide ? 1 : 0)) {\n var scrname = lump.rsfID.substring(4 + (iselide ? 1 : 0));\n if (scrname === \"ignore\") {\n nextpos = trc.close.lumpindex + 1;\n }\n else if (scrname === \"rewrite-url\") {\n torendero = {componentType: \"UILink\", target: {}};\n }\n else {\n openTag();\n replaceAttributesOpen();\n nextpos = trc.endopen.lumpindex;\n }\n }\n }\n if (torendero !== null) {\n // else there IS a component and we are going to render it. First make\n // sure we render any preamble.\n\n if (payload) {\n trc.endopen = lumps[payload.lumpindex + 1];\n trc.close = payload.close_tag;\n trc.uselump = payload;\n dumpTillLump(lumps, lumpindex, payload.lumpindex);\n lumpindex = payload.lumpindex;\n }\n\n adjustForID(attrcopy, torendero);\n //decoratormanager.decorate(torendero.decorators, uselump.getTag(), attrcopy);\n\n // ALWAYS dump the tag name, this can never be rewritten. (probably?!)\n openTag();\n\n renderComponent(torendero);\n // if there is a payload, dump the postamble.\n if (payload !== null) {\n // the default case is initialised to tag close\n if (trc.nextpos === nextpos) {\n dumpTillLump(lumps, trc.close.lumpindex + 1, outerclose.lumpindex + 1);\n }\n }\n nextpos = trc.nextpos;\n }\n return nextpos;\n }\n var renderRecurse;\n\n function renderContainer(child, targetlump) {\n var t2 = targetlump.parent;\n var firstchild = t2.lumps[targetlump.lumpindex + 1];\n if (child.children !== undefined) {\n dumpBranchHead(child, targetlump);\n }\n else {\n renderComponentSystem(child.parent, child, targetlump);\n }\n renderRecurse(child, targetlump, firstchild);\n }\n\n fetchComponent = function (basecontainer, id) {\n if (id.indexOf(\"msg=\") === 0) {\n var key = id.substring(4);\n return {componentType: \"UIMessage\", messagekey: key};\n }\n while (basecontainer) {\n var togo = basecontainer.childmap[id];\n if (togo) {\n return togo;\n }\n basecontainer = basecontainer.parent;\n }\n return null;\n };\n\n function fetchComponents(basecontainer, id) {\n var togo;\n while (basecontainer) {\n togo = basecontainer.childmap[id];\n if (togo) {\n break;\n }\n basecontainer = basecontainer.parent;\n }\n return togo;\n }\n\n function findChild(sourcescope, child) {\n var split = fluid.SplitID(child.ID);\n var headlumps = sourcescope.downmap[child.ID];\n if (!headlumps) {\n headlumps = sourcescope.downmap[split.prefix + \":\"];\n }\n return headlumps ? headlumps[0] : null;\n }\n\n renderRecurse = function (basecontainer, parentlump, baselump) {\n var children;\n var targetlump;\n var child;\n var renderindex = baselump.lumpindex;\n var basedepth = parentlump.nestingdepth;\n var t1 = parentlump.parent;\n var rendered;\n if (debugMode) {\n rendered = {};\n }\n while (true) {\n renderindex = dumpScan(t1.lumps, renderindex, basedepth, !parentlump.elide, false);\n if (renderindex === t1.lumps.length) {\n break;\n }\n var lump = t1.lumps[renderindex];\n var id = lump.rsfID;\n // new stopping rule - we may have been inside an elided tag\n if (lump.nestingdepth < basedepth || id === undefined) {\n break;\n }\n\n if (id.charCodeAt(0) === 126) { // \"~\"\n id = id.substring(1);\n }\n\n //var ismessagefor = id.indexOf(\"message-for:\") === 0;\n\n if (id.indexOf(\":\") !== -1) {\n var prefix = fluid.getPrefix(id);\n children = fetchComponents(basecontainer, prefix);\n\n var finallump = lump.uplump.finallump[prefix];\n var closefinal = finallump.close_tag;\n\n if (children) {\n for (var i = 0; i < children.length; ++i) {\n child = children[i];\n if (child.children) { // it is a branch\n if (debugMode) {\n rendered[child.fullID] = true;\n }\n targetlump = branchmap[child.fullID];\n if (targetlump) {\n if (debugMode) {\n renderComment(\"Branching for \" + child.fullID + \" from \" +\n fluid.debugLump(lump) + \" to \" + fluid.debugLump(targetlump));\n }\n\n renderContainer(child, targetlump);\n\n if (debugMode) {\n renderComment(\"Branch returned for \" + child.fullID +\n fluid.debugLump(lump) + \" to \" + fluid.debugLump(targetlump));\n }\n }\n else if (debugMode) {\n renderDebugMessage(\n \"No matching template branch found for branch container with full ID \" +\n child.fullID +\n \" rendering from parent template branch \" +\n fluid.debugLump(baselump));\n }\n }\n else { // repetitive leaf\n targetlump = findChild(parentlump, child);\n if (!targetlump) {\n if (debugMode) {\n renderDebugMessage(\"Repetitive leaf with full ID \" +\n child.fullID +\n \" could not be rendered from parent template branch \" +\n fluid.debugLump(baselump));\n }\n continue;\n }\n var renderend = renderComponentSystem(basecontainer, child, targetlump);\n var wasopentag = renderend < t1.lumps.lengtn && t1.lumps[renderend].nestingdepth >= targetlump.nestingdepth;\n var newbase = child.children ? child : basecontainer;\n if (wasopentag) {\n renderRecurse(newbase, targetlump, t1.lumps[renderend]);\n renderend = targetlump.close_tag.lumpindex + 1;\n }\n if (i !== children.length - 1) {\n // TODO - fix this bug in RSF Server!\n if (renderend < closefinal.lumpindex) {\n dumpScan(t1.lumps, renderend, targetlump.nestingdepth - 1, false, false);\n }\n }\n else {\n dumpScan(t1.lumps, renderend, targetlump.nestingdepth, true, false);\n }\n }\n } // end for each repetitive child\n }\n else {\n if (debugMode) {\n renderDebugMessage(\"No branch container with prefix \" +\n prefix + \": found in container \" +\n reportPath(basecontainer) +\n \" rendering at template position \" +\n fluid.debugLump(baselump) +\n \", skipping\");\n }\n }\n\n renderindex = closefinal.lumpindex + 1;\n if (debugMode) {\n renderComment(\"Stack returned from branch for ID \" + id + \" to \" +\n fluid.debugLump(baselump) + \": skipping from \" + fluid.debugLump(lump) +\n \" to \" + fluid.debugLump(closefinal));\n }\n }\n else {\n var component;\n if (id) {\n component = fetchComponent(basecontainer, id, lump);\n if (debugMode && component) {\n rendered[component.fullID] = true;\n }\n }\n if (component && component.children !== undefined) {\n renderContainer(component);\n renderindex = lump.close_tag.lumpindex + 1;\n }\n else {\n renderindex = renderComponentSystem(basecontainer, component, lump);\n }\n }\n if (renderindex === t1.lumps.length) {\n break;\n }\n }\n if (debugMode) {\n children = basecontainer.children;\n for (var key = 0; key < children.length; ++key) {\n child = children[key];\n if (!rendered[child.fullID]) {\n renderDebugMessage(\"Component \" +\n child.componentType + \" with full ID \" +\n child.fullID + \" could not be found within template \" +\n fluid.debugLump(baselump));\n }\n }\n }\n\n };\n\n function renderCollect(collump) {\n dumpTillLump(collump.parent.lumps, collump.lumpindex, collump.close_tag.lumpindex + 1);\n }\n\n // Let us pray\n function renderCollects() {\n for (var key in collected) {\n var collist = collected[key];\n for (var i = 0; i < collist.length; ++i) {\n renderCollect(collist[i]);\n }\n }\n }\n\n function processDecoratorQueue() {\n for (var i = 0; i < decoratorQueue.length; ++i) {\n var decorator = decoratorQueue[i];\n for (var j = 0; j < decorator.ids.length; ++j) {\n var id = decorator.ids[j];\n var node = fluid.byId(id, renderOptions.document);\n if (!node) {\n fluid.fail(\"Error during rendering - component with id \" + id +\n \" which has a queued decorator was not found in the output markup\");\n }\n if (decorator.type === \"jQuery\") {\n var jnode = renderOptions.jQuery(node);\n jnode[decorator.func].apply(jnode, fluid.makeArray(decorator.args));\n }\n else if (decorator.type === \"fluid\") {\n var args = decorator.args;\n if (!args) {\n var thisContainer = renderOptions.jQuery(node);\n if (!decorator.container) {\n decorator.container = thisContainer;\n }\n else {\n decorator.container.push(node);\n }\n args = [thisContainer, decorator.options];\n }\n var that = renderer.invokeFluidDecorator(decorator.func, args, id, i, options);\n decorator.that = that;\n }\n else if (decorator.type === \"event\") {\n node[decorator.event] = decorator.handler;\n }\n }\n }\n }\n\n that.renderTemplates = function () {\n tree = fixupTree(tree, options.model, options.resolverGetConfig);\n var template = templates[0];\n resolveBranches(templates.globalmap, tree, template.rootlump);\n renderedbindings = {};\n renderCollects();\n renderRecurse(tree, template.rootlump, template.lumps[template.firstdocumentindex]);\n return out;\n };\n\n that.processDecoratorQueue = function () {\n processDecoratorQueue();\n };\n return that;\n\n };\n\n jQuery.extend(true, fluid.renderer, renderer);\n\n /*\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.ComponentReference = function (reference) {\n this.reference = reference;\n };\n\n // Explodes a raw \"hash\" into a list of UIOutput/UIBound entries\n fluid.explode = function (hash, basepath) {\n var togo = [];\n for (var key in hash) {\n var binding = basepath === undefined ? key : basepath + \".\" + key;\n togo[togo.length] = {ID: key, value: hash[key], valuebinding: binding};\n }\n return togo;\n };\n\n\n /**\n * A common utility function to make a simple view of rows, where each row has a selection control and a label\n * @param {Object} optionlist An array of the values of the options in the select\n * @param {Object} opts An object with this structure: {\n selectID: \"\",\n rowID: \"\",\n inputID: \"\",\n labelID: \"\"\n }\n */\n fluid.explodeSelectionToInputs = function (optionlist, opts) {\n return fluid.transform(optionlist, function (option, index) {\n return {\n ID: opts.rowID,\n children: [\n {ID: opts.inputID, parentRelativeID: \"..::\" + opts.selectID, choiceindex: index},\n {ID: opts.labelID, parentRelativeID: \"..::\" + opts.selectID, choiceindex: index}\n ]\n };\n });\n };\n\n fluid.resolveMessageSource = function (messageSource) {\n if (messageSource.type === \"data\") {\n if (messageSource.url === undefined) {\n return fluid.messageLocator(messageSource.messages, messageSource.resolveFunc);\n }\n else {\n // TODO: fetch via AJAX, and convert format if necessary\n }\n }\n else if (messageSource.type === \"resolver\") {\n return messageSource.resolver.resolve;\n }\n };\n\n fluid.renderTemplates = function (templates, tree, options, fossilsIn) {\n var renderer = fluid.renderer(templates, tree, options, fossilsIn);\n var rendered = renderer.renderTemplates();\n return rendered;\n };\n /** A driver to render and bind an already parsed set of templates onto\n * a node. See documentation for fluid.selfRender.\n * @param templates A parsed template set, as returned from fluid.selfRender or\n * fluid.parseTemplates.\n */\n\n fluid.reRender = function (templates, node, tree, options) {\n options = options || {};\n var renderer = fluid.renderer(templates, tree, options, options.fossils);\n options = renderer.options;\n // Empty the node first, to head off any potential id collisions when rendering\n node = fluid.unwrap(node);\n var lastFocusedElement = fluid.getLastFocusedElement ? fluid.getLastFocusedElement() : null;\n var lastId;\n if (lastFocusedElement && fluid.dom.isContainer(node, lastFocusedElement)) {\n lastId = lastFocusedElement.id;\n }\n if ($.browser.msie) {\n options.jQuery(node).empty(); //- this operation is very slow.\n }\n else {\n node.innerHTML = \"\";\n }\n\n var rendered = renderer.renderTemplates();\n if (options.renderRaw) {\n rendered = fluid.XMLEncode(rendered);\n rendered = rendered.replace(/\\n/g, \"<br/>\");\n }\n if (options.model) {\n fluid.bindFossils(node, options.model, options.fossils);\n }\n if ($.browser.msie) {\n options.jQuery(node).html(rendered);\n }\n else {\n node.innerHTML = rendered;\n }\n renderer.processDecoratorQueue();\n if (lastId) {\n var element = fluid.byId(lastId, options.document);\n if (element) {\n options.jQuery(element).focus();\n }\n }\n\n return templates;\n };\n\n function findNodeValue(rootNode) {\n var node = fluid.dom.iterateDom(rootNode, function (node) {\n // NB, in Firefox at least, comment and cdata nodes cannot be distinguished!\n return node.nodeType === 8 || node.nodeType === 4 ? \"stop\" : null;\n }, true);\n var value = node.nodeValue;\n if (value.indexOf(\"[CDATA[\") === 0) {\n return value.substring(6, value.length - 2);\n }\n else {\n return value;\n }\n }\n\n fluid.extractTemplate = function (node, armouring) {\n if (!armouring) {\n return node.innerHTML;\n }\n else {\n return findNodeValue(node);\n }\n };\n /** A slightly generalised version of fluid.selfRender that does not assume that the\n * markup used to source the template is within the target node.\n * @param source Either a structure {node: node, armouring: armourstyle} or a string\n * holding a literal template\n * @param target The node to receive the rendered markup\n * @param tree, options, return as for fluid.selfRender\n */\n fluid.render = function (source, target, tree, options) {\n options = options || {};\n var template = source;\n if (typeof(source) === \"object\") {\n template = fluid.extractTemplate(fluid.unwrap(source.node), source.armouring);\n }\n target = fluid.unwrap(target);\n var resourceSpec = {base: {resourceText: template,\n href: \".\", resourceKey: \".\", cutpoints: options.cutpoints}\n };\n var templates = fluid.parseTemplates(resourceSpec, [\"base\"], options);\n return fluid.reRender(templates, target, tree, options);\n };\n\n /** A simple driver for single node self-templating. Treats the markup for a\n * node as a template, parses it into a template structure, renders it using\n * the supplied component tree and options, then replaces the markup in the\n * node with the rendered markup, and finally performs any required data\n * binding. The parsed template is returned for use with a further call to\n * reRender.\n * @param node The node both holding the template, and whose markup is to be\n * replaced with the rendered result.\n * @param tree The component tree to be rendered.\n * @param options An options structure to configure the rendering and binding process.\n * @return A templates structure, suitable for a further call to fluid.reRender or\n * fluid.renderTemplates.\n */\n fluid.selfRender = function (node, tree, options) {\n options = options || {};\n return fluid.render({node: node, armouring: options.armouring}, node, tree, options);\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2008-2010 University of Cambridge\nCopyright 2008-2009 University of Toronto\nCopyright 2010-2011 Lucendo Development Ltd.\nCopyright 2013 OCAD University\nCopyright 2013-2014 Raising the Floor - US\nCopyright 2015-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nfluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n if (!fluid.renderer) {\n fluid.fail(\"fluidRenderer.js is a necessary dependency of RendererUtilities\");\n }\n\n // TODO: API status of these 3 functions is uncertain. So far, they have never\n // appeared in documentation.\n fluid.renderer.visitDecorators = function (that, visitor) {\n fluid.visitComponentChildren(that, function (component, name) {\n if (name.indexOf(fluid.renderer.decoratorComponentPrefix) === 0) {\n visitor(component, name);\n }\n }, {flat: true}, []);\n };\n\n fluid.renderer.clearDecorators = function (that) {\n var instantiator = fluid.getInstantiator(that);\n fluid.renderer.visitDecorators(that, function (component, name) {\n instantiator.clearComponent(that, name);\n });\n };\n\n fluid.renderer.getDecoratorComponents = function (that) {\n var togo = {};\n fluid.renderer.visitDecorators(that, function (component, name) {\n togo[name] = component;\n });\n return togo;\n };\n\n // Utilities for coordinating options in renderer components - this code is all pretty\n // dreadful and needs to be organised as a suitable set of defaults and policies\n fluid.renderer.modeliseOptions = function (options, defaults, baseOptions) {\n return $.extend({}, defaults, fluid.filterKeys(baseOptions, [\"model\", \"applier\"]), options);\n };\n fluid.renderer.reverseMerge = function (target, source, names) {\n names = fluid.makeArray(names);\n fluid.each(names, function (name) {\n if (target[name] === undefined && source[name] !== undefined) {\n target[name] = source[name];\n }\n });\n };\n\n /** \"Renderer component\" infrastructure **/\n // TODO: fix this up with IoC and improved handling of templateSource as well as better\n // options layout (model appears in both rOpts and eOpts)\n // \"options\" here is the original \"rendererFnOptions\"\n fluid.renderer.createRendererSubcomponent = function (container, selectors, options, parentThat, fossils) {\n options = options || {};\n var source = options.templateSource ? options.templateSource : {node: $(container)};\n var nativeModel = options.rendererOptions.model === undefined;\n var rendererOptions = fluid.renderer.modeliseOptions(options.rendererOptions, null, parentThat);\n rendererOptions.fossils = fossils || {};\n rendererOptions.parentComponent = parentThat;\n if (container.jquery) {\n var cascadeOptions = {\n document: container[0].ownerDocument,\n jQuery: container.constructor\n };\n fluid.renderer.reverseMerge(rendererOptions, cascadeOptions, fluid.keys(cascadeOptions));\n }\n\n var that = {};\n\n var templates = null;\n that.render = function (tree) {\n var cutpointFn = options.cutpointGenerator || \"fluid.renderer.selectorsToCutpoints\";\n rendererOptions.cutpoints = rendererOptions.cutpoints || fluid.invokeGlobalFunction(cutpointFn, [selectors, options]);\n if (nativeModel) { // check necessary since the component insanely supports the possibility the model is not the component's model!\n // and the pagedTable uses this.\n rendererOptions.model = parentThat.model; // fix FLUID-5664\n }\n var renderTarget = $(options.renderTarget ? options.renderTarget : container);\n\n if (templates) {\n fluid.clear(rendererOptions.fossils);\n fluid.reRender(templates, renderTarget, tree, rendererOptions);\n }\n else {\n if (typeof(source) === \"function\") { // TODO: make a better attempt than this at asynchrony\n source = source();\n }\n templates = fluid.render(source, renderTarget, tree, rendererOptions);\n }\n };\n return that;\n };\n\n fluid.defaults(\"fluid.rendererComponent\", {\n gradeNames: [\"fluid.viewComponent\"],\n initFunction: \"fluid.initRendererComponent\",\n mergePolicy: {\n \"rendererOptions.idMap\": \"nomerge\",\n protoTree: \"noexpand, replace\",\n parentBundle: \"nomerge\",\n \"changeApplierOptions.resolverSetConfig\": \"resolverSetConfig\"\n },\n invokers: {\n refreshView: {\n funcName: \"fluid.rendererComponent.refreshView\",\n args: \"{that}\"\n },\n produceTree: {\n funcName: \"fluid.rendererComponent.produceTree\",\n args: \"{that}\"\n }\n },\n rendererOptions: {\n autoBind: true\n },\n events: {\n onResourcesFetched: null,\n prepareModelForRender: null,\n onRenderTree: null,\n afterRender: null\n },\n listeners: {\n onCreate: {\n funcName: \"fluid.rendererComponent.renderOnInit\",\n args: [\"{that}.options.renderOnInit\", \"{that}\"],\n priority: \"last\"\n }\n }\n });\n\n fluid.rendererComponent.renderOnInit = function (renderOnInit, that) {\n if (renderOnInit || that.renderOnInit) {\n that.refreshView();\n }\n };\n\n fluid.protoExpanderForComponent = function (parentThat, options) {\n var expanderOptions = fluid.renderer.modeliseOptions(options.expanderOptions, {ELstyle: \"${}\"}, parentThat);\n fluid.renderer.reverseMerge(expanderOptions, options, [\"resolverGetConfig\", \"resolverSetConfig\"]);\n var expander = fluid.renderer.makeProtoExpander(expanderOptions, parentThat);\n return expander;\n };\n\n fluid.rendererComponent.refreshView = function (that) {\n if (!that.renderer) {\n // Terrible stopgap fix for FLUID-5279 - all of this implementation will be swept away\n // model relay may cause this to be called during init, and we have no proper definition for \"that.renderer\" since it is\n // constructed in a terrible way\n that.renderOnInit = true;\n return;\n } else {\n fluid.renderer.clearDecorators(that);\n that.events.prepareModelForRender.fire(that.model, that.applier, that);\n var tree = that.produceTree(that);\n var rendererFnOptions = that.renderer.rendererFnOptions;\n // Terrible stopgap fix for FLUID-5821 - given that model reference may be rebound, generate the expander from scratch on every render\n if (!rendererFnOptions.noexpand) {\n var expander = fluid.protoExpanderForComponent(that, rendererFnOptions);\n tree = expander(tree);\n }\n that.events.onRenderTree.fire(that, tree);\n that.renderer.render(tree);\n that.events.afterRender.fire(that);\n }\n };\n\n fluid.rendererComponent.produceTree = function (that) {\n var produceTreeOption = that.options.produceTree;\n return produceTreeOption ?\n (typeof(produceTreeOption) === \"string\" ? fluid.getGlobalValue(produceTreeOption) : produceTreeOption) (that) :\n that.options.protoTree;\n };\n\n fluid.initRendererComponent = function (componentName, container, options) {\n var that = fluid.initView(componentName, container, options, {gradeNames: [\"fluid.rendererComponent\"]});\n fluid.getForComponent(that, \"model\"); // Force resolution of these due to our terrible workflow\n fluid.getForComponent(that, \"applier\");\n fluid.diagnoseFailedView(componentName, that, fluid.defaults(componentName), arguments);\n\n fluid.fetchResources(that.options.resources, that.events.onResourcesFetched.fire); // TODO: deal with asynchrony\n\n var rendererOptions = fluid.renderer.modeliseOptions(that.options.rendererOptions, null, that);\n\n var messageResolver;\n if (!rendererOptions.messageSource && that.options.strings) {\n messageResolver = fluid.messageResolver({\n messageBase: that.options.strings,\n resolveFunc: that.options.messageResolverFunction,\n parents: fluid.makeArray(that.options.parentBundle)\n });\n rendererOptions.messageSource = {type: \"resolver\", resolver: messageResolver};\n }\n fluid.renderer.reverseMerge(rendererOptions, that.options, [\"resolverGetConfig\", \"resolverSetConfig\"]);\n that.rendererOptions = rendererOptions;\n\n var rendererFnOptions = $.extend({}, that.options.rendererFnOptions, {\n rendererOptions: rendererOptions,\n repeatingSelectors: that.options.repeatingSelectors,\n selectorsToIgnore: that.options.selectorsToIgnore,\n expanderOptions: {\n envAdd: {styles: that.options.styles}\n }\n });\n\n if (that.options.resources && that.options.resources.template) {\n rendererFnOptions.templateSource = function () { // TODO: don't obliterate, multitemplates, etc.\n return that.options.resources.template.resourceText;\n };\n }\n\n fluid.renderer.reverseMerge(rendererFnOptions, that.options, [\"resolverGetConfig\", \"resolverSetConfig\"]);\n if (rendererFnOptions.rendererTargetSelector) {\n container = function () {return that.dom.locate(rendererFnOptions.rendererTargetSelector); };\n }\n var renderer = {\n fossils: {},\n rendererFnOptions: rendererFnOptions,\n boundPathForNode: function (node) {\n return fluid.boundPathForNode(node, renderer.fossils);\n }\n };\n\n var rendererSub = fluid.renderer.createRendererSubcomponent(container, that.options.selectors, rendererFnOptions, that, renderer.fossils);\n that.renderer = $.extend(renderer, rendererSub);\n\n if (messageResolver) {\n that.messageResolver = messageResolver;\n }\n renderer.refreshView = fluid.getForComponent(that, \"refreshView\"); // Stopgap implementation for FLUID-4334\n\n return that;\n };\n\n var removeSelectors = function (selectors, selectorsToIgnore) {\n fluid.each(fluid.makeArray(selectorsToIgnore), function (selectorToIgnore) {\n delete selectors[selectorToIgnore];\n });\n return selectors;\n };\n\n var markRepeated = function (selectorKey, repeatingSelectors) {\n if (repeatingSelectors) {\n fluid.each(repeatingSelectors, function (repeatingSelector) {\n if (selectorKey === repeatingSelector) {\n selectorKey = selectorKey + \":\";\n }\n });\n }\n return selectorKey;\n };\n\n fluid.renderer.selectorsToCutpoints = function (selectors, options) {\n var togo = [];\n options = options || {};\n selectors = fluid.copy(selectors); // Make a copy before potentially destructively changing someone's selectors.\n\n if (options.selectorsToIgnore) {\n selectors = removeSelectors(selectors, options.selectorsToIgnore);\n }\n\n for (var selectorKey in selectors) {\n togo.push({\n id: markRepeated(selectorKey, options.repeatingSelectors),\n selector: selectors[selectorKey]\n });\n }\n\n return togo;\n };\n\n /** END of \"Renderer Components\" infrastructure **/\n\n fluid.renderer.NO_COMPONENT = {};\n\n /** A special \"shallow copy\" operation suitable for nondestructively\n * merging trees of components. jQuery.extend in shallow mode will\n * neglect null valued properties.\n * This function is unsupported: It is not really intended for use by implementors.\n */\n fluid.renderer.mergeComponents = function (target, source) {\n for (var key in source) {\n target[key] = source[key];\n }\n return target;\n };\n\n fluid.registerNamespace(\"fluid.renderer.selection\");\n\n /** Definition of expanders - firstly, \"heavy\" expanders **/\n\n fluid.renderer.selection.inputs = function (options, container, key, config) {\n fluid.expect(\"Selection to inputs expander\", options, [\"selectID\", \"inputID\", \"labelID\", \"rowID\"]);\n var selection = config.expander(options.tree);\n var rows = fluid.transform(selection.optionlist.value, function (option, index) {\n var togo = {};\n var element = {parentRelativeID: \"..::\" + options.selectID, choiceindex: index};\n togo[options.inputID] = element;\n togo[options.labelID] = fluid.copy(element);\n return togo;\n });\n var togo = {}; // TODO: JICO needs to support \"quoted literal key initialisers\" :P\n togo[options.selectID] = selection;\n togo[options.rowID] = {children: rows};\n togo = config.expander(togo);\n return togo;\n };\n\n fluid.renderer.repeat = function (options, container, key, config) {\n fluid.expect(\"Repetition expander\", options, [\"controlledBy\", \"tree\"]);\n var env = config.threadLocal();\n var path = fluid.extractContextualPath(options.controlledBy, {ELstyle: \"ALL\"}, env);\n var list = fluid.get(config.model, path, config.resolverGetConfig);\n\n var togo = {};\n if (!list || list.length === 0) {\n return options.ifEmpty ? config.expander(options.ifEmpty) : togo;\n }\n var expanded = [];\n fluid.each(list, function (element, i) {\n var EL = fluid.model.composePath(path, i);\n var envAdd = {};\n if (options.pathAs) {\n envAdd[options.pathAs] = \"${\" + EL + \"}\";\n }\n if (options.valueAs) {\n envAdd[options.valueAs] = fluid.get(config.model, EL, config.resolverGetConfig);\n }\n var expandrow = fluid.withEnvironment(envAdd, function () {\n return config.expander(options.tree);\n }, env);\n if (fluid.isArrayable(expandrow)) {\n if (expandrow.length > 0) {\n expanded.push({children: expandrow});\n }\n }\n else if (expandrow !== fluid.renderer.NO_COMPONENT) {\n expanded.push(expandrow);\n }\n });\n var repeatID = options.repeatID;\n if (repeatID.indexOf(\":\") === -1) {\n repeatID = repeatID + \":\";\n }\n fluid.each(expanded, function (entry) {entry.ID = repeatID; });\n return expanded;\n };\n\n fluid.renderer.condition = function (options, container, key, config) {\n fluid.expect(\"Selection to condition expander\", options, [\"condition\"]);\n var condition;\n if (options.condition.funcName) {\n var args = config.expandLight(options.condition.args);\n condition = fluid.invokeGlobalFunction(options.condition.funcName, args);\n } else if (options.condition.expander) {\n condition = config.expander(options.condition);\n } else {\n condition = config.expandLight(options.condition);\n }\n var tree = (condition ? options.trueTree : options.falseTree);\n if (!tree) {\n tree = fluid.renderer.NO_COMPONENT;\n }\n return config.expander(tree);\n };\n\n\n /* An EL extraction utility suitable for context expressions which occur in\n * expanding component trees. It dispatches context expressions to fluid.transformContextPath\n * in order to resolve them against EL references stored in the direct environment, and hence\n * to the \"true (direct) model\" - however, if there is no entry in the direct environment, it will resort to the \"externalFetcher\".\n * It satisfies a similar contract as fluid.extractEL, in that it will either return\n * an EL path, or undefined if the string value supplied cannot be interpreted\n * as an EL path with respect to the supplied options - it may also return {value: value}\n * in the case the context can be resolved by the supplied \"externalFetcher\" (required for FLUID-4986)\n */\n // unsupported, non-API function\n fluid.extractContextualPath = function (string, options, env, externalFetcher) {\n var parsed = fluid.extractELWithContext(string, options);\n if (parsed) {\n if (parsed.context) {\n return env[parsed.context] ? fluid.transformContextPath(parsed, env).path : {value: externalFetcher(parsed)};\n }\n else {\n return parsed.path;\n }\n }\n };\n\n // unsupported, non-API function\n fluid.transformContextPath = function (parsed, env) {\n if (parsed.context) {\n var fetched = env[parsed.context];\n var EL;\n if (typeof(fetched) === \"string\") {\n EL = fluid.extractEL(fetched, {ELstyle: \"${}\"});\n }\n if (EL) {\n return {\n noDereference: parsed.path === \"\",\n path: fluid.model.composePath(EL, parsed.path)\n };\n }\n }\n return parsed;\n };\n\n // A forgiving variation of \"makeStackFetcher\" that returns nothing on failing to resolve an IoC reference,\n // in keeping with current protoComponent semantics. Note to self: abolish protoComponents\n fluid.renderer.makeExternalFetcher = function (contextThat) {\n return function (parsed) {\n var foundComponent = fluid.resolveContext(parsed.context, contextThat);\n return foundComponent ? fluid.getForComponent(foundComponent, parsed.path) : undefined;\n };\n };\n\n /** Create a \"protoComponent expander\" with the supplied set of options.\n * The returned value will be a function which accepts a \"protoComponent tree\"\n * as argument, and returns a \"fully expanded\" tree suitable for supplying\n * directly to the renderer.\n * A \"protoComponent tree\" is similar to the \"dehydrated form\" accepted by\n * the historical renderer - only\n * i) The input format is unambiguous - this expander will NOT accept hydrated\n * components in the {ID: \"myId, myfield: \"myvalue\"} form - but ONLY in\n * the dehydrated {myID: {myfield: myvalue}} form.\n * ii) This expander has considerably greater power to expand condensed trees.\n * In particular, an \"EL style\" option can be supplied which will expand bare\n * strings found as values in the tree into UIBound components by a configurable\n * strategy. Supported values for \"ELstyle\" are a) \"ALL\" - every string will be\n * interpreted as an EL reference and assigned to the \"valuebinding\" member of\n * the UIBound, or b) any single character, which if it appears as the first\n * character of the string, will mark it out as an EL reference - otherwise it\n * will be considered a literal value, or c) the value \"${}\" which will be\n * recognised bracketing any other EL expression.\n */\n\n fluid.renderer.makeProtoExpander = function (expandOptions, parentThat) {\n // shallow copy of options - cheaply avoid destroying model, and all others are primitive\n var options = $.extend({\n ELstyle: \"${}\"\n }, expandOptions); // shallow copy of options\n if (parentThat) {\n options.externalFetcher = fluid.renderer.makeExternalFetcher(parentThat);\n }\n var threadLocal; // rebound on every expansion at entry point\n\n function fetchEL(string) {\n var env = threadLocal();\n return fluid.extractContextualPath(string, options, env, options.externalFetcher);\n }\n\n var IDescape = options.IDescape || \"\\\\\";\n\n var expandLight = function (source) {\n return fluid.expand(source, options);\n };\n\n var expandBound = function (value, concrete) {\n if (value.messagekey !== undefined) {\n return {\n componentType: \"UIMessage\",\n messagekey: expandBound(value.messagekey),\n args: expandLight(value.args)\n };\n }\n var proto;\n if (!fluid.isPrimitive(value) && !fluid.isArrayable(value)) {\n proto = $.extend({}, value);\n if (proto.decorators) {\n proto.decorators = expandLight(proto.decorators);\n }\n value = proto.value;\n delete proto.value;\n } else {\n proto = {};\n }\n var EL;\n if (typeof (value) === \"string\") {\n var fetched = fetchEL(value);\n EL = typeof (fetched) === \"string\" ? fetched : null;\n value = fluid.get(fetched, \"value\") || value;\n }\n if (EL) {\n proto.valuebinding = EL;\n } else if (value !== undefined) {\n proto.value = value;\n }\n if (options.model && proto.valuebinding && proto.value === undefined) {\n proto.value = fluid.get(options.model, proto.valuebinding, options.resolverGetConfig);\n }\n if (concrete) {\n proto.componentType = \"UIBound\";\n }\n return proto;\n };\n\n options.filter = fluid.expander.lightFilter;\n\n var expandCond;\n var expandLeafOrCond;\n\n var expandEntry = function (entry) {\n var comp = [];\n expandCond(entry, comp);\n return {children: comp};\n };\n\n var expandExternal = function (entry) {\n if (entry === fluid.renderer.NO_COMPONENT) {\n return entry;\n }\n var singleTarget;\n var target = [];\n var pusher = function (comp) {\n singleTarget = comp;\n };\n expandLeafOrCond(entry, target, pusher);\n return singleTarget || target;\n };\n\n var expandConfig = {\n model: options.model,\n resolverGetConfig: options.resolverGetConfig,\n resolverSetConfig: options.resolverSetConfig,\n expander: expandExternal,\n expandLight: expandLight\n //threadLocal: threadLocal\n };\n\n var expandLeaf = function (leaf, componentType) {\n var togo = {componentType: componentType};\n var map = fluid.renderer.boundMap[componentType] || {};\n for (var key in leaf) {\n if (/decorators|args/.test(key)) {\n togo[key] = expandLight(leaf[key]);\n continue;\n } else if (map[key]) {\n togo[key] = expandBound(leaf[key]);\n } else {\n togo[key] = leaf[key];\n }\n }\n return togo;\n };\n\n // A child entry may be a cond, a leaf, or another \"thing with children\".\n // Unlike the case with a cond's contents, these must be homogeneous - at least\n // they may either be ALL leaves, or else ALL cond/childed etc.\n // In all of these cases, the key will be THE PARENT'S KEY\n var expandChildren = function (entry, pusher) {\n var children = entry.children;\n for (var i = 0; i < children.length; ++i) {\n // each child in this list will lead to a WHOLE FORKED set of children.\n var target = [];\n var comp = { children: target};\n\n var child = children[i];\n // This use of function creation within a loop is acceptable since\n // the function does not attempt to close directly over the loop counter\n var childPusher = function (comp) { // eslint-disable-line no-loop-func\n target[target.length] = comp;\n };\n\n expandLeafOrCond(child, target, childPusher);\n // Rescue the case of an expanded leaf into single component - TODO: check what sense this makes of the grammar\n if (comp.children.length === 1 && !comp.children[0].ID) {\n comp = comp.children[0];\n }\n pusher(comp);\n }\n };\n\n function detectBareBound(entry) {\n return fluid.find(entry, function (value, key) {\n return key === \"decorators\";\n }) !== false;\n }\n\n // We have reached something which is either a leaf or Cond - either inside\n // a Cond or as an entry in children.\n expandLeafOrCond = function (entry, target, pusher) {\n var componentType = fluid.renderer.inferComponentType(entry);\n if (!componentType && (fluid.isPrimitive(entry) || detectBareBound(entry))) {\n componentType = \"UIBound\";\n }\n if (componentType) {\n pusher(componentType === \"UIBound\" ? expandBound(entry, true) : expandLeaf(entry, componentType));\n } else {\n // we couldn't recognise it as a leaf, so it must be a cond\n // this may be illegal if we are already in a cond.\n if (!target) {\n fluid.fail(\"Illegal cond->cond transition\");\n }\n expandCond(entry, target);\n }\n };\n\n // cond entry may be a leaf, \"thing with children\" or a \"direct bound\".\n // a Cond can ONLY occur as a direct member of \"children\". Each \"cond\" entry may\n // give rise to one or many elements with the SAME key - if \"expandSingle\" discovers\n // \"thing with children\" they will all share the same key found in proto.\n expandCond = function (proto, target) {\n var key;\n var expandToTarget = function (expander) {\n var expanded = fluid.invokeGlobalFunction(expander.type, [expander, proto, key, expandConfig]);\n if (expanded !== fluid.renderer.NO_COMPONENT) {\n fluid.each(expanded, function (el) {target[target.length] = el; });\n }\n };\n var condPusher = function (comp) {\n comp.ID = key;\n target[target.length] = comp;\n };\n for (key in proto) {\n var entry = proto[key];\n if (key.charAt(0) === IDescape) {\n key = key.substring(1);\n }\n if (key === \"expander\") {\n var expanders = fluid.makeArray(entry);\n fluid.each(expanders, expandToTarget);\n } else if (entry) {\n if (entry.children) {\n if (key.indexOf(\":\") === -1) {\n key = key + \":\";\n }\n expandChildren(entry, condPusher);\n } else if (fluid.renderer.isBoundPrimitive(entry)) {\n condPusher(expandBound(entry, true));\n } else {\n expandLeafOrCond(entry, null, condPusher);\n }\n }\n }\n\n };\n\n return function (entry) {\n threadLocal = fluid.threadLocal(function () {\n return $.extend({}, options.envAdd);\n });\n options.fetcher = fluid.makeEnvironmentFetcher(options.model, fluid.transformContextPath, threadLocal, options.externalFetcher);\n expandConfig.threadLocal = threadLocal;\n return expandEntry(entry);\n };\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2011-2015 OCAD University\nCopyright 2011 Lucendo Development Ltd.\nCopyright 2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n /**********************\n * Sliding Panel *\n *********************/\n\n fluid.defaults(\"fluid.slidingPanel\", {\n gradeNames: [\"fluid.viewComponent\"],\n selectors: {\n panel: \".flc-slidingPanel-panel\",\n toggleButton: \".flc-slidingPanel-toggleButton\",\n toggleButtonLabel: \".flc-slidingPanel-toggleButton\"\n },\n strings: {\n showText: \"show\",\n hideText: \"hide\",\n panelLabel: \"panel\"\n },\n events: {\n onPanelHide: null,\n onPanelShow: null,\n afterPanelHide: null,\n afterPanelShow: null\n },\n listeners: {\n \"onCreate.bindClick\": {\n \"this\": \"{that}.dom.toggleButton\",\n \"method\": \"click\",\n \"args\": [\"{that}.togglePanel\"]\n },\n \"onCreate.bindModelChange\": {\n listener: \"{that}.applier.modelChanged.addListener\",\n args: [\"isShowing\", \"{that}.refreshView\"]\n },\n \"onCreate.setAriaProps\": \"{that}.setAriaProps\",\n \"onCreate.setInitialState\": {\n listener: \"{that}.refreshView\"\n },\n \"onPanelHide.setText\": {\n \"this\": \"{that}.dom.toggleButtonLabel\",\n \"method\": \"text\",\n \"args\": [\"{that}.options.strings.showText\"],\n \"priority\": \"first\"\n },\n \"onPanelHide.setAriaLabel\": {\n \"this\": \"{that}.dom.toggleButtonLabel\",\n \"method\": \"attr\",\n \"args\": [\"aria-label\", \"{that}.options.strings.showTextAriaLabel\"]\n },\n \"onPanelShow.setText\": {\n \"this\": \"{that}.dom.toggleButtonLabel\",\n \"method\": \"text\",\n \"args\": [\"{that}.options.strings.hideText\"],\n \"priority\": \"first\"\n },\n \"onPanelShow.setAriaLabel\": {\n \"this\": \"{that}.dom.toggleButtonLabel\",\n \"method\": \"attr\",\n \"args\": [\"aria-label\", \"{that}.options.strings.hideTextAriaLabel\"]\n },\n \"onPanelHide.operate\": {\n listener: \"{that}.operateHide\"\n },\n \"onPanelShow.operate\": {\n listener: \"{that}.operateShow\"\n },\n \"onCreate.setAriaStates\": \"{that}.setAriaStates\"\n },\n members: {\n panelId: {\n expander: {\n // create an id for panel\n // and set that.panelId to the id value\n funcName: \"fluid.allocateSimpleId\",\n args: \"{that}.dom.panel\"\n }\n }\n },\n model: {\n isShowing: false\n },\n modelListeners: {\n \"isShowing\": {\n funcName: \"{that}.setAriaStates\",\n excludeSource: \"init\"\n }\n },\n invokers: {\n operateHide: {\n \"this\": \"{that}.dom.panel\",\n \"method\": \"slideUp\",\n \"args\": [\"{that}.options.animationDurations.hide\", \"{that}.events.afterPanelHide.fire\"]\n },\n operateShow: {\n \"this\": \"{that}.dom.panel\",\n \"method\": \"slideDown\",\n \"args\": [\"{that}.options.animationDurations.show\", \"{that}.events.afterPanelShow.fire\"]\n },\n hidePanel: {\n func: \"{that}.applier.change\",\n args: [\"isShowing\", false]\n },\n showPanel: {\n func: \"{that}.applier.change\",\n args: [\"isShowing\", true]\n },\n setAriaStates: {\n funcName: \"fluid.slidingPanel.setAriaStates\",\n args: [\"{that}\", \"{that}.model.isShowing\"]\n },\n setAriaProps: {\n funcName: \"fluid.slidingPanel.setAriaProperties\",\n args: [\"{that}\", \"{that}.panelId\"]\n },\n togglePanel: {\n funcName: \"fluid.slidingPanel.togglePanel\",\n args: [\"{that}\"]\n },\n refreshView: {\n funcName: \"fluid.slidingPanel.refreshView\",\n args: [\"{that}\"]\n }\n },\n animationDurations: {\n hide: 400,\n show: 400\n }\n });\n\n fluid.slidingPanel.togglePanel = function (that) {\n that.applier.change(\"isShowing\", !that.model.isShowing);\n };\n\n fluid.slidingPanel.refreshView = function (that) {\n that.events[that.model.isShowing ? \"onPanelShow\" : \"onPanelHide\"].fire();\n };\n\n // panelId is passed in to ensure that it is evaluated before this\n // function is called.\n fluid.slidingPanel.setAriaProperties = function (that, panelId) {\n that.locate(\"toggleButton\").attr({\n \"role\": \"button\",\n \"aria-controls\": panelId\n });\n that.locate(\"panel\").attr({\n \"aria-label\": that.options.strings.panelLabel,\n \"role\": \"group\"\n });\n };\n\n fluid.slidingPanel.setAriaStates = function (that, isShowing) {\n that.locate(\"toggleButton\").attr(\"aria-pressed\", isShowing);\n that.locate(\"panel\").attr(\"aria-expanded\", isShowing);\n };\n\n})(jQuery, fluid_2_0_0);\n","/*!\n * jQuery UI Touch Punch 0.2.2\n *\n * Copyright 2011, Dave Furfero\n * Dual licensed under the MIT or GPL Version 2 licenses.\n *\n * Depends:\n * jquery.ui.widget.js\n * jquery.ui.mouse.js\n */\n(function ($) {\n\n // Detect touch support\n $.support.touch = 'ontouchend' in document;\n\n // Ignore browsers without touch support\n if (!$.support.touch) {\n return;\n }\n\n var mouseProto = $.ui.mouse.prototype,\n _mouseInit = mouseProto._mouseInit,\n touchHandled;\n\n /**\n * Simulate a mouse event based on a corresponding touch event\n * @param {Object} event A touch event\n * @param {String} simulatedType The corresponding mouse event\n */\n function simulateMouseEvent (event, simulatedType) {\n\n // Ignore multi-touch events\n if (event.originalEvent.touches.length > 1) {\n return;\n }\n\n event.preventDefault();\n\n var touch = event.originalEvent.changedTouches[0],\n simulatedEvent = document.createEvent('MouseEvents');\n \n // Initialize the simulated mouse event using the touch event's coordinates\n simulatedEvent.initMouseEvent(\n simulatedType, // type\n true, // bubbles \n true, // cancelable \n window, // view \n 1, // detail \n touch.screenX, // screenX \n touch.screenY, // screenY \n touch.clientX, // clientX \n touch.clientY, // clientY \n false, // ctrlKey \n false, // altKey \n false, // shiftKey \n false, // metaKey \n 0, // button \n null // relatedTarget \n );\n\n // Dispatch the simulated event to the target element\n event.target.dispatchEvent(simulatedEvent);\n }\n\n /**\n * Handle the jQuery UI widget's touchstart events\n * @param {Object} event The widget element's touchstart event\n */\n mouseProto._touchStart = function (event) {\n\n var self = this;\n\n // Ignore the event if another widget is already being handled\n if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {\n return;\n }\n\n // Set the flag to prevent other widgets from inheriting the touch event\n touchHandled = true;\n\n // Track movement to determine if interaction was a click\n self._touchMoved = false;\n\n // Simulate the mouseover event\n simulateMouseEvent(event, 'mouseover');\n\n // Simulate the mousemove event\n simulateMouseEvent(event, 'mousemove');\n\n // Simulate the mousedown event\n simulateMouseEvent(event, 'mousedown');\n };\n\n /**\n * Handle the jQuery UI widget's touchmove events\n * @param {Object} event The document's touchmove event\n */\n mouseProto._touchMove = function (event) {\n\n // Ignore event if not handled\n if (!touchHandled) {\n return;\n }\n\n // Interaction was not a click\n this._touchMoved = true;\n\n // Simulate the mousemove event\n simulateMouseEvent(event, 'mousemove');\n };\n\n /**\n * Handle the jQuery UI widget's touchend events\n * @param {Object} event The document's touchend event\n */\n mouseProto._touchEnd = function (event) {\n\n // Ignore event if not handled\n if (!touchHandled) {\n return;\n }\n\n // Simulate the mouseup event\n simulateMouseEvent(event, 'mouseup');\n\n // Simulate the mouseout event\n simulateMouseEvent(event, 'mouseout');\n\n // If the touch interaction did not move, it should trigger a click\n if (!this._touchMoved) {\n\n // Simulate the click event\n simulateMouseEvent(event, 'click');\n }\n\n // Unset the flag to allow other widgets to inherit the touch event\n touchHandled = false;\n };\n\n /**\n * A duck punch of the $.ui.mouse _mouseInit method to support touch events.\n * This method extends the widget with bound touch event handlers that\n * translate touch events to mouse events and pass them to the widget's\n * original mouse event handling methods.\n */\n mouseProto._mouseInit = function () {\n \n var self = this;\n\n // Delegate the touch handlers to the widget's element\n self.element\n .bind('touchstart', $.proxy(self, '_touchStart'))\n .bind('touchmove', $.proxy(self, '_touchMove'))\n .bind('touchend', $.proxy(self, '_touchEnd'));\n\n // Call the original $.ui.mouse init method\n _mouseInit.call(self);\n };\n\n})(jQuery);","/*\nCopyright 2013-2016 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /********************\n * Textfield Slider *\n ********************/\n\n fluid.defaults(\"fluid.textfieldSlider\", {\n gradeNames: [\"fluid.viewComponent\", \"fluid.contextAware\"],\n components: {\n textfield: {\n type: \"fluid.textfieldSlider.textfield\",\n container: \"{textfieldSlider}.dom.textfield\",\n options: {\n model: \"{textfieldSlider}.model\",\n range: \"{textfieldSlider}.options.range\",\n ariaOptions: \"{textfieldSlider}.options.ariaOptions\",\n strings: \"{textfieldSlider}.options.strings\"\n }\n },\n slider: {\n container: \"{textfieldSlider}.dom.slider\",\n options: {\n model: \"{textfieldSlider}.model\",\n range: \"{textfieldSlider}.options.range\",\n sliderOptions: \"{textfieldSlider}.options.sliderOptions\",\n ariaOptions: \"{textfieldSlider}.options.ariaOptions\",\n strings: \"{textfieldSlider}.options.strings\"\n }\n }\n },\n contextAwareness: {\n sliderVariety: {\n checks: {\n jQueryUI: {\n contextValue: \"{fluid.prefsWidgetType}\",\n equals: \"jQueryUI\",\n gradeNames: \"fluid.textfieldSlider.jQueryUI\"\n }\n },\n defaultGradeNames: \"fluid.textfieldSlider.nativeHTML\"\n }\n },\n selectors: {\n textfield: \".flc-textfieldSlider-field\",\n slider: \".flc-textfieldSlider-slider\"\n },\n model: {\n value: null\n },\n modelRelay: {\n target: \"value\",\n singleTransform: {\n type: \"fluid.transforms.limitRange\",\n input: \"{that}.model.value\",\n min: \"{that}.options.range.min\",\n max: \"{that}.options.range.max\"\n }\n },\n range: {\n min: 0,\n max: 100\n },\n ariaOptions: {\n // Specified by implementor\n // ID of an external label to refer to with aria-labelledby\n // attribute\n // \"aria-labelledby\": \"\"\n },\n sliderOptions: {\n orientation: \"horizontal\",\n step: 1.0\n },\n strings: {\n // Specified by implementor\n // text of label to apply to both textfield and slider input\n // via aria-label attribute\n // \"aria-label\": \"\"\n }\n });\n\n fluid.defaults(\"fluid.textfieldSlider.nativeHTML\", {\n components: {\n slider: {\n type: \"fluid.slider.native\"\n }\n }\n });\n\n fluid.defaults(\"fluid.textfieldSlider.jQueryUI\", {\n components: {\n slider: {\n type: \"fluid.slider.jQuery\"\n }\n }\n });\n\n fluid.defaults(\"fluid.textfieldSlider.textfield\", {\n gradeNames: [\"fluid.viewComponent\"],\n range: {}, // should be used to specify the min, max range e.g. {min: 0, max: 100}\n modelRelay: {\n target: \"value\",\n singleTransform: {\n type: \"fluid.transforms.stringToNumber\",\n input: \"{that}.model.stringValue\"\n }\n },\n modelListeners: {\n value: {\n \"this\": \"{that}.container\",\n \"method\": \"val\",\n args: [\"{change}.value\"]\n },\n // TODO: This listener is to deal with the issue that, when the input field receives a invalid input such as a string value,\n // ignore it and populate the field with the previous value.\n // This is an area in which UX has spilled over into our model configuration, which to some extent we should try to prevent.\n // Whenever we receive a \"change\" event or some other similar checkpoint, if these updates occurred any faster, the user would\n // be infuriated by being unable to type into the field. This situation doesn't occur at the moment because the change event is\n // only fired when users leave the input feild. At the very least, we need to give a namespace to this listener - unfortunately\n // the current dataBinding implementation will ignore it. Having this listener here represents an interaction decision rather\n // than an implementation decision. This issue needs to be revisited.\n stringValue: {\n \"this\": \"{that}.container\",\n \"method\": \"val\",\n args: [\"{that}.model.value\"]\n }\n },\n listeners: {\n \"onCreate.bindChangeEvt\": {\n \"this\": \"{that}.container\",\n \"method\": \"change\",\n \"args\": [\"{that}.setModel\"]\n },\n \"onCreate.initTextfieldAttributes\": {\n \"this\": \"{that}.container\",\n method: \"attr\",\n args: [{\n \"aria-labelledby\": \"{that}.options.ariaOptions.aria-labelledby\",\n \"aria-label\": \"{that}.options.strings.aria-label\"\n }]\n }\n },\n invokers: {\n setModel: {\n changePath: \"stringValue\",\n value: \"{arguments}.0.target.value\"\n }\n }\n });\n\n // Base slider grade\n fluid.defaults(\"fluid.slider\", {\n gradeNames: [\"fluid.viewComponent\"],\n range: {} // should be used to specify the min, max range e.g. {min: 0, max: 100}\n });\n\n fluid.defaults(\"fluid.slider.native\", {\n gradeNames: [\"fluid.slider\"],\n modelRelay: {\n target: \"value\",\n singleTransform: {\n type: \"fluid.transforms.stringToNumber\",\n input: \"{that}.model.stringValue\"\n }\n },\n invokers: {\n setModel: {\n changePath: \"stringValue\",\n value: {\n expander: {\n \"this\": \"{that}.container\",\n \"method\": \"val\"\n }\n }\n }\n },\n listeners: {\n \"onCreate.initSliderAttributes\": {\n \"this\": \"{that}.container\",\n method: \"attr\",\n args: [{\n \"min\": \"{that}.options.range.min\",\n \"max\": \"{that}.options.range.max\",\n \"step\": \"{that}.options.sliderOptions.step\",\n \"type\": \"range\",\n \"value\": \"{that}.model.value\",\n \"aria-labelledby\": \"{that}.options.ariaOptions.aria-labelledby\",\n \"aria-label\": \"{that}.options.strings.aria-label\"\n }]\n },\n \"onCreate.bindSlideEvt\": {\n \"this\": \"{that}.container\",\n \"method\": \"on\",\n \"args\": [\"input\", \"{that}.setModel\"]\n },\n \"onCreate.bindRangeChangeEvt\": {\n \"this\": \"{that}.container\",\n \"method\": \"on\",\n \"args\": [\"change\", \"{that}.setModel\"]\n }\n },\n modelListeners: {\n \"value\": [{\n \"this\": \"{that}.container\",\n \"method\": \"val\",\n args: [\"{change}.value\"],\n // If we don't exclude init, the value can get\n // set before onCreate.initSliderAttributes\n // sets min / max / step, which messes up the\n // initial slider rendering\n excludeSource: \"init\"\n }]\n }\n });\n\n fluid.defaults(\"fluid.slider.jQuery\", {\n gradeNames: [\"fluid.slider\"],\n selectors: {\n thumb: \".ui-slider-handle\"\n },\n styles: {\n handle: \"fl-slider-handle\",\n range: \"fl-slider-range\"\n },\n members: {\n slider: {\n expander: {\n \"this\": \"{that}.container\",\n method: \"slider\",\n args: [\"{that}.combinedSliderOptions\"]\n }\n },\n combinedSliderOptions: {\n expander: {\n funcName: \"fluid.slider.combineSliderOptions\",\n args: [\"{that}.options.sliderOptions\", \"{that}.options.range\"]\n }\n }\n },\n sliderOptions: {\n orientation: \"horizontal\",\n step: 1.0,\n classes: {\n \"ui-slider-handle\": \"{that}.options.styles.handle\",\n \"ui-slider-range\": \"{that}.options.styles.range\"\n }\n },\n invokers: {\n setSliderValue: {\n \"this\": \"{that}.slider\",\n \"method\": \"slider\",\n args: [\"value\", \"{arguments}.0\"]\n },\n setSliderAriaValueNow: {\n \"this\": \"{that}.dom.thumb\",\n \"method\": \"attr\",\n args: [\"aria-valuenow\", \"{arguments}.0\"]\n },\n setModel: {\n changePath: \"value\",\n value: \"{arguments}.1.value\"\n }\n },\n listeners: {\n // This can be removed once the jQuery UI slider has built in ARIA\n \"onCreate.initSliderAria\": {\n \"this\": \"{that}.dom.thumb\",\n method: \"attr\",\n args: [{\n role: \"slider\",\n \"aria-valuenow\": \"{that}.combinedSliderOptions.value\",\n \"aria-valuemin\": \"{that}.combinedSliderOptions.min\",\n \"aria-valuemax\": \"{that}.combinedSliderOptions.max\",\n \"aria-labelledby\": \"{that}.options.ariaOptions.aria-labelledby\",\n \"aria-label\": \"{that}.options.strings.aria-label\"\n }]\n },\n \"onCreate.bindSlideEvt\": {\n \"this\": \"{that}.slider\",\n \"method\": \"on\",\n \"args\": [\"slide\", \"{that}.setModel\"]\n }\n },\n modelListeners: {\n \"value\": [{\n listener: \"{that}.setSliderValue\",\n args: [\"{change}.value\"]\n }, {\n listener: \"{that}.setSliderAriaValueNow\",\n args: [\"{change}.value\"]\n }]\n }\n });\n\n fluid.slider.combineSliderOptions = function (sliderOptions, model, range) {\n return $.extend(true, {}, sliderOptions, model, range);\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2011-2016 OCAD University\nCopyright 2011 Lucendo Development Ltd.\nCopyright 2012 Raising the Floor - US\nCopyright 2015-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /******\n * ToC *\n *******/\n fluid.registerNamespace(\"fluid.tableOfContents\");\n\n fluid.tableOfContents.headingTextToAnchorInfo = function (heading) {\n var id = fluid.allocateSimpleId(heading);\n\n var anchorInfo = {\n id: id,\n url: \"#\" + id\n };\n\n return anchorInfo;\n };\n\n fluid.tableOfContents.locateHeadings = function (that) {\n var headings = that.locate(\"headings\");\n\n fluid.each(that.options.ignoreForToC, function (sel) {\n headings = headings.not(sel).not(sel + \" :header\");\n });\n\n return headings;\n };\n\n fluid.tableOfContents.refreshView = function (that) {\n var headings = that.locateHeadings();\n\n that.anchorInfo = fluid.transform(headings, function (heading) {\n return that.headingTextToAnchorInfo(heading);\n });\n\n var headingsModel = that.modelBuilder.assembleModel(headings, that.anchorInfo);\n that.applier.change(\"\", headingsModel);\n\n that.events.onRefresh.fire();\n };\n\n fluid.defaults(\"fluid.tableOfContents\", {\n gradeNames: [\"fluid.viewComponent\"],\n components: {\n levels: {\n type: \"fluid.tableOfContents.levels\",\n createOnEvent: \"onCreate\",\n container: \"{tableOfContents}.dom.tocContainer\",\n options: {\n model: {\n headings: \"{tableOfContents}.model\"\n },\n events: {\n afterRender: \"{tableOfContents}.events.afterRender\"\n },\n listeners: {\n \"{tableOfContents}.events.onRefresh\": \"{that}.refreshView\"\n },\n strings: \"{tableOfContents}.options.strings\"\n }\n },\n modelBuilder: {\n type: \"fluid.tableOfContents.modelBuilder\"\n }\n },\n model: [],\n invokers: {\n headingTextToAnchorInfo: \"fluid.tableOfContents.headingTextToAnchorInfo\",\n locateHeadings: {\n funcName: \"fluid.tableOfContents.locateHeadings\",\n args: [\"{that}\"]\n },\n refreshView: {\n funcName: \"fluid.tableOfContents.refreshView\",\n args: [\"{that}\"]\n },\n // TODO: is it weird to have hide and show on a component?\n hide: {\n \"this\": \"{that}.dom.tocContainer\",\n \"method\": \"hide\"\n },\n show: {\n \"this\": \"{that}.dom.tocContainer\",\n \"method\": \"show\"\n }\n },\n strings: {\n tocHeader: \"Table of Contents\"\n },\n selectors: {\n headings: \":header:visible\",\n tocContainer: \".flc-toc-tocContainer\"\n },\n ignoreForToC: {\n tocContainer: \"{that}.options.selectors.tocContainer\"\n },\n events: {\n onRefresh: null,\n afterRender: null,\n onReady: {\n events: {\n \"onCreate\": \"onCreate\",\n \"afterRender\": \"afterRender\"\n },\n args: [\"{that}\"]\n }\n },\n listeners: {\n \"onCreate.refreshView\": \"{that}.refreshView\"\n }\n });\n\n\n /*******************\n * ToC ModelBuilder *\n ********************/\n fluid.registerNamespace(\"fluid.tableOfContents.modelBuilder\");\n\n fluid.tableOfContents.modelBuilder.toModel = function (headingInfo, modelLevelFn) {\n var headings = fluid.copy(headingInfo);\n var buildModelLevel = function (headings, level) {\n var modelLevel = [];\n while (headings.length > 0) {\n var heading = headings[0];\n if (heading.level < level) {\n break;\n }\n if (heading.level > level) {\n var subHeadings = buildModelLevel(headings, level + 1);\n if (modelLevel.length > 0) {\n modelLevel[modelLevel.length - 1].headings = subHeadings;\n } else {\n modelLevel = modelLevelFn(modelLevel, subHeadings);\n }\n }\n if (heading.level === level) {\n modelLevel.push(heading);\n headings.shift();\n }\n }\n return modelLevel;\n };\n return buildModelLevel(headings, 1);\n };\n\n fluid.tableOfContents.modelBuilder.gradualModelLevelFn = function (modelLevel, subHeadings) {\n // Clone the subHeadings because we don't want to modify the reference of the subHeadings.\n // the reference will affect the equality condition in generateTree(), resulting an unwanted tree.\n var subHeadingsClone = fluid.copy(subHeadings);\n subHeadingsClone[0].level--;\n return subHeadingsClone;\n };\n\n fluid.tableOfContents.modelBuilder.skippedModelLevelFn = function (modelLevel, subHeadings) {\n modelLevel.push({headings: subHeadings});\n return modelLevel;\n };\n\n fluid.tableOfContents.modelBuilder.convertToHeadingObjects = function (that, headings, anchorInfo) {\n headings = $(headings);\n return fluid.transform(headings, function (heading, index) {\n return {\n level: that.headingCalculator.getHeadingLevel(heading),\n text: $(heading).text(),\n url: anchorInfo[index].url\n };\n });\n };\n\n fluid.tableOfContents.modelBuilder.assembleModel = function (that, headings, anchorInfo) {\n var headingInfo = that.convertToHeadingObjects(headings, anchorInfo);\n return that.toModel(headingInfo);\n };\n\n fluid.defaults(\"fluid.tableOfContents.modelBuilder\", {\n gradeNames: [\"fluid.component\"],\n components: {\n headingCalculator: {\n type: \"fluid.tableOfContents.modelBuilder.headingCalculator\"\n }\n },\n invokers: {\n toModel: {\n funcName: \"fluid.tableOfContents.modelBuilder.toModel\",\n args: [\"{arguments}.0\", \"{modelBuilder}.modelLevelFn\"]\n },\n modelLevelFn: \"fluid.tableOfContents.modelBuilder.gradualModelLevelFn\",\n convertToHeadingObjects: \"fluid.tableOfContents.modelBuilder.convertToHeadingObjects({that}, {arguments}.0, {arguments}.1)\", // headings, anchorInfo\n assembleModel: \"fluid.tableOfContents.modelBuilder.assembleModel({that}, {arguments}.0, {arguments}.1)\" // headings, anchorInfo\n }\n });\n\n /*************************************\n * ToC ModelBuilder headingCalculator *\n **************************************/\n fluid.registerNamespace(\"fluid.tableOfContents.modelBuilder.headingCalculator\");\n\n fluid.tableOfContents.modelBuilder.headingCalculator.getHeadingLevel = function (that, heading) {\n return that.options.levels.indexOf(heading.tagName) + 1;\n };\n\n fluid.defaults(\"fluid.tableOfContents.modelBuilder.headingCalculator\", {\n gradeNames: [\"fluid.component\"],\n invokers: {\n getHeadingLevel: \"fluid.tableOfContents.modelBuilder.headingCalculator.getHeadingLevel({that}, {arguments}.0)\" // heading\n },\n levels: [\"H1\", \"H2\", \"H3\", \"H4\", \"H5\", \"H6\"]\n });\n\n /*************\n * ToC Levels *\n **************/\n fluid.registerNamespace(\"fluid.tableOfContents.levels\");\n\n /**\n * Create an object model based on the type and ID. The object should contain an\n * ID that maps the selectors (ie. level1:), and the object should contain a children\n * @param string Accepted values are: level, items\n * @param int The current level which is used here as the ID.\n */\n fluid.tableOfContents.levels.objModel = function (type, ID) {\n var objModel = {\n ID: type + ID + \":\",\n children: []\n };\n return objModel;\n };\n\n /**\n * Configure item object when item object has no text, uri, level in it.\n * defaults to add a decorator to hide the bullets.\n */\n fluid.tableOfContents.levels.handleEmptyItemObj = function (itemObj) {\n itemObj.decorators = [{\n type: \"addClass\",\n classes: \"fl-tableOfContents-hide-bullet\"\n }];\n };\n\n /**\n * @param Object that.model, the model with all the headings, it should be in the format of {headings: [...]}\n * @param int the current level we want to generate the tree for. default to 1 if not defined.\n * @return Object A tree that looks like {children: [{ID: x, subTree:[...]}, ...]}\n */\n fluid.tableOfContents.levels.generateTree = function (headingsModel, currentLevel) {\n currentLevel = currentLevel || 0;\n var levelObj = fluid.tableOfContents.levels.objModel(\"level\", currentLevel);\n\n // FLUID-4352, run generateTree if there are headings in the model.\n if (headingsModel.headings.length === 0) {\n return currentLevel ? [] : {children: []};\n }\n\n // base case: level is 0, returns {children:[generateTree(nextLevel)]}\n // purpose is to wrap the first level with a children object.\n if (currentLevel === 0) {\n var tree = {\n children: [\n fluid.tableOfContents.levels.generateTree(headingsModel, currentLevel + 1)\n ]\n };\n return tree;\n }\n\n // Loop through the heading array, which can have multiple headings on the same level\n $.each(headingsModel.headings, function (index, model) {\n var itemObj = fluid.tableOfContents.levels.objModel(\"items\", currentLevel);\n var linkObj = {\n ID: \"link\" + currentLevel,\n target: model.url,\n linktext: model.text\n };\n\n // If level is undefined, then add decorator to it, otherwise add the links to it.\n if (!model.level) {\n fluid.tableOfContents.levels.handleEmptyItemObj(itemObj);\n } else {\n itemObj.children.push(linkObj);\n }\n // If there are sub-headings, go into the next level recursively\n if (model.headings) {\n itemObj.children.push(fluid.tableOfContents.levels.generateTree(model, currentLevel + 1));\n }\n // At this point, the itemObj should be in a tree format with sub-headings children\n levelObj.children.push(itemObj);\n });\n return levelObj;\n };\n\n /**\n * @return Object Returned produceTree must be in {headings: [trees]}\n */\n fluid.tableOfContents.levels.produceTree = function (that) {\n var tree = fluid.tableOfContents.levels.generateTree(that.model);\n // Add the header to the tree\n tree.children.push({\n ID: \"tocHeader\",\n messagekey: \"tocHeader\"\n });\n return tree;\n };\n\n fluid.tableOfContents.levels.fetchResources = function (that) {\n fluid.fetchResources(that.options.resources, function () {\n that.container.append(that.options.resources.template.resourceText);\n that.refreshView();\n });\n };\n\n\n fluid.defaults(\"fluid.tableOfContents.levels\", {\n gradeNames: [\"fluid.rendererComponent\"],\n produceTree: \"fluid.tableOfContents.levels.produceTree\",\n strings: {\n tocHeader: \"Table of Contents\"\n },\n selectors: {\n tocHeader: \".flc-toc-header\",\n level1: \".flc-toc-levels-level1\",\n level2: \".flc-toc-levels-level2\",\n level3: \".flc-toc-levels-level3\",\n level4: \".flc-toc-levels-level4\",\n level5: \".flc-toc-levels-level5\",\n level6: \".flc-toc-levels-level6\",\n items1: \".flc-toc-levels-items1\",\n items2: \".flc-toc-levels-items2\",\n items3: \".flc-toc-levels-items3\",\n items4: \".flc-toc-levels-items4\",\n items5: \".flc-toc-levels-items5\",\n items6: \".flc-toc-levels-items6\",\n link1: \".flc-toc-levels-link1\",\n link2: \".flc-toc-levels-link2\",\n link3: \".flc-toc-levels-link3\",\n link4: \".flc-toc-levels-link4\",\n link5: \".flc-toc-levels-link5\",\n link6: \".flc-toc-levels-link6\"\n },\n repeatingSelectors: [\"level1\", \"level2\", \"level3\", \"level4\", \"level5\", \"level6\", \"items1\", \"items2\", \"items3\", \"items4\", \"items5\", \"items6\"],\n model: {\n headings: [] // [text: heading, url: linkURL, headings: [ an array of subheadings in the same format]\n },\n listeners: {\n \"onCreate.fetchResources\": \"fluid.tableOfContents.levels.fetchResources\"\n },\n resources: {\n template: {\n forceCache: true,\n url: \"../html/TableOfContents.html\"\n }\n },\n rendererFnOptions: {\n noexpand: true\n },\n rendererOptions: {\n debugMode: false\n }\n\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2015-2016 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n\nIncludes code from Underscore.js 1.8.3\nhttp://underscorejs.org\n(c) 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\nUnderscore may be freely distributed under the MIT license.\n\n*/\n\n/* global speechSynthesis, SpeechSynthesisUtterance*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.textToSpeech\");\n\n /******************************************************************************************* *\n * fluid.textToSpeech provides a wrapper around the SpeechSynthesis Interface *\n * from the Web Speech API ( https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html ) *\n *********************************************************************************************/\n\n fluid.textToSpeech.isSupported = function () {\n return !!(window && window.speechSynthesis);\n };\n\n /**\n * Ensures that TTS is supported in the browser, including cases where the\n * feature is detected, but where the underlying audio engine is missing.\n * For example in VMs on SauceLabs, the behaviour for browsers which report that the speechSynthesis\n * API is implemented is for the `onstart` event of an utterance to never fire. If we don't receive this\n * event within a timeout, this API's behaviour is to return a promise which rejects.\n *\n * @param delay {Number} A time in milliseconds to wait for the speechSynthesis to fire its onStart event\n * by default it is 5000ms (5s). This is crux of the test, as it needs time to attempt to run the speechSynthesis.\n * @return {fluid.promise} A promise which will resolve if the TTS is supported (the onstart event is fired within the delay period)\n * or be rejected otherwise.\n */\n fluid.textToSpeech.checkTTSSupport = function (delay) {\n var promise = fluid.promise();\n if (fluid.textToSpeech.isSupported()) {\n // MS Edge speech synthesizer won't speak if the text string is blank,\n // so this must contain actual text\n var toSpeak = new SpeechSynthesisUtterance(\"short\"); // short text to attempt to speak\n toSpeak.volume = 0; // mutes the Speech Synthesizer\n // Same timeout as the timeout in the IoC testing framework\n var timeout = setTimeout(function () {\n fluid.textToSpeech.deferredSpeechSynthesisControl(\"cancel\");\n promise.reject();\n }, delay || 5000);\n toSpeak.onend = function () {\n clearTimeout(timeout);\n fluid.textToSpeech.deferredSpeechSynthesisControl(\"cancel\");\n promise.resolve();\n };\n fluid.textToSpeech.deferredSpeechSynthesisControl(\"speak\", toSpeak);\n } else {\n setTimeout(promise.reject, 0);\n }\n return promise;\n };\n\n\n fluid.defaults(\"fluid.textToSpeech\", {\n gradeNames: [\"fluid.modelComponent\"],\n events: {\n onStart: null,\n onStop: null,\n onError: null,\n onSpeechQueued: null\n },\n members: {\n queue: []\n },\n // Model paths: speaking, pending, paused, utteranceOpts, pauseRequested, resumeRequested\n model: {\n // Changes to the utteranceOpts will only text that is queued after the change.\n // All of these options can be overriden in the queueSpeech method by passing in\n // options directly there. It is useful in cases where a single instance needs to be\n // spoken with different options (e.g. single text in a different language.)\n utteranceOpts: {\n // text: \"\", // text to synthesize. avoid as it will override any other text passed in\n // lang: \"\", // the language of the synthesized text\n // voice: {} // a WebSpeechSynthesis object; if not set, will use the default one provided by the browser\n // volume: 1, // a value between 0 and 1\n // rate: 1, // a value from 0.1 to 10 although different synthesizers may have a smaller range\n // pitch: 1, // a value from 0 to 2\n }\n },\n modelListeners: {\n \"speaking\": {\n listener: \"fluid.textToSpeech.speak\",\n args: [\"{that}\", \"{change}.value\"]\n },\n \"pauseRequested\": {\n listener: \"fluid.textToSpeech.requestControl\",\n args: [\"{that}\", \"pause\", \"{change}\"]\n },\n \"resumeRequested\": {\n listener: \"fluid.textToSpeech.requestControl\",\n args: [\"{that}\", \"resume\", \"{change}\"]\n }\n },\n invokers: {\n queueSpeech: {\n funcName: \"fluid.textToSpeech.queueSpeech\",\n args: [\"{that}\", \"{arguments}.0\", \"{arguments}.1\", \"{arguments}.2\"]\n },\n cancel: {\n funcName: \"fluid.textToSpeech.cancel\",\n args: [\"{that}\"]\n },\n pause: {\n changePath: \"pauseRequested\",\n value: true\n },\n resume: {\n changePath: \"resumeRequested\",\n value: true\n },\n getVoices: {\n \"this\": \"speechSynthesis\",\n \"method\": \"getVoices\"\n },\n handleStart: {\n changePath: \"speaking\",\n value: true\n },\n // The handleEnd method is assumed to be triggered asynchronously\n // as it is processed/triggered by the mechanism voicing the utterance.\n handleEnd: {\n funcName: \"fluid.textToSpeech.handleEnd\",\n args: [\"{that}\"]\n },\n handleError: \"{that}.events.onError.fire\",\n handlePause: {\n changePath: \"paused\",\n value: true\n },\n handleResume: {\n changePath: \"paused\",\n value: false\n }\n }\n });\n\n // Issue commands to the speechSynthesis interface with deferral (1 ms timeout);\n // this makes the wrapper behave better when issuing commands, especially\n // play and pause\n fluid.textToSpeech.deferredSpeechSynthesisControl = function (control, args) {\n setTimeout(function () {\n speechSynthesis[control](args);\n }, 1);\n };\n\n // Throttle implementation adapted from underscore.js 1.8.3; see\n // file header for license details\n // Returns a version of a function that will only be called max once\n // every \"wait\" MS\n fluid.textToSpeech.throttle = function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) {\n options = {};\n }\n\n var later = function () {\n previous = options.leading === false ? 0 : new Date().getTime();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) {\n context = args = null;\n }\n };\n\n var throttled = function () {\n var now = new Date().getTime();\n if (!previous && options.leading === false) {\n previous = now;\n }\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n\n result = func.apply(context, args);\n if (!timeout) {\n context = args = null;\n }\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n };\n\n // Throttled version of deferred speech synthesis control\n fluid.textToSpeech.throttleControl = fluid.textToSpeech.throttle(fluid.textToSpeech.deferredSpeechSynthesisControl, 100, {leading: false});\n\n fluid.textToSpeech.speak = function (that, speaking) {\n that.events[speaking ? \"onStart\" : \"onStop\"].fire();\n };\n\n fluid.textToSpeech.requestControl = function (that, control, change) {\n // If there's a control request (value change to true), clear and\n // execute it\n if (change.value) {\n that.applier.change(change.path, false);\n fluid.textToSpeech.throttleControl(control);\n }\n };\n\n fluid.textToSpeech.handleEnd = function (that) {\n\n that.queue.shift();\n\n var resetValues = {\n speaking: false,\n pending: false,\n paused: false\n };\n\n if (that.queue.length) {\n that.applier.change(\"pending\", true);\n } else if (!that.queue.length) {\n var newModel = $.extend({}, that.model, resetValues);\n that.applier.change(\"\", newModel);\n }\n };\n\n fluid.textToSpeech.queueSpeech = function (that, text, interrupt, options) {\n if (interrupt) {\n that.cancel();\n }\n\n var errorFn = function () {\n that.handleError(text);\n };\n\n var toSpeak = new SpeechSynthesisUtterance(text);\n\n\n var eventBinding = {\n onstart: that.handleStart,\n onend: that.handleEnd,\n onerror: errorFn,\n onpause: that.handlePause,\n onresume: that.handleResume\n };\n $.extend(toSpeak, that.model.utteranceOpts, options, eventBinding);\n\n // Store toSpeak additionally on the queue to help deal\n // with premature garbage collection described at https://bugs.chromium.org/p/chromium/issues/detail?id=509488#c11\n // this makes the speech synthesis behave much better in Safari in\n // particular\n that.queue.push({text: text, utterance: toSpeak});\n\n that.events.onSpeechQueued.fire(text);\n fluid.textToSpeech.deferredSpeechSynthesisControl(\"speak\", toSpeak);\n };\n\n fluid.textToSpeech.cancel = function (that) {\n that.queue = [];\n fluid.textToSpeech.deferredSpeechSynthesisControl(\"cancel\");\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2009-2010 University of Cambridge\nCopyright 2011 Lucendo Development Ltd.\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /** URL utilities salvaged from kettle - these should go into core framework **/\n\n fluid.registerNamespace(\"fluid.url\");\n\n fluid.url.generateDepth = function (depth) {\n return fluid.generate(depth, \"../\").join(\"\");\n };\n\n fluid.url.parsePathInfo = function (pathInfo) {\n var togo = {};\n var segs = pathInfo.split(\"/\");\n if (segs.length > 0) {\n var top = segs.length - 1;\n var dotpos = segs[top].indexOf(\".\");\n if (dotpos !== -1) {\n togo.extension = segs[top].substring(dotpos + 1);\n segs[top] = segs[top].substring(0, dotpos);\n }\n }\n togo.pathInfo = segs;\n return togo;\n };\n\n fluid.url.parsePathInfoTrim = function (pathInfo) {\n var togo = fluid.url.parsePathInfo(pathInfo);\n if (togo.pathInfo[togo.pathInfo.length - 1] === \"\") {\n togo.pathInfo.length--;\n }\n return togo;\n };\n\n /** Collapse the array of segments into a URL path, starting at the specified\n * segment index - this will not terminate with a slash, unless the final segment\n * is the empty string\n */\n fluid.url.collapseSegs = function (segs, from, to) {\n var togo = \"\";\n if (from === undefined) {\n from = 0;\n }\n if (to === undefined) {\n to = segs.length;\n }\n for (var i = from; i < to - 1; ++i) {\n togo += segs[i] + \"/\";\n }\n if (to > from) { // TODO: bug in Kettle version\n togo += segs[to - 1];\n }\n return togo;\n };\n\n fluid.url.makeRelPath = function (parsed, index) {\n var togo = fluid.kettle.collapseSegs(parsed.pathInfo, index);\n if (parsed.extension) {\n togo += \".\" + parsed.extension;\n }\n return togo;\n };\n\n /** Canonicalise IN PLACE the supplied segment array derived from parsing a\n * pathInfo structure. Warning, this destructively modifies the argument.\n */\n fluid.url.cononocolosePath = function (pathInfo) {\n var consume = 0;\n for (var i = 0; i < pathInfo.length; ++i) {\n if (pathInfo[i] === \"..\") {\n ++consume;\n }\n else if (consume !== 0) {\n pathInfo.splice(i - consume * 2, consume * 2);\n i -= consume * 2;\n consume = 0;\n }\n }\n return pathInfo;\n };\n\n // parseUri 1.2.2\n // (c) Steven Levithan <stevenlevithan.com>\n // MIT License\n\n fluid.url.parseUri = function (str) {\n var o = fluid.url.parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) { uri[o.key[i]] = m[i] || \"\"; }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) { uri[o.q.name][$1] = $2; }\n });\n\n return uri;\n };\n\n fluid.url.parseUri.options = {\n strictMode: true,\n key: [\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"],\n q: {\n name: \"queryKey\",\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n };\n\n fluid.url.parseSegs = function (url) {\n var parsed = fluid.url.parseUri(url);\n var parsedSegs = fluid.url.parsePathInfoTrim(parsed.directory);\n return parsedSegs.pathInfo;\n };\n\n fluid.url.isAbsoluteUrl = function (url) {\n var parseRel = fluid.url.parseUri(url);\n return (parseRel.host || parseRel.protocol || parseRel.directory.charAt(0) === \"/\");\n };\n\n fluid.url.computeRelativePrefix = function (outerLocation, iframeLocation, relPath) {\n if (fluid.url.isAbsoluteUrl(relPath)) {\n return relPath;\n }\n var relSegs = fluid.url.parsePathInfo(relPath).pathInfo;\n var parsedOuter = fluid.url.parseSegs(outerLocation);\n var parsedRel = parsedOuter.concat(relSegs);\n fluid.url.cononocolosePath(parsedRel);\n var parsedInner = fluid.url.parseSegs(iframeLocation);\n var seg = 0;\n for (; seg < parsedRel.length; ++seg) {\n if (parsedRel[seg] !== parsedInner[seg]) { break; }\n }\n var excess = parsedInner.length - seg;\n var back = fluid.url.generateDepth(excess);\n var front = fluid.url.collapseSegs(parsedRel, seg);\n return back + front;\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2009 University of Toronto\nCopyright 2011-2013 OCAD University\nCopyright 2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /**\n * A Generic data source grade that defines an API for getting and setting\n * data.\n */\n // TODO: unify with Kettle's and ultimately Infusion's dataSource\n fluid.defaults(\"fluid.prefs.dataSource\", {\n gradeNames: [\"fluid.component\"],\n invokers: {\n get: \"fluid.notImplemented\",\n set: \"fluid.notImplemented\"\n }\n });\n\n fluid.defaults(\"fluid.prefs.store\", {\n gradeNames: [\"fluid.prefs.dataSource\", \"fluid.contextAware\"],\n contextAwareness: {\n strategy: {\n defaultGradeNames: \"fluid.prefs.cookieStore\"\n }\n }\n });\n\n /****************\n * Cookie Store *\n ****************/\n\n /**\n * SettingsStore Subcomponent that uses a cookie for persistence.\n * @param {Object} options\n */\n fluid.defaults(\"fluid.prefs.cookieStore\", {\n gradeNames: [\"fluid.prefs.store\"],\n cookie: {\n name: \"fluid-ui-settings\",\n path: \"/\",\n expires: \"\"\n },\n invokers: {\n get: {\n funcName: \"fluid.prefs.cookieStore.get\",\n args: \"{that}.options.cookie.name\"\n },\n set: {\n funcName: \"fluid.prefs.cookieStore.set\",\n args: [\"{arguments}.0\", \"{that}.options.cookie\"]\n }\n }\n });\n\n /**\n * Retrieve and return the value of the cookie\n */\n fluid.prefs.cookieStore.get = function (cookieName) {\n var cookie = document.cookie;\n if (cookie.length <= 0) {\n return;\n }\n\n var cookiePrefix = cookieName + \"=\";\n var startIndex = cookie.indexOf(cookiePrefix);\n if (startIndex < 0) {\n return;\n }\n\n startIndex = startIndex + cookiePrefix.length;\n var endIndex = cookie.indexOf(\";\", startIndex);\n if (endIndex < startIndex) {\n endIndex = cookie.length;\n }\n var cookieSection = cookie.substring(startIndex, endIndex);\n var togo;\n try {\n togo = JSON.parse(decodeURIComponent(cookieSection));\n } catch (e) {\n fluid.log(\"Error parsing cookie \" + cookieSection + \" as JSON - clearing\");\n document.cookie = \"\";\n }\n return togo;\n };\n\n /**\n * Assembles the cookie string\n * @param {Object} cookie settings\n */\n fluid.prefs.cookieStore.assembleCookie = function (cookieOptions) {\n var cookieStr = cookieOptions.name + \"=\" + cookieOptions.data;\n\n if (cookieOptions.expires) {\n cookieStr += \"; expires=\" + cookieOptions.expires;\n }\n\n if (cookieOptions.path) {\n cookieStr += \"; path=\" + cookieOptions.path;\n }\n\n return cookieStr;\n };\n\n /**\n * Saves the settings into a cookie\n * @param {Object} settings\n * @param {Object} cookieOptions\n */\n fluid.prefs.cookieStore.set = function (settings, cookieOptions) {\n cookieOptions.data = encodeURIComponent(JSON.stringify(settings));\n document.cookie = fluid.prefs.cookieStore.assembleCookie(cookieOptions);\n };\n\n\n /**************\n * Temp Store *\n **************/\n\n /**\n * SettingsStore mock that doesn't do persistence.\n * @param {Object} options\n */\n fluid.defaults(\"fluid.prefs.tempStore\", {\n gradeNames: [\"fluid.prefs.store\", \"fluid.modelComponent\"],\n invokers: {\n get: {\n funcName: \"fluid.identity\",\n args: \"{that}.model\"\n },\n set: {\n funcName: \"fluid.prefs.tempStore.set\",\n args: [\"{arguments}.0\", \"{that}.applier\"]\n }\n }\n });\n\n fluid.prefs.tempStore.set = function (settings, applier) {\n applier.fireChangeRequest({path: \"\", type: \"DELETE\"});\n applier.change(\"\", settings);\n };\n\n fluid.defaults(\"fluid.prefs.globalSettingsStore\", {\n gradeNames: [\"fluid.component\"],\n components: {\n settingsStore: {\n type: \"fluid.prefs.store\",\n options: {\n gradeNames: [\"fluid.resolveRootSingle\"],\n singleRootType: \"fluid.prefs.store\"\n }\n }\n }\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2009 University of Toronto\nCopyright 2010-2015 OCAD University\nCopyright 2011 Lucendo Development Ltd.\nCopyright 2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /*******************************************************************************\n * Root Model *\n * *\n * Holds the default values for enactors and panel model values *\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.initialModel\", {\n gradeNames: [\"fluid.component\"],\n members: {\n // TODO: This information is supposed to be generated from the JSON\n // schema describing various preferences. For now it's kept in top\n // level prefsEditor to avoid further duplication.\n initialModel: {\n preferences: {} // To keep initial preferences\n }\n }\n });\n\n /***********************************************\n * UI Enhancer *\n * *\n * Transforms the page based on user settings. *\n ***********************************************/\n\n fluid.defaults(\"fluid.uiEnhancer\", {\n gradeNames: [\"fluid.viewComponent\"],\n invokers: {\n updateModel: {\n func: \"{that}.applier.change\",\n args: [\"\", \"{arguments}.0\"]\n }\n },\n userGrades: \"@expand:fluid.prefs.filterEnhancerGrades({that}.options.gradeNames)\"\n });\n\n // Make this a standalone grade since options merging can't see 2 levels deep into merging\n // trees and will currently trash \"gradeNames\" for 2nd level nested components!\n fluid.defaults(\"fluid.uiEnhancer.root\", {\n gradeNames: [\"fluid.uiEnhancer\", \"fluid.resolveRootSingle\"],\n singleRootType: \"fluid.uiEnhancer\"\n });\n\n fluid.uiEnhancer.ignorableGrades = [\"fluid.uiEnhancer\", \"fluid.uiEnhancer.root\", \"fluid.resolveRoot\", \"fluid.resolveRootSingle\"];\n\n // These function is necessary so that we can \"clone\" a UIEnhancer (e.g. one in an iframe) from another.\n // This reflects a long-standing mistake in UIEnhancer design - we should separate the logic in an enhancer\n // from a particular binding onto a container.\n fluid.prefs.filterEnhancerGrades = function (gradeNames) {\n return fluid.remove_if(fluid.makeArray(gradeNames), function (gradeName) {\n return fluid.frameworkGrades.indexOf(gradeName) !== -1 || fluid.uiEnhancer.ignorableGrades.indexOf(gradeName) !== -1;\n });\n };\n\n // This just the options that we are clear safely represent user options - naturally this all has\n // to go when we refactor UIEnhancer\n fluid.prefs.filterEnhancerOptions = function (options) {\n return fluid.filterKeys(options, [\"classnameMap\", \"fontSizeMap\", \"tocTemplate\", \"components\"]);\n };\n\n /********************************************************************************\n * PageEnhancer *\n * *\n * A UIEnhancer wrapper that concerns itself with the entire page. *\n * *\n * \"originalEnhancerOptions\" is a grade component to keep track of the original *\n * uiEnhancer user options *\n ********************************************************************************/\n\n // TODO: Both the pageEnhancer and the uiEnhancer need to be available separately - some\n // references to \"{uiEnhancer}\" are present in prefsEditorConnections, whilst other\n // sites refer to \"{pageEnhancer}\". The fact that uiEnhancer requires \"body\" prevents it\n // being top-level until we have the options flattening revolution. Also one day we want\n // to make good of advertising an unmerged instance of the \"originalEnhancerOptions\"\n fluid.defaults(\"fluid.pageEnhancer\", {\n gradeNames: [\"fluid.component\", \"fluid.originalEnhancerOptions\",\n \"fluid.prefs.initialModel\", \"fluid.prefs.settingsGetter\",\n \"fluid.resolveRootSingle\"],\n distributeOptions: {\n source: \"{that}.options.uiEnhancer\",\n target: \"{that > uiEnhancer}.options\"\n },\n singleRootType: \"fluid.pageEnhancer\",\n components: {\n uiEnhancer: {\n type: \"fluid.uiEnhancer.root\",\n container: \"body\"\n }\n },\n originalUserOptions: \"@expand:fluid.prefs.filterEnhancerOptions({uiEnhancer}.options)\",\n listeners: {\n \"onCreate.initModel\": \"fluid.pageEnhancer.init\"\n }\n });\n\n fluid.pageEnhancer.init = function (that) {\n that.uiEnhancer.updateModel(fluid.get(that.getSettings(), \"preferences\"));\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2009 University of Toronto\nCopyright 2010-2016 OCAD University\nCopyright 2011 Lucendo Development Ltd.\nCopyright 2012-2014 Raising the Floor - US\nCopyright 2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /*****************************\n * Preferences Editor Loader *\n *****************************/\n\n /**\n * An Preferences Editor top-level component that reflects the collaboration between prefsEditor, templateLoader and messageLoader.\n * This component is the only Preferences Editor component that is intended to be called by the outside world.\n *\n * @param {Object} options\n */\n fluid.defaults(\"fluid.prefs.prefsEditorLoader\", {\n gradeNames: [\"fluid.prefs.settingsGetter\", \"fluid.prefs.initialModel\", \"fluid.viewComponent\"],\n defaultLocale: \"en\",\n members: {\n settings: {\n expander: {\n funcName: \"fluid.prefs.prefsEditorLoader.getCompleteSettings\",\n args: [\"{that}.initialModel\", \"{that}.getSettings\"]\n }\n }\n },\n components: {\n prefsEditor: {\n priority: \"last\",\n type: \"fluid.prefs.prefsEditor\",\n createOnEvent: \"onCreatePrefsEditorReady\",\n options: {\n members: {\n initialModel: \"{prefsEditorLoader}.initialModel\"\n },\n invokers: {\n getSettings: \"{prefsEditorLoader}.getSettings\"\n }\n }\n },\n templateLoader: {\n type: \"fluid.resourceLoader\",\n options: {\n events: {\n onResourcesLoaded: \"{prefsEditorLoader}.events.onPrefsEditorTemplatesLoaded\"\n }\n }\n },\n messageLoader: {\n type: \"fluid.resourceLoader\",\n options: {\n defaultLocale: \"{prefsEditorLoader}.options.defaultLocale\",\n locale: \"{prefsEditorLoader}.settings.locale\",\n resourceOptions: {\n dataType: \"json\"\n },\n events: {\n onResourcesLoaded: \"{prefsEditorLoader}.events.onPrefsEditorMessagesLoaded\"\n }\n }\n }\n },\n events: {\n onPrefsEditorTemplatesLoaded: null,\n onPrefsEditorMessagesLoaded: null,\n onCreatePrefsEditorReady: {\n events: {\n templateLoaded: \"onPrefsEditorTemplatesLoaded\",\n prefsEditorMessagesLoaded: \"onPrefsEditorMessagesLoaded\"\n }\n }\n },\n distributeOptions: [{\n source: \"{that}.options.templateLoader\",\n removeSource: true,\n target: \"{that > templateLoader}.options\"\n }, {\n source: \"{that}.options.messageLoader\",\n removeSource: true,\n target: \"{that > messageLoader}.options\"\n }, {\n source: \"{that}.options.terms\",\n target: \"{that > templateLoader}.options.terms\"\n }, {\n source: \"{that}.options.terms\",\n target: \"{that > messageLoader}.options.terms\"\n }, {\n source: \"{that}.options.prefsEditor\",\n removeSource: true,\n target: \"{that > prefsEditor}.options\"\n }]\n });\n\n fluid.prefs.prefsEditorLoader.getCompleteSettings = function (initialModel, getSettingsFunc) {\n var savedSettings = getSettingsFunc();\n return $.extend(true, {}, initialModel, savedSettings);\n };\n\n // TODO: This mixin grade appears to be supplied manually by various test cases but no longer appears in\n // the main configuration. We should remove the need for users to supply this - also the use of \"defaultPanels\" in fact\n // refers to \"starter panels\"\n fluid.defaults(\"fluid.prefs.transformDefaultPanelsOptions\", {\n // Do not supply \"fluid.prefs.inline\" here, since when this is used as a mixin for separatedPanel, it ends up displacing the\n // more refined type of the prefsEditorLoader\n gradeNames: [\"fluid.viewComponent\"],\n distributeOptions: [{\n source: \"{that}.options.textSize\",\n removeSource: true,\n target: \"{that textSize}.options\"\n }, {\n source: \"{that}.options.lineSpace\",\n removeSource: true,\n target: \"{that lineSpace}.options\"\n }, {\n source: \"{that}.options.textFont\",\n removeSource: true,\n target: \"{that textFont}.options\"\n }, {\n source: \"{that}.options.contrast\",\n removeSource: true,\n target: \"{that contrast}.options\"\n }, {\n source: \"{that}.options.layoutControls\",\n removeSource: true,\n target: \"{that layoutControls}.options\"\n }, {\n source: \"{that}.options.linksControls\",\n removeSource: true,\n target: \"{that linksControls}.options\"\n }]\n });\n\n /**********************\n * Preferences Editor *\n **********************/\n\n fluid.defaults(\"fluid.prefs.settingsGetter\", {\n gradeNames: [\"fluid.component\"],\n members: {\n getSettings: \"{fluid.prefs.store}.get\"\n }\n });\n\n fluid.defaults(\"fluid.prefs.settingsSetter\", {\n gradeNames: [\"fluid.component\"],\n invokers: {\n setSettings: {\n funcName: \"fluid.prefs.settingsSetter.setSettings\",\n args: [\"{arguments}.0\", \"{fluid.prefs.store}.set\"]\n }\n }\n });\n\n fluid.prefs.settingsSetter.setSettings = function (model, set) {\n var userSettings = fluid.copy(model);\n set(userSettings);\n };\n\n fluid.defaults(\"fluid.prefs.uiEnhancerRelay\", {\n gradeNames: [\"fluid.modelComponent\"],\n listeners: {\n \"onCreate.addListener\": \"{that}.addListener\",\n \"onDestroy.removeListener\": \"{that}.removeListener\"\n },\n events: {\n updateEnhancerModel: \"{fluid.prefs.prefsEditor}.events.onUpdateEnhancerModel\"\n },\n invokers: {\n addListener: {\n funcName: \"fluid.prefs.uiEnhancerRelay.addListener\",\n args: [\"{that}.events.updateEnhancerModel\", \"{that}.updateEnhancerModel\"]\n },\n removeListener: {\n funcName: \"fluid.prefs.uiEnhancerRelay.removeListener\",\n args: [\"{that}.events.updateEnhancerModel\", \"{that}.updateEnhancerModel\"]\n },\n updateEnhancerModel: {\n funcName: \"fluid.prefs.uiEnhancerRelay.updateEnhancerModel\",\n args: [\"{uiEnhancer}\", \"{fluid.prefs.prefsEditor}.model.preferences\"]\n }\n }\n });\n\n fluid.prefs.uiEnhancerRelay.addListener = function (modelChanged, listener) {\n modelChanged.addListener(listener);\n };\n\n fluid.prefs.uiEnhancerRelay.removeListener = function (modelChanged, listener) {\n modelChanged.removeListener(listener);\n };\n\n fluid.prefs.uiEnhancerRelay.updateEnhancerModel = function (uiEnhancer, newModel) {\n uiEnhancer.updateModel(newModel);\n };\n\n /**\n * A component that works in conjunction with the UI Enhancer component\n * to allow users to set personal user interface preferences. The Preferences Editor component provides a user\n * interface for setting and saving personal preferences, and the UI Enhancer component carries out the\n * work of applying those preferences to the user interface.\n *\n * @param {Object} container\n * @param {Object} options\n */\n fluid.defaults(\"fluid.prefs.prefsEditor\", {\n gradeNames: [\"fluid.prefs.settingsGetter\", \"fluid.prefs.settingsSetter\", \"fluid.prefs.initialModel\", \"fluid.viewComponent\"],\n invokers: {\n /**\n * Updates the change applier and fires modelChanged on subcomponent fluid.prefs.controls\n *\n * @param {Object} newModel\n * @param {Object} source\n */\n fetch: {\n funcName: \"fluid.prefs.prefsEditor.fetch\",\n args: [\"{that}\", \"{arguments}.0\"]\n },\n applyChanges: {\n funcName: \"fluid.prefs.prefsEditor.applyChanges\",\n args: [\"{that}\"]\n },\n save: {\n funcName: \"fluid.prefs.prefsEditor.save\",\n args: [\"{that}\"]\n },\n saveAndApply: {\n funcName: \"fluid.prefs.prefsEditor.saveAndApply\",\n args: [\"{that}\"]\n },\n reset: {\n funcName: \"fluid.prefs.prefsEditor.reset\",\n args: [\"{that}\"]\n },\n cancel: {\n funcName: \"fluid.prefs.prefsEditor.cancel\",\n args: [\"{that}\"]\n }\n },\n selectors: {\n cancel: \".flc-prefsEditor-cancel\",\n reset: \".flc-prefsEditor-reset\",\n save: \".flc-prefsEditor-save\",\n previewFrame : \".flc-prefsEditor-preview-frame\"\n },\n events: {\n onSave: null,\n onCancel: null,\n beforeReset: null,\n afterReset: null,\n onAutoSave: null,\n modelChanged: null,\n onPrefsEditorRefresh: null,\n onUpdateEnhancerModel: null,\n onPrefsEditorMarkupReady: null,\n onReady: null\n },\n listeners: {\n \"onCreate.init\": \"fluid.prefs.prefsEditor.init\",\n \"onAutoSave.save\": \"{that}.save\"\n },\n modelListeners: {\n \"\": [{\n listener: \"fluid.prefs.prefsEditor.handleAutoSave\",\n args: [\"{that}\"]\n }, {\n listener: \"{that}.events.modelChanged.fire\",\n args: [\"{change}.value\"]\n }]\n },\n resources: {\n template: \"{templateLoader}.resources.prefsEditor\"\n },\n autoSave: false\n });\n\n /**\n * Refresh PrefsEditor\n */\n fluid.prefs.prefsEditor.applyChanges = function (that) {\n that.events.onUpdateEnhancerModel.fire();\n };\n\n fluid.prefs.prefsEditor.fetch = function (that, eventName) {\n var completeModel = that.getSettings();\n completeModel = $.extend(true, {}, that.initialModel, completeModel);\n // TODO: This may not be completely effective if the root model is smaller than\n // the current one. Given our previous discoveries re \"model shrinkage\"\n // (http://issues.fluidproject.org/browse/FLUID-5585 ), the proper thing to do here\n // is to apply a DELETE to the root before putting in the new model. And this should\n // be done within a transaction in order to avoid notifying the tree more than necessary.\n // However, the transactional model of the changeApplier is going to change radically\n // soon (http://wiki.fluidproject.org/display/fluid/New+New+Notes+on+the+ChangeApplier)\n // and this implementation doesn't seem to be causing a problem at present so we had\n // just better leave it the way it is for now.\n that.applier.change(\"\", completeModel);\n if (eventName) {\n that.events[eventName].fire(that);\n }\n that.events.onPrefsEditorRefresh.fire();\n that.applyChanges();\n };\n\n /**\n * Sends the prefsEditor.model to the store and fires onSave\n * @param that: A fluid.prefs.prefsEditor instance\n * @return the saved model\n */\n fluid.prefs.prefsEditor.save = function (that) {\n if (!that.model) { // Don't save a reset model\n return;\n }\n\n var modelToSave = fluid.copy(that.model),\n initialModel = that.initialModel,\n stats = {changes: 0, unchanged: 0, changeMap: {}},\n changedPrefs = {};\n\n // To address https://issues.fluidproject.org/browse/FLUID-4686\n fluid.model.diff(modelToSave.preferences, fluid.get(initialModel, [\"preferences\"]), stats);\n\n if (stats.changes === 0) {\n delete modelToSave.preferences;\n } else {\n fluid.each(stats.changeMap, function (state, pref) {\n fluid.set(changedPrefs, pref, modelToSave.preferences[pref]);\n });\n modelToSave.preferences = changedPrefs;\n }\n\n that.events.onSave.fire(modelToSave);\n that.setSettings(modelToSave);\n return modelToSave;\n };\n\n fluid.prefs.prefsEditor.saveAndApply = function (that) {\n var prevSettings = that.getSettings(),\n changedSelections = that.save();\n\n // Only when preferences are changed, re-render panels and trigger enactors to apply changes\n if (!fluid.model.diff(fluid.get(changedSelections, \"preferences\"), fluid.get(prevSettings, \"preferences\"))) {\n that.events.onPrefsEditorRefresh.fire();\n that.applyChanges();\n }\n };\n\n /**\n * Resets the selections to the integrator's defaults and fires afterReset\n */\n fluid.prefs.prefsEditor.reset = function (that) {\n that.events.beforeReset.fire(that);\n that.applier.fireChangeRequest({path: \"\", type: \"DELETE\"});\n that.applier.change(\"\", fluid.copy(that.initialModel));\n that.events.onPrefsEditorRefresh.fire();\n that.events.afterReset.fire(that);\n };\n\n /**\n * Resets the selections to the last saved selections and fires onCancel\n */\n fluid.prefs.prefsEditor.cancel = function (that) {\n that.events.onCancel.fire();\n that.fetch();\n };\n\n // called once markup is applied to the document containing tab component roots\n fluid.prefs.prefsEditor.finishInit = function (that) {\n var bindHandlers = function (that) {\n var saveButton = that.locate(\"save\");\n if (saveButton.length > 0) {\n saveButton.click(that.saveAndApply);\n var form = fluid.findForm(saveButton);\n $(form).submit(function () {\n that.saveAndApply();\n });\n }\n that.locate(\"reset\").click(that.reset);\n that.locate(\"cancel\").click(that.cancel);\n };\n\n that.container.append(that.options.resources.template.resourceText);\n bindHandlers(that);\n\n that.fetch(\"onPrefsEditorMarkupReady\");\n that.events.onReady.fire(that);\n };\n\n fluid.prefs.prefsEditor.handleAutoSave = function (that) {\n if (that.options.autoSave) {\n that.events.onAutoSave.fire();\n }\n };\n\n fluid.prefs.prefsEditor.init = function (that) {\n // This setTimeout is to ensure that fetching of resources is asynchronous,\n // and so that component construction does not run ahead of subcomponents for SeparatedPanel\n // (FLUID-4453 - this may be a replacement for a branch removed for a FLUID-2248 fix)\n setTimeout(function () {\n if (!fluid.isDestroyed(that)) {\n fluid.prefs.prefsEditor.finishInit(that);\n }\n }, 1);\n };\n\n /******************************\n * Preferences Editor Preview *\n ******************************/\n\n fluid.defaults(\"fluid.prefs.preview\", {\n gradeNames: [\"fluid.viewComponent\"],\n components: {\n enhancer: {\n type: \"fluid.uiEnhancer\",\n container: \"{preview}.enhancerContainer\",\n createOnEvent: \"onReady\"\n },\n templateLoader: \"{templateLoader}\"\n },\n invokers: {\n updateModel: {\n funcName: \"fluid.prefs.preview.updateModel\",\n args: [\n \"{preview}\",\n \"{prefsEditor}.model.preferences\"\n ]\n }\n },\n events: {\n onReady: null\n },\n listeners: {\n \"onCreate.startLoadingContainer\": \"fluid.prefs.preview.startLoadingContainer\",\n \"{prefsEditor}.events.modelChanged\": \"{that}.updateModel\",\n \"onReady.updateModel\": \"{that}.updateModel\"\n },\n templateUrl: \"%prefix/PrefsEditorPreview.html\"\n });\n\n fluid.prefs.preview.updateModel = function (that, preferences) {\n /**\n * SetTimeout is temp fix for http://issues.fluidproject.org/browse/FLUID-2248\n */\n setTimeout(function () {\n if (that.enhancer) {\n that.enhancer.updateModel(preferences);\n }\n }, 0);\n };\n\n fluid.prefs.preview.startLoadingContainer = function (that) {\n var templateUrl = that.templateLoader.transformURL(that.options.templateUrl);\n that.container.on(\"load\", function () {\n that.enhancerContainer = $(\"body\", that.container.contents());\n that.events.onReady.fire();\n });\n that.container.attr(\"src\", templateUrl);\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013-2016 OCAD University\nCopyright 2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n\n(function ($, fluid) {\n \"use strict\";\n\n /**********************\n * msgLookup grade *\n **********************/\n\n fluid.defaults(\"fluid.prefs.msgLookup\", {\n gradeNames: [\"fluid.component\"],\n members: {\n msgLookup: {\n expander: {\n funcName: \"fluid.prefs.stringLookup\",\n args: [\"{msgResolver}\", \"{that}.options.stringArrayIndex\"]\n }\n }\n },\n stringArrayIndex: {}\n });\n\n fluid.prefs.stringLookup = function (messageResolver, stringArrayIndex) {\n var that = {id: fluid.allocateGuid()};\n that.singleLookup = function (value) {\n var looked = messageResolver.lookup([value]);\n return fluid.get(looked, \"template\");\n };\n that.multiLookup = function (values) {\n return fluid.transform(values, function (value) {\n return that.singleLookup(value);\n });\n };\n that.lookup = function (value) {\n var values = fluid.get(stringArrayIndex, value) || value;\n var lookupFn = fluid.isArrayable(values) ? \"multiLookup\" : \"singleLookup\";\n return that[lookupFn](values);\n };\n that.resolvePathSegment = that.lookup;\n return that;\n };\n\n /***********************************************\n * Base grade panel\n ***********************************************/\n\n fluid.defaults(\"fluid.prefs.panel\", {\n gradeNames: [\"fluid.prefs.msgLookup\", \"fluid.rendererComponent\"],\n events: {\n onDomBind: null\n },\n // Any listener that requires a DOM element, should be registered\n // to the onDomBind listener. By default it is fired by onCreate, but\n // when used as a subpanel, it will be triggered by the resetDomBinder invoker.\n listeners: {\n \"onCreate.onDomBind\": \"{that}.events.onDomBind\"\n },\n components: {\n msgResolver: {\n type: \"fluid.messageResolver\"\n }\n },\n rendererOptions: {\n messageLocator: \"{msgResolver}.resolve\"\n },\n distributeOptions: {\n source: \"{that}.options.messageBase\",\n target: \"{that > msgResolver}.options.messageBase\"\n }\n });\n\n /***************************\n * Base grade for subpanel *\n ***************************/\n\n fluid.defaults(\"fluid.prefs.subPanel\", {\n gradeNames: [\"fluid.prefs.panel\", \"{that}.getDomBindGrade\"],\n listeners: {\n \"{compositePanel}.events.afterRender\": {\n listener: \"{that}.events.afterRender\",\n args: [\"{that}\"]\n },\n // Changing the firing of onDomBind from the onCreate.\n // This is due to the fact that the rendering process, controlled by the\n // composite panel, will set/replace the DOM elements.\n \"onCreate.onDomBind\": null, // remove listener\n \"afterRender.onDomBind\": \"{that}.resetDomBinder\"\n },\n rules: {\n expander: {\n func: \"fluid.prefs.subPanel.generateRules\",\n args: [\"{that}.options.preferenceMap\"]\n }\n },\n invokers: {\n refreshView: \"{compositePanel}.refreshView\",\n // resetDomBinder must fire the onDomBind event\n resetDomBinder: {\n funcName: \"fluid.prefs.subPanel.resetDomBinder\",\n args: [\"{that}\"]\n },\n getDomBindGrade: {\n funcName: \"fluid.prefs.subPanel.getDomBindGrade\",\n args: [\"{prefsEditor}\"]\n }\n },\n strings: {},\n parentBundle: \"{compositePanel}.messageResolver\",\n renderOnInit: false\n });\n\n fluid.defaults(\"fluid.prefs.subPanel.domBind\", {\n gradeNames: [\"fluid.component\"],\n listeners: {\n \"onDomBind.domChange\": {\n listener: \"{prefsEditor}.events.onSignificantDOMChange\"\n }\n }\n });\n\n fluid.prefs.subPanel.getDomBindGrade = function (prefsEditor) {\n var hasListener = fluid.get(prefsEditor, \"options.events.onSignificantDOMChange\") !== undefined;\n if (hasListener) {\n return \"fluid.prefs.subPanel.domBind\";\n }\n };\n\n /*\n * Since the composite panel manages the rendering of the subpanels\n * the markup used by subpanels needs to be completely replaced.\n * The subpanel's container is refereshed to point at the newly\n * rendered markup, and the domBinder is re-initialized. Once\n * this is all done, the onDomBind event is fired.\n */\n fluid.prefs.subPanel.resetDomBinder = function (that) {\n // TODO: The line below to find the container jQuery instance was copied from the framework code -\n // https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/FluidView.js#L145\n // in order to reset the dom binder when panels are in an iframe.\n // It can be be eliminated once we have the new renderer.\n var userJQuery = that.container.constructor;\n var context = that.container[0].ownerDocument;\n var selector = that.container.selector;\n that.container = userJQuery(selector, context);\n // To address FLUID-5966, manually adding back the selector and context properties that were removed from jQuery v3.0.\n // ( see: https://jquery.com/upgrade-guide/3.0/#breaking-change-deprecated-context-and-selector-properties-removed )\n // In most cases the \"selector\" property will already be restored through the DOM binder or fluid.container.\n // However, in this case we are manually recreating the container to ensure that it is referencing an element currently added\n // to the correct Document ( e.g. iframe ) (also see: FLUID-4536). This manual recreation of the container requires us to\n // manually add back the selector and context from the original container. This code and fix parallels that in\n // FluidView.js fluid.container line 129\n that.container.selector = selector;\n that.container.context = context;\n if (that.container.length === 0) {\n fluid.fail(\"resetDomBinder got no elements in DOM for container searching for selector \" + that.container.selector);\n }\n fluid.initDomBinder(that, that.options.selectors);\n that.events.onDomBind.fire(that);\n };\n\n fluid.prefs.subPanel.safePrefKey = function (prefKey) {\n return prefKey.replace(/[.]/g, \"_\");\n };\n\n /*\n * Generates the model relay rules for a subpanel.\n * Takes advantage of the fact that compositePanel\n * uses the preference key (with \".\" replaced by \"_\"),\n * as its model path.\n */\n fluid.prefs.subPanel.generateRules = function (preferenceMap) {\n var rules = {};\n fluid.each(preferenceMap, function (prefObj, prefKey) {\n fluid.each(prefObj, function (value, prefRule) {\n if (prefRule.indexOf(\"model.\") === 0) {\n rules[fluid.prefs.subPanel.safePrefKey(prefKey)] = prefRule.slice(\"model.\".length);\n }\n });\n });\n return rules;\n };\n\n /**********************************\n * Base grade for composite panel *\n **********************************/\n\n fluid.registerNamespace(\"fluid.prefs.compositePanel\");\n\n fluid.prefs.compositePanel.arrayMergePolicy = function (target, source) {\n target = fluid.makeArray(target);\n source = fluid.makeArray(source);\n fluid.each(source, function (selector) {\n if (target.indexOf(selector) < 0) {\n target.push(selector);\n }\n });\n return target;\n };\n\n fluid.defaults(\"fluid.prefs.compositePanel\", {\n gradeNames: [\"fluid.prefs.panel\", \"{that}.getDistributeOptionsGrade\", \"{that}.getSubPanelLifecycleBindings\"],\n mergePolicy: {\n subPanelOverrides: \"noexpand\",\n selectorsToIgnore: fluid.prefs.compositePanel.arrayMergePolicy\n },\n selectors: {}, // requires selectors into the template which will act as the containers for the subpanels\n selectorsToIgnore: [], // should match the selectors that are used to identify the containers for the subpanels\n repeatingSelectors: [],\n events: {\n initSubPanels: null\n },\n listeners: {\n \"onCreate.combineResources\": \"{that}.combineResources\",\n \"onCreate.appendTemplate\": {\n \"this\": \"{that}.container\",\n \"method\": \"append\",\n \"args\": [\"{that}.options.resources.template.resourceText\"]\n },\n \"onCreate.initSubPanels\": \"{that}.events.initSubPanels\",\n \"onCreate.hideInactive\": \"{that}.hideInactive\",\n \"onCreate.surfaceSubpanelRendererSelectors\": \"{that}.surfaceSubpanelRendererSelectors\",\n \"afterRender.hideInactive\": \"{that}.hideInactive\"\n },\n invokers: {\n getDistributeOptionsGrade: {\n funcName: \"fluid.prefs.compositePanel.assembleDistributeOptions\",\n args: [\"{that}.options.components\"]\n },\n getSubPanelLifecycleBindings: {\n funcName: \"fluid.prefs.compositePanel.subPanelLifecycleBindings\",\n args: [\"{that}.options.components\"]\n },\n combineResources: {\n funcName: \"fluid.prefs.compositePanel.combineTemplates\",\n args: [\"{that}.options.resources\", \"{that}.options.selectors\"]\n },\n surfaceSubpanelRendererSelectors: {\n funcName: \"fluid.prefs.compositePanel.surfaceSubpanelRendererSelectors\",\n args: [\"{that}\", \"{that}.options.components\", \"{that}.options.selectors\"]\n },\n produceSubPanelTrees: {\n funcName: \"fluid.prefs.compositePanel.produceSubPanelTrees\",\n args: [\"{that}\"]\n },\n expandProtoTree: {\n funcName: \"fluid.prefs.compositePanel.expandProtoTree\",\n args: [\"{that}\"]\n },\n produceTree: {\n funcName: \"fluid.prefs.compositePanel.produceTree\",\n args: [\"{that}\"]\n },\n hideInactive: {\n funcName: \"fluid.prefs.compositePanel.hideInactive\",\n args: [\"{that}\"]\n },\n handleRenderOnPreference: {\n funcName: \"fluid.prefs.compositePanel.handleRenderOnPreference\",\n args: [\"{that}\", \"{that}.refreshView\", \"{that}.conditionalCreateEvent\", \"{arguments}.0\", \"{arguments}.1\", \"{arguments}.2\"]\n },\n conditionalCreateEvent: {\n funcName: \"fluid.prefs.compositePanel.conditionalCreateEvent\"\n }\n },\n subPanelOverrides: {\n gradeNames: [\"fluid.prefs.subPanel\"]\n },\n rendererFnOptions: {\n noexpand: true,\n cutpointGenerator: \"fluid.prefs.compositePanel.cutpointGenerator\",\n subPanelRepeatingSelectors: {\n expander: {\n funcName: \"fluid.prefs.compositePanel.surfaceRepeatingSelectors\",\n args: [\"{that}.options.components\"]\n }\n }\n },\n components: {},\n resources: {} // template is reserved for the compositePanel's template, the subpanel template should have same key as the selector for its container.\n });\n\n /*\n * Attempts to prefetch a components options before it is instantiated.\n * Only use in cases where the instatiated component cannot be used.\n */\n fluid.prefs.compositePanel.prefetchComponentOptions = function (type, options) {\n var baseOptions = fluid.getMergedDefaults(type, fluid.get(options, \"gradeNames\"));\n // TODO: awkwardly, fluid.merge is destructive on each argument!\n return fluid.merge(baseOptions.mergePolicy, fluid.copy(baseOptions), options);\n };\n /*\n * Should only be used when fluid.prefs.compositePanel.isActivatePanel cannot.\n * While this implementation doesn't require an instantiated component, it may in\n * the process miss some configuration provided by distribute options and demands.\n */\n fluid.prefs.compositePanel.isPanel = function (type, options) {\n var opts = fluid.prefs.compositePanel.prefetchComponentOptions(type, options);\n return fluid.hasGrade(opts, \"fluid.prefs.panel\");\n };\n\n fluid.prefs.compositePanel.isActivePanel = function (comp) {\n return comp && fluid.hasGrade(comp.options, \"fluid.prefs.panel\");\n };\n\n /*\n * Creates a grade containing the distributeOptions rules needed for the subcomponents\n */\n fluid.prefs.compositePanel.assembleDistributeOptions = function (components) {\n var gradeName = \"fluid.prefs.compositePanel.distributeOptions_\" + fluid.allocateGuid();\n var distributeOptions = [];\n var relayOption = {};\n fluid.each(components, function (componentOptions, componentName) {\n if (fluid.prefs.compositePanel.isPanel(componentOptions.type, componentOptions.options)) {\n distributeOptions.push({\n source: \"{that}.options.subPanelOverrides\",\n target: \"{that > \" + componentName + \"}.options\"\n });\n }\n\n // Construct the model relay btw the composite panel and its subpanels\n var componentRelayRules = {};\n var definedOptions = fluid.prefs.compositePanel.prefetchComponentOptions(componentOptions.type, componentOptions.options);\n var preferenceMap = fluid.get(definedOptions, [\"preferenceMap\"]);\n fluid.each(preferenceMap, function (prefObj, prefKey) {\n fluid.each(prefObj, function (value, prefRule) {\n if (prefRule.indexOf(\"model.\") === 0) {\n fluid.set(componentRelayRules, prefRule.slice(\"model.\".length), \"{compositePanel}.model.\" + fluid.prefs.subPanel.safePrefKey(prefKey));\n }\n });\n });\n relayOption[componentName] = componentRelayRules;\n distributeOptions.push({\n source: \"{that}.options.relayOption.\" + componentName,\n target: \"{that > \" + componentName + \"}.options.model\"\n });\n });\n fluid.defaults(gradeName, {\n gradeNames: [\"fluid.component\"],\n relayOption: relayOption,\n distributeOptions: distributeOptions\n });\n return gradeName;\n };\n\n fluid.prefs.compositePanel.conditionalCreateEvent = function (value, createEvent) {\n if (value) {\n createEvent();\n }\n };\n\n\n fluid.prefs.compositePanel.handleRenderOnPreference = function (that, refreshViewFunc, conditionalCreateEventFunc, value, createEvent, componentNames) {\n componentNames = fluid.makeArray(componentNames);\n conditionalCreateEventFunc(value, createEvent);\n fluid.each(componentNames, function (componentName) {\n var comp = that[componentName];\n if (!value && comp) {\n comp.destroy();\n }\n });\n refreshViewFunc();\n };\n\n fluid.prefs.compositePanel.creationEventName = function (pref) {\n return \"initOn_\" + pref;\n };\n\n fluid.prefs.compositePanel.generateModelListeners = function (conditionals) {\n return fluid.transform(conditionals, function (componentNames, pref) {\n var eventName = fluid.prefs.compositePanel.creationEventName(pref);\n return {\n func: \"{that}.handleRenderOnPreference\",\n args: [\"{change}.value\", \"{that}.events.\" + eventName + \".fire\", componentNames]\n };\n });\n };\n\n /*\n * Creates a grade containing all of the lifecycle binding configuration needed for the subpanels.\n * This includes the following:\n * - adding events used to trigger the initialization of the subpanels\n * - adding the createOnEvent configuration for the subpanels\n * - binding handlers to model changed events\n * - binding handlers to afterRender and onCreate\n */\n fluid.prefs.compositePanel.subPanelLifecycleBindings = function (components) {\n var gradeName = \"fluid.prefs.compositePanel.subPanelCreationTimingDistibution_\" + fluid.allocateGuid();\n var distributeOptions = [];\n var subPanelCreationOpts = {\n \"default\": \"initSubPanels\"\n };\n var conditionals = {};\n var listeners = {};\n var events = {};\n fluid.each(components, function (componentOptions, componentName) {\n if (fluid.prefs.compositePanel.isPanel(componentOptions.type, componentOptions.options)) {\n var creationEventOpt = \"default\";\n // would have had renderOnPreference directly sourced from the componentOptions\n // however, the set of configuration specified there is restricted.\n var renderOnPreference = fluid.get(componentOptions, \"options.renderOnPreference\");\n if (renderOnPreference) {\n var pref = fluid.prefs.subPanel.safePrefKey(renderOnPreference);\n var onCreateListener = \"onCreate.\" + pref;\n creationEventOpt = fluid.prefs.compositePanel.creationEventName(pref);\n subPanelCreationOpts[creationEventOpt] = creationEventOpt;\n events[creationEventOpt] = null;\n conditionals[pref] = conditionals[pref] || [];\n conditionals[pref].push(componentName);\n listeners[onCreateListener] = {\n listener: \"{that}.conditionalCreateEvent\",\n args: [\"{that}.model.\" + pref, \"{that}.events.\" + creationEventOpt + \".fire\"]\n };\n }\n distributeOptions.push({\n source: \"{that}.options.subPanelCreationOpts.\" + creationEventOpt,\n target: \"{that}.options.components.\" + componentName + \".createOnEvent\"\n });\n }\n });\n\n fluid.defaults(gradeName, {\n gradeNames: [\"fluid.component\"],\n events: events,\n listeners: listeners,\n modelListeners: fluid.prefs.compositePanel.generateModelListeners(conditionals),\n subPanelCreationOpts: subPanelCreationOpts,\n distributeOptions: distributeOptions\n });\n return gradeName;\n };\n\n /*\n * Used to hide the containers of inactive sub panels.\n * This is necessary as the composite panel's template is the one that has their containers and\n * it would be undesirable to have them visible when their associated panel has not been created.\n * Also, hiding them allows for the subpanel to initialize, as it requires their container to be present.\n * The subpanels need to be initialized before rendering, for the produce function to source the rendering\n * information from it.\n */\n fluid.prefs.compositePanel.hideInactive = function (that) {\n fluid.each(that.options.components, function (componentOpts, componentName) {\n if (fluid.prefs.compositePanel.isPanel(componentOpts.type, componentOpts.options) && !fluid.prefs.compositePanel.isActivePanel(that[componentName])) {\n that.locate(componentName).hide();\n }\n });\n };\n\n /*\n * Use the renderer directly to combine the templates into a single\n * template to be used by the components actual rendering.\n */\n fluid.prefs.compositePanel.combineTemplates = function (resources, selectors) {\n var cutpoints = [];\n var tree = {children: []};\n\n fluid.each(resources, function (resource, resourceName) {\n if (resourceName !== \"template\") {\n tree.children.push({\n ID: resourceName,\n markup: resource.resourceText\n });\n cutpoints.push({\n id: resourceName,\n selector: selectors[resourceName]\n });\n }\n });\n\n var resourceSpec = {\n base: {\n resourceText: resources.template.resourceText,\n href: \".\",\n resourceKey: \".\",\n cutpoints: cutpoints\n }\n };\n\n var templates = fluid.parseTemplates(resourceSpec, [\"base\"]);\n var renderer = fluid.renderer(templates, tree, {cutpoints: cutpoints, debugMode: true});\n resources.template.resourceText = renderer.renderTemplates();\n };\n\n fluid.prefs.compositePanel.rebaseSelectorName = function (memberName, selectorName) {\n return memberName + \"_\" + selectorName;\n };\n\n /*\n * Surfaces the rendering selectors from the subpanels to the compositePanel,\n * and scopes them to the subpanel's container.\n * Since this is used by the cutpoint generator, which only gets run once, we need to\n * surface all possible subpanel selectors, and not just the active ones.\n */\n fluid.prefs.compositePanel.surfaceSubpanelRendererSelectors = function (that, components, selectors) {\n fluid.each(components, function (compOpts, compName) {\n if (fluid.prefs.compositePanel.isPanel(compOpts.type, compOpts.options)) {\n var opts = fluid.prefs.compositePanel.prefetchComponentOptions(compOpts.type, compOpts.options);\n fluid.each(opts.selectors, function (selector, selName) {\n if (!opts.selectorsToIgnore || opts.selectorsToIgnore.indexOf(selName) < 0) {\n fluid.set(selectors, fluid.prefs.compositePanel.rebaseSelectorName(compName, selName), selectors[compName] + \" \" + selector);\n }\n });\n }\n });\n };\n\n fluid.prefs.compositePanel.surfaceRepeatingSelectors = function (components) {\n var repeatingSelectors = [];\n fluid.each(components, function (compOpts, compName) {\n if (fluid.prefs.compositePanel.isPanel(compOpts.type, compOpts.options)) {\n var opts = fluid.prefs.compositePanel.prefetchComponentOptions(compOpts.type, compOpts.options);\n var rebasedRepeatingSelectors = fluid.transform(opts.repeatingSelectors, function (selector) {\n return fluid.prefs.compositePanel.rebaseSelectorName(compName, selector);\n });\n repeatingSelectors = repeatingSelectors.concat(rebasedRepeatingSelectors);\n }\n });\n return repeatingSelectors;\n };\n\n fluid.prefs.compositePanel.cutpointGenerator = function (selectors, options) {\n var opts = {\n selectorsToIgnore: options.selectorsToIgnore,\n repeatingSelectors: options.repeatingSelectors.concat(options.subPanelRepeatingSelectors)\n };\n return fluid.renderer.selectorsToCutpoints(selectors, opts);\n };\n\n fluid.prefs.compositePanel.rebaseID = function (value, memberName) {\n return memberName + \"_\" + value;\n };\n\n fluid.prefs.compositePanel.rebaseParentRelativeID = function (val, memberName) {\n var slicePos = \"..::\".length; // ..:: refers to the parentRelativeID prefix used in the renderer\n return val.slice(0, slicePos) + fluid.prefs.compositePanel.rebaseID(val.slice(slicePos), memberName);\n };\n\n fluid.prefs.compositePanel.rebaseValueBinding = function (value, modelRelayRules) {\n return fluid.find(modelRelayRules, function (oldModelPath, newModelPath) {\n if (value === oldModelPath) {\n return newModelPath;\n } else if (value.indexOf(oldModelPath) === 0) {\n return value.replace(oldModelPath, newModelPath);\n }\n }) || value;\n };\n\n fluid.prefs.compositePanel.rebaseTreeComp = function (msgResolver, model, treeComp, memberName, modelRelayRules) {\n var rebased = fluid.copy(treeComp);\n\n if (rebased.ID) {\n rebased.ID = fluid.prefs.compositePanel.rebaseID(rebased.ID, memberName);\n }\n\n if (rebased.children) {\n rebased.children = fluid.prefs.compositePanel.rebaseTree(msgResolver, model, rebased.children, memberName, modelRelayRules);\n } else if (rebased.selection) {\n rebased.selection = fluid.prefs.compositePanel.rebaseTreeComp(msgResolver, model, rebased.selection, memberName, modelRelayRules);\n } else if (rebased.messagekey) {\n // converts the \"UIMessage\" renderer component into a \"UIBound\"\n // and passes in the resolved message as the value.\n rebased.componentType = \"UIBound\";\n rebased.value = msgResolver.resolve(rebased.messagekey.value, rebased.messagekey.args);\n delete rebased.messagekey;\n } else if (rebased.parentRelativeID) {\n rebased.parentRelativeID = fluid.prefs.compositePanel.rebaseParentRelativeID(rebased.parentRelativeID, memberName);\n } else if (rebased.valuebinding) {\n rebased.valuebinding = fluid.prefs.compositePanel.rebaseValueBinding(rebased.valuebinding, modelRelayRules);\n\n if (rebased.value) {\n var modelValue = fluid.get(model, rebased.valuebinding);\n rebased.value = modelValue !== undefined ? modelValue : rebased.value;\n }\n }\n\n return rebased;\n };\n\n fluid.prefs.compositePanel.rebaseTree = function (msgResolver, model, tree, memberName, modelRelayRules) {\n var rebased;\n\n if (fluid.isArrayable(tree)) {\n rebased = fluid.transform(tree, function (treeComp) {\n return fluid.prefs.compositePanel.rebaseTreeComp(msgResolver, model, treeComp, memberName, modelRelayRules);\n });\n } else {\n rebased = fluid.prefs.compositePanel.rebaseTreeComp(msgResolver, model, tree, memberName, modelRelayRules);\n }\n\n return rebased;\n };\n\n fluid.prefs.compositePanel.produceTree = function (that) {\n var produceTreeOption = that.options.produceTree;\n var ownTree = produceTreeOption ?\n (typeof (produceTreeOption) === \"string\" ? fluid.getGlobalValue(produceTreeOption) : produceTreeOption)(that) :\n that.expandProtoTree();\n var subPanelTree = that.produceSubPanelTrees();\n var tree = {\n children: ownTree.children.concat(subPanelTree.children)\n };\n return tree;\n };\n\n fluid.prefs.compositePanel.expandProtoTree = function (that) {\n var expanderOptions = fluid.renderer.modeliseOptions(that.options.expanderOptions, {ELstyle: \"${}\"}, that);\n var expander = fluid.renderer.makeProtoExpander(expanderOptions, that);\n return expander(that.options.protoTree || {});\n };\n\n fluid.prefs.compositePanel.produceSubPanelTrees = function (that) {\n var tree = {children: []};\n fluid.each(that.options.components, function (options, componentName) {\n var subPanel = that[componentName];\n if (fluid.prefs.compositePanel.isActivePanel(subPanel)) {\n var expanderOptions = fluid.renderer.modeliseOptions(subPanel.options.expanderOptions, {ELstyle: \"${}\"}, subPanel);\n var expander = fluid.renderer.makeProtoExpander(expanderOptions, subPanel);\n var subTree = subPanel.produceTree();\n subTree = fluid.get(subPanel.options, \"rendererFnOptions.noexpand\") ? subTree : expander(subTree);\n var rebasedTree = fluid.prefs.compositePanel.rebaseTree(subPanel.msgResolver, that.model, subTree, componentName, subPanel.options.rules);\n tree.children = tree.children.concat(rebasedTree.children);\n }\n });\n return tree;\n };\n\n /********************************************************************************\n * The grade that contains the connections between a panel and the prefs editor *\n ********************************************************************************/\n\n fluid.defaults(\"fluid.prefs.prefsEditorConnections\", {\n gradeNames: [\"fluid.component\"],\n listeners: {\n \"{fluid.prefs.prefsEditor}.events.onPrefsEditorRefresh\": \"{fluid.prefs.panel}.refreshView\"\n },\n strings: {},\n parentBundle: \"{fluid.prefs.prefsEditorLoader}.msgResolver\"\n });\n\n /********************************\n * Preferences Editor Text Size *\n ********************************/\n\n /**\n * A sub-component of fluid.prefs that renders the \"text size\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.textSize\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.textSize\": {\n \"model.textSize\": \"default\",\n \"range.min\": \"minimum\",\n \"range.max\": \"maximum\"\n }\n },\n // The default model values represent both the expected format as well as the setting to be applied in the absence of values passed down to the component.\n // i.e. from the settings store, or specific defaults derived from schema.\n // Note: Except for being passed down to its subcomponent, these default values are not contributed and shared out\n range: {\n min: 1,\n max: 2\n },\n selectors: {\n textSize: \".flc-prefsEditor-min-text-size\",\n label: \".flc-prefsEditor-min-text-size-label\",\n multiplier: \".flc-prefsEditor-multiplier\",\n textSizeDescr: \".flc-prefsEditor-text-size-descr\"\n },\n selectorsToIgnore: [\"textSize\"],\n components: {\n textfieldSlider: {\n type: \"fluid.textfieldSlider\",\n container: \"{that}.dom.textSize\",\n createOnEvent: \"afterRender\",\n options: {\n model: {\n value: \"{fluid.prefs.panel.textSize}.model.textSize\"\n },\n range: \"{fluid.prefs.panel.textSize}.options.range\",\n sliderOptions: \"{fluid.prefs.panel.textSize}.options.sliderOptions\",\n ariaOptions: {\n \"aria-labelledby\": \"{textSize}.options.panelOptions.labelId\"\n }\n }\n }\n },\n protoTree: {\n label: {\n messagekey: \"textSizeLabel\",\n decorators: {\n attrs: {id: \"{that}.options.panelOptions.labelId\"}\n }\n },\n multiplier: {messagekey: \"multiplier\"},\n textSizeDescr: {messagekey: \"textSizeDescr\"}\n },\n sliderOptions: {\n orientation: \"horizontal\",\n step: 0.1,\n range: \"min\"\n },\n panelOptions: {\n labelId: \"textSize-label-\" + fluid.allocateGuid()\n }\n });\n\n /********************************\n * Preferences Editor Text Font *\n ********************************/\n\n /**\n * A sub-component of fluid.prefs that renders the \"text font\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.textFont\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.textFont\": {\n \"model.value\": \"default\",\n \"controlValues.textFont\": \"enum\"\n }\n },\n selectors: {\n textFont: \".flc-prefsEditor-text-font\",\n label: \".flc-prefsEditor-text-font-label\",\n textFontDescr: \".flc-prefsEditor-text-font-descr\"\n },\n stringArrayIndex: {\n textFont: [\"textFont-default\", \"textFont-times\", \"textFont-comic\", \"textFont-arial\", \"textFont-verdana\"]\n },\n protoTree: {\n label: {messagekey: \"textFontLabel\"},\n textFontDescr: {messagekey: \"textFontDescr\"},\n textFont: {\n optionnames: \"${{that}.msgLookup.textFont}\",\n optionlist: \"${{that}.options.controlValues.textFont}\",\n selection: \"${value}\",\n decorators: {\n type: \"fluid\",\n func: \"fluid.prefs.selectDecorator\",\n options: {\n styles: \"{that}.options.classnameMap.textFont\"\n }\n }\n }\n },\n classnameMap: null, // must be supplied by implementors\n controlValues: {\n textFont: [\"default\", \"times\", \"comic\", \"arial\", \"verdana\"]\n }\n });\n\n /*********************************\n * Preferences Editor Line Space *\n *********************************/\n\n /**\n * A sub-component of fluid.prefs that renders the \"line space\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.lineSpace\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.lineSpace\": {\n \"model.lineSpace\": \"default\",\n \"range.min\": \"minimum\",\n \"range.max\": \"maximum\"\n }\n },\n // The default model values represent both the expected format as well as the setting to be applied in the absence of values passed down to the component.\n // i.e. from the settings store, or specific defaults derived from schema.\n // Note: Except for being passed down to its subcomponent, these default values are not contributed and shared out\n range: {\n min: 1,\n max: 2\n },\n selectors: {\n lineSpace: \".flc-prefsEditor-line-space\",\n label: \".flc-prefsEditor-line-space-label\",\n multiplier: \".flc-prefsEditor-multiplier\",\n lineSpaceDescr: \".flc-prefsEditor-line-space-descr\"\n },\n selectorsToIgnore: [\"lineSpace\"],\n components: {\n textfieldSlider: {\n type: \"fluid.textfieldSlider\",\n container: \"{that}.dom.lineSpace\",\n createOnEvent: \"afterRender\",\n options: {\n model: {\n value: \"{fluid.prefs.panel.lineSpace}.model.lineSpace\"\n },\n range: \"{fluid.prefs.panel.lineSpace}.options.range\",\n sliderOptions: \"{fluid.prefs.panel.lineSpace}.options.sliderOptions\",\n ariaOptions: {\n \"aria-labelledby\": \"{lineSpace}.options.panelOptions.labelId\"\n }\n }\n }\n },\n protoTree: {\n label: {\n messagekey: \"lineSpaceLabel\",\n decorators: {\n attrs: {id: \"{that}.options.panelOptions.labelId\"}\n }\n },\n multiplier: {messagekey: \"multiplier\"},\n lineSpaceDescr: {messagekey: \"lineSpaceDescr\"}\n },\n sliderOptions: {\n orientation: \"horizontal\",\n step: 0.1,\n range: \"min\"\n },\n panelOptions: {\n labelId: \"lineSpace-label-\" + fluid.allocateGuid()\n }\n });\n\n /*******************************\n * Preferences Editor Contrast *\n *******************************/\n\n /**\n * A sub-component of fluid.prefs that renders the \"contrast\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.contrast\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.contrast\": {\n \"model.value\": \"default\",\n \"controlValues.theme\": \"enum\"\n }\n },\n listeners: {\n \"afterRender.style\": \"{that}.style\"\n },\n selectors: {\n themeRow: \".flc-prefsEditor-themeRow\",\n themeLabel: \".flc-prefsEditor-theme-label\",\n themeInput: \".flc-prefsEditor-themeInput\",\n label: \".flc-prefsEditor-contrast-label\",\n contrastDescr: \".flc-prefsEditor-contrast-descr\"\n },\n styles: {\n defaultThemeLabel: \"fl-prefsEditor-contrast-defaultThemeLabel\"\n },\n stringArrayIndex: {\n theme: [\"contrast-default\", \"contrast-bw\", \"contrast-wb\", \"contrast-by\", \"contrast-yb\", \"contrast-lgdg\"]\n },\n repeatingSelectors: [\"themeRow\"],\n protoTree: {\n label: {messagekey: \"contrastLabel\"},\n contrastDescr: {messagekey: \"contrastDescr\"},\n expander: {\n type: \"fluid.renderer.selection.inputs\",\n rowID: \"themeRow\",\n labelID: \"themeLabel\",\n inputID: \"themeInput\",\n selectID: \"theme-radio\",\n tree: {\n optionnames: \"${{that}.msgLookup.theme}\",\n optionlist: \"${{that}.options.controlValues.theme}\",\n selection: \"${value}\"\n }\n }\n },\n controlValues: {\n theme: [\"default\", \"bw\", \"wb\", \"by\", \"yb\", \"lgdg\"]\n },\n markup: {\n // Aria-hidden needed on fl-preview-A and Display 'a' created as pseudo-content in css to prevent AT from reading out display 'a' on IE, Chrome, and Safari\n // Aria-hidden needed on fl-crossout to prevent AT from trying to read crossout symbol in Safari\n label: \"<span class=\\\"fl-preview-A\\\" aria-hidden=\\\"true\\\"></span><span class=\\\"fl-hidden-accessible\\\">%theme</span><div class=\\\"fl-crossout\\\" aria-hidden=\\\"true\\\"></div>\"\n },\n invokers: {\n style: {\n funcName: \"fluid.prefs.panel.contrast.style\",\n args: [\n \"{that}.dom.themeLabel\",\n \"{that}.msgLookup.theme\",\n \"{that}.options.markup.label\",\n \"{that}.options.controlValues.theme\",\n \"default\",\n \"{that}.options.classnameMap.theme\",\n \"{that}.options.styles.defaultThemeLabel\"\n ]\n }\n }\n });\n\n fluid.prefs.panel.contrast.style = function (labels, strings, markup, theme, defaultThemeName, style, defaultLabelStyle) {\n fluid.each(labels, function (label, index) {\n label = $(label);\n\n var themeValue = strings[index];\n label.html(fluid.stringTemplate(markup, {\n theme: themeValue\n }));\n\n // Aria-label set to prevent Firefox from reading out the display 'a'\n label.attr(\"aria-label\", themeValue);\n\n var labelTheme = theme[index];\n if (labelTheme === defaultThemeName) {\n label.addClass(defaultLabelStyle);\n }\n label.addClass(style[labelTheme]);\n });\n };\n\n /**************************************\n * Preferences Editor Layout Controls *\n **************************************/\n\n /**\n * A sub-component of fluid.prefs that renders the \"layout and navigation\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.layoutControls\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.tableOfContents\": {\n \"model.toc\": \"default\"\n }\n },\n selectors: {\n toc: \".flc-prefsEditor-toc\",\n label: \".flc-prefsEditor-toc-label\",\n tocDescr: \".flc-prefsEditor-toc-descr\"\n },\n protoTree: {\n label: {messagekey: \"tocLabel\"},\n tocDescr: {messagekey: \"tocDescr\"},\n toc: \"${toc}\"\n }\n });\n\n /**************************************\n * Preferences Editor Emphasize Links *\n **************************************/\n /**\n * A sub-component of fluid.prefs that renders the \"links and buttons\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.emphasizeLinks\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.emphasizeLinks\": {\n \"model.links\": \"default\"\n }\n },\n selectors: {\n links: \".flc-prefsEditor-links\",\n linksChoiceLabel: \".flc-prefsEditor-links-choice-label\"\n },\n protoTree: {\n linksChoiceLabel: {messagekey: \"linksChoiceLabel\"},\n links: \"${links}\"\n }\n });\n\n /************************************\n * Preferences Editor Inputs Larger *\n ************************************/\n /**\n * A sub-component of fluid.prefs that renders the \"links and buttons\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.inputsLarger\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.inputsLarger\": {\n \"model.inputsLarger\": \"default\"\n }\n },\n selectors: {\n inputsLarger: \".flc-prefsEditor-inputs-larger\",\n inputsChoiceLabel: \".flc-prefsEditor-links-inputs-choice-label\"\n },\n protoTree: {\n inputsChoiceLabel: {messagekey: \"inputsChoiceLabel\"},\n inputsLarger: \"${inputsLarger}\"\n }\n });\n\n /*************************************\n * Preferences Editor Links Controls *\n *************************************/\n /**\n * A sub-component of fluid.prefs that renders the \"links and buttons\" panel of the user preferences interface.\n */\n fluid.defaults(\"fluid.prefs.panel.linksControls\", {\n gradeNames: [\"fluid.prefs.compositePanel\"],\n selectors: {\n label: \".flc-prefsEditor-linksControls-label\"\n },\n protoTree: {\n label: {messagekey: \"linksControlsLabel\"}\n }\n });\n\n /********************************************************\n * Preferences Editor Select Dropdown Options Decorator *\n ********************************************************/\n\n /**\n * A sub-component that decorates the options on the select dropdown list box with the css style\n */\n fluid.defaults(\"fluid.prefs.selectDecorator\", {\n gradeNames: [\"fluid.viewComponent\"],\n listeners: {\n \"onCreate.decorateOptions\": \"fluid.prefs.selectDecorator.decorateOptions\"\n },\n styles: {\n preview: \"fl-preview-theme\"\n }\n });\n\n fluid.prefs.selectDecorator.decorateOptions = function (that) {\n fluid.each($(\"option\", that.container), function (option) {\n var styles = that.options.styles;\n $(option).addClass(styles.preview + \" \" + styles[fluid.value(option)]);\n });\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2014-2015 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /**********************************************************************************\n * speakPanel\n **********************************************************************************/\n fluid.defaults(\"fluid.prefs.panel.speak\", {\n gradeNames: [\"fluid.prefs.panel\"],\n preferenceMap: {\n \"fluid.prefs.speak\": {\n \"model.speak\": \"default\"\n }\n },\n selectors: {\n speak: \".flc-prefsEditor-speak\",\n label: \".flc-prefsEditor-speak-label\",\n speakDescr: \".flc-prefsEditor-speak-descr\"\n },\n protoTree: {\n label: {messagekey: \"speakLabel\"},\n speakDescr: {messagekey: \"speakDescr\"},\n speak: \"${speak}\"\n }\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013-2016 OCAD University\nCopyright 2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.defaults(\"fluid.prefs.enactor\", {\n gradeNames: [\"fluid.modelComponent\"]\n });\n\n /**********************************************************************************\n * styleElements\n *\n * Adds or removes the classname to/from the elements based upon the model value.\n * This component is used as a grade by emphasizeLinks & inputsLarger\n **********************************************************************************/\n fluid.defaults(\"fluid.prefs.enactor.styleElements\", {\n gradeNames: [\"fluid.prefs.enactor\"],\n cssClass: null, // Must be supplied by implementors\n elementsToStyle: null, // Must be supplied by implementors\n invokers: {\n applyStyle: {\n funcName: \"fluid.prefs.enactor.styleElements.applyStyle\",\n args: [\"{arguments}.0\", \"{arguments}.1\"]\n },\n resetStyle: {\n funcName: \"fluid.prefs.enactor.styleElements.resetStyle\",\n args: [\"{arguments}.0\", \"{arguments}.1\"]\n },\n handleStyle: {\n funcName: \"fluid.prefs.enactor.styleElements.handleStyle\",\n args: [\"{arguments}.0\", \"{that}.options.elementsToStyle\", \"{that}.options.cssClass\", \"{that}.applyStyle\", \"{that}.resetStyle\"]\n }\n },\n modelListeners: {\n value: {\n listener: \"{that}.handleStyle\",\n args: [\"{change}.value\"]\n }\n }\n });\n\n fluid.prefs.enactor.styleElements.applyStyle = function (elements, cssClass) {\n elements.addClass(cssClass);\n };\n\n fluid.prefs.enactor.styleElements.resetStyle = function (elements, cssClass) {\n $(elements, \".\" + cssClass).addBack().removeClass(cssClass);\n };\n\n fluid.prefs.enactor.styleElements.handleStyle = function (value, elements, cssClass, applyStyleFunc, resetStyleFunc) {\n var func = value ? applyStyleFunc : resetStyleFunc;\n func(elements, cssClass);\n };\n\n /*******************************************************************************\n * ClassSwapper\n *\n * Has a hash of classes it cares about and will remove all those classes from\n * its container before setting the new class.\n * This component tends to be used as a grade by textFont and contrast\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.enactor.classSwapper\", {\n gradeNames: [\"fluid.prefs.enactor\", \"fluid.viewComponent\"],\n classes: {}, // Must be supplied by implementors\n invokers: {\n clearClasses: {\n funcName: \"fluid.prefs.enactor.classSwapper.clearClasses\",\n args: [\"{that}.container\", \"{that}.classStr\"]\n },\n swap: {\n funcName: \"fluid.prefs.enactor.classSwapper.swap\",\n args: [\"{arguments}.0\", \"{that}\", \"{that}.clearClasses\"]\n }\n },\n modelListeners: {\n value: {\n listener: \"{that}.swap\",\n args: [\"{change}.value\"]\n }\n },\n members: {\n classStr: {\n expander: {\n func: \"fluid.prefs.enactor.classSwapper.joinClassStr\",\n args: \"{that}.options.classes\"\n }\n }\n }\n });\n\n fluid.prefs.enactor.classSwapper.clearClasses = function (container, classStr) {\n container.removeClass(classStr);\n };\n\n fluid.prefs.enactor.classSwapper.swap = function (value, that, clearClassesFunc) {\n clearClassesFunc();\n that.container.addClass(that.options.classes[value]);\n };\n\n fluid.prefs.enactor.classSwapper.joinClassStr = function (classes) {\n var classStr = \"\";\n\n fluid.each(classes, function (oneClassName) {\n if (oneClassName) {\n classStr += classStr ? \" \" + oneClassName : oneClassName;\n }\n });\n return classStr;\n };\n\n /*******************************************************************************\n * emphasizeLinks\n *\n * The enactor to emphasize links in the container according to the value\n *******************************************************************************/\n\n // Note that the implementors need to provide the container for this view component\n fluid.defaults(\"fluid.prefs.enactor.emphasizeLinks\", {\n gradeNames: [\"fluid.prefs.enactor.styleElements\", \"fluid.viewComponent\"],\n preferenceMap: {\n \"fluid.prefs.emphasizeLinks\": {\n \"model.value\": \"default\"\n }\n },\n cssClass: null, // Must be supplied by implementors\n elementsToStyle: \"{that}.container\"\n });\n\n /*******************************************************************************\n * inputsLarger\n *\n * The enactor to enlarge inputs in the container according to the value\n *******************************************************************************/\n\n // Note that the implementors need to provide the container for this view component\n fluid.defaults(\"fluid.prefs.enactor.inputsLarger\", {\n gradeNames: [\"fluid.prefs.enactor.styleElements\", \"fluid.viewComponent\"],\n preferenceMap: {\n \"fluid.prefs.inputsLarger\": {\n \"model.value\": \"default\"\n }\n },\n cssClass: null, // Must be supplied by implementors\n elementsToStyle: \"{that}.container\"\n });\n\n /*******************************************************************************\n * textFont\n *\n * The enactor to change the font face used according to the value\n *******************************************************************************/\n // Note that the implementors need to provide the container for this view component\n fluid.defaults(\"fluid.prefs.enactor.textFont\", {\n gradeNames: [\"fluid.prefs.enactor.classSwapper\"],\n preferenceMap: {\n \"fluid.prefs.textFont\": {\n \"model.value\": \"default\"\n }\n }\n });\n\n /*******************************************************************************\n * contrast\n *\n * The enactor to change the contrast theme according to the value\n *******************************************************************************/\n // Note that the implementors need to provide the container for this view component\n fluid.defaults(\"fluid.prefs.enactor.contrast\", {\n gradeNames: [\"fluid.prefs.enactor.classSwapper\"],\n preferenceMap: {\n \"fluid.prefs.contrast\": {\n \"model.value\": \"default\"\n }\n }\n });\n\n\n\n /*******************************************************************************\n * Functions shared by textSize and lineSpace\n *******************************************************************************/\n\n /**\n * return \"font-size\" in px\n * @param (Object) container\n * @param (Object) fontSizeMap: the mapping between the font size string values (\"small\", \"medium\" etc) to px values\n */\n fluid.prefs.enactor.getTextSizeInPx = function (container, fontSizeMap) {\n var fontSize = container.css(\"font-size\");\n\n if (fontSizeMap[fontSize]) {\n fontSize = fontSizeMap[fontSize];\n }\n\n // return fontSize in px\n return parseFloat(fontSize);\n };\n\n /*******************************************************************************\n * textSize\n *\n * Sets the text size on the root element to the multiple provided.\n *******************************************************************************/\n\n // Note that the implementors need to provide the container for this view component\n fluid.defaults(\"fluid.prefs.enactor.textSize\", {\n gradeNames: [\"fluid.prefs.enactor\", \"fluid.viewComponent\"],\n preferenceMap: {\n \"fluid.prefs.textSize\": {\n \"model.value\": \"default\"\n }\n },\n members: {\n root: {\n expander: {\n \"this\": \"{that}.container\",\n \"method\": \"closest\", // ensure that the correct document is being used. i.e. in an iframe\n \"args\": [\"html\"]\n }\n }\n },\n fontSizeMap: {}, // must be supplied by implementors\n invokers: {\n set: {\n funcName: \"fluid.prefs.enactor.textSize.set\",\n args: [\"{arguments}.0\", \"{that}\", \"{that}.getTextSizeInPx\"]\n },\n getTextSizeInPx: {\n funcName: \"fluid.prefs.enactor.getTextSizeInPx\",\n args: [\"{that}.root\", \"{that}.options.fontSizeMap\"]\n }\n },\n modelListeners: {\n value: {\n listener: \"{that}.set\",\n args: [\"{change}.value\"]\n }\n }\n });\n\n fluid.prefs.enactor.textSize.set = function (times, that, getTextSizeInPxFunc) {\n times = times || 1;\n // Calculating the initial size here rather than using a members expand because the \"font-size\"\n // cannot be detected on hidden containers such as separated paenl iframe.\n if (!that.initialSize) {\n that.initialSize = getTextSizeInPxFunc();\n }\n\n if (that.initialSize) {\n var targetSize = times * that.initialSize;\n that.root.css(\"font-size\", targetSize + \"px\");\n }\n };\n\n /*******************************************************************************\n * lineSpace\n *\n * Sets the line space on the container to the multiple provided.\n *******************************************************************************/\n\n // Note that the implementors need to provide the container for this view component\n fluid.defaults(\"fluid.prefs.enactor.lineSpace\", {\n gradeNames: [\"fluid.prefs.enactor\", \"fluid.viewComponent\"],\n preferenceMap: {\n \"fluid.prefs.lineSpace\": {\n \"model.value\": \"default\"\n }\n },\n fontSizeMap: {}, // must be supplied by implementors\n invokers: {\n set: {\n funcName: \"fluid.prefs.enactor.lineSpace.set\",\n args: [\"{arguments}.0\", \"{that}\", \"{that}.getLineHeightMultiplier\"]\n },\n getTextSizeInPx: {\n funcName: \"fluid.prefs.enactor.getTextSizeInPx\",\n args: [\"{that}.container\", \"{that}.options.fontSizeMap\"]\n },\n getLineHeight: {\n funcName: \"fluid.prefs.enactor.lineSpace.getLineHeight\",\n args: \"{that}.container\"\n },\n getLineHeightMultiplier: {\n funcName: \"fluid.prefs.enactor.lineSpace.getLineHeightMultiplier\",\n args: [{expander: {func: \"{that}.getLineHeight\"}}, {expander: {func: \"{that}.getTextSizeInPx\"}}]\n }\n },\n modelListeners: {\n value: {\n listener: \"{that}.set\",\n args: [\"{change}.value\"]\n }\n }\n });\n\n // Get the line-height of an element\n // In IE8 and IE9 this will return the line-height multiplier\n // In other browsers it will return the pixel value of the line height.\n fluid.prefs.enactor.lineSpace.getLineHeight = function (container) {\n return container.css(\"line-height\");\n };\n\n // Interprets browser returned \"line-height\" value, either a string \"normal\", a number with \"px\" suffix or \"undefined\"\n // into a numeric value in em.\n // Return 0 when the given \"lineHeight\" argument is \"undefined\" (http://issues.fluidproject.org/browse/FLUID-4500).\n fluid.prefs.enactor.lineSpace.getLineHeightMultiplier = function (lineHeight, fontSize) {\n // Handle the given \"lineHeight\" argument is \"undefined\", which occurs when firefox detects\n // \"line-height\" css value on a hidden container. (http://issues.fluidproject.org/browse/FLUID-4500)\n if (!lineHeight) {\n return 0;\n }\n\n // Needs a better solution. For now, \"line-height\" value \"normal\" is defaulted to 1.2em\n // according to https://developer.mozilla.org/en/CSS/line-height\n if (lineHeight === \"normal\") {\n return 1.2;\n }\n\n // Continuing the work-around of jQuery + IE bug - http://bugs.jquery.com/ticket/2671\n if (lineHeight.match(/[0-9]$/)) {\n return Number(lineHeight);\n }\n\n return Math.round(parseFloat(lineHeight) / fontSize * 100) / 100;\n };\n\n fluid.prefs.enactor.lineSpace.set = function (times, that, getLineHeightMultiplierFunc) {\n // Calculating the initial size here rather than using a members expand because the \"line-height\"\n // cannot be detected on hidden containers such as separated paenl iframe.\n if (!that.initialSize) {\n that.initialSize = getLineHeightMultiplierFunc();\n }\n\n // that.initialSize === 0 when the browser returned \"lineHeight\" css value is undefined,\n // which occurs when firefox detects \"line-height\" value on a hidden container.\n // @ See getLineHeightMultiplier() & http://issues.fluidproject.org/browse/FLUID-4500\n if (that.initialSize) {\n var targetLineSpace = times * that.initialSize;\n that.container.css(\"line-height\", targetLineSpace);\n }\n };\n\n /*******************************************************************************\n * tableOfContents\n *\n * To create and show/hide table of contents\n *******************************************************************************/\n\n // Note that the implementors need to provide the container for this view component\n fluid.defaults(\"fluid.prefs.enactor.tableOfContents\", {\n gradeNames: [\"fluid.prefs.enactor\", \"fluid.viewComponent\"],\n preferenceMap: {\n \"fluid.prefs.tableOfContents\": {\n \"model.toc\": \"default\"\n }\n },\n tocTemplate: null, // must be supplied by implementors\n components: {\n tableOfContents: {\n type: \"fluid.tableOfContents\",\n container: \"{fluid.prefs.enactor.tableOfContents}.container\",\n createOnEvent: \"onCreateTOCReady\",\n options: {\n components: {\n levels: {\n type: \"fluid.tableOfContents.levels\",\n options: {\n resources: {\n template: {\n forceCache: true,\n url: \"{fluid.prefs.enactor.tableOfContents}.options.tocTemplate\"\n }\n }\n }\n }\n },\n listeners: {\n \"afterRender.boilAfterTocRender\": \"{fluid.prefs.enactor.tableOfContents}.events.afterTocRender\"\n }\n }\n }\n },\n invokers: {\n applyToc: {\n funcName: \"fluid.prefs.enactor.tableOfContents.applyToc\",\n args: [\"{arguments}.0\", \"{that}\"]\n }\n },\n events: {\n onCreateTOCReady: null,\n afterTocRender: null,\n onLateRefreshRelay: null\n },\n modelListeners: {\n toc: {\n listener: \"{that}.applyToc\",\n args: [\"{change}.value\"]\n }\n },\n distributeOptions: {\n source: \"{that}.options.ignoreForToC\",\n target: \"{that tableOfContents}.options.ignoreForToC\"\n }\n });\n\n fluid.prefs.enactor.tableOfContents.applyToc = function (value, that) {\n if (value) {\n if (that.tableOfContents) {\n that.tableOfContents.show();\n } else {\n that.events.onCreateTOCReady.fire();\n }\n } else if (that.tableOfContents) {\n that.tableOfContents.hide();\n }\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013-2015 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /*******************************************************************************\n * speak\n *\n * An enactor that is capable of speaking text.\n * Typically this will be used as a base grade to an enactor that supplies\n * the text to be spoken.\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.enactor.speak\", {\n gradeNames: \"fluid.prefs.enactor\",\n preferenceMap: {\n \"fluid.prefs.speak\": {\n \"model.enabled\": \"default\"\n }\n },\n components: {\n tts: {\n type: \"fluid.textToSpeech\",\n options: {\n model: \"{speak}.model\",\n invokers: {\n queueSpeech: {\n funcName: \"fluid.prefs.enactor.speak.queueSpeech\",\n args: [\"{that}\", \"fluid.textToSpeech.queueSpeech\", \"{arguments}.0\", \"{arguments}.1\", \"{arguments}.2\"]\n }\n }\n }\n }\n }\n });\n\n // Accepts a speechFn (either a function or function name), which will be used to perform the\n // underlying queuing of the speech. This allows the SpeechSynthesis to be replaced (e.g. for testing)\n fluid.prefs.enactor.speak.queueSpeech = function (that, speechFn, text, interrupt, options) {\n // force a string value\n var str = text.toString();\n\n // remove extra whitespace\n str = str.trim();\n str.replace(/\\s{2,}/gi, \" \");\n\n if (that.model.enabled && str) {\n if (typeof(speechFn) === \"string\") {\n fluid.invokeGlobalFunction(speechFn, [that, str, interrupt, options]);\n } else {\n speechFn(that, str, interrupt, options);\n }\n }\n };\n\n /*******************************************************************************\n * selfVoicing\n *\n * The enactor that enables self voicing of an entire page\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.enactor.selfVoicing\", {\n gradeNames: [\"fluid.prefs.enactor.speak\", \"fluid.viewComponent\"],\n modelListeners: {\n \"enabled\": {\n listener: \"{that}.handleSelfVoicing\",\n args: [\"{change}.value\"]\n }\n },\n invokers: {\n handleSelfVoicing: {\n funcName: \"fluid.prefs.enactor.selfVoicing.handleSelfVoicing\",\n // Pass in invokers to force them to be resolved\n args: [\"{that}.options.strings.welcomeMsg\", \"{tts}.queueSpeech\", \"{that}.readFromDOM\", \"{tts}.cancel\", \"{arguments}.0\"]\n },\n readFromDOM: {\n funcName: \"fluid.prefs.enactor.selfVoicing.readFromDOM\",\n args: [\"{that}\", \"{that}.container\"]\n }\n },\n strings: {\n welcomeMsg: \"text to speech enabled\"\n }\n });\n\n fluid.prefs.enactor.selfVoicing.handleSelfVoicing = function (welcomeMsg, queueSpeech, readFromDOM, cancel, enabled) {\n if (enabled) {\n queueSpeech(welcomeMsg, true);\n readFromDOM();\n } else {\n cancel();\n }\n };\n\n // Constants representing DOM node types.\n fluid.prefs.enactor.selfVoicing.nodeType = {\n ELEMENT_NODE: 1,\n TEXT_NODE: 3\n };\n\n // TODO: Currently only reads text nodes and alt text.\n // This should be expanded to read other text descriptors as well.\n fluid.prefs.enactor.selfVoicing.readFromDOM = function (that, elm) {\n elm = $(elm);\n var nodes = elm.contents();\n fluid.each(nodes, function (node) {\n if (node.nodeType === fluid.prefs.enactor.selfVoicing.nodeType.TEXT_NODE && node.nodeValue) {\n that.tts.queueSpeech(node.nodeValue);\n }\n\n if (node.nodeType === fluid.prefs.enactor.selfVoicing.nodeType.ELEMENT_NODE && window.getComputedStyle(node).display !== \"none\") {\n if (node.nodeName === \"IMG\") {\n var altText = node.getAttribute(\"alt\");\n if (altText) {\n that.tts.queueSpeech(altText);\n }\n } else {\n fluid.prefs.enactor.selfVoicing.readFromDOM(that, node);\n }\n }\n });\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013-2016 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /*******************************************************************************\n * Starter prefsEditor Model\n *\n * Provides the default values for the starter prefsEditor model\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.initialModel.starter\", {\n gradeNames: [\"fluid.prefs.initialModel\"],\n members: {\n // TODO: This information is supposed to be generated from the JSON\n // schema describing various preferences. For now it's kept in top\n // level prefsEditor to avoid further duplication.\n initialModel: {\n preferences: {\n textFont: \"default\", // key from classname map\n theme: \"default\", // key from classname map\n textSize: 1, // in points\n lineSpace: 1, // in ems\n toc: false, // boolean\n links: false, // boolean\n inputsLarger: false // boolean\n }\n }\n }\n });\n\n /*******************************************************************************\n * CSSClassEnhancerBase\n *\n * Provides the map between the settings and css classes to be applied.\n * Used as a UIEnhancer base grade that can be pulled in as requestd.\n *******************************************************************************/\n\n fluid.defaults(\"fluid.uiEnhancer.cssClassEnhancerBase\", {\n gradeNames: [\"fluid.component\"],\n classnameMap: {\n \"textFont\": {\n \"default\": \"\",\n \"times\": \"fl-font-times\",\n \"comic\": \"fl-font-comic-sans\",\n \"arial\": \"fl-font-arial\",\n \"verdana\": \"fl-font-verdana\"\n },\n \"theme\": {\n \"default\": \"fl-theme-prefsEditor-default\",\n \"bw\": \"fl-theme-bw\",\n \"wb\": \"fl-theme-wb\",\n \"by\": \"fl-theme-by\",\n \"yb\": \"fl-theme-yb\",\n \"lgdg\": \"fl-theme-lgdg\"\n },\n \"links\": \"fl-link-enhanced\",\n \"inputsLarger\": \"fl-text-larger\"\n }\n });\n\n /*******************************************************************************\n * BrowserTextEnhancerBase\n *\n * Provides the default font size translation between the strings and actual pixels.\n * Used as a UIEnhancer base grade that can be pulled in as requestd.\n *******************************************************************************/\n\n fluid.defaults(\"fluid.uiEnhancer.browserTextEnhancerBase\", {\n gradeNames: [\"fluid.component\"],\n fontSizeMap: {\n \"xx-small\": \"9px\",\n \"x-small\": \"11px\",\n \"small\": \"13px\",\n \"medium\": \"15px\",\n \"large\": \"18px\",\n \"x-large\": \"23px\",\n \"xx-large\": \"30px\"\n }\n });\n\n /*******************************************************************************\n * UI Enhancer Starter Enactors\n *\n * A grade component for UIEnhancer. It is a collection of default UI Enhancer\n * action ants.\n *******************************************************************************/\n\n fluid.defaults(\"fluid.uiEnhancer.starterEnactors\", {\n gradeNames: [\"fluid.uiEnhancer\", \"fluid.uiEnhancer.cssClassEnhancerBase\", \"fluid.uiEnhancer.browserTextEnhancerBase\"],\n model: \"{fluid.prefs.initialModel}.initialModel.preferences\",\n components: {\n textSize: {\n type: \"fluid.prefs.enactor.textSize\",\n container: \"{uiEnhancer}.container\",\n options: {\n fontSizeMap: \"{uiEnhancer}.options.fontSizeMap\",\n model: {\n value: \"{uiEnhancer}.model.textSize\"\n }\n }\n },\n textFont: {\n type: \"fluid.prefs.enactor.textFont\",\n container: \"{uiEnhancer}.container\",\n options: {\n classes: \"{uiEnhancer}.options.classnameMap.textFont\",\n model: {\n value: \"{uiEnhancer}.model.textFont\"\n }\n }\n },\n lineSpace: {\n type: \"fluid.prefs.enactor.lineSpace\",\n container: \"{uiEnhancer}.container\",\n options: {\n fontSizeMap: \"{uiEnhancer}.options.fontSizeMap\",\n model: {\n value: \"{uiEnhancer}.model.lineSpace\"\n }\n }\n },\n contrast: {\n type: \"fluid.prefs.enactor.contrast\",\n container: \"{uiEnhancer}.container\",\n options: {\n classes: \"{uiEnhancer}.options.classnameMap.theme\",\n model: {\n value: \"{uiEnhancer}.model.theme\"\n }\n }\n },\n emphasizeLinks: {\n type: \"fluid.prefs.enactor.emphasizeLinks\",\n container: \"{uiEnhancer}.container\",\n options: {\n cssClass: \"{uiEnhancer}.options.classnameMap.links\",\n model: {\n value: \"{uiEnhancer}.model.links\"\n }\n }\n },\n inputsLarger: {\n type: \"fluid.prefs.enactor.inputsLarger\",\n container: \"{uiEnhancer}.container\",\n options: {\n cssClass: \"{uiEnhancer}.options.classnameMap.inputsLarger\",\n model: {\n value: \"{uiEnhancer}.model.inputsLarger\"\n }\n }\n },\n tableOfContents: {\n type: \"fluid.prefs.enactor.tableOfContents\",\n container: \"{uiEnhancer}.container\",\n options: {\n tocTemplate: \"{uiEnhancer}.options.tocTemplate\",\n model: {\n toc: \"{uiEnhancer}.model.toc\"\n }\n }\n }\n }\n });\n\n /*********************************************************************************************************\n * Starter Settings Panels\n *\n * A collection of all the default Preferences Editorsetting panels.\n *********************************************************************************************************/\n fluid.defaults(\"fluid.prefs.starterPanels\", {\n gradeNames: [\"fluid.prefs.prefsEditor\"],\n selectors: {\n textSize: \".flc-prefsEditor-text-size\",\n textFont: \".flc-prefsEditor-text-font\",\n lineSpace: \".flc-prefsEditor-line-space\",\n contrast: \".flc-prefsEditor-contrast\",\n textControls: \".flc-prefsEditor-text-controls\",\n layoutControls: \".flc-prefsEditor-layout-controls\",\n linksControls: \".flc-prefsEditor-links-controls\"\n },\n components: {\n textSize: {\n type: \"fluid.prefs.panel.textSize\",\n container: \"{prefsEditor}.dom.textSize\",\n createOnEvent: \"onPrefsEditorMarkupReady\",\n options: {\n gradeNames: \"fluid.prefs.prefsEditorConnections\",\n model: {\n textSize: \"{prefsEditor}.model.preferences.textSize\"\n },\n messageBase: \"{messageLoader}.resources.textSize.resourceText\",\n resources: {\n template: \"{templateLoader}.resources.textSize\"\n }\n }\n },\n lineSpace: {\n type: \"fluid.prefs.panel.lineSpace\",\n container: \"{prefsEditor}.dom.lineSpace\",\n createOnEvent: \"onPrefsEditorMarkupReady\",\n options: {\n gradeNames: \"fluid.prefs.prefsEditorConnections\",\n model: {\n lineSpace: \"{prefsEditor}.model.preferences.lineSpace\"\n },\n messageBase: \"{messageLoader}.resources.lineSpace.resourceText\",\n resources: {\n template: \"{templateLoader}.resources.lineSpace\"\n }\n }\n },\n textFont: {\n type: \"fluid.prefs.panel.textFont\",\n container: \"{prefsEditor}.dom.textFont\",\n createOnEvent: \"onPrefsEditorMarkupReady\",\n options: {\n gradeNames: \"fluid.prefs.prefsEditorConnections\",\n classnameMap: \"{uiEnhancer}.options.classnameMap\",\n model: {\n value: \"{prefsEditor}.model.preferences.textFont\"\n },\n messageBase: \"{messageLoader}.resources.textFont.resourceText\",\n resources: {\n template: \"{templateLoader}.resources.textFont\"\n }\n }\n },\n contrast: {\n type: \"fluid.prefs.panel.contrast\",\n container: \"{prefsEditor}.dom.contrast\",\n createOnEvent: \"onPrefsEditorMarkupReady\",\n options: {\n gradeNames: \"fluid.prefs.prefsEditorConnections\",\n classnameMap: \"{uiEnhancer}.options.classnameMap\",\n model: {\n value: \"{prefsEditor}.model.preferences.theme\"\n },\n messageBase: \"{messageLoader}.resources.contrast.resourceText\",\n resources: {\n template: \"{templateLoader}.resources.contrast\"\n }\n }\n },\n layoutControls: {\n type: \"fluid.prefs.panel.layoutControls\",\n container: \"{prefsEditor}.dom.layoutControls\",\n createOnEvent: \"onPrefsEditorMarkupReady\",\n options: {\n gradeNames: \"fluid.prefs.prefsEditorConnections\",\n model: {\n toc: \"{prefsEditor}.model.preferences.toc\"\n },\n messageBase: \"{messageLoader}.resources.layoutControls.resourceText\",\n resources: {\n template: \"{templateLoader}.resources.layoutControls\"\n }\n }\n },\n linksControls: {\n type: \"fluid.prefs.panel.linksControls\",\n container: \"{prefsEditor}.dom.linksControls\",\n createOnEvent: \"onPrefsEditorMarkupReady\",\n options: {\n gradeNames: \"fluid.prefs.prefsEditorConnections\",\n selectors: {\n emphasizeLinks: \".flc-prefsEditor-emphasizeLinks\",\n inputsLarger: \".flc-prefsEditor-inputsLarger\"\n },\n selectorsToIgnore: [\"emphasizeLinks\", \"inputsLarger\"],\n model: {\n fluid_prefs_emphasizeLinks: \"{prefsEditor}.model.preferences.links\",\n fluid_prefs_inputsLarger: \"{prefsEditor}.model.preferences.inputsLarger\"\n },\n components: {\n emphasizeLinks: {\n type: \"fluid.prefs.panel.emphasizeLinks\",\n container: \"{that}.dom.emphasizeLinks\",\n createOnEvent: \"initSubPanels\",\n options: {\n messageBase: \"{messageLoader}.resources.emphasizeLinks.resourceText\"\n }\n },\n inputsLarger: {\n type: \"fluid.prefs.panel.inputsLarger\",\n container: \"{that}.dom.inputsLarger\",\n createOnEvent: \"initSubPanels\",\n options: {\n messageBase: \"{messageLoader}.resources.inputsLarger.resourceText\"\n }\n }\n },\n messageBase: \"{messageLoader}.resources.linksControls.resourceText\",\n resources: {\n template: \"{templateLoader}.resources.linksControls\",\n emphasizeLinks: \"{templateLoader}.resources.emphasizeLinks\",\n inputsLarger: \"{templateLoader}.resources.inputsLarger\"\n }\n }\n }\n }\n });\n\n /******************************\n * Starter Template Loader\n ******************************/\n\n /**\n * A template loader component that expands the resources blocks for loading resources used by starterPanels\n *\n * @param {Object} options\n */\n\n fluid.defaults(\"fluid.prefs.starterTemplateLoader\", {\n gradeNames: [\"fluid.resourceLoader\", \"fluid.contextAware\"],\n resources: {\n textFont: \"%templatePrefix/PrefsEditorTemplate-textFont.html\",\n contrast: \"%templatePrefix/PrefsEditorTemplate-contrast.html\",\n layoutControls: \"%templatePrefix/PrefsEditorTemplate-layout.html\",\n linksControls: \"%templatePrefix/PrefsEditorTemplate-linksControls.html\",\n emphasizeLinks: \"%templatePrefix/PrefsEditorTemplate-emphasizeLinks.html\",\n inputsLarger: \"%templatePrefix/PrefsEditorTemplate-inputsLarger.html\"\n },\n contextAwareness: {\n startTemplateLoaderPrefsWidgetType: {\n checks: {\n jQueryUI: {\n contextValue: \"{fluid.prefsWidgetType}\",\n equals: \"jQueryUI\",\n gradeNames: \"fluid.prefs.starterTemplateLoader.jQuery\"\n }\n },\n defaultGradeNames: \"fluid.prefs.starterTemplateLoader.native\"\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.starterTemplateLoader.native\", {\n resources: {\n textSize: \"%templatePrefix/PrefsEditorTemplate-textSize-nativeHTML.html\",\n lineSpace: \"%templatePrefix/PrefsEditorTemplate-lineSpace-nativeHTML.html\"\n }\n });\n\n fluid.defaults(\"fluid.prefs.starterTemplateLoader.jQuery\", {\n resources: {\n textSize: \"%templatePrefix/PrefsEditorTemplate-textSize-jQueryUI.html\",\n lineSpace: \"%templatePrefix/PrefsEditorTemplate-lineSpace-jQueryUI.html\"\n }\n });\n\n fluid.defaults(\"fluid.prefs.starterSeparatedPanelTemplateLoader\", {\n gradeNames: [\"fluid.prefs.starterTemplateLoader\"],\n resources: {\n prefsEditor: \"%templatePrefix/SeparatedPanelPrefsEditor.html\"\n }\n });\n\n fluid.defaults(\"fluid.prefs.starterFullPreviewTemplateLoader\", {\n gradeNames: [\"fluid.prefs.starterTemplateLoader\"],\n resources: {\n prefsEditor: \"%templatePrefix/FullPreviewPrefsEditor.html\"\n }\n });\n\n fluid.defaults(\"fluid.prefs.starterFullNoPreviewTemplateLoader\", {\n gradeNames: [\"fluid.prefs.starterTemplateLoader\"],\n resources: {\n prefsEditor: \"%templatePrefix/FullNoPreviewPrefsEditor.html\"\n }\n });\n\n /******************************\n * Starter Message Loader\n ******************************/\n\n /**\n * A message loader component that expands the resources blocks for loading messages for starter panels\n *\n * @param {Object} options\n */\n\n fluid.defaults(\"fluid.prefs.starterMessageLoader\", {\n gradeNames: [\"fluid.resourceLoader\"],\n resources: {\n prefsEditor: \"%messagePrefix/prefsEditor.json\",\n textSize: \"%messagePrefix/textSize.json\",\n textFont: \"%messagePrefix/textFont.json\",\n lineSpace: \"%messagePrefix/lineSpace.json\",\n contrast: \"%messagePrefix/contrast.json\",\n layoutControls: \"%messagePrefix/tableOfContents.json\",\n linksControls: \"%messagePrefix/linksControls.json\",\n emphasizeLinks: \"%messagePrefix/emphasizeLinks.json\",\n inputsLarger: \"%messagePrefix/inputsLarger.json\"\n }\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2011-2016 OCAD University\nCopyright 2011 Lucendo Development Ltd.\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.dom\");\n\n fluid.dom.getDocumentHeight = function (dokkument) {\n var body = $(\"body\", dokkument)[0];\n return body.offsetHeight;\n };\n\n /*******************************************************\n * Separated Panel Preferences Editor Top Level Driver *\n *******************************************************/\n\n fluid.defaults(\"fluid.prefs.separatedPanel\", {\n gradeNames: [\"fluid.prefs.prefsEditorLoader\", \"fluid.contextAware\"],\n events: {\n afterRender: null,\n onReady: null,\n onCreateSlidingPanelReady: {\n events: {\n iframeRendered: \"afterRender\",\n onPrefsEditorMessagesLoaded: \"onPrefsEditorMessagesLoaded\"\n }\n },\n templatesAndIframeReady: {\n events: {\n iframeReady: \"afterRender\",\n templatesLoaded: \"onPrefsEditorTemplatesLoaded\",\n messagesLoaded: \"onPrefsEditorMessagesLoaded\"\n }\n }\n },\n lazyLoad: false,\n contextAwareness: {\n lazyLoad: {\n checks: {\n lazyLoad: {\n contextValue: \"{fluid.prefs.separatedPanel}.options.lazyLoad\",\n gradeNames: \"fluid.prefs.separatedPanel.lazyLoad\"\n }\n }\n },\n separatedPanelPrefsWidgetType: {\n checks: {\n jQueryUI: {\n contextValue: \"{fluid.prefsWidgetType}\",\n equals: \"jQueryUI\",\n gradeNames: \"fluid.prefs.separatedPanel.jQueryUI\"\n }\n },\n defaultGradeNames: \"fluid.prefs.separatedPanel.nativeHTML\"\n }\n },\n selectors: {\n reset: \".flc-prefsEditor-reset\",\n iframe: \".flc-prefsEditor-iframe\"\n },\n listeners: {\n \"onReady.bindEvents\": {\n listener: \"fluid.prefs.separatedPanel.bindEvents\",\n args: [\"{separatedPanel}.prefsEditor\", \"{iframeRenderer}.iframeEnhancer\", \"{separatedPanel}\"]\n },\n \"onCreate.hideReset\": {\n listener: \"fluid.prefs.separatedPanel.hideReset\",\n args: [\"{separatedPanel}\"]\n }\n },\n invokers: {\n bindReset: {\n funcName: \"fluid.bind\",\n args: [\"{separatedPanel}.dom.reset\", \"click\", \"{arguments}.0\"]\n }\n },\n components: {\n slidingPanel: {\n type: \"fluid.slidingPanel\",\n container: \"{separatedPanel}.container\",\n createOnEvent: \"onCreateSlidingPanelReady\",\n options: {\n gradeNames: [\"fluid.prefs.msgLookup\"],\n strings: {\n showText: \"{that}.msgLookup.slidingPanelShowText\",\n hideText: \"{that}.msgLookup.slidingPanelHideText\",\n showTextAriaLabel: \"{that}.msgLookup.showTextAriaLabel\",\n hideTextAriaLabel: \"{that}.msgLookup.hideTextAriaLabel\",\n panelLabel: \"{that}.msgLookup.slidingPanelPanelLabel\"\n },\n invokers: {\n operateShow: {\n funcName: \"fluid.prefs.separatedPanel.showPanel\",\n args: [\"{that}.dom.panel\", \"{that}.events.afterPanelShow.fire\"],\n // override default implementation\n \"this\": null,\n \"method\": null\n },\n operateHide: {\n funcName: \"fluid.prefs.separatedPanel.hidePanel\",\n args: [\"{that}.dom.panel\", \"{iframeRenderer}.iframe\", \"{that}.events.afterPanelHide.fire\"],\n // override default implementation\n \"this\": null,\n \"method\": null\n }\n },\n components: {\n msgResolver: {\n type: \"fluid.messageResolver\",\n options: {\n messageBase: \"{messageLoader}.resources.prefsEditor.resourceText\"\n }\n }\n }\n }\n },\n iframeRenderer: {\n type: \"fluid.prefs.separatedPanel.renderIframe\",\n container: \"{separatedPanel}.dom.iframe\",\n options: {\n events: {\n afterRender: \"{separatedPanel}.events.afterRender\"\n },\n components: {\n iframeEnhancer: {\n type: \"fluid.uiEnhancer\",\n container: \"{iframeRenderer}.renderPrefsEditorContainer\",\n createOnEvent: \"afterRender\",\n options: {\n gradeNames: [\"{pageEnhancer}.uiEnhancer.options.userGrades\"],\n jQuery: \"{iframeRenderer}.jQuery\",\n tocTemplate: \"{pageEnhancer}.uiEnhancer.options.tocTemplate\"\n }\n }\n }\n }\n },\n prefsEditor: {\n createOnEvent: \"templatesAndIframeReady\",\n container: \"{iframeRenderer}.renderPrefsEditorContainer\",\n options: {\n gradeNames: [\"fluid.prefs.uiEnhancerRelay\"],\n // ensure that model and applier are available to users at top level\n model: \"{separatedPanel}.model\",\n events: {\n onSignificantDOMChange: null,\n updateEnhancerModel: \"{that}.events.modelChanged\"\n },\n listeners: {\n \"modelChanged.save\": \"{that}.save\",\n \"onCreate.bindReset\": {\n listener: \"{separatedPanel}.bindReset\",\n args: [\"{that}.reset\"]\n },\n \"afterReset.applyChanges\": \"{that}.applyChanges\",\n \"onReady.boilOnReady\": {\n listener: \"{separatedPanel}.events.onReady\",\n args: \"{separatedPanel}\"\n }\n }\n }\n }\n },\n outerEnhancerOptions: \"{originalEnhancerOptions}.options.originalUserOptions\",\n distributeOptions: [{\n source: \"{that}.options.slidingPanel\",\n removeSource: true,\n target: \"{that > slidingPanel}.options\"\n }, {\n source: \"{that}.options.iframeRenderer\",\n removeSource: true,\n target: \"{that > iframeRenderer}.options\"\n }, {\n source: \"{that}.options.iframe\",\n removeSource: true,\n target: \"{that}.options.selectors.iframe\"\n }, {\n source: \"{that}.options.outerEnhancerOptions\",\n removeSource: true,\n target: \"{that iframeEnhancer}.options\"\n }, {\n source: \"{that}.options.terms\",\n target: \"{that > iframeRenderer}.options.terms\"\n }]\n });\n\n // Used for context-awareness behaviour\n fluid.defaults(\"fluid.prefs.separatedPanel.nativeHTML\", {\n components: {\n iframeRenderer: {\n options: {\n markupProps: {\n src: \"%templatePrefix/SeparatedPanelPrefsEditorFrame-nativeHTML.html\"\n }\n }\n }\n }\n });\n\n // Used for context-awareness behaviour\n fluid.defaults(\"fluid.prefs.separatedPanel.jQueryUI\", {\n components: {\n iframeRenderer: {\n options: {\n markupProps: {\n src: \"%templatePrefix/SeparatedPanelPrefsEditorFrame-jQueryUI.html\"\n }\n }\n }\n }\n });\n\n fluid.prefs.separatedPanel.hideReset = function (separatedPanel) {\n separatedPanel.locate(\"reset\").hide();\n };\n /*****************************************\n * fluid.prefs.separatedPanel.renderIframe *\n *****************************************/\n\n fluid.defaults(\"fluid.prefs.separatedPanel.renderIframe\", {\n gradeNames: [\"fluid.viewComponent\"],\n events: {\n afterRender: null\n },\n styles: {\n container: \"fl-prefsEditor-separatedPanel-iframe\"\n },\n terms: {\n templatePrefix: \".\"\n },\n markupProps: {\n \"class\": \"flc-iframe\",\n src: \"%templatePrefix/prefsEditorIframe.html\"\n },\n listeners: {\n \"onCreate.startLoadingIframe\": \"fluid.prefs.separatedPanel.renderIframe.startLoadingIframe\"\n }\n });\n\n fluid.prefs.separatedPanel.renderIframe.startLoadingIframe = function (that) {\n var styles = that.options.styles;\n // TODO: get earlier access to templateLoader,\n that.options.markupProps.src = fluid.stringTemplate(that.options.markupProps.src, that.options.terms);\n that.iframeSrc = that.options.markupProps.src;\n\n // Create iframe and append to container\n that.iframe = $(\"<iframe/>\");\n that.iframe.on(\"load\", function () {\n var iframeWindow = that.iframe[0].contentWindow;\n that.iframeDocument = iframeWindow.document;\n // The iframe should prefer its own version of jQuery if a separate\n // one is loaded\n that.jQuery = iframeWindow.jQuery || $;\n\n that.renderPrefsEditorContainer = that.jQuery(\"body\", that.iframeDocument);\n that.jQuery(that.iframeDocument).ready(that.events.afterRender.fire);\n });\n that.iframe.attr(that.options.markupProps);\n\n that.iframe.addClass(styles.container);\n that.iframe.hide();\n\n that.iframe.appendTo(that.container);\n };\n\n fluid.prefs.separatedPanel.updateView = function (prefsEditor) {\n prefsEditor.events.onPrefsEditorRefresh.fire();\n prefsEditor.events.onSignificantDOMChange.fire();\n };\n\n\n fluid.prefs.separatedPanel.bindEvents = function (prefsEditor, iframeEnhancer, separatedPanel) {\n // FLUID-5740: This binding should be done declaratively - needs ginger world in order to bind onto slidingPanel\n // which is a child of this component\n\n var separatedPanelId = separatedPanel.slidingPanel.panelId;\n separatedPanel.locate(\"reset\").attr({\n \"aria-controls\": separatedPanelId,\n \"role\": \"button\"\n });\n\n separatedPanel.slidingPanel.events.afterPanelShow.addListener(function () {\n fluid.prefs.separatedPanel.updateView(prefsEditor);\n }, \"updateView\", \"after:openPanel\");\n\n prefsEditor.events.onPrefsEditorRefresh.addListener(function () {\n iframeEnhancer.updateModel(prefsEditor.model.preferences);\n }, \"updateModel\");\n prefsEditor.events.afterReset.addListener(function (prefsEditor) {\n fluid.prefs.separatedPanel.updateView(prefsEditor);\n }, \"updateView\");\n prefsEditor.events.onSignificantDOMChange.addListener(function () {\n var dokkument = prefsEditor.container[0].ownerDocument;\n var height = fluid.dom.getDocumentHeight(dokkument);\n var iframe = separatedPanel.iframeRenderer.iframe;\n var attrs = {height: height + 15}; // TODO: Configurable padding here\n var panel = separatedPanel.slidingPanel.locate(\"panel\");\n panel.css({height: \"\"});\n iframe.animate(attrs, 400);\n }, \"adjustHeight\");\n\n separatedPanel.slidingPanel.events.afterPanelHide.addListener(function () {\n separatedPanel.iframeRenderer.iframe.height(0);\n\n // Prevent the hidden Preferences Editorpanel from being keyboard and screen reader accessible\n separatedPanel.iframeRenderer.iframe.hide();\n }, \"collapseFrame\");\n separatedPanel.slidingPanel.events.afterPanelShow.addListener(function () {\n separatedPanel.iframeRenderer.iframe.show();\n separatedPanel.locate(\"reset\").show();\n }, \"openPanel\");\n separatedPanel.slidingPanel.events.onPanelHide.addListener(function () {\n separatedPanel.locate(\"reset\").hide();\n }, \"hideReset\");\n };\n\n // Replace the standard animator since we don't want the panel to become hidden\n // (potential cause of jumping)\n fluid.prefs.separatedPanel.hidePanel = function (panel, iframe, callback) {\n iframe.clearQueue(); // FLUID-5334: clear the animation queue\n $(panel).animate({height: 0}, {duration: 400, complete: callback});\n };\n\n // no activity - the kickback to the updateView listener will automatically trigger the\n // DOMChangeListener above. This ordering is preferable to avoid causing the animation to\n // jump by refreshing the view inside the iframe\n fluid.prefs.separatedPanel.showPanel = function (panel, callback) {\n // A bizarre race condition has emerged under FF where the iframe held within the panel does not\n // react synchronously to being shown\n fluid.invokeLater(callback);\n };\n\n /**\n * FLUID-5926: Some of our users have asked for ways to improve the initial page load\n * performance when using the separated panel prefs editor / UI Options. One option,\n * provided here, is to implement a scheme for lazy loading the instantiation of the\n * prefs editor, only instantiating enough of the workflow to allow display the\n * sliding panel tab.\n *\n * fluid.prefs.separatedPanel.lazyLoad modifies the typical separatedPanel workflow\n * by delaying the instantiation and loading of resources for the prefs editor until\n * the first time it is opened.\n *\n * Lazy Load Workflow:\n *\n * - On instantiation of the prefsEditorLoader only the messageLoader and slidingPanel are instantiated\n * - On instantiation, the messageLoader only loads preLoadResources, these are the messages required by\n * the slidingPanel. The remaining message bundles will not be loaded until the \"onLazyLoad\" event is fired.\n * - After the preLoadResources have been loaded, the onPrefsEditorMessagesPreloaded event is fired, and triggers the\n * sliding panel to instantiate.\n * - When a user opens the separated panel prefs editor / UI Options, it checks to see if the prefs editor has been\n * instantiated. If it hasn't, a listener is temporarily bound to the onReady event, which gets fired\n * after the prefs editor is ready. This is used to continue the process of opening the sliding panel for the first time.\n * Additionally the onLazyLoad event is fired, which kicks off the remainder of the instantiation process.\n * - onLazyLoad triggers the templateLoader to fetch all of the templates and the messageLoader to fetch the remaining\n * message bundles. From here the standard instantiation workflow takes place.\n */\n fluid.defaults(\"fluid.prefs.separatedPanel.lazyLoad\", {\n events: {\n onLazyLoad: null,\n onPrefsEditorMessagesPreloaded: null,\n onCreateSlidingPanelReady: {\n events: {\n onPrefsEditorMessagesLoaded: \"onPrefsEditorMessagesPreloaded\"\n }\n },\n templatesAndIframeReady: {\n events: {\n onLazyLoad: \"onLazyLoad\"\n }\n }\n },\n components: {\n templateLoader: {\n createOnEvent: \"onLazyLoad\"\n },\n messageLoader: {\n options: {\n events: {\n onResourcesPreloaded: \"{separatedPanel}.events.onPrefsEditorMessagesPreloaded\"\n },\n preloadResources: \"prefsEditor\",\n listeners: {\n \"onCreate.loadResources\": {\n listener: \"fluid.prefs.separatedPanel.lazyLoad.preloadResources\",\n args: [\"{that}\", {expander: {func: \"{that}.resolveResources\"}}, \"{that}.options.preloadResources\"]\n },\n \"{separatedPanel}.events.onLazyLoad\": {\n listener: \"fluid.resourceLoader.loadResources\",\n args: [\"{messageLoader}\", {expander: {func: \"{messageLoader}.resolveResources\"}}]\n }\n }\n }\n },\n slidingPanel: {\n options: {\n invokers: {\n operateShow: {\n funcName: \"fluid.prefs.separatedPanel.lazyLoad.showPanel\",\n args: [\"{separatedPanel}\", \"{that}.events.afterPanelShow.fire\"]\n }\n }\n }\n }\n }\n });\n\n fluid.prefs.separatedPanel.lazyLoad.showPanel = function (separatedPanel, callback) {\n if (separatedPanel.prefsEditor) {\n fluid.invokeLater(callback);\n } else {\n separatedPanel.events.onReady.addListener(function (that) {\n that.events.onReady.removeListener(\"showPanelCallBack\");\n fluid.invokeLater(callback);\n }, \"showPanelCallBack\");\n separatedPanel.events.onLazyLoad.fire();\n }\n\n };\n\n /**\n * Used to override the standard \"onCreate.loadResources\" listener for fluid.resourceLoader component,\n * allowing for pre-loading of a subset of resources. This is required for the lazyLoading workflow\n * for the \"fluid.prefs.separatedPanel.lazyLoad\".\n *\n * @param {Object} that - the component\n * @param {Object} resource - all of the resourceSpecs to load, including preload and others.\n * see: fluid.fetchResources\n * @param {Array/String} toPreload - a String or an Array of Strings corresponding to the names\n * of the resources, supplied in the resource argument, that\n * should be loaded. Only these resources will be loaded.\n */\n fluid.prefs.separatedPanel.lazyLoad.preloadResources = function (that, resources, toPreload) {\n toPreload = fluid.makeArray(toPreload);\n var preloadResources = {};\n\n fluid.each(toPreload, function (resourceName) {\n preloadResources[resourceName] = resources[resourceName];\n });\n\n // This portion of code was copied from fluid.resourceLoader.loadResources\n // and will likely need to track any changes made there.\n fluid.fetchResources(preloadResources, function () {\n that.resources = preloadResources;\n that.events.onResourcesPreloaded.fire(preloadResources);\n });\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2011-2016 OCAD University\nCopyright 2011 Lucendo Development Ltd.\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /**************************************\n * Full No Preview Preferences Editor *\n **************************************/\n\n fluid.defaults(\"fluid.prefs.fullNoPreview\", {\n gradeNames: [\"fluid.prefs.prefsEditorLoader\"],\n components: {\n prefsEditor: {\n container: \"{that}.container\",\n options: {\n listeners: {\n \"afterReset.applyChanges\": {\n listener: \"{that}.applyChanges\"\n },\n \"afterReset.save\": {\n listener: \"{that}.save\",\n priority: \"after:applyChanges\"\n },\n \"onReady.boilOnReady\": {\n listener: \"{fullNoPreview}.events.onReady\",\n args: \"{fullNoPreview}\"\n }\n }\n }\n }\n },\n events: {\n onReady: null\n }\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2011-2016 OCAD University\nCopyright 2011 Lucendo Development Ltd.\nCopyright 2015 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n /***********************************\n * Full Preview Preferences Editor *\n ***********************************/\n\n fluid.defaults(\"fluid.prefs.fullPreview\", {\n gradeNames: [\"fluid.prefs.prefsEditorLoader\"],\n outerUiEnhancerOptions: \"{originalEnhancerOptions}.options.originalUserOptions\",\n outerUiEnhancerGrades: \"{originalEnhancerOptions}.uiEnhancer.options.userGrades\",\n components: {\n prefsEditor: {\n container: \"{that}.container\",\n options: {\n components: {\n preview: {\n type: \"fluid.prefs.preview\",\n createOnEvent: \"onReady\",\n container: \"{prefsEditor}.dom.previewFrame\",\n options: {\n listeners: {\n \"onReady.boilOnPreviewReady\": \"{fullPreview}.events.onPreviewReady\"\n }\n }\n }\n },\n listeners: {\n \"onReady.boilOnPrefsEditorReady\": \"{fullPreview}.events.onPrefsEditorReady\"\n },\n distributeOptions: {\n source: \"{that}.options.preview\",\n removeSource: true,\n target: \"{that > preview}.options\"\n }\n }\n }\n },\n events: {\n onPrefsEditorReady: null,\n onPreviewReady: null,\n onReady: {\n events: {\n onPrefsEditorReady: \"onPrefsEditorReady\",\n onPreviewReady: \"onPreviewReady\"\n },\n args: \"{that}\"\n }\n },\n distributeOptions: [{\n source: \"{that}.options.outerUiEnhancerOptions\",\n target: \"{that enhancer}.options\"\n }, {\n source: \"{that}.options.preview\",\n target: \"{that preview}.options\"\n }, {\n source: \"{that}.options.previewEnhancer\",\n target: \"{that enhancer}.options\"\n }, {\n source: \"{that}.options.outerUiEnhancerGrades\",\n target: \"{that enhancer}.options.gradeNames\"\n }]\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.prefs.schemas\");\n\n /**\n * A custom merge policy that merges primary schema blocks and\n * places them in the right location (consistent with the JSON schema\n * format).\n * @param {JSON} target A base for merging the options.\n * @param {JSON} source Options being merged.\n * @return {JSON} Updated target.\n */\n fluid.prefs.schemas.merge = function (target, source) {\n if (!target) {\n target = {\n type: \"object\",\n properties: {}\n };\n }\n // We can handle both schema blocks in options directly and also inside\n // the |properties| field.\n source = source.properties || source;\n $.extend(true, target.properties, source);\n return target;\n };\n\n /*******************************************************************************\n * Primary builder grade\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.primaryBuilder\", {\n gradeNames: [\"fluid.component\", \"{that}.buildPrimary\"],\n // An index of all schema grades registered with the framework.\n schemaIndex: {\n expander: {\n func: \"fluid.indexDefaults\",\n args: [\"schemaIndex\", {\n gradeNames: \"fluid.prefs.schemas\",\n indexFunc: \"fluid.prefs.primaryBuilder.defaultSchemaIndexer\"\n }]\n }\n },\n primarySchema: {},\n // A list of all necessarry top level preference names.\n typeFilter: [],\n invokers: {\n // An invoker used to generate a set of grades that comprise a\n // final version of the primary schema to be used by the PrefsEditor\n // builder.\n buildPrimary: {\n funcName: \"fluid.prefs.primaryBuilder.buildPrimary\",\n args: [\n \"{that}.options.schemaIndex\",\n \"{that}.options.typeFilter\",\n \"{that}.options.primarySchema\"\n ]\n }\n }\n });\n\n /**\n * An invoker method that builds a list of grades that comprise a final\n * version of the primary schema.\n * @param {JSON} schemaIndex A global index of all schema grades\n * registered with the framework.\n * @param {Array} typeFilter A list of all necessarry top level\n * preference names.\n * @param {JSON} primarySchema Primary schema provided as an option to\n * the primary builder.\n * @return {Array} A list of schema grades.\n */\n fluid.prefs.primaryBuilder.buildPrimary = function (schemaIndex, typeFilter, primarySchema) {\n var suppliedPrimaryGradeName = \"fluid.prefs.schemas.suppliedPrimary\" + fluid.allocateGuid();\n // Create a grade that has a primary schema passed as an option inclosed.\n fluid.defaults(suppliedPrimaryGradeName, {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: fluid.filterKeys(primarySchema.properties || primarySchema,\n typeFilter, false)\n });\n var primary = [];\n // Lookup all available schema grades from the index that match the\n // top level preference name.\n fluid.each(typeFilter, function merge(type) {\n var schemaGrades = schemaIndex[type];\n if (schemaGrades) {\n primary.push.apply(primary, schemaGrades);\n }\n });\n primary.push(suppliedPrimaryGradeName);\n return primary;\n };\n\n /**\n * An index function that indexes all shcema grades based on their\n * preference name.\n * @param {JSON} defaults Registered defaults for a schema grade.\n * @return {String} A preference name.\n */\n fluid.prefs.primaryBuilder.defaultSchemaIndexer = function (defaults) {\n if (defaults.schema) {\n return fluid.keys(defaults.schema.properties);\n }\n };\n\n /*******************************************************************************\n * Base primary schema grade\n *******************************************************************************/\n fluid.defaults(\"fluid.prefs.schemas\", {\n gradeNames: [\"fluid.component\"],\n mergePolicy: {\n schema: fluid.prefs.schemas.merge\n }\n });\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013-2016 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.prefs\");\n\n /*******************************************************************************\n * Base auxiliary schema grade\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.auxSchema\", {\n gradeNames: [\"fluid.component\"],\n auxiliarySchema: {\n \"loaderGrades\": [\"fluid.prefs.separatedPanel\"]\n }\n });\n\n /**\n * Look up the value on the given source object by using the path.\n * Takes a template string containing tokens in the form of \"@source-path-to-value\".\n * Returns a value (any type) or undefined if the path is not found.\n *\n * @param {object} root an object to retrieve the returned value from\n * @param {String} pathRef a string that the path to the requested value is embedded into\n *\n * Example:\n * 1. Parameters:\n * source:\n * {\n * path1: {\n * path2: \"here\"\n * }\n * }\n *\n * template: \"@path1.path2\"\n *\n * 2. Return: \"here\"\n */\n fluid.prefs.expandSchemaValue = function (root, pathRef) {\n if (pathRef.charAt(0) !== \"@\") {\n return pathRef;\n }\n\n return fluid.get(root, pathRef.substring(1));\n };\n\n fluid.prefs.addAtPath = function (root, path, object) {\n var existingObject = fluid.get(root, path);\n fluid.set(root, path, $.extend(true, {}, existingObject, object));\n\n return root;\n };\n\n // only works with top level elements\n fluid.prefs.removeKey = function (root, key) {\n var value = root[key];\n delete root[key];\n return value;\n };\n\n fluid.prefs.rearrangeDirect = function (root, toPath, sourcePath) {\n var result = {};\n var sourceValue = fluid.prefs.removeKey(root, sourcePath);\n if (sourceValue) {\n fluid.set(result, toPath, sourceValue);\n }\n return result;\n };\n\n fluid.prefs.addCommonOptions = function (root, path, commonOptions, templateValues) {\n templateValues = templateValues || {};\n\n var existingValue = fluid.get(root, path);\n\n if (!existingValue) {\n return root;\n }\n\n var opts = {}, mergePolicy = {};\n\n fluid.each(commonOptions, function (value, key) {\n // Adds \"container\" option only for view and renderer components\n if (key === \"container\") {\n var componentType = fluid.get(root, [path, \"type\"]);\n var componentOptions = fluid.defaults(componentType);\n // Note that this approach is not completely reliable, although it has been reviewed as \"good enough\" -\n // a grade which modifies the creation signature of its principal type would cause numerous other problems.\n // We can review this awkward kind of \"anticipatory logic\" when the new renderer arrives.\n if (fluid.get(componentOptions, [\"argumentMap\", \"container\"]) === undefined) {\n return false;\n }\n }\n // Merge grade names defined in aux schema and system default grades\n if (key.indexOf(\"gradeNames\") !== -1) {\n mergePolicy[key] = fluid.arrayConcatPolicy;\n }\n\n key = fluid.stringTemplate(key, templateValues);\n value = typeof (value) === \"string\" ? fluid.stringTemplate(value, templateValues) : value;\n\n fluid.set(opts, key, value);\n });\n\n fluid.set(root, path, fluid.merge(mergePolicy, existingValue, opts));\n\n return root;\n };\n\n fluid.prefs.containerNeeded = function (root, path) {\n var componentType = fluid.get(root, [path, \"type\"]);\n var componentOptions = fluid.defaults(componentType);\n return (fluid.hasGrade(componentOptions, \"fluid.viewComponent\") || fluid.hasGrade(componentOptions, \"fluid.rendererComponent\"));\n };\n\n fluid.prefs.checkPrimarySchema = function (primarySchema, prefKey) {\n if (!primarySchema) {\n fluid.fail(\"The primary schema for \" + prefKey + \" is not defined.\");\n }\n return !!primarySchema;\n };\n\n fluid.prefs.expandSchemaComponents = function (auxSchema, type, prefKey, componentConfig, index, commonOptions, modelCommonOptions, mappedDefaults) {\n var componentOptions = fluid.copy(componentConfig) || {};\n var components = {};\n var initialModel = {};\n\n var componentName = fluid.prefs.removeKey(componentOptions, \"type\");\n var regexp = new RegExp(\"\\\\.\", \"g\");\n var memberName = componentName.replace(regexp, \"_\");\n var flattenedPrefKey = prefKey.replace(regexp, \"_\");\n\n if (componentName) {\n\n components[memberName] = {\n type: componentName,\n options: componentOptions\n };\n\n var selectors = fluid.prefs.rearrangeDirect(componentOptions, memberName, \"container\");\n var templates = fluid.prefs.rearrangeDirect(componentOptions, memberName, \"template\");\n var messages = fluid.prefs.rearrangeDirect(componentOptions, memberName, \"message\");\n\n var preferenceMap = fluid.defaults(componentName).preferenceMap;\n\n var map = preferenceMap[prefKey];\n var prefSchema = mappedDefaults[prefKey];\n\n fluid.each(map, function (primaryPath, internalPath) {\n if (fluid.prefs.checkPrimarySchema(prefSchema, prefKey)) {\n var opts = {};\n if (internalPath.indexOf(\"model.\") === 0) {\n var internalModelName = internalPath.slice(6);\n // Set up the binding in \"rules\" accepted by the modelRelay base grade of every panel\n fluid.set(opts, \"model\", fluid.get(opts, \"model\") || {});\n fluid.prefs.addCommonOptions(opts, \"model\", modelCommonOptions, {\n internalModelName: internalModelName,\n externalModelName: flattenedPrefKey\n });\n fluid.set(initialModel, [\"members\", \"initialModel\", \"preferences\", flattenedPrefKey], prefSchema[primaryPath]);\n } else {\n fluid.set(opts, internalPath, prefSchema[primaryPath]);\n }\n $.extend(true, componentOptions, opts);\n }\n });\n\n fluid.prefs.addCommonOptions(components, memberName, commonOptions, {\n prefKey: memberName\n });\n\n fluid.prefs.addAtPath(auxSchema, [type, \"components\"], components);\n fluid.prefs.addAtPath(auxSchema, [type, \"selectors\"], selectors);\n fluid.prefs.addAtPath(auxSchema, [\"templateLoader\", \"resources\"], templates);\n fluid.prefs.addAtPath(auxSchema, [\"messageLoader\", \"resources\"], messages);\n fluid.prefs.addAtPath(auxSchema, \"initialModel\", initialModel);\n }\n\n return auxSchema;\n };\n\n /**\n * Expands a all \"@\" path references from an auxiliary schema.\n * Note that you cannot chain \"@\" paths.\n *\n * @param {object} schemaToExpand the shcema which will be expanded\n * @param {object} altSource an alternative look up object. This is primarily used for the internal recursive call.\n * @return {object} an expaneded version of the schema.\n */\n fluid.prefs.expandSchemaImpl = function (schemaToExpand, altSource) {\n var expandedSchema = fluid.copy(schemaToExpand);\n altSource = altSource || expandedSchema;\n\n fluid.each(expandedSchema, function (value, key) {\n if (typeof value === \"object\") {\n expandedSchema[key] = fluid.prefs.expandSchemaImpl(value, altSource);\n } else if (typeof value === \"string\") {\n var expandedVal = fluid.prefs.expandSchemaValue(altSource, value);\n if (expandedVal !== undefined) {\n expandedSchema[key] = expandedVal;\n } else {\n delete expandedSchema[key];\n }\n }\n });\n return expandedSchema;\n };\n\n fluid.prefs.expandCompositePanels = function (auxSchema, compositePanelList, panelIndex, panelCommonOptions, subPanelCommonOptions,\n compositePanelBasedOnSubCommonOptions, panelModelCommonOptions, mappedDefaults) {\n var panelsToIgnore = [];\n\n fluid.each(compositePanelList, function (compositeDetail, compositeKey) {\n var compositePanelOptions = {};\n var components = {};\n var initialModel = {};\n var selectors = {};\n var templates = {};\n var messages = {};\n var selectorsToIgnore = [];\n\n var thisCompositeOptions = fluid.copy(compositeDetail);\n fluid.set(compositePanelOptions, \"type\", thisCompositeOptions.type);\n delete thisCompositeOptions.type;\n\n selectors = fluid.prefs.rearrangeDirect(thisCompositeOptions, compositeKey, \"container\");\n templates = fluid.prefs.rearrangeDirect(thisCompositeOptions, compositeKey, \"template\");\n messages = fluid.prefs.rearrangeDirect(thisCompositeOptions, compositeKey, \"message\");\n\n var subPanelList = []; // list of subpanels to generate options for\n var subPanels = {};\n var subPanelRenderOn = {};\n\n // thisCompositeOptions.panels can be in two forms:\n // 1. an array of names of panels that should always be rendered;\n // 2. an object that describes what panels should be always rendered,\n // and what panels should be rendered when a preference is turned on\n // The loop below is only needed for processing the latter.\n if (fluid.isPlainObject(thisCompositeOptions.panels) && !fluid.isArrayable(thisCompositeOptions.panels)) {\n fluid.each(thisCompositeOptions.panels, function (subpanelArray, pref) {\n subPanelList = subPanelList.concat(subpanelArray);\n if (pref !== \"always\") {\n fluid.each(subpanelArray, function (onePanel) {\n fluid.set(subPanelRenderOn, onePanel, pref);\n });\n }\n });\n } else {\n subPanelList = thisCompositeOptions.panels;\n }\n\n fluid.each(subPanelList, function (subPanelID) {\n panelsToIgnore.push(subPanelID);\n var subPanelPrefsKey = fluid.get(auxSchema, [subPanelID, \"type\"]);\n var safeSubPanelPrefsKey = fluid.prefs.subPanel.safePrefKey(subPanelPrefsKey);\n selectorsToIgnore.push(safeSubPanelPrefsKey);\n\n var subPanelOptions = fluid.copy(fluid.get(auxSchema, [subPanelID, \"panel\"]));\n var subPanelType = fluid.get(subPanelOptions, \"type\");\n\n fluid.set(subPanels, [safeSubPanelPrefsKey, \"type\"], subPanelType);\n var renderOn = fluid.get(subPanelRenderOn, subPanelID);\n if (renderOn) {\n fluid.set(subPanels, [safeSubPanelPrefsKey, \"options\", \"renderOnPreference\"], renderOn);\n }\n\n // Deal with preferenceMap related options\n var map = fluid.defaults(subPanelType).preferenceMap[subPanelPrefsKey];\n var prefSchema = mappedDefaults[subPanelPrefsKey];\n\n fluid.each(map, function (primaryPath, internalPath) {\n if (fluid.prefs.checkPrimarySchema(prefSchema, subPanelPrefsKey)) {\n var opts;\n if (internalPath.indexOf(\"model.\") === 0) {\n // Set up the binding in \"rules\" accepted by the modelRelay base grade of every panel\n fluid.set(compositePanelOptions, [\"options\", \"model\"], fluid.get(compositePanelOptions, [\"options\", \"model\"]) || {});\n fluid.prefs.addCommonOptions(compositePanelOptions, [\"options\", \"model\"], panelModelCommonOptions, {\n internalModelName: safeSubPanelPrefsKey,\n externalModelName: safeSubPanelPrefsKey\n });\n fluid.set(initialModel, [\"members\", \"initialModel\", \"preferences\", safeSubPanelPrefsKey], prefSchema[primaryPath]);\n } else {\n opts = opts || {options: {}};\n fluid.set(opts, \"options.\" + internalPath, prefSchema[primaryPath]);\n }\n $.extend(true, subPanels[safeSubPanelPrefsKey], opts);\n }\n });\n\n fluid.set(templates, safeSubPanelPrefsKey, fluid.get(subPanelOptions, \"template\"));\n fluid.set(messages, safeSubPanelPrefsKey, fluid.get(subPanelOptions, \"message\"));\n\n fluid.set(compositePanelOptions, [\"options\", \"selectors\", safeSubPanelPrefsKey], fluid.get(subPanelOptions, \"container\"));\n fluid.set(compositePanelOptions, [\"options\", \"resources\"], fluid.get(compositePanelOptions, [\"options\", \"resources\"]) || {});\n\n fluid.prefs.addCommonOptions(compositePanelOptions.options, \"resources\", compositePanelBasedOnSubCommonOptions, {\n subPrefKey: safeSubPanelPrefsKey\n });\n\n // add additional options from the aux schema for subpanels\n delete subPanelOptions.type;\n delete subPanelOptions.template;\n delete subPanelOptions.message;\n delete subPanelOptions.container;\n fluid.set(subPanels, [safeSubPanelPrefsKey, \"options\"], $.extend(true, {}, fluid.get(subPanels, [safeSubPanelPrefsKey, \"options\"]), subPanelOptions));\n\n fluid.prefs.addCommonOptions(subPanels, safeSubPanelPrefsKey, subPanelCommonOptions, {\n compositePanel: compositeKey,\n prefKey: safeSubPanelPrefsKey\n });\n });\n delete thisCompositeOptions.panels;\n\n // add additional options from the aux schema for the composite panel\n fluid.set(compositePanelOptions, [\"options\"], $.extend(true, {}, compositePanelOptions.options, thisCompositeOptions));\n fluid.set(compositePanelOptions, [\"options\", \"selectorsToIgnore\"], selectorsToIgnore);\n fluid.set(compositePanelOptions, [\"options\", \"components\"], subPanels);\n\n components[compositeKey] = compositePanelOptions;\n\n fluid.prefs.addCommonOptions(components, compositeKey, panelCommonOptions, {\n prefKey: compositeKey\n });\n\n // Add onto auxSchema\n fluid.prefs.addAtPath(auxSchema, [\"panels\", \"components\"], components);\n fluid.prefs.addAtPath(auxSchema, [\"panels\", \"selectors\"], selectors);\n fluid.prefs.addAtPath(auxSchema, [\"templateLoader\", \"resources\"], templates);\n fluid.prefs.addAtPath(auxSchema, [\"messageLoader\", \"resources\"], messages);\n fluid.prefs.addAtPath(auxSchema, \"initialModel\", initialModel);\n $.extend(true, auxSchema, {panelsToIgnore: panelsToIgnore});\n });\n\n return auxSchema;\n };\n\n // Processes the auxiliary schema to output an object that contains all grade component definitions\n // required for building the preferences editor, uiEnhancer and the settings store. These grade components\n // are: panels, enactors, initialModel, messageLoader, templateLoader and terms.\n // These grades are consumed and integrated by builder.js\n // (https://github.com/fluid-project/infusion/blob/master/src/framework/preferences/js/Builder.js)\n fluid.prefs.expandSchema = function (schemaToExpand, indexes, topCommonOptions, elementCommonOptions, mappedDefaults) {\n var auxSchema = fluid.prefs.expandSchemaImpl(schemaToExpand);\n auxSchema.namespace = auxSchema.namespace || \"fluid.prefs.created_\" + fluid.allocateGuid();\n\n var terms = fluid.get(auxSchema, \"terms\");\n if (terms) {\n delete auxSchema.terms;\n fluid.set(auxSchema, [\"terms\", \"terms\"], terms);\n }\n\n var compositePanelList = fluid.get(auxSchema, \"groups\");\n if (compositePanelList) {\n fluid.prefs.expandCompositePanels(auxSchema, compositePanelList, fluid.get(indexes, \"panel\"),\n fluid.get(elementCommonOptions, \"panel\"), fluid.get(elementCommonOptions, \"subPanel\"),\n fluid.get(elementCommonOptions, \"compositePanelBasedOnSub\"), fluid.get(elementCommonOptions, \"panelModel\"),\n mappedDefaults);\n }\n\n fluid.each(auxSchema, function (category, prefName) {\n // TODO: Replace this cumbersome scheme with one based on an extensible lookup to handlers\n var type = \"panel\";\n // Ignore the subpanels that are only for composing composite panels\n if (category[type] && !fluid.contains(auxSchema.panelsToIgnore, prefName)) {\n fluid.prefs.expandSchemaComponents(auxSchema, \"panels\", category.type, category[type], fluid.get(indexes, type),\n fluid.get(elementCommonOptions, type), fluid.get(elementCommonOptions, type + \"Model\"), mappedDefaults);\n }\n\n type = \"enactor\";\n if (category[type]) {\n fluid.prefs.expandSchemaComponents(auxSchema, \"enactors\", category.type, category[type], fluid.get(indexes, type),\n fluid.get(elementCommonOptions, type), fluid.get(elementCommonOptions, type + \"Model\"), mappedDefaults);\n }\n\n fluid.each([\"template\", \"message\"], function (type) {\n if (prefName === type) {\n fluid.set(auxSchema, [type + \"Loader\", \"resources\", \"prefsEditor\"], auxSchema[type]);\n delete auxSchema[type];\n }\n });\n\n });\n\n // Remove subPanels array. It is to keep track of the panels that are only used as sub-components of composite panels.\n if (auxSchema.panelsToIgnore) {\n delete auxSchema.panelsToIgnore;\n }\n\n // Add top common options\n fluid.each(topCommonOptions, function (topOptions, type) {\n fluid.prefs.addCommonOptions(auxSchema, type, topOptions);\n });\n\n return auxSchema;\n };\n\n fluid.defaults(\"fluid.prefs.auxBuilder\", {\n gradeNames: [\"fluid.prefs.auxSchema\"],\n mergePolicy: {\n elementCommonOptions: \"noexpand\"\n },\n topCommonOptions: {\n panels: {\n gradeNames: [\"fluid.prefs.prefsEditor\"]\n },\n enactors: {\n gradeNames: [\"fluid.uiEnhancer\"]\n },\n templateLoader: {\n gradeNames: [\"fluid.resourceLoader\"]\n },\n messageLoader: {\n gradeNames: [\"fluid.resourceLoader\"]\n },\n initialModel: {\n gradeNames: [\"fluid.prefs.initialModel\"]\n },\n terms: {\n gradeNames: [\"fluid.component\"]\n }\n },\n elementCommonOptions: {\n panel: {\n \"createOnEvent\": \"onPrefsEditorMarkupReady\",\n \"container\": \"{prefsEditor}.dom.%prefKey\",\n \"options.gradeNames\": \"fluid.prefs.prefsEditorConnections\",\n \"options.resources.template\": \"{templateLoader}.resources.%prefKey\",\n \"options.messageBase\": \"{messageLoader}.resources.%prefKey.resourceText\"\n },\n panelModel: {\n \"%internalModelName\": \"{prefsEditor}.model.preferences.%externalModelName\"\n },\n compositePanelBasedOnSub: {\n \"%subPrefKey\": \"{templateLoader}.resources.%subPrefKey\"\n },\n subPanel: {\n \"container\": \"{%compositePanel}.dom.%prefKey\",\n \"options.messageBase\": \"{messageLoader}.resources.%prefKey.resourceText\"\n },\n enactor: {\n \"container\": \"{uiEnhancer}.container\"\n },\n enactorModel: {\n \"%internalModelName\": \"{uiEnhancer}.model.%externalModelName\"\n }\n },\n indexes: {\n panel: {\n expander: {\n func: \"fluid.indexDefaults\",\n args: [\"panelsIndex\", {\n gradeNames: \"fluid.prefs.panel\",\n indexFunc: \"fluid.prefs.auxBuilder.prefMapIndexer\"\n }]\n }\n },\n enactor: {\n expander: {\n func: \"fluid.indexDefaults\",\n args: [\"enactorsIndex\", {\n gradeNames: \"fluid.prefs.enactor\",\n indexFunc: \"fluid.prefs.auxBuilder.prefMapIndexer\"\n }]\n }\n }\n },\n mappedDefaults: {},\n expandedAuxSchema: {\n expander: {\n func: \"fluid.prefs.expandSchema\",\n args: [\n \"{that}.options.auxiliarySchema\",\n \"{that}.options.indexes\",\n \"{that}.options.topCommonOptions\",\n \"{that}.options.elementCommonOptions\",\n \"{that}.options.mappedDefaults\"\n ]\n }\n }\n });\n\n fluid.prefs.auxBuilder.prefMapIndexer = function (defaults) {\n return fluid.keys(defaults.preferenceMap);\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013-2016 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function (fluid) {\n \"use strict\";\n\n /*******************************************************************************\n * Starter auxiliary schema grade\n *\n * Contains the settings for 7 preferences: text size, line space, text font,\n * contrast, table of contents, inputs larger and emphasize links\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.termsAware\");\n\n // textSize mixin (base)\n fluid.defaults(\"fluid.prefs.auxSchema.starter.textSize\", {\n gradeNames: [\"fluid.contextAware\"],\n auxiliarySchema: {\n \"textSize\": {\n \"type\": \"fluid.prefs.textSize\",\n \"enactor\": {\n \"type\": \"fluid.prefs.enactor.textSize\"\n },\n \"panel\": {\n \"type\": \"fluid.prefs.panel.textSize\",\n \"container\": \".flc-prefsEditor-text-size\", // the css selector in the template where the panel is rendered\n \"message\": \"%messagePrefix/textSize.json\"\n }\n }\n },\n contextAwareness: {\n textSizeSliderVariety: {\n checks: {\n jQueryUI: {\n contextValue: \"{fluid.prefsWidgetType}\",\n equals: \"jQueryUI\",\n gradeNames: \"fluid.prefs.auxSchema.starter.textSize.jQueryUI\"\n }\n },\n defaultGradeNames: \"fluid.prefs.auxSchema.starter.textSize.nativeHTML\"\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.auxSchema.starter.textSize.nativeHTML\", {\n auxiliarySchema: {\n \"textSize\": {\n \"panel\": {\n \"template\": \"%templatePrefix/PrefsEditorTemplate-textSize-nativeHTML.html\"\n }\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.auxSchema.starter.textSize.jQueryUI\", {\n auxiliarySchema: {\n \"textSize\": {\n \"panel\": {\n \"template\": \"%templatePrefix/PrefsEditorTemplate-textSize-jQueryUI.html\"\n }\n }\n }\n });\n\n // lineSpace mixin (base)\n fluid.defaults(\"fluid.prefs.auxSchema.starter.lineSpace\", {\n gradeNames: [\"fluid.contextAware\"],\n auxiliarySchema: {\n \"lineSpace\": {\n \"type\": \"fluid.prefs.lineSpace\",\n \"enactor\": {\n \"type\": \"fluid.prefs.enactor.lineSpace\",\n \"fontSizeMap\": {\n \"xx-small\": \"9px\",\n \"x-small\": \"11px\",\n \"small\": \"13px\",\n \"medium\": \"15px\",\n \"large\": \"18px\",\n \"x-large\": \"23px\",\n \"xx-large\": \"30px\"\n }\n },\n \"panel\": {\n \"type\": \"fluid.prefs.panel.lineSpace\",\n \"container\": \".flc-prefsEditor-line-space\", // the css selector in the template where the panel is rendered\n \"message\": \"%messagePrefix/lineSpace.json\"\n }\n }\n },\n contextAwareness: {\n lineSpaceSliderVariety: {\n checks: {\n jQueryUI: {\n contextValue: \"{fluid.prefsWidgetType}\",\n equals: \"jQueryUI\",\n gradeNames: \"fluid.prefs.auxSchema.starter.lineSpace.jQueryUI\"\n }\n },\n defaultGradeNames: \"fluid.prefs.auxSchema.starter.lineSpace.nativeHTML\"\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.auxSchema.starter.lineSpace.nativeHTML\", {\n auxiliarySchema: {\n \"lineSpace\": {\n \"panel\": {\n \"template\": \"%templatePrefix/PrefsEditorTemplate-lineSpace-nativeHTML.html\"\n }\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.auxSchema.starter.lineSpace.jQueryUI\", {\n auxiliarySchema: {\n \"lineSpace\": {\n \"panel\": {\n \"template\": \"%templatePrefix/PrefsEditorTemplate-lineSpace-jQueryUI.html\"\n }\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.auxSchema.starter\", {\n gradeNames: [\"fluid.prefs.auxSchema\", \"fluid.prefs.auxSchema.starter.lineSpace\", \"fluid.prefs.auxSchema.starter.textSize\"],\n auxiliarySchema: {\n \"loaderGrades\": [\"fluid.prefs.separatedPanel\"],\n \"namespace\": \"fluid.prefs.constructed\", // The author of the auxiliary schema will provide this and will be the component to call to initialize the constructed PrefsEditor.\n \"terms\": {\n \"templatePrefix\": \"../../framework/preferences/html\", // Must match the keyword used below to identify the common path to settings panel templates.\n \"messagePrefix\": \"../../framework/preferences/messages\" // Must match the keyword used below to identify the common path to message files.\n },\n \"template\": \"%templatePrefix/SeparatedPanelPrefsEditor.html\",\n \"message\": \"%messagePrefix/prefsEditor.json\",\n \"textFont\": {\n \"type\": \"fluid.prefs.textFont\",\n \"classes\": {\n \"default\": \"\",\n \"times\": \"fl-font-times\",\n \"comic\": \"fl-font-comic-sans\",\n \"arial\": \"fl-font-arial\",\n \"verdana\": \"fl-font-verdana\"\n },\n \"enactor\": {\n \"type\": \"fluid.prefs.enactor.textFont\",\n \"classes\": \"@textFont.classes\"\n },\n \"panel\": {\n \"type\": \"fluid.prefs.panel.textFont\",\n \"container\": \".flc-prefsEditor-text-font\", // the css selector in the template where the panel is rendered\n \"classnameMap\": {\"textFont\": \"@textFont.classes\"},\n \"template\": \"%templatePrefix/PrefsEditorTemplate-textFont.html\",\n \"message\": \"%messagePrefix/textFont.json\"\n }\n },\n \"contrast\": {\n \"type\": \"fluid.prefs.contrast\",\n \"classes\": {\n \"default\": \"fl-theme-prefsEditor-default\",\n \"bw\": \"fl-theme-bw\",\n \"wb\": \"fl-theme-wb\",\n \"by\": \"fl-theme-by\",\n \"yb\": \"fl-theme-yb\",\n \"lgdg\": \"fl-theme-lgdg\"\n\n },\n \"enactor\": {\n \"type\": \"fluid.prefs.enactor.contrast\",\n \"classes\": \"@contrast.classes\"\n },\n \"panel\": {\n \"type\": \"fluid.prefs.panel.contrast\",\n \"container\": \".flc-prefsEditor-contrast\", // the css selector in the template where the panel is rendered\n \"classnameMap\": {\"theme\": \"@contrast.classes\"},\n \"template\": \"%templatePrefix/PrefsEditorTemplate-contrast.html\",\n \"message\": \"%messagePrefix/contrast.json\"\n }\n },\n \"tableOfContents\": {\n \"type\": \"fluid.prefs.tableOfContents\",\n \"enactor\": {\n \"type\": \"fluid.prefs.enactor.tableOfContents\",\n \"tocTemplate\": \"../../components/tableOfContents/html/TableOfContents.html\"\n },\n \"panel\": {\n \"type\": \"fluid.prefs.panel.layoutControls\",\n \"container\": \".flc-prefsEditor-layout-controls\", // the css selector in the template where the panel is rendered\n \"template\": \"%templatePrefix/PrefsEditorTemplate-layout.html\",\n \"message\": \"%messagePrefix/tableOfContents.json\"\n }\n },\n \"emphasizeLinks\": {\n \"type\": \"fluid.prefs.emphasizeLinks\",\n \"enactor\": {\n \"type\": \"fluid.prefs.enactor.emphasizeLinks\",\n \"cssClass\": \"fl-link-enhanced\"\n },\n \"panel\": {\n \"type\": \"fluid.prefs.panel.emphasizeLinks\",\n \"container\": \".flc-prefsEditor-emphasizeLinks\", // the css selector in the template where the panel is rendered\n \"template\": \"%templatePrefix/PrefsEditorTemplate-emphasizeLinks.html\",\n \"message\": \"%messagePrefix/emphasizeLinks.json\"\n }\n },\n \"inputsLarger\": {\n \"type\": \"fluid.prefs.inputsLarger\",\n \"enactor\": {\n \"type\": \"fluid.prefs.enactor.inputsLarger\",\n \"cssClass\": \"fl-text-larger\"\n },\n \"panel\": {\n \"type\": \"fluid.prefs.panel.inputsLarger\",\n \"container\": \".flc-prefsEditor-inputsLarger\", // the css selector in the template where the panel is rendered\n \"template\": \"%templatePrefix/PrefsEditorTemplate-inputsLarger.html\",\n \"message\": \"%messagePrefix/inputsLarger.json\"\n }\n },\n groups: {\n \"linksControls\": {\n \"container\": \".flc-prefsEditor-links-controls\",\n \"template\": \"%templatePrefix/PrefsEditorTemplate-linksControls.html\",\n \"message\": \"%messagePrefix/linksControls.json\",\n \"type\": \"fluid.prefs.panel.linksControls\",\n \"panels\": [\"emphasizeLinks\", \"inputsLarger\"]\n }\n }\n }\n });\n\n /*******************************************************************************\n * Starter primary schema grades\n *\n * Contains the settings for 7 preferences: text size, line space, text font,\n * contrast, table of contents, inputs larger and emphasize links\n *******************************************************************************/\n\n fluid.defaults(\"fluid.prefs.schemas.textSize\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.textSize\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 1,\n \"maximum\": 2,\n \"divisibleBy\": 0.1\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.schemas.lineSpace\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.lineSpace\": {\n \"type\": \"number\",\n \"default\": 1,\n \"minimum\": 1,\n \"maximum\": 2,\n \"divisibleBy\": 0.1\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.schemas.textFont\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.textFont\": {\n \"type\": \"string\",\n \"default\": \"default\",\n \"enum\": [\"default\", \"times\", \"comic\", \"arial\", \"verdana\"]\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.schemas.contrast\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.contrast\": {\n \"type\": \"string\",\n \"default\": \"default\",\n \"enum\": [\"default\", \"bw\", \"wb\", \"by\", \"yb\", \"lgdg\"]\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.schemas.tableOfContents\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.tableOfContents\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.schemas.emphasizeLinks\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.emphasizeLinks\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n });\n\n fluid.defaults(\"fluid.prefs.schemas.inputsLarger\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.inputsLarger\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n });\n})(fluid_2_0_0);\n","/*\nCopyright 2015 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n(function (fluid) {\n \"use strict\";\n\n /*******************************************************************************\n * Starter auxiliary schema grade\n *\n * Contains the settings for 7 preferences: text size, line space, text font,\n * contrast, table of contents, inputs larger and emphasize links\n *******************************************************************************/\n\n // Fine-tune the starter aux schema and add speak panel\n fluid.defaults(\"fluid.prefs.auxSchema.speak\", {\n gradeNames: [\"fluid.prefs.auxSchema\"],\n auxiliarySchema: {\n \"namespace\": \"fluid.prefs.constructed\",\n \"terms\": {\n \"templatePrefix\": \"../../framework/preferences/html/\",\n \"messagePrefix\": \"../../framework/preferences/messages/\"\n },\n \"template\": \"%templatePrefix/SeparatedPanelPrefsEditor.html\",\n \"message\": \"%messagePrefix/prefsEditor.json\",\n\n speak: {\n type: \"fluid.prefs.speak\",\n enactor: {\n type: \"fluid.prefs.enactor.selfVoicing\",\n container: \"body\"\n },\n panel: {\n type: \"fluid.prefs.panel.speak\",\n container: \".flc-prefsEditor-speak\",\n template: \"%templatePrefix/PrefsEditorTemplate-speak.html\",\n message: \"%messagePrefix/speak.json\"\n }\n }\n }\n });\n\n\n /*******************************************************************************\n * Primary Schema\n *******************************************************************************/\n\n // add extra prefs to the starter primary schemas\n\n fluid.defaults(\"fluid.prefs.schemas.speak\", {\n gradeNames: [\"fluid.prefs.schemas\"],\n schema: {\n \"fluid.prefs.speak\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n });\n\n})(fluid_2_0_0);\n","/*\nCopyright 2013-2015 OCAD University\nCopyright 2015-2016 Raising the Floor - International\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.prefs\");\n\n fluid.defaults(\"fluid.prefs.builder\", {\n gradeNames: [\"fluid.component\", \"fluid.prefs.auxBuilder\"],\n mergePolicy: {\n auxSchema: \"expandedAuxSchema\"\n },\n assembledPrefsEditorGrade: {\n expander: {\n func: \"fluid.prefs.builder.generateGrade\",\n args: [\"prefsEditor\", \"{that}.options.auxSchema.namespace\", {\n gradeNames: [\"fluid.prefs.assembler.prefsEd\", \"fluid.viewComponent\"],\n componentGrades: \"{that}.options.constructedGrades\",\n loaderGrades: \"{that}.options.auxSchema.loaderGrades\"\n }]\n }\n },\n assembledUIEGrade: {\n expander: {\n func: \"fluid.prefs.builder.generateGrade\",\n args: [\"uie\", \"{that}.options.auxSchema.namespace\", {\n gradeNames: [\"fluid.viewComponent\", \"fluid.prefs.assembler.uie\"],\n componentGrades: \"{that}.options.constructedGrades\"\n }]\n }\n },\n constructedGrades: {\n expander: {\n func: \"fluid.prefs.builder.constructGrades\",\n args: [\"{that}.options.auxSchema\", [\"enactors\", \"messages\", \"panels\", \"initialModel\", \"templateLoader\", \"messageLoader\", \"terms\"]]\n }\n },\n mappedDefaults: \"{primaryBuilder}.options.schema.properties\",\n components: {\n primaryBuilder: {\n type: \"fluid.prefs.primaryBuilder\",\n options: {\n typeFilter: {\n expander: {\n func: \"fluid.prefs.builder.parseAuxSchema\",\n args: \"{builder}.options.auxiliarySchema\"\n }\n }\n }\n }\n },\n distributeOptions: [{\n source: \"{that}.options.primarySchema\",\n removeSource: true,\n target: \"{that > primaryBuilder}.options.primarySchema\"\n }]\n });\n\n fluid.defaults(\"fluid.prefs.assembler.uie\", {\n gradeNames: [\"fluid.viewComponent\"],\n components: {\n // These two components become global\n store: {\n type: \"fluid.prefs.globalSettingsStore\",\n options: {\n distributeOptions: {\n target: \"{that fluid.prefs.store}.options.contextAwareness.strategy.checks.user\",\n record: {\n contextValue: \"{fluid.prefs.assembler.uie}.options.storeType\",\n gradeNames: \"{fluid.prefs.assembler.uie}.options.storeType\"\n }\n }\n }\n },\n enhancer: {\n type: \"fluid.component\",\n options: {\n gradeNames: \"{that}.options.enhancerType\",\n enhancerType: \"fluid.pageEnhancer\",\n components: {\n uiEnhancer: {\n options: {\n gradeNames: [\"{fluid.prefs.assembler.uie}.options.componentGrades.enactors\"]\n }\n }\n }\n }\n }\n },\n distributeOptions: [{\n source: \"{that}.options.enhancer\",\n target: \"{that uiEnhancer}.options\",\n removeSource: true\n }, { // TODO: not clear that this hits anything since settings store is not a subcomponent\n source: \"{that}.options.store\",\n target: \"{that fluid.prefs.store}.options\"\n }, {\n source: \"{that}.options.enhancerType\",\n target: \"{that > enhancer}.options.enhancerType\"\n }]\n });\n\n fluid.defaults(\"fluid.prefs.assembler.prefsEd\", {\n gradeNames: [\"fluid.viewComponent\", \"fluid.prefs.assembler.uie\"],\n components: {\n prefsEditorLoader: {\n type: \"fluid.viewComponent\",\n container: \"{fluid.prefs.assembler.prefsEd}.container\",\n priority: \"last\",\n options: {\n gradeNames: [\n \"{fluid.prefs.assembler.prefsEd}.options.componentGrades.terms\",\n \"{fluid.prefs.assembler.prefsEd}.options.componentGrades.messages\",\n \"{fluid.prefs.assembler.prefsEd}.options.componentGrades.initialModel\",\n \"{that}.options.loaderGrades\"\n ],\n templateLoader: {\n gradeNames: [\"{fluid.prefs.assembler.prefsEd}.options.componentGrades.templateLoader\"]\n },\n messageLoader: {\n gradeNames: [\"{fluid.prefs.assembler.prefsEd}.options.componentGrades.messageLoader\"]\n },\n prefsEditor: {\n gradeNames: [\"{fluid.prefs.assembler.prefsEd}.options.componentGrades.panels\", \"fluid.prefs.uiEnhancerRelay\"]\n },\n events: {\n onReady: \"{fluid.prefs.assembler.prefsEd}.events.onPrefsEditorReady\"\n }\n }\n }\n },\n events: {\n onPrefsEditorReady: null,\n onReady: {\n events: {\n onPrefsEditorReady: \"onPrefsEditorReady\",\n onCreate: \"onCreate\"\n },\n args: [\"{that}\"]\n }\n },\n distributeOptions: [{\n source: \"{that}.options.loaderGrades\",\n removeSource: true,\n target: \"{that > prefsEditorLoader}.options.loaderGrades\"\n }, {\n source: \"{that}.options.prefsEditor\",\n removeSource: true,\n target: \"{that prefsEditor}.options\"\n }, {\n source: \"{that}.options.terms\",\n removeSource: true,\n target: \"{that prefsEditorLoader}.options.terms\"\n }]\n });\n\n fluid.prefs.builder.generateGrade = function (name, namespace, options) {\n var gradeNameTemplate = \"%namespace.%name\";\n var gradeName = fluid.stringTemplate(gradeNameTemplate, {name: name, namespace: namespace});\n fluid.defaults(gradeName, options);\n return gradeName;\n };\n\n fluid.prefs.builder.constructGrades = function (auxSchema, gradeCategories) {\n var constructedGrades = {};\n fluid.each(gradeCategories, function (category) {\n var gradeOpts = auxSchema[category];\n if (fluid.get(gradeOpts, \"gradeNames\")) {\n constructedGrades[category] = fluid.prefs.builder.generateGrade(category, auxSchema.namespace, gradeOpts);\n }\n });\n return constructedGrades;\n };\n\n fluid.prefs.builder.parseAuxSchema = function (auxSchema) {\n var auxTypes = [];\n fluid.each(auxSchema, function parse(field) {\n var type = field.type;\n if (type) {\n auxTypes.push(type);\n }\n });\n return auxTypes;\n };\n\n /*\n * A one-stop-shop function to build and instantiate a prefsEditor from a schema.\n */\n fluid.prefs.create = function (container, options) {\n options = options || {};\n var builder = fluid.prefs.builder(options.build);\n return fluid.invokeGlobalFunction(builder.options.assembledPrefsEditorGrade, [container, options.prefsEditor]);\n };\n\n})(jQuery, fluid_2_0_0);\n","/*\nCopyright 2013-2016 OCAD University\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_2_0_0 = fluid_2_0_0 || {};\n(function ($, fluid) {\n \"use strict\";\n\n // Gradename to invoke \"fluid.uiOptions.prefsEditor\"\n fluid.prefs.builder({\n gradeNames: [\"fluid.prefs.auxSchema.starter\"]\n });\n\n fluid.defaults(\"fluid.uiOptions.prefsEditor\", {\n gradeNames: [\"fluid.prefs.constructed.prefsEditor\"],\n lazyLoad: false,\n distributeOptions: [{\n record: \"{that}.options.lazyLoad\",\n target: \"{that separatedPanel}.options.lazyLoad\"\n }, {\n source: \"{that}.options.tocTemplate\",\n target: \"{that uiEnhancer}.options.tocTemplate\"\n }, {\n source: \"{that}.options.ignoreForToC\",\n target: \"{that uiEnhancer}.options.ignoreForToC\"\n }],\n enhancer: {\n distributeOptions: [{\n source: \"{that}.options.tocTemplate\",\n target: \"{that > fluid.prefs.enactor.tableOfContents}.options.tocTemplate\"\n }, {\n source: \"{that}.options.ignoreForToC\",\n target: \"{that > fluid.prefs.enactor.tableOfContents}.options.ignoreForToC\"\n }]\n }\n });\n\n})(jQuery, fluid_2_0_0);\n"]} |